LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display more than 1 string result via serial port

ok guys..i try to explain my prb..
 
 
right now i can display 1 string input to DBL...but my main task is to input more than 1 string... how do i do that?
 
 
0 Kudos
Message 1 of 7
(3,018 Views)
Hi caltex,

please explain a little more in detail!
Do you want to display results on a connected device? Just send two values to the device instead of one...
Do you want to input values from a device via serial port? Just read two times...

Do you have values to convert from string to double? Use 'Scan from string' with proper format string. Or if you have a string array you may use the 'Fract/Exp String To Number' function.

Do you want to convert 2 DBL to one string? Use 'Format into String' with proper format string.


Message Edited by GerdW on 07-18-2007 01:17 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,014 Views)

i will try with your solution...

 

by the way how do i key in more than 1 string?

my first string is denoted by @ ,#

can i do this @50#100@500#40? but everytime the meter only show the first input @50#100, cant detect @500#40. how come?

0 Kudos
Message 3 of 7
(3,006 Views)
Hi caltex,

have you tried to split this string into two commands '@50#100' and '@500#40' and send them with two serial write commands?
Maybe your 'meter' (?) only scans the string from start until it finds 2 parameters. By sending two times the meter will receive 2 commands and will (hopefully) scan them both.
Maybe you have to use some kind of 'End of Transmission' character too?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,000 Views)
Maybe i have to use some kind of 'End of Transmission' character? but what will be the character?
0 Kudos
Message 5 of 7
(2,990 Views)
You aren't providing a lot of information to help you with and now you are just confusing things. Your original question was about displaying more than one result and now you are asking about sending more than one command. Whether or not you can send multiple commands with a single write is dependent on the instrument and you haven't even provided the make and model. Do you have a programming manual for it? What does it say? GPIB instruments or serial instruments with a GPIB option will usually take multi commands by separating the commands with a ';' character. Many serial only instruments do not have this option. The manual should hvae this information as well as any termination character. Post the manual or a link to it if you are having trouble understanding what is there.
0 Kudos
Message 6 of 7
(2,982 Views)
What specifically is the device that you are talking to?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 7
(2,974 Views)