03-06-2013 06:25 AM
Hi sirs...
I used fopen() in labview,it is not working.Is that i can use fopen() works in labview?
please help me as i am new to labview.
Thanks in advance
Solved! Go to Solution.
03-06-2013 06:42 AM
Can you provide some description of how you're trying to do this?
You realize that LabVIEW is not text-based, right?
Are you just looking for an equivalent method? http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/vi_open_front_panel/
03-06-2013 06:55 AM - edited 03-06-2013 07:01 AM
As Chris points out, LabVIEW is not a text based programming language.
So i recommend you to work through the LabVIEW in three hours tutorial.
Pay special attention on file IO functions.....
Norbert
EDIT: Maybe you should better look into the tutorial LabVIEW in six hours (same link as above) since it better elaborates on the basic file IO functions rather than only ExpressVIs.....
03-06-2013 08:01 AM
Norbert,
Thanks for recognizing the file I/O call . . . wow, it's been a long time since I coded that in text based . . .
03-06-2013 10:06 AM
Hi Sir.
Thanks for ur previous reply.![]()
As i need to write 'n' number of data(integer type) in to a file,I am not going with ArrayToFile.(becoz array size is not constant)
Rather I am trying with C file handlers i.e fopen() so that i can put 'n' values.
In File IO I could open FileOpen() where as WriteFile() i can not use becoz in this content to be written is char buff[],
whereas i want long int to be written.
03-06-2013 10:41 AM
Why are you even using LabVIEW? There is no such function as ArrayToFile and none of the File I/O functions in LabVIEW care about a constant array size. I really think you should take those tutorials and attach some of your code so we can see where you are having issues.
03-06-2013 10:45 AM
@pals wrote:
Hi Sir.
Thanks for ur previous reply.
As i need to write 'n' number of data(integer type) in to a file,I am not going with ArrayToFile.(becoz array size is not constant)
Rather I am trying with C file handlers i.e fopen() so that i can put 'n' values.
In File IO I could open FileOpen() where as WriteFile() i can not use becoz in this content to be written is char buff[],
whereas i want long int to be written.
becoz? What language is that? You can't spell because?
Sounds like you should stick with C or possibly use LabWindows/CVI.
03-06-2013 10:46 AM - edited 03-06-2013 10:49 AM
Use the Write to Binary File Function and wire the long int to the data variant input.
Be aware that LabVIEW is big endian. There is an optional input on this function to specify how to write (big or little)
Writing Binary Files with LabVIEW That Can Be Read by Other Applications
03-06-2013 10:52 PM
Dear Sir,
I am sorry for that.
03-06-2013 10:59 PM
Hi Sir.
Thank you for the reply.It helped me to go through the tutorials.