Virtual Console: Difference between revisions

From CANopen-Lift
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:


== CANopen virtual terminal for CiA 417, Object 600Ah ==
== CANopen virtual terminal for CiA 417, Object 600Ah ==
<div style="border:1px solid #8080FF; background:#E0E0FF; font-size:100%; padding:5px; margin-top:5px;">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). </ Div>>
<div style="border:1px solid #8080FF; background:#E0E0FF; font-size:100%; padding:5px; margin-top:5px;">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). </ div>>


=== General ===
=== General ===

Revision as of 11:46, 12 September 2013

right

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). </ div>>

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 symbol different than zero (0), will be displayed on the terminal. The control sequences VT-52 will be used to control the cursor.

If there are no signs the poll lenght will be shorter.

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 activate the display-output, the virtual terminal sends Cntrl-D (04h) or, if the time monitoring (Cntrl-A) is on, the device 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:

Dez. Hex Char Meaning
24 0x18 CAN End key (Cntrl-X)
45 0x2D '-' Minus key
43 0x2B '+' Plus key
13 0x0D CR Enter key
27 65 0x1B 0x41 ESC A up arrow key
27 66 0x1B 0x42 ESC B Down arrow key
27 67 0x1B 0x43 ESC C right arrow key
27 68 0x1B 0x44 ESC D left arrow key
27 80 0x1B 0x50 ESC P F1 key
27 81 0x1B 0x51 ESC Q F2 key
27 82 0x1B 0x52 ESC R F3 key
27 83 0x1B 0x53 ESC S F4 key


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

Minimun requirements for the VT52 control sequences

Code Name Meaning
ESC A Cursor up The cursor will move up one line. If it is y in the first row there will not be any reaction.
ESC B Cursor down The cursor will move down one line. If it is in the last row, there will no be any reaction.
ESC C Cursor right The cursor will move to the left one row. Total right, no reaction.
ESC D Cursor left Der Cursor wird um eine Spalte nach links bewegt. Ist er schon ganz links, erfolgt keine Reaktion.
ESC E Clear home Der Bildschirm wird gelöscht, der Cursor geht nach links oben.
ESC H Cursor home Der Cursor geht nach links oben.
ESC I Cursor up and insert Der Cursor geht um eine Zeile nach oben. Ist er schon in der ersten Zeile, wird eine Leerzeile eingefügt. Die Folgezeilen rücken dann nach unten.
ESC J Clear to end of frame Der Bildschirm wird ab Cursor bis zum Ende gelöscht.
ESC K Clear to end of line Die Zeile wird ab Cursor gelöscht.
ESC L Inser line Leerzeile wird an aktueller Cursor-Zeile eingefügt. Der Rest des Bildschirms wir um eine Zeile nach unten geschoben.
ESC M Delete line Löscht die Zeile, in der sich der Cursor befindet. Die anderen Zeilen rücken auf. Die letzte Zeile wird leer.
ESC Yyx Move Cursor Bewegt den Cursor auf Zeile y und Spalte x. Auf die y- und x-Position muss immer 32 addiert werden. (x = 0 ... 19, y = 0 ... 3)
ESC e Cursor on Cursor einschalten
ESC f Cursor off Cursor ausschalten
ESC j Store cursor Die aktuelle Cursor-Position wird gespeichert.
ESC k Restore cursor Der Cursor wird auf die mit ESC j gespeicherte Position bewegt.
ESC l Clear line Die Cursor-Zeile wird gelöscht. Der Cursor geht dann auf den Zeilenanfang.
ESC o Clear line to cursor Die Cursor-Zeile wird vom Anfang bis zum Cursor gelöscht.

Kategorie:Erweiterungen des Profils Kategorie:Empfehlungen