LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send commands to Hyperterminal

Solved!
Go to solution

Hello,

 

is it possible to send commands from LabView to Hyperterminal to control a device?

 

At the moment I'm trying to write a .vi to make a long term test of a device by letting him perform the the same measurement several thousand times and reading out two parameters after each measurement. At the moment I'm doing it via the TCP .vis (Visa and Ni MAX isn't working with that device for some reason) but this for some reason not very stable.

After just a few runs of the measurement the communication usually fails and I have to close and open the connection to the device again.

 

In the past it was possible to perform such long term test via Hyperterminal, but this method is not very time efficient since the timing of the commandos can't be controlled properly, so I'm considering at the moment to use LabView to control the timing of the commands in Hyperterminal. But can't figure out how to establish a communication between the two programs.

0 Kudos
Message 1 of 6
(4,726 Views)

Hi GMAch,

 

Hyperterminal usually is used with a serial port.

LabVIEW can also communicate with a serial port (using VISA).

Why don you need a communication between LabVIEW and Hyperterminal, when LabVIEW can directly communicate with your device?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(4,709 Views)

In this case I want to use Hyperterminal for the communication via Ethernet.

 

The problem with the LabView communication is that it is apparently not stable enough for a long term measurement. I'm trying to solve the stability problem, but in case that doesn't work out using Hyperterminal would be my Plan B.

0 Kudos
Message 3 of 6
(4,695 Views)

GMAch wrote:

The problem with the LabView communication is that it is apparently not stable enough for a long term measurement.


Then there is something wrong with your code and/or instrument.

 

Are you including termination characters like Hyperterminal does?  Do you go a long time without sending anything back and forth over the Ethernet port?


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 6
(4,682 Views)

  Do you go a long time without sending anything back and forth over the Ethernet port?

Apparently the the device terminates the connection after 1 minute without communication, so my immediate problem is hopefully solved. Don't know why that never caused a problem with Hyperterminal.

 

But I would still like to know if it is possible to control Hyperterminal with LabView.

0 Kudos
Message 5 of 6
(4,678 Views)
Solution
Accepted by topic author GMAch

Documentation on Hyperterminal beyond use as a terminal program is sparse to non existent. It does not seem to implement any official remote programming interface itself like ActiveX or even true old fashioned and completely obsolete DDE.

So basically the only way to control it would seem to be through applications like AutoIt or similar that simulate GUI interaction to a program. Not really fun to do.

When using other terminal emulation applications you might have some more success although there is none that I know of that supports a fully open remote control API. Teraterm has a macro application that you can call through System Exec.Basically it is a sort command line version of Teraterm that you can call with command line parameters to execute. Works fine for simple tasks like connecting to a target and executing a few commands, but not for a lengthy data exchange with the device that requires to go back and forth between LabVIEW (or any other application) and the Teraterm Macro executable. Putty is another possibility with similar limitations.

Putty can be integrated with LabVIEW through use of standard IO redirection to Pipes, and I have developed an OpenG library to do this redirection but it never quite got fully tested and released. In the meantime some other people have developed .Net based pipe redirection interfaces which might be able to do that.

But none of this is going to be trivial.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(4,660 Views)