Virtual Console: Difference between revisions

From CANopen-Lift
Jump to navigation Jump to search
No edit summary
No edit summary
Line 32: Line 32:
To manually control a key a keycode will be written in the Object 600Ah, subindex 1.
To manually control a key a keycode will be written in the Object 600Ah, subindex 1.


=== Data echange process via MPDO ===  
=== Data exchange process via MPDO ===  


There is the posibility of using in- and output data via MPDO to accelerate the process.
There is the posibility of using in- and output data via MPDO to accelerate the process.
Line 38: Line 38:
Display-output (Device -> Virtual terminal):
Display-output (Device -> Virtual terminal):


   COB-ID:      0x500 + Node-ID Gerät
   COB-ID:      0x500 + Node-ID device
   Länge:        8 Bytes
   Lenght:        8 Bytes
   Address:      Node-ID Gerät (Source)
   Address:      Node-ID device (Source)
   Multiplexor:  600Ah, Subindex 2
   Multiplexor:  600Ah, Subindex 2
   Data:        DWORD mit bis zu 4 Zeichen
   Data:        DWORD up to 4 characters


Tastatur-Eingaben (Virtuelles Terminal -> Gerät):
Keyboard input (Virtual Terminal -> device):


   COB-ID:      0x500 + Node-ID virtuelles Terminal
   COB-ID:      0x500 + Node-ID virtual terminal
   Länge:        8 Bytes  
   Lenght:        8 Bytes  
   Address:      0x80 + Node-ID Gerät (Destination)
   Address:      0x80 + Node-ID device (Destination)
   Multiplexor:  600Ah, Subindex 1
   Multiplexor:  600Ah, Subindex 1
   Data:        DWORD mit bis zu 4 Zeichen
   Data:        DWORD up to 4 characters


Zum Einschalten der Display-Ausgabe via MPDO schickt das virtuelle Terminal entweder ein beliebiges Zeichen ungleich NUL (0) oder Cntrl-A (01h). Mit Cntrl-A wird die Zeitüberwachung aktiviert, d. h. das virtuelle Terminal muss mindestens jede Sekunde einen Tasten-Code schicken (z. B. Cntrl-A). Bekommt in diesem Mode das Gerät innerhalb von 4 s kein Zeichen, wird die Display-Ausgabe via MPDO abgeschaltet.  
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.


Zum Deaktivieren der Display-Ausgabe schickt das virtuelle Terminal Cntrl-D (04h) oder wenn die Zeitüberwachung (Cntrl-A) aktiv ist, beendet das Gerät automatisch die Ausgabe, wenn kein Zeichen mehr empfangen wurde.
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.


Damit es bei der Zeichenausgabe per MPDO nicht zu einer zu hohen Buslast kommt, sollten maximal zwei MPDO pro 10 ms ausgegeben werden (inhibit Timer 5 ms).
Damit es bei der Zeichenausgabe per MPDO nicht zu einer zu hohen Buslast kommt, sollten maximal zwei MPDO pro 10 ms ausgegeben werden (inhibit Timer 5 ms).

Revision as of 10:39, 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.

Damit es bei der Zeichenausgabe per MPDO nicht zu einer zu hohen Buslast kommt, sollten maximal zwei MPDO pro 10 ms ausgegeben werden (inhibit Timer 5 ms).

Zeichensatz

Für die Kodierung der Zeichen (Umlaute) wird der Zeichensatz ISO-8859-15 (siehe ISO-8859-15) verwendet.


Tastaturcodes (Virtuelle Tasten)

Folgende ASCII-Codes können für eine Menü-Steuerung verwendet werden:

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

Das Gerät entscheidet selbstständig, wie die Tasten zu interpretieren sind. Dabei ist davon auszugehen, dass nicht alle virtuellen Terminals alle Tasten senden.

Mindestanforderung an VT52 Steuersequenzen

Code Name Bedeutung
ESC A Cursor up Der Cursor wird eine Zeile nach oben bewegt. Ist er schon in der ersten Zeile, erfolgt keine Reaktion.
ESC B Cursor down Der Cursor wird eine Zeile nach unten bewegt. Ist er schon in der letzten Zeile, erfolgt keine Reaktion.
ESC C Cursor right Der Cursor wird um eine Spalte nach rechts bewegt. Ist er schon ganz rechts, erfolgt keine Reaktion.
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