05-10-2010 02:38 AM
Hy i'm new here. i want to take same valoues from a temperature senzor and send them through sms to a computer. i use phone as modem gsm, is connect on usb port but in labview i use the virtual com made by phone. I know how to read an sms, but the proplem is: when i receive that sms with the value, i want to store them on hdd to a text file and plot them. I dont know how to do it.
please help.
05-10-2010 02:54 AM
05-10-2010 02:54 AM
In LabVIEW go to Help>Find Examples then select Fundametals>File Input Output. There are lots of examples how to read and write txt files.
Christian
05-16-2010 06:54 AM
Hey i received sms, i readit, i save the value to a text file, im able to plot it. But the problem is every time i want to save te value, the text file is been rewrite().
I want to go to the next line every time, i read a new sms and put that values in the text file, and what was before has to be keepit, and write to the next line.
plese help
05-16-2010 07:48 AM
This is directly from the LabVIEW Help for Write to Text File:
"file can be a refnum or absolute file path. If you wire a path to the file input, the function opens or creates the file before writing to it and replaces any previous file contents. If you wire a file refnum to the file input, writing begins at the current file position. To append to an existing file, set the file position to the end of the file by using the Set File Position function. The default is to display a file dialog box and prompt you to select a file."
Always, always, always have context help open and always click on 'Detailed Help".
05-18-2010 03:15 AM
05-18-2010 05:44 AM - edited 05-18-2010 05:47 AM
Here is a VI in 2009 that should help explain a bit of how to do the file write part.
Input the full file path and if the file does not exist, it is created as long as the directory path is a valid path.
You should really break it down into 2 parts - File open, and file write, then the write can be looped many times if required without havinig to open or close the file. You will need to close the file after using this VI, but you may want to do other things first.
Hope this helps with your learning. I've tried to document the VI to help you as much as possible to explain what I've done.
James
Edit: A File Refnum is created after you have opened a file the first time or done some other action that creates a file refnum - I'm sure there are more than I know, the safest thing is to open the file with a path 1st time, then with the refnum through from there.
05-24-2010 03:32 AM
Thank you very much, for the example. it help me.