Page
213
of
248
19.5
Sutron Function Codes
This section describes the use of the Sutron function code to get files, send files and, get the log over
MODBUS. This only applies when the station is a Modbus server.
The data portion of a packet carrying the Sutron function code (function code 65, or 0x41) contains a
subcode and associated parameters to define the particular function to perform. The subcode and its
parameters are expressed using ASCII characters. The functions that each sub-code performs are defined
to be stateless, and the burden of the transport is on the client station.
The following text defines the subcode functions, parameters, and responses.
19.5.1
Get Log Command
The Get Log subcode is used to retrieve log data from the unit. The format of the command is as follows:
GL,logfilename,datetime,recordID,numbytes
The logfilename can be used to return log entries of specific types. The available types are
data
events
all
The datetime value must be in the following format: MM/DD/YYYY HH:MM:SS.
The numbytes value refers to the number of data bytes from the log entry to include in the
response, not the number of bytes to store in the return packet. The station will never return
more than 255 data bytes. Since the client station or transport medium may be limited in the
number of bytes that can be handled in a single packet, the numbytes value should be sized small
enough to allow for header and CRC information, as well as translation to ASCII if that is the
selected protocol (the ASCII protocol uses two bytes to represent every data byte). If numbytes
is *, up to 255 bytes will be returned. Regardless of the requested numbytes, only complete log
records are returned. Do not set numbytes to less than 64. Ideally, use * or 255.
The format of the reply is as follows:
GLR,status,recordID,numbytes,data[numbytes,data]
The value of status can be any of the following values:
Value
Description
0
Ok.
1
File not found.
2
Get beyond file end.
6
Record not found.
7
Command format error
Содержание SUTRON XLINK 100
Страница 1: ...Operations Maintenance Manual SUTRON XLINK 100 500 Part No 8800 1217 Rev 8 44 4 January 14 2022...
Страница 230: ...Page 230 of 248...
Страница 247: ...Page 247 of 248...