LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from I60

Solved!
Go to solution

I used to use "Read from I16" VI to read a binary file on Labview 7.1. Now, I'm using Labview 8.5 which has "Read from binary" VI. However, Read from binary VI doesn't have "start with read offset". Could you please teach me how I can take this in a newer version? 

 

 

0 Kudos
Message 1 of 7
(3,734 Views)

Advanced File Functions: Set File Position.

 

Lynn 

Message 2 of 7
(3,730 Views)

Thanks, Lynn. But I got one more problem. Since the data type of my input is "path" but not "refnum" which is input for "Set file position" VI. I know there is a VI converting 'refnum to path', but I don't know how to do the other way around. Could you tell me how to do it?

 

Best,

Jay

0 Kudos
Message 3 of 7
(3,719 Views)
Solution
Accepted by jeongho20000

Jay,

 

Use the open file function.  The Set File Position and Read from Binary File functions can be inside a loop if multiple reads will be performed.  (The image is from LV2009 but I think the functions are the same in 8.x).

 

Lynn

 

File Postion.png 

Message 4 of 7
(3,710 Views)

Should I have "close file" VI?

Thanks,

Jay

0 Kudos
Message 5 of 7
(3,699 Views)

Jay,

 

It is always safe to close each reference which has been opened.  In some cases it is important to do so to prevent memory leaks.  LV can do a pretty good job of closing references on its own, but it is not clear when it does so and when it may not, so closing explicitly is preferable.

 

Lynn 

Message 6 of 7
(3,686 Views)

thank you so much Lynn

0 Kudos
Message 7 of 7
(3,679 Views)