LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a VT100 emulator

Hi,
I need to create a terminal emulator (VT100) with labwindows-CVI for
an instrument connected to the serial port.
I am familiar with the serial communication, but not very much with
terminal emulation.
Is there a tool or some code from where I can start?
Anyone has ever written a similar application?
Thanks
0 Kudos
Message 1 of 3
(4,392 Views)
Hello-

I didn't find any examples of this type of application. It's probably quite simple. I'd use VISA commands instead of serial commands for later expandability (VISA 2.5 can use TCP/IP).

Simply install a callback for VISA data received. Have the callback show the data receieved when it is called. Then, do a loop with a scanf for line-buffered input from the keyboard. After the scanf returns, simply do a viWrite with data returned from scanf.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,390 Views)
For a VT100 emulation you have to read every character coming in fromthe
serial ports. equences of characters starting (usually 2 or three) with the
code ESC should be kept in a buffer. These character sequences have to be
compared with a known table and the be instructed to do things such as move
the cursor around, make text blink, clear the teminal page do a print screen
etc. VT100 was a very popular emulation back when computers were text only.
So you have to emulate also a screen with 80 rows by 25 lines (24 for I/O 1
for status information) you should also use a fixed sized font such as
Fixedsys or courier, since some applications rely onspacing or tabbing to
display columns or even ASCII art.

Good luck

L Villa
"Elio Fungi" wrote in message

news:55dac88b.0111090210.5d07c199@posting.google.com...
> Hi,
> I need to create a terminal emulator (VT100) with labwindows-CVI for
> an instrument connected to the serial port.
> I am familiar with the serial communication, but not very much with
> terminal emulation.
> Is there a tool or some code from where I can start?
> Anyone has ever written a similar application?
> Thanks
0 Kudos
Message 3 of 3
(4,390 Views)