CNI RM85x User Manual

Hand-held terminals
Table of Contents

Advertisement

DESCRIPTION
The RM85x family of hand-held terminals communicate with a remote controller over an EIA standard
RS-232 serial row at a baud rate of 57.6, 38.4, 19.2 or 9.6 Kb.
RM85x terminals can use two communication protocols: VT100 and CNI proprietary.
RM85x Hand-held Terminals User
Manual
Serial Communication
Protocols
CNI Engineering
Via Carpanelli, 24
40011 Anzola dell'Emilia (Bo) Italy
Tel. +39 051 6508911
Fax +39 051 6508912
Info@cnicnc.com
www.cnicnc.com
H5834D0003ING
V. 01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RM85x and is the answer not in the manual?

Questions and answers

Summary of Contents for CNI RM85x

  • Page 1 Protocols DESCRIPTION The RM85x family of hand-held terminals communicate with a remote controller over an EIA standard RS-232 serial row at a baud rate of 57.6, 38.4, 19.2 or 9.6 Kb. RM85x terminals can use two communication protocols: VT100 and CNI proprietary.
  • Page 2 Update List Revision Added Deleted Modified V. 01 CNI Engineering S.r.l. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanic, including photocopying, without the express written permission of CNI.
  • Page 3 MANUAL ISSUED BY: Technical Documentation Dept. CNI Engineering S.r.l. Via Carpanelli, 24 - 40011 Anzola dell’ Emilia (Bo) Italy Tel. +39 051 6508911 Fax +39 051 6508912 Info@cnicnc.com www.cnicnc.com H5834D0003ING Document code: V. 01 Document revision: 05-10-2007 Document issue:...
  • Page 5: Table Of Contents

    TABLE OF CONTENTS TABLE OF CONTENTS Installation ............................1 Serial communication ........................1 VT100 protocol ........................1 CNI proprietary protocol ......................1 2.2.1 Control characters ......................1 2.2.2 Packet checksum (8 bit CRC) ..................2 2.2.3 Packet length........................2 2.2.4 Node address ........................
  • Page 6 3.6.1 Switch LEDs........................19 3.6.2 Monitor keys........................20 3.6.3 Monitor knob ........................21 3.6.4 Monitor overrides ......................22 CNI proprietary protocol commands....................23 4.1.1 Position cursor ....................... 23 4.1.2 Write string........................24 4.1.3 Delete rows ........................25 4.1.4 Scroll ..........................26 4.1.5...
  • Page 7 The RM850 hand held terminal ..................... 45 E.2.1 Numbering of keys......................45 E.2.2 Numbering of LEDs ....................... 45 E.2.3 Numbering of overrides ....................45 Calculating the 16 bit CRC......................46 MODULE CRC16.H....................... 46 MODULE CRC16.C....................... 47 05-10-2007 CNI Engineering S.r.l.
  • Page 8 TABLE OF CONTENTS 05-10-2007 CNI Engineering S.r.l.
  • Page 9: Installation

    1 start bit, 8 data bits, no parity, 1 stop bit 2.1 VT100 protocol RM85x hand-held terminals support a sub-set of commands from the standard VT100 protocol as well as customised commands for I/O control. VT100 protocol includes the necessary XON/XOFF communication control. The terminal has a FIFO buffer in reception and transmission comprising 64 characters.
  • Page 10: Packet Checksum (8 Bit Crc)

    The second byte of each command identifies the target terminal’s node address, as configured on the terminal’s DIP-switch. If RM85x hand-held terminals communicate over an RS232 connection, this address must be set to 0x00 to ensure correct functioning. All the switches on the configuration DIP must be OFF for this setting.
  • Page 11: Cursor On

    ‘?’ (0x3f) ‘2’ (0x32) ‘5’ (0x35) ‘l’ (0x6c) 3.1.3 Cursor home (Carriage return) This command moves the cursor to the first column of the row on which it is currently positioned. Sequence Byte Command Response (0x0d) 05-10-2007 CNI Engineering S.r.l.
  • Page 12: Cursor Down And Home

    RM85x Hand-held Terminals User Manual 3.1.4 Cursor down and home The VT, LF, ESC E character sequence moves the cursor to the first column of the next row after the row on which it is currently positioned. If the cursor is already on the last row in the scroll area, all displayed rows are moved up.
  • Page 13: Cursor Down Without Scroll

    If n is greater than the number of rows displayed, the cursor moves to the first row of the display. ESC [ Pn A Sequence Example: To move the cursor to the next row above the row on which it is currently positioned (Pn=1). Byte Command Response (0x1b) ‘[’ (0x5b) ‘1’ (0x31) ‘A’ (0x41) 05-10-2007 CNI Engineering S.r.l.
  • Page 14: Cursor Right

    RM85x Hand-held Terminals User Manual 3.1.9 Cursor right This command moves the cursor to the right along the row on which it is currently positioned. The number of columns moved is determined by the parameter Pn. If Pn is omitted, or if its value is set to 0 or 1, the cursor moves to the next column to the right.
  • Page 15: Position Cursor

    (column 20), is does not move. Sequence Byte Command Response (0x09) 3.1.14 Save cursor This command saves the position of the cursor (its row and column) and its attributes (off or on). ESC 7 Sequence Byte Command Response (0x1b) ‘7’ (0x37) 05-10-2007 CNI Engineering S.r.l.
  • Page 16: Restore Cursor

    RM85x Hand-held Terminals User Manual 3.1.15 Restore cursor This command restores the position of the cursor (row and column) and its attributes (off or on), previously saved with the Save cursor command. ESC 8 Sequence Byte Command Response (0x1b) ‘8’...
  • Page 17 VT100 protocol commands Example: To send the string “Rm-851”. Byte Command Response ‘R’ (0x52) ‘m’ (0x6d) ‘-’ (0x2d) ‘8’ (0x38) ‘5’ (0x35) ‘1’ (0x31) The figure below shows what characters are available. 05-10-2007 CNI Engineering S.r.l.
  • Page 18: Scroll Area

    RM85x Hand-held Terminals User Manual 3.2.2 Scroll area This command sets the scroll area,. i.e. the area by which the display scrolls at one time. The parameter Pn-r1 determines the first row of the scroll area and parameter Pn-r2 determines the last row.
  • Page 19: Display Blinking Characters

    If Pn is omitted or if its value set to 0, just one blank character is inserted. This command does not change the position of the cursor. ESC [ Pn @ Sequence Example: To insert 5 blank characters. Byte Command Response (0x1b) ‘[’ (0x5b) ‘5’ (0x35) ‘@’ (0x40) 05-10-2007 CNI Engineering S.r.l.
  • Page 20: Insert Rows

    RM85x Hand-held Terminals User Manual 3.2.8 Insert rows This command inserts the number of blank rows determined by the parameter Pn. Blank rows are inserted starting from the row on which the cursor is currently positioned. All rows beneath the row the cursor is on are moved down accordingly.
  • Page 21: Delete To End Of Row

    This command deletes the entire row on which the cursor is currently positioned. It does not change the position of the cursor. ESC [ 2 K Sequence Byte Command Response (0x1b) ‘[’ (0x5b) ‘2’ (0x32) ‘K’ (0x4b) 05-10-2007 CNI Engineering S.r.l.
  • Page 22: Delete To End Of Display

    RM85x Hand-held Terminals User Manual 3.3.5 Delete to end of display This command deletes all characters from the current cursor position to the last character in the display (last row, last column). It does not change the position of the cursor.
  • Page 23: Delete N Rows

    Example: To request the firmware version, receiving the response from the terminal that its firmware is version 4. Byte Command Response (0x05) ‘R’ (0x52) ‘M’ (0x4d) ‘8’ (0x38) ‘5’ (0x35) ‘x’ (0x78) ‘-‘ (0x2d) ‘4’ (0x34) 05-10-2007 CNI Engineering S.r.l.
  • Page 24: Request Cursor Position

    RM85x Hand-held Terminals User Manual 3.4.2 Request cursor position This command requests the terminal to return the numbers of the row and column on which the cursor is currently positioned. ESC [ 6 n Sequence ESC [ Pn-r ; Pn-c R...
  • Page 25: Request Terminal Attributes

    Example: To request the terminal’s attributes, receiving the response , showing that the terminal is an “advanced video option” terminal. Byte Command Response (0x1b) (0x1b) ‘[‘ (0x5b) ‘[’ (0x5b) ‘c’ (0x63) ‘1’ (0x31) ‘;’ (0x3b) ‘2’ (0x32) ‘c’ (0x63) 05-10-2007 CNI Engineering S.r.l.
  • Page 26: Terminal Status Commands

    RM85x Hand-held Terminals User Manual 3.5 Terminal status commands 3.5.1 Reset terminal This command resets the terminal to its initial state, characterised by:  cursor off, at position row 1, column 1  display empty  scroll area set between first and last rows of display ...
  • Page 27: Exit Vt100 Protocol

    VT100 protocol commands 3.5.4 Exit VT100 protocol This command makes the terminal exit VT100 protocol and start using CNI proprietary protocol instead. To re-start using VT100 protocol, you must either switch the terminal off and back on again, or send the VT100 selection command in CNI proprietary protocol.
  • Page 28: Monitor Keys

    RM85x Hand-held Terminals User Manual 3.6.2 Monitor keys Whenever one of its keys changes state, the terminal sends the following sequence. ESC [ Pn-1 ; Pn-2 ; Pn-3 t Sequence Parameter Pn-1 identifies the state of the key. Value 1 means that the key is pressed, 0 means it is released.
  • Page 29: Monitor Knob

    Example: The current value of the knob is 32. The following sequence is sent when the knob is turned. Byte Sequence sent Response (0x1b) ‘[‘ (0x5b) ‘2’ (0x32) ‘3’ (0x33) ‘;’ (0x3b) ‘1’ (0x31) ‘;’ (0x3b) ‘4’ (0x34) ‘6’ (0x36) ‘3’ (0x33) ‘2’ (0x32) ‘2’ (0x32) ‘q’ (0x71) 05-10-2007 CNI Engineering S.r.l.
  • Page 30: Monitor Overrides

    RM85x Hand-held Terminals User Manual 3.6.4 Monitor overrides Whenever one of its overrides changes state, the terminal sends the following sequence. ESC [ Pn-1 ; Pn-2 ; Pn-3 p Sequence Parameter Pn-1 identifies the state of the override. This parameter can have any value from 0 to 255.
  • Page 31: Cni Proprietary Protocol Commands

    CNI proprietary protocol commands 4 CNI proprietary protocol commands Packets sent in response to CNI proprietary commands always contain 4 Status Bits. See Appendix C for the meanings of these bits. 4.1.1 Position cursor This command positions the cursor at the CursorPosition, which varies from 0 to 79, and assigns it CursorAttributes with the following meaning.
  • Page 32: Write String

    RM85x Hand-held Terminals User Manual 4.1.2 Write string This command writes a string of characters NumberCharacters long, with blinking characters if CharacterBlinking is set to 1. The string is displayed at position PositionCharacters. Byte Command Response Node Node 0x08 StatusBit...
  • Page 33: Delete Rows

    CNI proprietary protocol commands 4.1.3 Delete rows This command deletes the display rows defined bit by bit in RowsBit. The first bit set to 1 identifies the first row, the second bit set to 1 the second row and so on.
  • Page 34: Scroll

    RM85x Hand-held Terminals User Manual 4.1.4 Scroll This command scrolls up (if ScrollUp is set to 1) or scrolls down (if ScrollUp is set to 0) by the number of rows determined by NRowsScroll Byte Command Response Node Node 0x08...
  • Page 35: Read I/O Command

    CNI proprietary protocol commands 4.1.5 Read I/O command This command requests the terminal to return data on the states of its I/O devices: knob, override/s, and keys. Byte Command Response Node Node CmdDefault CmdDefault StatusBit 0x00 Meaning of returned data The meaning is determined by the first StatusBit bit according to the following table.
  • Page 36: Read Message

    RM85x Hand-held Terminals User Manual 4.1.6 Read message This command reads the error message saved in the terminal. Byte Command Response Node Node 0x08 StatusBit CmdGetAlarm CmdGetAlarm 0x00 0x00 0x00 High byte of message code Low byte of message code...
  • Page 37: Read Character

    CNI proprietary protocol commands 4.1.7 Read character This command reads the character currently displayed at the position CharacterPosition. The character is that actually ‘printed to screen’ when the command is received, so if you wish to read a character that is blinking, you may read either a blank (0x20) or the character itself, depending on the instant the command is sent.
  • Page 38: Read Version

    RM85x Hand-held Terminals User Manual 4.1.8 Read version This command reads the version of the terminal’s firmware. Byte Command Response Node Node 0x08 StatusBit CmdGetVer CmdGetVer 0x00 0x00 0x00 HighByteVersion 0x00 LowByteVersion Example: To read the version of the firmware in the terminal at node address 0, which is 1029...
  • Page 39: Read Type

    CNI proprietary protocol commands 4.1.9 Read type This command reads the terminal type. Byte Command Response Node Node 0x08 StatusBit CmdGetType CmdGetType 0x00 0x00 0x00 HighByteType 0x00 LowByteType Response The following table summarises the possible meanings of the response. Type returned...
  • Page 40: Change Parameter

    RM85x Hand-held Terminals User Manual 4.1.10 Change parameter This command changes one of the parameters in the terminal. Byte Command Response Node Node 0x08 StatusBit CmdChgPar CmdChgPar 0x00 0x00 High part of parameter code High part of parameter code Low part of parameter code...
  • Page 41: Read Parameter

    CNI proprietary protocol commands 4.1.11 Read parameter This command reads the terminal’s internal parameters. Byte Command Response Node Node 0x08 StatusBit CmdGetParN CmdGetParN 0x00 0x00 High part of parameter code High part of parameter code Low part of parameter code...
  • Page 42: Restart Vt100

    RM85x Hand-held Terminals User Manual 4.1.12 Restart VT100 This command restores VT100 protocol. Byte Command Response Node Node 0x08 StatusBit CmdStartVt100 CmdStartVt100 0x00 0x00 0x00 0x00 0x00 0x00 Example: To restore VT100 protocol to the terminal at node address 0.
  • Page 43: Save Parameters To Flash Memory

    CNI proprietary protocol commands 4.1.13 Save parameters to flash memory When the terminal is switched on, it loads its operating parameters from flash memory. This command saves the terminal’s current parameters into its flash memory so that they will be loaded automatically the next time the terminal is switched on.
  • Page 44: Sample Variable

    RM85x Hand-held Terminals User Manual 4.1.15 Sample variable This command commences sampling two variables in the terminal’s firmware. See the appendices for details on the coding of these variables. Byte Command Response Node Node 0x08 StatusBit CmdSampleVar CmdSampleVar 0x00 0x00...
  • Page 45: Read Samples

    CNI proprietary protocol commands 4.1.17 Read samples This command downloads sampled values from the terminal. Byte Command Response 0x02 (STX) 0x02 (STX) 0x00 (Node) 0x00 (Node) 0x08 StatusBit 0x58 (CmdGetSamp) 0x58 (CmdGetSamp) 0x00 0x00 0x00 High part of number of samples...
  • Page 46: A Parameters

    RM85x Hand-held Terminals User Manual Parameters Parameters can be changed using the CMDCHGPAR command(0x68). Code Meaning Name Size Unit of Default Min/ measure value 0x0100 Reserved RESERVED1 16 bit parameter(Increases 32767 cursor display time in msec) 0x0101 Reserved RESERVED2 16 bit...
  • Page 47 CNI proprietary protocol commands 0x0112 The frequency at which FILTERBUTTON 16 bit msec 1 / 1000 the filter is run to check key state. 0x0113 Display contrast: the CONTRASTON 16 bit 0 / 15 lower the value, the higher the contrast.
  • Page 48 RM85x Hand-held Terminals User Manual 0x011F The low byte forms the FONT2_3 16 bit 0 / 7967 seventh row of pixels of the third character. The high byte forms the eighth row. 0x0120 The low byte forms the FONT3_0 16 bit...
  • Page 49 CNI proprietary protocol commands 0x012B The low byte forms the FONT5_3 16 bit 0 / 7967 seventh row of pixels of the sixth character. The high byte forms the eighth row. 0x012C The low byte forms the FONT6_0 16 bit...
  • Page 50: B Error Messages

    ALFLNOTERASED Contact the supplier. memory that has not been deleted. (1) Serial communications error with CNI proprietary protocol. May be caused by:  Timeout: the master has not sent any more data  A packet of characters received was too long (or the ETX character was missing) ...
  • Page 51: C Status Bits

    CNI proprietary protocol commands Status bits Packets sent in response to commands always contain 4 StatusBits. The following table defines the meanings of these bits. Name Meaning Not used MASKBITWARNING If the value is 1, a message is waiting for the master.
  • Page 52: E I/O

    RM85x Hand-held Terminals User Manual The RM851 hand-held terminal Numbering of keys E.1.1 The terminal is equipped with a maximum of 32 keys. The keys are numbered starting from the bottom up and from left to right as shown in Figure 1.
  • Page 53: The Rm850 Hand Held Terminal

    CNI proprietary protocol commands The RM850 hand held terminal Numbering of keys E.2.1 The terminal is equipped with a maximum of 32 keys. The keys are numbered starting from the bottom up and from left to right as shown in Figure 3.
  • Page 54: F Calculating The 16 Bit Crc

    RM85x Hand-held Terminals User Manual Calculating the 16 bit CRC VT100 protocol uses a 16 bit CRC in some commands. The source code for these functions is reproduced below. MODULE CRC16.H /**************************************************************************** Filename: crc16.h Description: Cyclic Redundancy Check 16 functions...
  • Page 55: Module Crc16.C

    CNI proprietary protocol commands int ByteCRC16(int value, int crcin); #else CRC16 CalcCRC16Words(unsigned int count, short *buffer); #endif #ifdef _CRC16_BYTES CRC16 CalcCRC16Bytes(unsigned int count, char *buffer); #endif #ifdef __cplusplus #endif #endif /* __CRC16_H__ */ MODULE CRC16.C /**************************************************************************** Filename: crc16.c Description: Cyclic Redundancy Check 16 functions...
  • Page 56 RM85x Hand-held Terminals User Manual #ifdef _OPT_SIZE ===== ByteCRC16 ===== Calculate (update) the CRC16 for a single 8-bit byte int ByteCRC16(int value, int crcin) int k = (((crcin >> 8) ^ value) & 255) << 8; int crc = 0;...
  • Page 57 CNI proprietary protocol commands 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,...
  • Page 58 RM85x Hand-held Terminals User Manual CRC16 CalcCRC16Bytes(unsigned int count, char *buffer) { int crc = 0; do { int value = *buffer++; crc = ByteCRC16(value, crc); while (--count); return crc; #endif /* _CRC16_BYTES */ CNI Engineering S.r.l. 05-10-2007...

Table of Contents