LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Backslash Codesin string

I am using the Basic Serial Write vi to write to a SMAC actuator that needs a Carriage Return. I am writing the string to be sent from several different vis. I am having trouble getting the backslash codes to work consistently. sometimes i get \\r as a readback and sometimes carriage return at all. Should i only check backslash codes on the string control in Serial Read and Write vi. I tried to just add /r to the string to write in Serial Write vi, but it didnt like that too much. Does anyone have experience doing this?. Any help is Greatly Appreciated.
0 Kudos
Message 1 of 2
(2,596 Views)


GRMAN a écrit:
I am using the Basic Serial Write vi to write to a SMAC actuator that needs a Carriage Return. I am writing the string to be sent from several different vis. I am having trouble getting the backslash codes to work consistently. sometimes i get \\r as a readback and sometimes carriage return at all. Should i only check backslash codes on the string control in Serial Read and Write vi. I tried to just add /r to the string to write in Serial Write vi, but it didnt like that too much. Does anyone have experience doing this?. Any help is Greatly Appreciated.


Are you sure you are not mixing normal string and '\' code display ? You could simply append the CR constant to the string, or even configure the serial port to add the CR automatically for you (use the ASRL End Out property node)

 
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 2
(2,588 Views)