Sending Serial Commands And Data; Command Chart; Command String Construction; Transmitting Data To The Meter - Omega Engineering PTC900 User Manual

Panel-mount programmable timer and real-time clock
Table of Contents

Advertisement

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
Node (Meter) Address
Address a specific meter. Must be followed by
N
Specifier
node address. Not required when address = 00.
Read a register from the meter. Must be
T
Transmit Value (read)
followed by register ID character.
Write to register of the meter. Must be followed
V
Value change (write)
by register ID character and numeric data.
Reset a register or output. Must be followed
R
Reset
by register ID character
Block Print Request
Initiates a block print output. Registers are
P
(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 E
not stored if the $ terminator is used.
Register Identification Chart
REGISTER
ID
VALUE DESCRIPTION
NAME
A
Timer Value
B
Cycle Counter Value
C
RTC Time Value
D
RTC Date Value
E
Setpoint 1
F
Setpoint 2
G
Setpoint 3
H
Setpoint 4
I
Setpoint 1 Off Value
J
Setpoint 2 Off Value
K
Setpoint 3 Off Value
L
Setpoint 4 Off Value
M
Timer Start Value
O
Cycle Counter Start Value
Q
Timer Stop Value
S
Cycle Counter Stop Value
U
Auto/Man Register
W
Day of Week Value
X
Setpoint Register
1. Register Names are also used as Register Mnemonics during full transmission.
2. The registers associated with the P command are set up in Print Options (Module 7).
3. Unless otherwise specified, the Transmit Details apply to both T and V
Commands.
2
PROM memory. Values are
2
COMMAND
TRANSMIT DETAILS
1
TMR
T, V, R
6 digit
CNT
T, V, R
6 digit
TIM
T, V
6 digit
DAT
T, V
6 digit
SP1
T, V, R
6 digit
SP2
T, V, R
6 digit
SP3
T, V, R
6 digit
SP4
T, V, R
6 digit
SO1
T, V
6 digit
SO2
T, V
5 digit
SO3
T, V
6 digit
SO4
T, V
6 digit
TST
T, V
6 digit
CST
T, V
6 digit
TSP
T, V
6 digit
CSP
T, V
6 digit
MMR
T, V
0 - auto, 1 - manual
DAY
T, V
1 = Sun....7 = Sat
SOR
T, V
0 - not active, 1 - active
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.
Full Transmission
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.
3
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.
22
(
)
=

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ptc901

Table of Contents