LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with the output form after communicating with the instrument using rs 232

hi
i am new to labview. i am having a problem with output .i am using micromega temperature controller and after communicating with the device using rs 232 cable,the output with i am getting is not proper. i am sending a command '*X04' to read the value from the device and i managed to get value from the output but its of form ' *X04\r\23.1\r " where as the output should be only 23.1. so please help to solve my problem.
                                                                                                                                                                                                  thanking you
                                                                                                                                                                                                       naveen 
0 Kudos
Message 1 of 26
(3,719 Views)
A scan from string function can be used as per the attachment. The double \ ('\\') is in the format string in order to interpret the '\' characters in your input string as literal characters and not special formatting.
 

Message Edited by Dennis Knutson on 07-10-2006 03:53 PM

Message 2 of 26
(3,708 Views)
hii
i am new to labview.iam using scan from string function but its giving error " error 85 occured at scan form the string " and poss reason is scan failed.so pla can you help me wt going wrong and wt should i do.
                                                                                                            thanking you
                                                                                                                 naveen
0 Kudos
Message 3 of 26
(3,687 Views)
You will get a scan failed when the input string does not match the format string. If your input string matches what you previously posted and you entered the format string exactly as in the picture, the scan will not fail. Determine what is different and post back. If you want, post the VI you wrote along with a real input. Since you are getting the string from an instrument, make sure that you have an indicator at the VISA Read. Run the VI and then select Operate>Make Current Values Default. Save the VI.
Message 4 of 26
(3,679 Views)

hii

i am posting my VI.The output what i want is only the temperarure ie 22.6 or any floating point digit,

thank you

naveen

0 Kudos
Message 5 of 26
(3,677 Views)
Can you save it as LabVIEW 7.1?
0 Kudos
Message 6 of 26
(3,672 Views)

hii

i saved in labview 7.1

thaank you

0 Kudos
Message 7 of 26
(3,669 Views)
That's a 8.0 file as well.
0 Kudos
Message 8 of 26
(3,664 Views)

hii

i have both labview 7.1 and 8 but when i am trying to open 7.1 ,labview 8 is opening.

so can u help me any in solving my probelm

thankinh you

naveen

 

0 Kudos
Message 9 of 26
(3,660 Views)
If you put the format string as Dennis suggested in his earlier post, it works. You have the format string as "%2f %2f" whih does not produce the result you want. Look at the Contect Help for Scan from String for more information.

Lynn
Message 10 of 26
(3,657 Views)