SENDING SERIAL COMMANDS AND DATA
When sending commands to the meter, a string containing at least one command character must be constructed. A command string consists of a command character, a value identifier, numerical data (if writing data to the meter) followed by the command terminator character * or $.
Command Chart
| COMMAND | DESCRIPTION | NOTES |
| | | |
| N | Node (Meter) Address | Address a specific meter. Must be followed by |
| Specifier | node address. Not required when address = 00. |
| |
| T | Transmit Value (read) | Read a register from the meter. Must be |
| | | followed by register ID character. |
| V | Value change (write) | Write to register of the meter. Must be followed |
| by register ID character and numeric data. |
| | |
| R | Reset | Reset a register or output. Must be followed |
| by register ID character |
| | |
| P | Block Print Request | Initiates a block print output. Registers are |
| (read) | defined in programming. |
| |
Command String Construction
The command string must be constructed in a specific sequence. The meter does not respond with an error message to invalid commands. The following procedure details construction of a command string:
1.The first characters consist of the Node Address Specifier (N) followed by a 1 or 2 character address number. The address number of the meter is programmable. If the node address is 0, this command and the node address itself may be omitted. The address suffix , “?” is the global broadcast address specifier. A command string that is sent with N? prefix will be accepted by all PAXCKs on the RS485 network (software code version 2.3 or greater). This is useful for setting all meters to the current time, date or day that may have unique meter addresses on a bus. It is important not to send (P)rint or (T)ransmit commands using N? prefix, as it will result in multiple meters responding at the same time. This is the only command that may be used in conjunction with other commands.
2.After the optional address specifier, the next character is the command character.
3.The next character is the Register ID. This identifies the register that the command affects. The P command does not require a Register ID character. It prints according to the selections made in print the options. If constructing a value change command (writing data), the numeric data is sent next.
4.All command strings must be terminated with the string termination characters * or $. The meter does not begin processing the command string until this character is received. See Timing Diagram figure for differences between terminating characters.
Note: On a change value command (V), if the command string is terminated with the * character, all values are stored in E2PROM memory. Values are not stored if the $ terminator is used.
Register Identification Chart
ID | VALUE DESCRIPTION | REGISTER | COMMAND 2 | TRANSMIT DETAILS 3 |
NAME | 1 |
| | | | |
A | Timer Value | TMR | | T, V, R | 6 digit |
B | Cycle Counter Value | CNT | | T, V, R | 6 digit |
C | RTC Time Value | TIM | | T, V | 6 digit |
D | RTC Date Value | DAT | | T, V | 6 digit |
E | Setpoint 1 | SP1 | | T, V, R | 6 digit |
F | Setpoint 2 | SP2 | | T, V, R | 6 digit |
G | Setpoint 3 | SP3 | | T, V, R | 6 digit |
H | Setpoint 4 | SP4 | | T, V, R | 6 digit |
I | Setpoint 1 Off Value | SO1 | | T, V | 6 digit |
J | Setpoint 2 Off Value | SO2 | | T, V | 5 digit |
K | Setpoint 3 Off Value | SO3 | | T, V | 6 digit |
L | Setpoint 4 Off Value | SO4 | | T, V | 6 digit |
M | Timer Start Value | TST | | T, V | 6 digit |
O | Cycle Counter Start Value | CST | | T, V | 6 digit |
Q | Timer Stop Value | TSP | | T, V | 6 digit |
S | Cycle Counter Stop Value | CSP | | T, V | 6 digit |
U | Auto/Man Register | MMR | | T, V | 0 - auto, 1 - manual |
W | Day of Week Value | DAY | | T, V | 1 = Sun....7 = Sat |
X | Setpoint Register | SOR | | T, V | 0 - not active, 1 - active |
1.Register Names are also used as Register Mnemonics during full transmission.
2.The registers associated with the Pcommand are set up in Print Options (Module 7).
3.Unless otherwise specified, the Transmit Details apply to both T and V Commands.
Command String Examples:
1.Address = 17, Write 350 to Setpoint 1 String: N17VE350$
2.Address = 5, Cycle Counter value, response time of 50 to 100 msec. min. String: N05TB*
3.Address = 0, Reset Timer value
String: RA*
Transmitting Data To the Meter
Numeric data sent to the meter must be limited to Transmit Details listed in the Register Identification Chart. Leading zeros are ignored. The meter ignores any decimal point and conforms the number to the scaled resolution. (ie. The meter’s scaled decimal point position is set for 0.0 and 25 is written to a register. The value of the register is now 2.5. In this case, write a value of 250 to equal 25.0).
For RTC Time [C] and Date [D] Value:
Time - 24 Hours, Minutes, Seconds (HHMMSS)
Ex: 083000 = 8:30 AM, 144500 = 2:45 PM
Date - Month, Day, Year (mmddyy)
Ex: 123101 = December 31, 2001
Day - 1 = Sunday through 7 = Saturday
EX: 3 = Tuesday
Notes:
1.Since the meter does not issue a reply to value change commands, follow with a transmit value command for readback verification.
2.The date and day must be set separately.
Transmitting Data From the Meter
Data is transmitted from the meter in response to either a transmit command (T), a print block command (P) or User Function print request. The response from the meter is either a full field transmission or an abbreviated transmission. The meter response is established in Module 7.
BYTE DESCRIPTION
1, 2 2 byte Node (Meter) Address field [00-99] 3 <SP> (Space)
4-6 3 byte Register Mnemonic field
7-18 12 byte numeric data field: 6 bytes for number, up to 3 for decimal points.
19<CR> (Carriage return)
20<LF> (Line feed)
21<SP> (Space)✰
22<CR> (Carriage return)✰
23<LF> (Line feed)✰
✰These characters only appear in the last line of a block print.
The first two characters transmitted are the unit address. If the address assigned is 0, two spaces are substituted. A space follows the unit address field. The next three characters are the register mnemonic.
The numeric data is transmitted next. The numeric field is 12 characters long (decimal points are loaded depending on timer range selected). The data is right- aligned with leading spaces for any unfilled positions.
The end of the response string is terminated with <CR> and <LF>. When a block print is finished, an extra <SP>, <CR>, and <LF> are used to provide separation between the transmissions.