LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read From I16 File in LV 8.0.1

I can't find this VI on palette. I used them in 7.1 but in LV 8.0...there isn't.
Strange is that I found it in: c:\Program Files\National Instruments\LabVIEW 8.0\vi.lib\Utility\file.llb.
What am I doing wrong? Why isn't on the palette?


Other thing I am looking for is "error constant" or "error ring" - I'm not sure with the correct name. It was ring with desciption of errors. It wasn't necessary to know the error number, only wire this "error constant".

Thanks all
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 1 of 9
(3,485 Views)
Just use "read from Binary File" and wire an empty I16 array to the datatype input. 😄
 
0 Kudos
Message 2 of 9
(3,482 Views)
Hi Altenbach,
I already tried, but failed...
Whats wrong?

Thanks again
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 3 of 9
(3,477 Views)
Read it as a 1D I16 array. LabVIEW has no way of knowing how the rows and columns are arranged, it's just one linear stream of data in the file. You can also get rid of the byte swapping and set the byte order directly.
 
After reading, reshape the 1D array to a 2D array of desired size. You need to know at least one of the dimension sizes.

Message Edited by altenbach on 07-10-2006 05:11 PM

0 Kudos
Message 4 of 9
(3,474 Views)
I haven't tried, but you might possibly also define the 2D size by wiring a cluster of the row and column numbers to the "count" input. The online help is a bit vague here.
 
(Check deep inside the old "Read from I16" for an example).
0 Kudos
Message 5 of 9
(3,467 Views)
Hi,
I'm still having problems. I know the data file consist of 2columns and 3600rows, but always error occurs.
jochynator
LV 8.0.1, WinXP Pro
Download All
0 Kudos
Message 6 of 9
(3,462 Views)
Sorry, you need to wire a scalar I16 to the type, of course. My mistake.
 
Still, your file only contains 3504 rows, so you cannot read 3600x2x2bytes (14400bytes). Attached is a simple example that works.
 
If you can guarantee that the size is correct, you can wire 3504 to the count cluster and leave out the first two file operations (dialog and sizing).
 
Try this!

Message Edited by altenbach on 07-11-2006 08:25 AM

Download All
Message 7 of 9
(3,453 Views)
Hi and thank you very much. Strange is, that I'm sure that the data file contains 3600 rows! I'll think about it and I'll write tomorow.

Thanks a lot!
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 8 of 9
(3,439 Views)
Hi again,
You're right the datafile consist of 3504 rows. It was cut during measuring. It should have 3600 samples. Strange and funny...

Thanks!
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 9 of 9
(3,422 Views)