Reading and Writing Files
Reading and Writing Files
(OP)
Another one: (LabView 7.1)
I'm trying to write a file containing 3 lines with 3 numeric data.
I've tried using the Express Write LVM File, and it creates the file allright (without headers and with time column). But when I try to read from it, it returns an error saying that The File has invalid data. The file LabView wrote himself!
Then I'm tried not using the Express VI and make the write function with other VIs (opening the file, writing/reading it and closing) but it doesn't work as well.
I simply want to read and write a binary file containig 3 numeric values. This should be simple. Please help, I know beginners make a lot of "stupid" questions, but we have to learn somehow.
Thanks in advance.
I'm trying to write a file containing 3 lines with 3 numeric data.
I've tried using the Express Write LVM File, and it creates the file allright (without headers and with time column). But when I try to read from it, it returns an error saying that The File has invalid data. The file LabView wrote himself!
Then I'm tried not using the Express VI and make the write function with other VIs (opening the file, writing/reading it and closing) but it doesn't work as well.
I simply want to read and write a binary file containig 3 numeric values. This should be simple. Please help, I know beginners make a lot of "stupid" questions, but we have to learn somehow.
Thanks in advance.





RE: Reading and Writing Files
Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.
RE: Reading and Writing Files
- Save to one file
- Overwrite file
- No headers
- Empty time column
- Delimiter: TAB
And put an array created with the Build Array VI in the signals input.
---------------------------------------------------------
For reading it, I've configured the Read LVM File Express VI with the following settings:
- Retrieve segments of original size
- Relative to start of measure
- Read generic text files
- Delimiter: TAB
- Start row of numeric data: 1
- First column is time channel
- Decimal point: dot
And using an Index Array VI to read each element to a different variable using 3 constants (0, 1, 2) as it only stores 3 values.
With this configuration I solved the invalid data problem. But now it gives me another error:
"LabView: End of file encountered
---
NI-488: Invalid argument or arguments"
Any ideas?
RE: Reading and Writing Files
How do I do to "Reset" the Read LVM File Express VI to start reading from BOF every time it is executed (as it does not have a Reset input)?