Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to RS232

Hello @all,

i'll connect my µC with the RS232. To check the connection, i have a connect.vi. In this vi, i'll send the letter "D". The µC returns "D", if it was okay. And now there is my problem. How can i check, which letter i get. If it's "D" than i will get a true and it's any other letter or what ever i need a false.

For better understanding here is the vi.

But in this vi, i get only a false, if i get an empty string.

Thank you, all...

By Thomas
0 Kudos
Message 1 of 5
(3,192 Views)
If you want to see what the connection is returning, just wire the VISA Read to your string indicator. I don't understand why you have two different indicators - one for the true case and one for the false. Use a single one outside the case statement. Use Format Into String or Concatanate String to add your message to the read result.
0 Kudos
Message 2 of 5
(3,169 Views)
Hi,

the two indicators are the problem. But the vi requires the a true-indicator and a false-indicator. But i can't specify the false-indicator, because of an error, i don't know what i receive.

if i receive "D" -> string-output--->connection o.k.

receive any other kinds of string or no string-----> string output----> connection failed.

Do you know what i mean?

Thanxs Thomas
0 Kudos
Message 3 of 5
(3,164 Views)
No, I don't understand why you need two indicators. Can't you simply do like the attached?
0 Kudos
Message 4 of 5
(3,156 Views)
Hi Dennis,

thanks for your help, thats it what i need.

Cu Thomas
0 Kudos
Message 5 of 5
(3,143 Views)