LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using tilde(~)

Solved!
Go to solution

Hi,

   I'm trying to write ~ to the serial port of a device that I'm trying to control; ~ is the only command that can be used to exit a certain menu.  If I issue ~ manually via the tera term the command works just fine, but Labview seems to have trouble.  I have confirmed that I'm entering 7E hex, and if I monitor the serial(rx only) port of the device the command Labview sends appears to be correct

 

Thanks in advance

0 Kudos
Message 1 of 20
(3,866 Views)

Do you need to send a carriage return or line feed after the tilde? When you use TeraTerm, do you hit Enter after you send the tilde?

0 Kudos
Message 2 of 20
(3,852 Views)

I wonder if you have to add the Line Feed Constant of '\n'.

I usually have to add that character in the end of the command when I sent the command.

You can check your command by selecting the Codes Display of your command string.

0 Kudos
Message 3 of 20
(3,851 Views)

Thanks for the quick replies.  I don't need a line feed constant but have tried that as well. 

0 Kudos
Message 4 of 20
(3,837 Views)

Can you send other commands successfully without any error?

0 Kudos
Message 5 of 20
(3,825 Views)

William,

  Yes, I'm able to successfully execute other commands even stepping back a directory (cd ..) with no issue.  Is it possible that ~ is a taboo character in Labview; I wasn't able to find anything stating this to be true.

   

0 Kudos
Message 6 of 20
(3,822 Views)
Your string control is set for hex display or are you converting the string some other way - i.e. typecast?

You mention a menu. Is the instrument using something like a vt100 display?
0 Kudos
Message 7 of 20
(3,810 Views)

Hi Dennis,

     I attached the very simple VI that I'm trying to execute; I'm not a labview master.  I'm trying to execute "tilde period line return" (~.\n); don't really need the return.  The unit is running Linux, but again I can execute this command from tera term w/o an issue.  I believe the trouble is with ~ because I sent ~ via tera term then just ran "." in labview and it worked.

 

thanks

 

 

0 Kudos
Message 8 of 20
(3,789 Views)

Mike_RF wrote:

     I attached the very simple VI that I'm trying to execute; I'm not a labview master.  


That's not a VI, it is a word document containing a picture. Pretty useless to us. Attach the VI instead.

 


@Mike_RF wrote:

I'm trying to execute "tilde period line return" (~.\n); don't really need the return. 


\n is "newline". A "return" is typically \r. Why do you add a return (or whatever) if you don't really need it?

 

0 Kudos
Message 9 of 20
(3,781 Views)

Try putting an indicator on the Error Out terminal of the VISA Write. Is there an error?

 

I don't think there's anything special about the tilde character. Can you disconnect from the device, jumper the send and receive pins together, write a tilde, and then read it back?

 

Please don't use Word for screenshots. LabVIEW makes it easy to share code using "snippets" saved as PNG graphics, which you can easily upload to this forum using the Insert/Edit Image feature. Select the code you want to share, then choose Create VI Snippet from Selection on the Edit menu.

0 Kudos
Message 10 of 20
(3,777 Views)