2head - 3.5.6 file transfers, 6 file transfers, 1 obtaining cpu files using modbus protocol – GE Industrial Solutions Entellisys 5.0 Integrator's Guide User Manual

Page 54

Advertising
background image

Modbus® protocol implementation

54

3

3.5.6 File transfers

3.5.6.1 Obtaining CPU files using Modbus protocol

The CPU has a generic file transfer facility, meaning that you use the same method to obtain all
of the different types of files from the unit. The Modbus registers that implement file transfer are
found in the “Modbus File Transfer (Read/Write)” and “Modbus File Transfer (Read Only)”
modules, starting at address 030Eh in the Modbus Memory Map. To read a file from the CPU, use
the following steps:

1. Write the filename to the “Name of file to read” register using a write multiple registers

command. If the name is shorter than 80 characters, you may write only enough registers to
include all the text of the filename. Filenames are not case sensitive.

2. Repeatedly read all the registers in “Modbus File Transfer (Read Only)” using a read multiple

registers command. It is not necessary to read the entire data block, since the CPU will
remember which was the last register read. The “position” register is initially zero and
thereafter indicates how many bytes (2 times the number of registers) you have read so far.
The “size of...” register indicates the number of bytes of data remaining to read, to a
maximum of 244.

3. Keep reading until the “size of...” register is smaller than the number of bytes you are

transferring. This condition indicates end of file. Discard any bytes you have read beyond the
indicated block size.

4. If you need to re-try a block, read only the “size of...” and “block of data”, without reading the

position. The file pointer is only incremented when you read the position register, so the
same data block will be returned as was read in the previous operation. On the next read,
check to see if the position is where you expect it to be, and discard the previous block if it is
not (this condition would indicate that the CPU did not process your original read request).
The CPU retains connection-specific file transfer information, so files may be read
simultaneously on multiple Modbus connections.
a. Obtaining files from the CPU using other protocols

All the files available via Modbus may also be retrieved using the standard file transfer
mechanisms in other protocols (for example, TFTP).

b. Reading event recorder files

To read the entire event recorder contents in ASCII format (the only available format), use
the following filename:

• EVT.TXT

c. Reading fault report files

The file name for fault report data is faultReport#####.txt. The ##### refers to the
fault report record number. This number is identical to the event record number
associated with the fault report. A request for a non-existent fault report file will yield file
with no data below the header.

CRC - low order byte

93

CRC - high order byte

95

SLAVE RESPONSE

Advertising