LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication RS232 et Touche d'échappement

Solved!
Go to solution

Bonjour,

 

Je communique avec un indexeur en RS232, je souhaite envoyer la commande <ESC>A0100<CR>, mon problème est que le caractère ESC est la touche echap. Je ne sais pas comment mettre la touche echap dans le string du buffer d'écriture du VISA. Quand je tape la commande directement sur un terminal ça fonctionne.

 

Pouvez-vous m'aider ?

 

Merci d'avance

Maxime

0 Kudos
Message 1 of 4
(483 Views)
Solution
Accepted by MaximeBrrr

Translated to English via Google Translate:


@MaximeBrrr wrote:

Good morning,

 

I communicate with an indexer in RS232, I want to send the command <ESC>A0100<CR>, my problem is that the ESC character is the escape key. I don't know how to put the escape key in the VISA write buffer string. When I type the command directly on a terminal it works.

 

Can you help me ?


Use a string constant and set the display style to "\ Codes".  You can now input the command using  \ codes.  <ESC> is \1B (ASCII hexidecimal value for an Escape character), <CR> is \n.  So your full command string in \ Codes style is "\1BA0100\n".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(470 Views)

Hi thank you, it's working with the \r for the CR ! 

0 Kudos
Message 3 of 4
(452 Views)

@MaximeBrrr wrote:

Hi thank you, it's working with the \r for the CR ! 


Yeah, I often get my Carriage Return and Line Feed flipped.  Good catch.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(443 Views)