background image

14

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 a command terminator character, * or $. 

Command Chart

Register Identification Chart

ID

Value Description MNEMONIC

Transmit Details (T and V)

A

Counter A

CTA

8 digit positive/7 digit negative
(with minus sign)

B

Counter B

CTB

7 digit, positive only

C Rate

RTE

6 digit, positive only

D Scale Factor A

SFA

6 digit, positive only

E

Scale Factor B

SFB

6 digit, positive only

H

G

F

CLD

SP2

SP1

8 digit positive/7 digit negative
(with minus sign)

per setpoint Assignment, same
as Counter or Rate

per setpoint Assignment, same
as Counter or Rate

T, V, R

T, V, R

T

T, V

T, V,

T, V

T, V, R

T, V, R

Command String Construction

The command string must be constructed in a specific sequence. The meter

does not respond with an error message to illegal commands. The following
procedure details construction of a command string:

1. The first 2 or 3 characters consist of the Node Address Specifier (N) followed

by a 1 or 2 character node address number. The node address number of the
meter is programmable. If the node address is 0, this command and the node
address itself may be omitted. 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 all the active selections chosen in the Print Options menu parameter.

4. If constructing a value change command (writing data), the numeric data is

sent next. 

5. 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 Command Response Time section for
differences in meter response time when using the * and $ terminating
characters.

Command String Examples:

1. Node address = 17, Write 350 to the Setpoint 1 value

String: N17VF350*

2. Node address = 5, Read Counter A, response time of 50 msec min

String: N5TA*

3. Node address = 0, Reset Setpoint 1 output

String: RF*

4. Node address = 31, Request a Block Print Output, response time of 2 msec min

String: N31P$

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. Negative numbers
must have a minus sign. The meter ignores any decimal point and conforms the
number to the scaled resolution. (For example: 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).

Note: Since the meter does not issue a reply to value change commands, follow

with a transmit value command for readback verification.

Receiving Data From The Meter

Data is transmitted from the meter in response to either a transmit command

(T), a block print request command (P) or a User Input print request. The
response from the meter is either a full field transmission or an abbreviated
transmission, depending on the selection chosen in Module 5.

Full Field Transmission

* These characters only appear in the last line of a block print.

The first two characters transmitted are the meter address. If the address

assigned is 0, two spaces are substituted. A space follows the meter address field.
The next three characters are the register mnemonic, as shown in the Register
Identification Chart.

The numeric data is transmitted next. The numeric field (bytes 7 to 18) is 12

characters long. When a requested counter or rate value exceeds the meter’s
display limits, an * (used as an overflow character) replaces a space in byte 7.
Byte 8 is always a space.

The remaining ten positions of this field consist of a minus sign (for negative

values), a floating decimal point (if applicable), and eight positions for the 

requested value. The data within bytes 9 to 18 is right-aligned with leading
spaces for any unfilled positions.

The end of the response string is terminated with a <CR> and <LF>. After the

last line of a block print, an extra <SP>, <CR> and <LF> are added to provide
separation between the print blocks.

Abbreviated Transmission

* These characters only appear in the last line of a block print.

The abbreviated response suppresses the node address and register ID,

leaving only the numeric part of the response.

Meter Response Examples:

1. Node address = 17, full field response, Counter A = 875

17 CTA

875 <CR><LF>

2. Node address = 0, full field response, Setpoint 1 = -250.5

SP1                -250.5<CR><LF>

3. Node address = 0, abbreviated response, Setpoint 1 = 250, last line of block

print

250<CR><LF><SP><CR><LF>

Byte

Description

1, 2

2 byte Node Address field [00-99]

3

<SP> (Space)

4-6

3 byte Register Mnemonic field

7-18

19

<CR> (carriage return)

20

<LF> (line feed)

21

<SP>* (Space)

22

<CR>* (carriage return)

23

<LF>* (line feed)

Byte

Description

1-12

12 byte data field, 10 bytes for number, one byte for sign,
one byte for decimal point

13

<CR> (carriage return)

14

<LF> (line feed)

15

<SP>* (Space)

16

<CR>* (carriage return)

17

<LF>* (line feed)

12 byte data field; 10 bytes for number, one byte for sign, one byte for
decimal point

Applicable
Commands

Initiates a block print output. Registers in the
print block are selected in Print Options.

Block Print Request
(read)

P

Reset a count value or setpoint output. Must
be followed by a register ID character 

Reset

R

Write to register of the meter. Must be
followed by a register ID character and
numeric data.

Value Change (write)

V

Read a register from the meter. Must be
followed by a register ID character.

Transmit Value (read)

T

Address a specific meter. Must be followed by
one or two digit node address. Not required
when node address = 0.

Node (meter)
Address Specifier

N

Notes

Description

Command

Setpoint 1
(Reset Output 1)

Counter A Count
Load Value

Setpoint 2
(Reset Output 2)

Summary of Contents for CUB5B

Page 1: ...Setpoint capability is field installable with the addition of the single setpoint relay output module or the dual setpoint solid state output module Serial communications capability for RS232 or RS48...

Page 2: ...ature 35 to 85 C Operating and Storage Humidity 0 to 85 max relative humidity non condensing Vibration According to IEC 68 2 6 Operational 5 to 500 Hz in X Y Z direction for 1 5 hours 5 g s Shock Acco...

Page 3: ...se widths to 10 msec To access the switches remove the rear cover of the meter as described below A bank of 4 switches is located in the upper right hand corner After setting the switches install any...

Page 4: ...pplications where cable runs are long and portable two way radios are used in close proximity or if the installation is near a commercial radio transmitter 4 Signal or Control cables within an enclosu...

Page 5: ...erators Etc Input A Two Wire Proximity Current Source Input A Magnetic Pickup Input A Current Sourcing Output Input A Interfacing With TTL Input A Current Sinking Output Input A Switch or Isolated Tra...

Page 6: ...move to the next parameter PROGRAMMING MODE EXIT SEL KEY The Programming Mode is exited by pressing the SEL key with Pro NO displayed This will commit any stored parameter changes to memory and return...

Page 7: ...is value if Reset to Count Load action is selected 9999999 to 99999999 00000500 CmtA Ld COUNTER B BATCH COUNT ENABLE The Counter B batch count function internally counts the number of output activatio...

Page 8: ...y reset of the selected counter s Change backlight color with each activation backlight version only Inhibit Maintained Reset Freeze display of selected counter s while allowing counts to accumulate i...

Page 9: ...a pulse every 2 seconds RATE HIGH UPDATE TIME 0 2 to 99 9 seconds 01 0 LO Udt 02 0 HI Udt SCALING FOR RATE INDICATION To scale the rate enter a Scaling Display value with a corresponding Scaling Input...

Page 10: ...are only active when Counter B is enabled Dual Count mode or batch counter FRONT PANEL COUNTER RESET ENABLE RST The yES selection allows the display to automatically scroll through the enabled displa...

Page 11: ...Setpoint Action not applicable for Counter B Assignment Select the Setpoint Output to be programmed starting with Setpoint 1 The n in the following parameters reflects the chosen Setpoint number After...

Page 12: ...vated Reverse rEV turns the output off when activated and on when deactivated NOr SPn OUt SETPOINT ANNUNCIATOR Normal NOr displays the setpoint annunciator when the corresponding output is on Reverse...

Page 13: ...om the meter in response to a Transmit Value command or a Block Print Request Select NO for a full print transmission consisting of the meter address mnemonics and parameter data Select YES for abbrev...

Page 14: ...es not issue a reply to value change commands follow with a transmit value command for readback verification Receiving Data From The Meter Data is transmitted from the meter in response to either a tr...

Page 15: ...o take place The figures list the data formats employed by the meter Start Bit and Data Bits Data transmission always begins with the start bit The start bit signals the receiving device to prepare fo...

Page 16: ...16 CUB5 PROGRAMMING QUICK OVERVIEW Press and hold SEL key to enter Programming Mode...

Reviews: