LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Serial versus TeraTerm

Solved!
Go to solution

What is the difference between the way VISA serial sends data and the way TeraTerm sends data over a serial port?

 

I am working with a device that when you send values in a list it is supposed to respond with the values that were set.

 

Using TeraTerm I send SetValues [location:value,location:value,location:value]

 

The UUT responds [location:value,location:value,location:value] as expected

 

But when I use VISA Serial to send the exact same command SetValues [location:value,location:value,location:value]

 

The UUT returns SetValues [location:value,location:value,location:value] the command SetValues was also sent back like there is some kind of local echo turned on.

 

What could be the difference?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 19
(819 Views)

@RTSLVU wrote:

But when I use VISA Serial to send the exact same command SetValues [location:value,location:value,location:value]

 

The UUT returns SetValues [location:value,location:value,location:value] the command SetValues was also sent back like there is some kind of local echo turned on.

 

What could be the difference?


Your device is echoing back the command you send it.  This is actually a remote echo.  Terminal applications such as Putty and Teraterm can automatically handle this as it is constantly reading and it will not display the echo.  Your application just needs to perform 2 reads to read the echo and then read the response.  Or if you want to mimic me, I constantly read the port and only send data back to the main loop that it requests (apply a filter on the read line and decide whether or not to pass it on).  I also have the habit of logging everything that comes from the terminal.  In this situation, the echo makes life easy as I don't have to worry about trying to log what I send out.


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
Message 2 of 19
(806 Views)

It does not appear to be sending back a remote echo and the requested data.

 

I tried two VISA Reads and the first one has the response with the command the second VISA Read just times out. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 19
(791 Views)

Ok, now I'm really confused on what the problem is.  If the device is not sending the echo, then you just need to read once.  Or are you confused about Teraterm showing what you sent?


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 19
(784 Views)

Using Teraterm I send the command "data?list=[{"3036":"I0"},{"3034":"F18000"},{"3035":"F1000"},{"3040":"I5"}]"
The UUT returns "[{"3036":"I0"},{"3034":"F18000"},{"3035":"F1000"},{"3040":"I5"}]"as expected

 

But using VISA Serial I send "data?list=[{"3036":"I0"},{"3034":"F18000"},{"3035":"F1000"},{"3040":"I5"}]"
The UUT returns "data?list=[{"3036":"I0"},{"3034":"F18000"},{"3035":"F1000"},{"3040":"I5"}]"

 

The "data?list=" is still there using visa and I don't understand why.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 19
(770 Views)

Yes, that looks like the device is echoing what you are sending.  Are you also sending a Carriage Return and/or a Line Feed at the end of your command?  It is likely the device is looking for that termination character before it processes the command.


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
Message 6 of 19
(745 Views)

@RTSLVU wrote:

What is the difference between the way VISA serial sends data and the way TeraTerm sends data over a serial port?

...

What could be the difference?


Have you tried displaying the received data in binary encoding?

 

My suspicion is that there might be some terminal control characters that TeraTerm handles and LabVIEW silently drops on regular string display.

0 Kudos
Message 7 of 19
(699 Views)

@crossrulz wrote:

@RTSLVU wrote:

But when I use VISA Serial to send the exact same command SetValues [location:value,location:value,location:value]

 

The UUT returns SetValues [location:value,location:value,location:value] the command SetValues was also sent back like there is some kind of local echo turned on.

 

What could be the difference?


Your device is echoing back the command you send it.  This is actually a remote echo.  Terminal applications such as Putty and Teraterm can automatically handle this as it is constantly reading and it will not display the echo.  Your application just needs to perform 2 reads to read the echo and then read the response.  Or if you want to mimic me, I constantly read the port and only send data back to the main loop that it requests (apply a filter on the read line and decide whether or not to pass it on).  I also have the habit of logging everything that comes from the terminal.  In this situation, the echo makes life easy as I don't have to worry about trying to log what I send out.


I always though echo was a local thing.  Is there a second type of echo handled from the remote side?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 19
(667 Views)

What is the device?

 

NOTE: TeraTerm does actually open an Emulation Window where DOS VT, BS, etc..help navigate the response context in SOME OBSOLETE FW applications.   In those cases (when the fw engineer says "well, we've been working this way since the 1950's") You have to mention that the transistor is 77 years old and 77baud is just as obsolete. 

 

At times you may need to set a DOS Prompt size that is larger than the "boundaries" presented by the '|' and '_' sent to the cmd line area.  The response location is read as well as the character sent.   I've seen this exactly once this century on firmware created by SPX.

 

Is there a "border"

______

|xxxx|

|xx....|    

______

 

on the TeraTerm IO?  I think that I worked around that by sending the response char PREPENDED with the arrow key codes.  But, don't quote me on that.  (I tried to forget that pain)


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 19
(650 Views)

@billko wrote:
I always though echo was a local thing.  Is there a second type of echo handled from the remote side?

It completely depends on the device you are trying to talk with.  For instance, an SSH connection to a Linux CLI will echo back what you wrote to it.  SCPI devices generally do not.  I know Putty has an option (on by default) for a terminal to detect the remote echo and will perform a local echo (ie display what you just typed) if it does not get it.


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
Message 10 of 19
(625 Views)