LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

send ctrl-x in serial port?

Can someone help ,
 
How do i send "ctrl-x" in serial com port?
 
For example,
ComWrt ( 1 , "\n" ,  StringLength("\n") );
 
 
Thanks,
 
 
0 Kudos
Message 1 of 4
(7,508 Views)

Ctrl-X, or Cancel command, is ASCII character 24. You can format a string with this character and send the string:

sprintf (string, "%c", 24); ComWrt (port, string, 1);

You should be able to embed it directly into a string or send directlt to the port using "\030" (octal code of Ctrl-X):

ComWrt (port, "\030", 1);



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(7,494 Views)
In addition to Robert's response, CTRL+A, CTRL+B, CTRL+C....CTRL+Z are all known as control characters. Every control character has the decimal value equal to the control letter's order in the alphabet, starting with A=1. For a more comlete list of Control Characters, check out the following table found on the wikipeia site:

Control Characters in US-ASCII

Logan S.
0 Kudos
Message 3 of 4
(7,489 Views)
Thanks for the all the help.
 
Im very happy now.
 
Thanks
0 Kudos
Message 4 of 4
(7,485 Views)