LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read sms problem

 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.

0 Kudos
Message 1 of 8
(3,545 Views)

hi suker,

  Are you able to receive that SMS to the computer..if yes use some string functions to get the temperature and convert to normal floating values and plot...

 

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 8
(3,538 Views)

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

0 Kudos
Message 3 of 8
(3,536 Views)

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 

0 Kudos
Message 4 of 8
(3,475 Views)

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".

Message 5 of 8
(3,459 Views)
Hy try to put a refnum instead a path but it isn't work, pleasee can you help me... i readit all the explanations from help but i guess i dont understand how i have to make the changes to work. can you give me hand.
0 Kudos
Message 6 of 8
(3,399 Views)

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.

Message Edited by James W on 05-18-2010 11:47 AM
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 7 of 8
(3,378 Views)

Thank you very much, for the example. it help me.

 

0 Kudos
Message 8 of 8
(3,317 Views)