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 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.
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.
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.
‘?’ (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.
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.
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.
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.
(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.
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.
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.
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.
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.
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.
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.
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.
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...
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 ...
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.
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.
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.
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.
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.
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...
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.
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...
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.
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...
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.
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...
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...
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...
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...
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.
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...
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...
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) ...
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.
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.
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.
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...
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;...
Need help?
Do you have a question about the RM85x and is the answer not in the manual?
Questions and answers