Showing results for 
Search instead for 
Did you mean: 

Sending escape character code via Serial port

So im trying to control a temperature probe that is connected to the serial port. I have the control codes given by the manufacturer and can use them in hyperterminal.
When i try to do it in labview its like nothing happened.

To send an instruction in hyperterminal - requires to first press the escape key and then type in a code
ESC PS=1 \n

So ive tried everything in labview converted the ESC key to HEX but still it doesnt work. Can someone help?
0 Kudos
Message 1 of 8
It should work assuming you have the correct hex code and are actually sending the line feed code and not the characters "\" and "n". Why don't you post the code that you're using. If you're using any string controls, etc., enter the values that you've been using, go to Operate>Make Current Values Default, and save the VI before posting it.
0 Kudos
Message 2 of 8
Heres what i did
0 Kudos
Message 3 of 8
In your first post, you say you're sending a line feed but in the example you posted, you're sending a carriage return. Is that because you've tried it both ways and neither works? I don't see anything wrong with the way you're sending the ESC or the commands. Maybe you can try sending both a CR and LF. Do you read anything at all or does it just timeout with no data?
0 Kudos
Message 4 of 8
Oops in my first post i meant i sent "\n" - i believe this makes Labview send both CR and LF. I havent done it individually coz it didnt work in the past.

I dont know what to do  
0 Kudos
Message 5 of 8
Yeah i see that the code has only a carriage return ill try out different combinations  of CR, CR & LF, and just plain '\n' and let you know
0 Kudos
Message 6 of 8

Where you able to figure this out? As I am trying to so the same thing and it is not working. Please let me know. Thank you.

0 Kudos
Message 7 of 8

I'm not sure if they figured out a solution, but i had a problem talking to an instrument where it worked in Hyperterminal but not in labview.  Turns out that i had to write characters one at a time.  This example helped me. Not sure if this is your problem but a little FYI either way.



0 Kudos
Message 8 of 8