LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Streaming data acquired by two E series devices connected by RTSI

I use two PCI-MIO-16E-1 cards, connected by RTSI. I'd like to stream the data from both cards to a binary file, after having added a header to it.

For tests, on the channel 0 of each card is applied the same square wave, 100 Hz.

The hardware support RTSI. I use LabView 6.1.

Till now I have:

1. Combined the "Two E-series Shared ScanClk.vi" and the "High Speed Data Logger.vi" into a DAQ VI. To do this, I have "doubled" and adapted the "High Speed Data Logger.vi". For testing purposes the data are
stored in two files, always the same ones (the old ones being overwritten after each acquisition).

2. "Doubled" and adapted "High Speed Data Reader.vi" into another VI, for reading from both f
iles, mentioned earlier.

What already works:

- The headers for both files are correctly stored (VI point 1.)
- The acquired data from the first card (device 1) are correctly stored (VI point 1.)
- The VI (point 2.) that reads both files and displays the results works

What doesn't work:

- The acquired data from the second card aren't stored at all (VI point 1.)
- An error message says: "Error -10608 occurred at AI Buffer Read. Possible reason: NI-DAQ LV: No transfer is in progress for the specified resource."

I think that I understand this message, but I don't know how to continue.

My DAQ VI is attached, but can be also downloaded from (please click the link, then the link on that page; about 100K, zipped):

http://www.swissheartnet.unibe.ch/labview.htm

Any suggestion will be highly appreciated.

Regards,

Victor Manta
0 Kudos
Message 1 of 3
(2,555 Views)
Isn't this the same question you posted yesterday?

Let me try again.

In LabVIEW, the order in which operations are caried out is determined by data dependency. What this means is that any piece of your diagram that requires inputs on another piece, has to wait on those pieces to finish before it can start.

A variation on this "dependancy" is that
"Any piece of code that has all of it inputs available is free to run at any time."

In your code, you pass the task ID from the inititalize and set-up tasks to your two loops. At that point, both of your loops have all of their inputs avaialable so both can and will runn at the same time. When your top loop finishes, it closes the task ID you are using to do the I/O. It is because the first loop closes this task,
that the second loop enounters the error.

If you want to keep using the same task ID for the second loop, you have to make sure the top loop does not close it before the bottom loop is done.

You can do this by putting both of your data collection loops inside a single frame sequence structure. Make sure the code that close the task ID's is outside this new seq structure.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,555 Views)
I haven't seen answers to my earlier postings, after having delivered supplementary information. Anyway, thanks a lot for this one!

I have done what it seemed to me as the most logical thing, i.e. to separate the task IDs. One thing is already won: no runtime errors anymore.

But... it still doesn't work, because only one channel is streamed, as before.

I have taken the first task ID out from the last VI in the top chain (Route Signal - none 1)and I have routed it into the first loop. I have taken the second task ID from the last VI of the the second chain (AI Control) and I have routed it into the second loop.

This didn't work, as mentioned. The whole worked sometimes (1 time of maybe 6) when I cross the wires described above.

Where could be t
he problem? TIA.

Victor
0 Kudos
Message 3 of 3
(2,555 Views)