EasyManua.ls Logo

CAT EMCP 4 - 7 SCADA PROGRAMMING EXAMPLES; 7.1 SIMPLE REGISTER READS; BATTERY VOLTAGE

CAT EMCP 4
102 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Application and Installation Guide EMCP 4 SCADA Data Links
©2013 Caterpillar
All rights reserved. Page 38
7 SCADA PROGRAMMING EXAMPLES
In the following examples, the EMCP 4 SCADA Data Link Slave Address setpoint is assumed to be set to
1 (0x01). The last 2 bytes (shown as “xx xx” in this Chapter) of each message consist of the CRC. The
CRC is typically automatically generated and checked by SCADA communication software, and therefore
is not discussed below.
These are only examples of specific conditions and the responses from the control under those
conditions, and are not intended to represent the complete functionality of the control or all the possible
conditions that can result in these responses. In particular, Exception Responses or all error conditions
are not reflected here.
7.1 SIMPLE REGISTER READS
It is convenient to refer to these equations when converting between measured (real-world) units and raw
(as sent over Modbus) data:
MEASURED_DATA
= ( RAW_DATA × RESOLUTION ) + OFFSET
RAW_DATA
= ( MEASURED_DATA - OFFSET ) / RESOLUTION
BATTERY VOLTAGE
Request: 0x 01 03 00 c9 00 01 xx xx
0x 01 = slave address of EMCP 4
0x 03 = function code (Read Registers)
0x 00 C9 = Battery Voltage
0x 00 01 = register count (1 register)
Response: 0x 01 03 02 01 FD xx xx
0x 01 = slave address of EMCP 4
0x 03 = function code (Read Registers)
0x 02 = byte count (2 bytes – 1 register)
0x 01 FD = 509. 509 × 0.05 V/bit = 25.45V
Below is an example of how to perform a simple single register read correctly and a common
example of reading singe-register data incorrectly by omitting the scaling and offset: