16.0 COMMAND CODE LISTING BY ALPHABETICAL ORDER……… 18
PAGE 2 74845
DLR334 PRESSURE DUPLEX SERIAL PROTOCOL
1.0 GENERAL:
! This document applies to the basic Pressure program KDG-1.
! The duplex protocol includes the following basic functions:
♦ Setup entry and recall.
♦ Current pressure data recall.
♦ Calibration and correction recall and entry.
♦ All front panel key functions.
♦ Temperature calibration and correction recall and entry.
! The protocol between the “standard” full duplex and the RS485 will only differ by the addition of
the origin and destination address characters.
! The protocol will be designed to be expandable for future growth and special applications.
2.0 FULL DUPLEX PROTOCOL:
Communications from the host computer into the DLR:
*<DD><OO><cmd><{><data entry><}><CHECK><CR>
Response from the DLR:
:<OO><DD><cmd r><{><data resp><}><CHECK><CR>
Where:
“<”,”>” Brackets are not sent
* = Message from master (host computer)(2AH).
: = Response from DLR (3AH).
DD = DLR unit address (two digit) if in RS485.
OO = Master address (fixed at 00) if in RS485.
If RS485 mode not selected the “DD” and “OO” are not transmitted.
Cmd = Three character command to DLR.
Cmd r = Three character command echoed from DLR.
{= Start of data character (7BH).
}= End of data character (7DH).
‘{‘ and ‘}’ only sent if data entry or recall.
Data entry= Data entered into DLR if entry command.
Data resp = Data response from DLR if in response.
CHECK = Optional two character check if selected.
CR = Message terminator (0DH).
A “LF” character following the “CR” will be ignored. All characters following
the “CR” and preceding the “*” will be ignored.
3.0 COMMAND CODE <cmd> DESCRIPTION:
The <cmd> consists of three (3) characters “ppt” where:
pp = the command parameter.
T = the command type.
The three (3) command types (t) are as follows:
Direct cmd code = < D > character (44H).
‘D’ Commands have no data associated with them.
PAGE 3 74845
Data request code = < R > character (3FH).
Data entry code = < E > character (45H).
For complete listing of command codes see Table II.
4.0 DATA FORMAT:
4.1 GENERAL:
! When data is transmitted it is always bracketed with the ‘{‘ and ‘}’ characters.
! The separation character ‘|’ (7CH) is used to separate data in a string.
! All DLR recalled data has leading zero suppression with the zeros transmitted as spaces.
! All data entered into the DLR can have leading zero suppression with the zeros transmitted
as spaces but is not required.
! Summary of data formats:
PRESSURE:<value><units><par><stat>
STATUS:
SETUP: <par 1>|<par 2>| - - - <par x>
♦ General commands (Zero, etc.).
♦ Display commands (Min,Max, etc.).
♦ Pressure calibration (Zero Cal, etc.).
‘R’ commands requesting data from the host to the DLR.
♦ Pressure data.
♦ Status.
♦ Setup data.
Calibration data.
‘E’ commands with data sent from host to be entered into the DLR.
♦ Setup data.
♦ Calibration data.
WEIGHT: <stat>
INPUT: <I1>|<I2>
OUTPUT: <O1>|<O2>
5.0 RESPONSE:
! In the print/port 1/duplex setup the response by the DLR from the direct commands and data entry
commands can be selected for ‘None’ or Echo’.
‘None’: no response is given a direct cmd (D) or data entry cmd (E) if valid or invalid.
‘Echo’: the command (direct or entry) is echoed as received if valid; the start of transmission
character is returned with a ‘:’ not the ‘*’ character. If invalid a _NAK_ is returned
‘Ack/Nak’: instead of echoing back the received command code and entered data the DLR
responds with ‘ACK’ (41H, 43H & 48H) in place of the code. If an error in received data is
detected the DLR responds with ‘NAK’(4EH, 41H & 48H).
! An invalid input consists of the following:
Response in Echo or Ack/Nak mode = :NAK<CR>
Ack response: :ACK<CR>
Nak response: :NAK<CR>
♦ Parity error.
♦ Check error if enabled.
♦ Invalid command code.
♦ Invalid data format.
PAGE 4 74845
! Commands received as valid but that can not be performed:
A valid command in the Echo or Ack/Nak mode that can not be performed will respond with:
:NAC<CA>
The conditions that give you a ‘NAC’ response are:
♦Not in a valid mode for the command. For example, a ’Cal’ command in the
‘normal (run)’ mode (Refer to Command Performance Status Table Below).
♦The Command is acting on a parameter that is disabled in Configuration. For
example, Peak data recall command when the Peak is configured for ‘off’.
(Refer to Command Performance Status Table I Below).
♦The command is acting on a parameter that can not be performed due to the
unit conditions such as motion or over range.
COMMAND ‘PERFORM’ STATUS TABLE I
CATEGORYCOMMANDS
GENERALZED, TADR UNYES
DATA RECALLPDR, PGRRUN/CALN O
DATA RECALLPNR, PWR, PPR, PMR, PVR, PHRR U NYES
STATUS RECALLPSR, MSR, ISR, OSRR UNYES
DISPLAY SELECTMGDRUN/CALN O
DISPLAY SELECT MND, MPD, MMDRU NYES
UNITS SELECTUxDRU NYES
UNITS SELECTUUE/UURCALNO
PRINTPR DRUNYES
CAPACITY/RESCPE/CPR, REE/RERCALN O
CALIBRATIONZRD, RxD, LxE, ZFE/ZFR,
The check option is setup in the print duplex mode of port 1. It can be applied to the duplex serial in
the RS485 mode or in non addressable mode.
If check setup is set for ‘NONE’ (OFF), no characters are transmitted for check.
Checksum: if checksum is selected the check consists of two ASCII characters.
♦All ASCII characters including the starting character and terminating character preceding
the checksum is included in the checksum.
♦ The ASCII characters are binary summed (not including the parity bit).
♦ The least significant byte is divided into four bits each “nibbles” and 30H is added to
each. Therefore a sum of 5EH will be transmitted as 35H and 3EH or ‘5>’.
Xor: if exclusive or is selected the check consists of two ASCII characters.
♦ All ASCII characters preceding the checksum are exclusively or’ed together.
♦ The check byte is then calculated to give a result of zero when it is exclusively or’ed in.
♦ The check byte is divided into four bits each and 30H is added to each.
7.0 RS485:
The RS485 protocol is the same as the standard duplex except the two character destination address
and two character origin address is included after the starting character.
The host computer’s address is fixed at ‘00’ and the DLR address can be set between 1 and 98.
When the setup is not set for the RS485 mode the RS485 transceiver is set for transmit only (RS422
applications).
8.0 COMMAND CODE SUMMARY:
The Response is shown in the ‘Ack/Nak’ mode.
The ‘D’ column represents the data character length including the ‘|’ seperator but not the ‘{‘or’}’
brackets.