LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bin file as DAQ output

Dear Group,

rather than a DAQ system I have binary files
containing data quadruples (long,double,double,double)
streamed at 500 Hz.

Now I want to stream the data from the files
into a vi as if the data were coming from
an actual measurement.

Can someone please hint me to an infosource
concerning this problem or even to a ready-
to-use vi?

YES-I am a beginner with LabVIEW 😉

TIA,
Peter
0 Kudos
Message 1 of 2
(2,804 Views)
Use the File Open.vi outside of your "Acquisition and processing" while loop. Pass the file refnum and the error cluster into your loop (it's best to use shift registers for both of these). Use Read File.vi (not read characters or lines) and set position mode to "Current" (so each read will return consecutive data and not start over) and wire "count" with the number of bytes to read (in this case, long = 4, double = 8, so 4 + 8 + 8 + 8 = 28). Take subsets of the string returned by the read and use Type Cast.vi to convert them to the appropriate types. Don't forget to close the file refnum at the end of the application.
0 Kudos
Message 2 of 2
(2,804 Views)