beautypg.com

Serial communications, Serial modbus communications, Supported function codes – Red Lion PAX2A User Manual

Page 23: Supported exception codes

background image

23

USB

The USB programming port is primarily intended to be used to configure the

PAX2A with the Crimson programming software. It can also, be used as a virtual

serial communications port following installation of the PAX2A USB drivers

that are supplied with the Crimson software. When the USB port is being used,

i.e. the USB cable is connected between PAX2A and PC, all serial communications

with the serial option card (if used) is disabled.

USB Cable type required: USB A to Mini-B (not supplied)

PAX2A CONFIGURATION USING CRIMSON AND USB

1. Install Crimson software.

2. Supply power to PAX2A

3. Insure “USB” parameter in module 7-SERIAL, is set to “CONFIG” (factory

default setting).

4. Attach USB A – MiniB cable between PC and PAX2A

5. Create a new (File, New) or open an existing PAX2A database within

Crimson.

6. Configure Crimson 2 Link, Options to the serial port the communication cable

is attached (in Step 4).

SERIAL MODBUS COMMUNICATIONS

Modbus Communications requires that the Serial Communication Type

Parameter (tYPE) be set to “Mbrtu” or “MbASC”.

PAX2A CONFIGURATION USING CRIMSON AND SERIAL

COMMUNICATIONS CARD

1. Install Crimson software.

2. Install RS232 or RS485 card and connect communications cable from PAX2A

to PC.

3. Supply power to PAX2A

4. Configure serial parameters in 7-SERIAL to Mbrtu, 38,400 baud, address 247.

5. Create a new (File, New) or open an existing PAX2A database within

Crimson.

6. Configure Crimson 2 Link, Options to the serial port the comunication cable

is attached (in step 2).

SUPPORTED FUNCTION CODES

FC03: Read Holding Registers

1. Up to 32 registers can be requested at one time.

2. HEX <8000> is returned for non-used registers.

FC04: Read Input Registers

1. Up to 32 registers can be requested at one time.

2. Block starting point can not exceed register boundaries.

3. HEX <8000> is returned in registers beyond the boundaries.

4. Input registers are a mirror of Holding registers.

FC06: Preset Single Register

1. HEX <8001> is echoed back when attempting to write to a read only register.

2. If the write value exceeds the register limit (see Register Table), then that

register value changes to its high or low limit. It is also returned in the

response.

FC16: Preset Multiple Registers

1. No response is given with an attempt to write to more than 32 registers at a

time.

2. Block starting point cannot exceed the read and write boundaries (40001-

41280).

3. If a multiple write includes read only registers, then only the write registers

will change.

4. If the write value exceeds the register limit (see Register Table), then that

register value changes to its high or low limit.

FC08: Diagnostics

The following is sent upon FC08 request:

Module Address, 08 (FC code), 04 (byte count), “Total Comms” 2 byte count,

“Total Good Comms” 2 byte count, checksum of the string

“Total Comms” is the total number of messages received that were addressed

to the PAX2. “Total Good Comms” is the total messages received by the

PAX2A with good address, parity and checksum. Both counters are reset

to 0 upon response to FC08 and at power-up.

FC17: Report Slave ID

The following is sent upon FC17 request:

RLC-PAX2A ab<0100h><20h><20h><10h>

a = SP Card, “0”-No SP, “2” or “4” SP

b = Linear Card “0” = None, “1” = Yes

<0100> Software Version Number (1.00)

<20h>Max Register Reads (32)

<20h>Max Register Writes (32)

<10h> Number Guid/Scratch Pad Regs (16)

SUPPORTED EXCEPTION CODES

01: Illegal Function

Issued whenever the requested function is not implemented in the meter.

02: Illegal Data Address

Issued whenever an attempt is made to access a single register that does not

exist (outside the implemented space) or to access a block of registers that falls

completely outside the implemented space.

03: Illegal Data Value

Issued when an attempt is made to read or write more registers than the meter

can handle in one request.

07: Negative Acknowledge

Issued when a write to a register is attempted with an invalid string length.

serial COmmuniCaTiOns

The PAX2A supports serial communications using the optional serial communication cards or via the USB programming port located on the side of the unit. When

USB is being used (connected), the serial communication card is disabled. When using the standard RS232 and RS485 Pax option cards, the PAX2A supports both the

RLC protocol and also supports ModBus communications. The Pax ModBus option card should not be used with the PAX2A, as the PAX2A internal ModBus protocol

supports complete unit configuration, and is much more responsive.