LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send esc serial

I have to send the following string to a serial device:
AE ?
If successfull, the serial device would return AE = ENABLE. if not, it returns AE ??
Well. I tried several methods to send this string to the device, but neither worked.

First: I changed the Send-String Dialog to Hex Code.
I inserted the values 1B 41 45 20 3F 0D 0A (just like it is written in the manual of the device).
But all i got back was AE??
I made a probe to see what string was send: <-AE ?
i dont know if <- is the sign for the ESC.

Second method: i changed to '\' Codes and sent this one:
\1BAE\s?\n\r
same return and same probe.
If i send the char-combination by hyper terminal by just putting the character via keyboard, it works.

has anyone any idea what i did wro
ng???

thanx for any help.
0 Kudos
Message 1 of 3
(2,772 Views)
Are you using VISA write or the old serial drivers - not sure what you mean by "Send-String Dialog"? When I put a probe on a string control set for hex and your values, what I see in the probe is a little square box and then AE ? (LabVIEW 6.1 and 7) so I'm not sure how you're seeing that left arrow character. Also, in your hex example, you end the string with CR and then LF. In your \code example, you've got the opposite - LF and then CR. You could also try using the Byte Array to String function
0 Kudos
Message 2 of 3
(2,772 Views)
Try sending just a newline \n without a carriage return \r.




On Wed, 29 Oct 2003 09:28:52 -0600 (CST), Thomas Beckert
wrote:

>I have to send the following string to a serial device:
>AE ?
>If successfull, the serial device would return AE = ENABLE. if not, it
>returns AE ??
>Well. I tried several methods to send this string to the device, but
>neither worked.
>
>First: I changed the Send-String Dialog to Hex Code.
>I inserted the values 1B 41 45 20 3F 0D 0A (just like it is written in
>the manual of the device).
>But all i got back was AE??
>I made a probe to see what string was send: <-AE ?
>i dont know if <- is the sign for the ESC.
>
>Second method: i changed to '\' Codes and sent this one:
>\1BAE\s?\n\r
>same return and same probe.
>If i send
the char-combination by hyper terminal by just putting the
>character via keyboard, it works.
>
>has anyone any idea what i did wrong???
>
>thanx for any help.
0 Kudos
Message 3 of 3
(2,772 Views)