06-30-2009 09:16 PM
Hi, can somebody help me insert variables into a text string? I am using the "Basic Serial Write and Read.vi in labview.
I need to send the following string to the serial port:
- AT$$INPUT1SMSPHONE=phone1,phone2,phone3
- AT$$INPUT1SMS_WSEC=5
- AT$$INPUT1SMS_DATAON=TYPE SMS MESSAGE HERE
How do I make a vi with phone1,phone2,phone3 and TYPE SMS MESSAGE HERE as variables and send it to the serial port?
If somebody could do an example vi it would be fantastic.
Kind regards,
Mark
Solved! Go to Solution.
06-30-2009 09:29 PM
markwtc,
Use the Format into String.vi. I attached an example (LV86) and png. Basically, replace your string tokens (phone1, phone2, etc) with "%s" format specifier. There are a million ways to format variables into strings using this vi. Dig through the help and have fun!
-cb
06-30-2009 11:06 PM
Thank you for your prompt reply. Your example is perfect thanks mate.
Cheers,
Mark
07-01-2009 12:49 AM
Then please mark -cb's message as the solution to your question rather than your own thank you message. If you go to the Options menu to the upper right of your message, you'll be able to unmark yours as the solution. Then go to cb's message and mark it as the solution.