LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fixed size string and cluster files.

Hi, i need help for 2 things :
- How can i limit the string size that a user can fill. (example, 8 characters max).
- I 'd like to make a file containing 1 (big)cluster / record, with the possibility to modify then with the record number , but when i read it back, it says EOF reach. ( i join my .vi). I wish I could make files that work like those in basic/C programs.
Thank for help.
0 Kudos
Message 1 of 8
(3,654 Views)
for your first question, look here:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000E72C0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=%22length+of+string%22+limit&USEARCHCONTEXT_QUESTION_S=0

for q2, not sure, but have you tried setting convert EOL to true on read file vi? don't forget to close your references if you get it working...
0 Kudos
Message 2 of 8
(3,652 Views)
As far as your second question is concerned, could you post an example of the VI that you're using to create the file and an actual data file itself? It's possible that the datatype in the write and read don't match.
0 Kudos
Message 3 of 8
(3,652 Views)
Here you are Dennis.
Thank for caring.
0 Kudos
Message 4 of 8
(3,652 Views)
Okay, I see where you made your mistake. In the read VI, wire the datatype to the Open File function and not the Read File. You can also write the data without converting everything to a string. I've attached modified versions of your VIs that do it that way.
Download All
0 Kudos
Message 5 of 8
(3,652 Views)
thanks a lot, i m such a noob. 😉

1 more thing please, is it possible to write and read fixed length string files, and access them by reccord numbers. Like 'get'/'put' in BASIC language or 'seek' in C ?
0 Kudos
Message 6 of 8
(3,652 Views)
HI DAVID,

Did u get rid of that "fixed string" problem.. I am also facing same.. If u can throw some light on it.


I want to save binary file of labview  which is also readable by "C langauge"..

Regards,
Cyborg
0 Kudos
Message 7 of 8
(3,396 Views)

Hello Cyborg,

I would take a look at this forum post to get started.

Have a great weekend!

Janell R | applications engineer

Message 8 of 8
(3,376 Views)