B.3 FILE TRANSFERS
The UR relay 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 3100 in the Modbus Memory Map. To read a file from
the UR relay, use the following steps:
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
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 UR relay will remember which was the last register you 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.
Keep reading until the "size of..." register is smaller than the number of bytes you are transferring. This condition indi-
cates end of file. Discard any bytes you have read beyond the indicated block size.
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 pre-
vious 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 UR relay did not process your original read request).
The UR relay retains connection-specific file transfer information, so files may be read simultaneously on multiple Modbus
b) OTHER PROTOCOLS
All the files available via Modbus may also be retrieved using the standard file transfer mechanisms in other protocols (for
example, TFTP or MMS).
c) COMTRADE, OSCILLOGRAPHY, AND DATA LOGGER FILES
Oscillography and data logger files are formatted using the COMTRADE file format per IEEE PC37.111 Draft 7c (02 Sep-
tember 1997). The files may be obtained in either text or binary COMTRADE format.
d) READING OSCILLOGRAPHY FILES
Familiarity with the oscillography feature is required to understand the following description. Refer to the Oscillography sec-
tion in Chapter 5 for additional details.
The "Oscillography Number of Triggers" register is incremented by one every time a new oscillography file is triggered
(captured) and cleared to zero when oscillography data is cleared. When a new trigger occurs, the associated oscillography
file is assigned a file identifier number equal to the incremented value of this register; the newest file number is equal to the
"Oscillography Number of Triggers" register. This register can be used to determine if any new data has been captured by
periodically reading it to see if the value has changed; if the number has increased then new data is available.
The "Oscillography Number of Records" register specifies the maximum number of files (and the number of cycles of data
per file) that can be stored in memory of the relay. The "Oscillography Available Records" register specifies the actual num-
ber of files that are stored and still available to be read out of the relay.
Writing "Yes" (i.e. the value 1) to the "Oscillography Clear Data" register clears oscillography data files, clears both the
"Oscillography Number of Triggers" and "Oscillography Available Records" registers to zero, and sets the "Oscillography
Last Cleared Date" to the present date and time.
To read binary COMTRADE oscillography files, read the following filenames:
OSCnnnn.CFG and OSCnnn.DAT
Replace "nnn" with the desired oscillography trigger number. For ASCII format, use the following file names
OSCAnnnn.CFG and OSCAnnn.DAT
B.3.1 OBTAINING RELAY FILES VIA MODBUS
C30 Controller System