LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Datalog Files with record length

How do I write a Datalog File with a record length of 128 int16s?
0 Kudos
Message 1 of 5
(2,905 Views)
Just use the Write to I16 File.vi. It's on the File I/O>Binary File VIs palette.
0 Kudos
Message 2 of 5
(2,905 Views)
Does that mean that the Write to I16 File.vi automatically writes blocks (record lengths) of 512 bytes? Can I then use an Open(?,recordlength=fixed,recl=128) directly in Fortran to read this file?
0 Kudos
Message 3 of 5
(2,905 Views)
Each I16 number in LabVIEW that you write uses 2 bytes because 8 bits equals 1 byte. If you write 128 numbers, the file will be 256 bytes long. You can modify the VI to write I32 (4 bytes) or I8 (1 byte) just by changing the representation of the number. You also need to change the subVI that does the actual writing (Write File+ [I16].vi). Be sure to rename the VIs that you change. I would think that your Fortran program would work as long as the data types match.
0 Kudos
Message 4 of 5
(2,905 Views)
Is there any way that I can be sure that my I16 file has 128 columns and n full rows of data?
0 Kudos
Message 5 of 5
(2,905 Views)