Virtual Console

Virtuelle_Konsole

CANopen virtual terminal for CiA 417, Object 600Ah
Tip: The Object 600Ah for the virtual terminal will be defined as CiA 417 V 1.0.5. That means that there are some changes to the initial proposal with the object 1026h (CiA 301).

General
A CANopen device can be used or controlled using the Object 600Ah. The display and the keyboard are located in another CANopen appliance (Virtual Terminal)

The mentioned Object should always be included in the drive unit.

There are 2 remote control channels:


 * An input channel (stdin), and
 * an output channel (stdout)

Object 600Ah Subindex 1 is stdin (Standard-input: Keyboard) Object 600Ah Subindex 2 is stdout (Standard-output: screen)

If the signs Object 600Ah, subindex 2 are ready the device send output to the virtual termnial. The zero sign (0) means no sign available. The control sequences VT-52 can be used to control the cursors.

To control a key manually the keycode (1...225) should be written in the Object 600Ah, subindex 1. Some keys will be send as escape keys (VT-52).

Data exchange process via SDO
The output device (virtual terminal) polls the Object 600Ah, subindex 2 cyclically. If it reads a char different than zero (0), it will be displayed on the terminal. The control sequences VT-52 will be used to control the cursor.

If there are no chars available, the polling time could be longer.

To manually control a key a keycode will be written in the Object 600Ah, subindex 1.

Data exchange process via MPDO
There is the posibility of using in- and output data via MPDO to accelerate the process.

Display-output (Device -> Virtual terminal):

COB-ID:      0x500 + Node-ID device Lenght:       8 Bytes Address:     Node-ID device (Source) Multiplexor: 600Ah, Subindex 2 Data:        DWORD up to 4 characters

Keyboard input (Virtual Terminal -> device):

COB-ID:      0x500 + Node-ID virtual terminal Lenght:       8 Bytes Address:     0x80 + Node-ID device (Destination) Multiplexor: 600Ah, Subindex 1 Data:        DWORD up to 4 characters

To switch-on the display-output via MPDO the virtual terminal sends either a number different from zero (0) or Cntrl-A (01h). Cntrl-A activates the time monitoring, that means that the virtual terminal has to send a keycode (eg, Cntrl-A) almost every second. If the device does not recieve any sign in 4s the display-output will be switched-off.

To deactivate the display-output, the virtual terminal sends Cntrl-D (04h) or, if the time monitoring (Cntrl-A) is on, the virtual terminal is automatically switched-off when it does not recieve any sign.

In order not to overload the bus, one should not send more than 2 MPDO pro 10ms (inhibit timer 5 ms)

Character set
The character set ISO-8859-15 (siehe ISO-8859-15) can be used to enconde the characters (umlauds)

Keyboardcodes (Virtual keys)
The following ASCII-codes can be use to control the menu:

The device decides itself how to read the keys. Its assumed that not all the virtual terminals send all the keys.

Proposal for new control sequences
With a new command, the possibility should be created, the properties of the output and input device (terminal) to ask.

The device shall transmit

ESC Z = Identify terminal type

The controller/terminal shall answer

ESC [;;;; ] = Terminal features a_rows, a_columns: ASCII-Mode Count rows/columns g_rows, g_colums:  Graphics-Mode Count rows/columns keymap:            0 = normal/standard, 1 = cursor keys (up, down, left right), 2 = +/- keys (end, -, +, CR)

Example:

ASCII-Mode only and standard keys:   ESC [4;20] ASCII-Mode only and cursor-keys:     ESC [4;20;;;1] oder ESC [4;20;0;0;1] Graphics-mode and standard-key:      ESC [4;20;64;128] Graphics-mode and cursor-keys:       ESC [4;20;64;128;1]

Additionally to enter graphics mode, a command is required:

ESC g = Enter graphic mode