beautypg.com

Counter c serial slave display – Red Lion PAX2D User Manual

Page 28

background image

28

Abbreviated Transmission (Numeric data only)

Byte

Description

1-12 12 byte data field, 10 bytes for number, one byte for sign, one byte for

decimal point

13

carriage return

14

line feed

15

* (Space)

16

* carriage return

17

* line feed

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

Meter Response Examples:

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

17 CTA 875

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

SP2 -250.5

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

print

250

Auto/Manual Mode Register (MMR) ID: U

This register sets the controlling mode for the outputs. In Auto Mode (0) the

meter controls the setpoint and analog output. In Manual Mode (1) the outputs

are defined by the registers SOR and AOR. When transferring from auto mode

to manual mode, the meter holds the last output value (until the register is

changed by a write). Each output may be independently changed to auto or

manual. In a write command string (VU), any character besides 0 or 1 in a field

will not change the corresponding output mode.

U abcde

e = Analog Output

d = SP4

c = SP3

b = SP2

a = SP1

Example: VU00011* places SP4 and Analog in manual.

Analog Output Register (AOR) ID: W

This register stores the present signal value of the analog output. The range

of values of this register is 0 to 4095, which corresponds to the analog output

range per the following chart:

Register

Value

Output Signal*

0-20 mA 4-20 mA

0-10 V

0

0.00

4.00

0.000

1

0.005

4.004

0.0025

2047

10.000 12.000

5.000

4094

19.995 19.996

9.9975

4095

20.000 20.000

10.000

*Due to the absolute accuracy rating and resolution of the output card, the

actual output signal may differ 0.15% FS from the table values. The output

signal corresponds to the range selected (0-20 mA, 4-20 mA or 0-10 V).
Writing to this register (VW) while the analog output is in the Manual Mode

causes the output signal level to update immediately to the value sent. While in

the Automatic Mode, this register may be written to, but it has no effect until the

analog output is placed in the manual mode. When in the Automatic Mode, the

meter controls the analog output signal level. Reading from this register (TW)

will show the present value of the analog output signal.

Example: VW2047* will result in an output of 10.000 mA, 12.000 mA or

5.000V depending on the range selected.

Setpoint Output Register (SOR) ID: X

This register stores the states of the setpoint outputs. Reading from this

register (TX) will show the present state of all the setpoint outputs. A “0” in the

setpoint location means the output is off and a “1” means the output is on.

X abcd

d = SP4

c = SP3

b = SP2

a = SP1

In Automatic Mode, the meter controls the setpoint output state. In Manual

Mode, writing to this register (VX) will change the output state. Sending any

character besides 0 or 1 in a field or if the corresponding output was not first in

manual mode, the corresponding output value will not change. (It is not

necessary to send least significant 0s.)

Example: VX10* will result in output 1 on and output 2 off.

COUNTER C SERIAL SLAVE DISPLAY

Counter C may be programmed for SLAUE to act as a serial slave display. In

this mode, the carriage return is added as a valid command terminator

character for all serial command strings. The as a terminator may be very

useful for standard serial commands, even if Counter C is never displayed or

sent a slave message. The <*> and <$> are also recognized as valid terminators

for the serial slave.

The Counter C slave display is right aligned, and has the capacity of

displaying six characters on Line 1 or nine characters on Line 2. When less than

the full display of characters is received, blank spaces are placed in front of the

characters. If more than the full display of characters is received, only the last

six (or nine) characters are displayed. The meter has an internal 300 character

buffer for the slave display. If more than 300 characters are received, the

additional characters are discarded until a is received. At that point, the

last six (or nine) characters in the buffer are displayed.

Counter C processes Numeric and Literal slave transmissions as follows.

Numeric Transmissions

When a string that does not begin with #, T, V, P or R is received, the meter

processes it as a Numeric transmission. In this case, only numbers and a minus

sign can be displayed. All other characters in the string are discarded. If a minus

sign appears anywhere in the string the resulting number will be negative. If a

decimal point is desired, it is programmed in Counter C setup and is ignored in

the serial string. If no numerical characters are received, then the numeric value

will be zero.

The numeric display can be used for setpoint (boundary action only) and

analog output functions. The numeric value is retained in Counter C memory

until another Numeric transmission is received. If a numeric values is not to be

saved to non-volatile memory, send the value as a literal transmission.

Note: Numeric transmissions sent to meter addresses 1 through 9 must have a

leading zero character sent with the address (i.e. N01 through N09).

Literal Transmissions

When a string that begins with # is received, the meter processes it as a Literal

transmission. In this case, only numeric and alphabetic characters or a minus

sign (dash) will be processed. Any other non-alphanumeric character will be

discarded. Non-displayable alphabetic characters (M, W and X) will be replaced

with a space. A Literal display overrides any Units Mnemonics characters, when

shown on Line 2.

A Literal display will replace a Numeric value in the Counter C display.

However, it will not remove a previous Numeric value from Counter C memory

or prevent the Counter C assigned outputs from functioning with the previous

Numeric value.

Displayable Alphabetic Characters:

ASCII

A b C d E F G H I J K L N O P q r S t U V Y Z

DISPLAY

A b C

d E

F G

H

I J k

L N

O

P

q r S

t U

U

Y

Z

(Both uppercase and lowercase ASCII characters are accepted.)

Downloading Data from a G3 to a PAX2D

Communications:

Port: RS232 Comms Raw Serial Port

Port Driver: Raw Serial Port

Programming:

PortPrint(2, “N01” + IntToText(Var1, 10, 6) + “\r”);

This program is called from the Global On Tick. It sends “N01” (the meter

address), followed by the ASCII equivalent of Var1, then a carriage return.