02-26-2024 08:53 AM
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
Solved! Go to Solution.
02-26-2024 09:11 AM - edited 02-26-2024 09:12 AM
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".
02-26-2024 09:47 AM
Hi thank you, it's working with the \r for the CR !
02-26-2024 09:59 AM
@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.