LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please help me 2 little question

Hi all
2 little questions:

1)in the count of a read file block how can I insert the EOF(end of file)
condition? instead of use (as now I'm doing) a fixed integer.

2)anyway the array that come up is a 1x480 and i want subdivide it in a
16x30 getting the i-th's 16 elements (the columns) for each of the 30 rows
I've used the decimate array function but unfortunately I have to know
exactly the number of rows that I want, is there a way to set the rows with
a variable number? (getted for example from a digital control)

Thank you very much to any of you that will dedicate me a little bit of his
time.
0 Kudos
Message 1 of 2
(2,399 Views)
1) insert the EOF function after the file open function and before the read. Inputs to EOF are the file reference number, an error cluster and two setting. The outputs are a copy of the file reference number, an error cluster and an offset. If you leave the two setting inputs (called I believe, Offset Mode and Offset Position) unwired, the offset output will be the number of bytes in the file. The Read Characters from FIle.vi routine under the File IO palette shows how this is done.2) If you take the number of values in the 1D array and do a MOD n division (where n is the number of columns in the data) the quotient output from the division will be the number of rows. Besure to trap the error condition where the Remainder output is >0. This indicates a partial ro
w at the end of the data.Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 2
(2,399 Views)