INSTRUCTION BULLETIN—Reference Guide
CyTime
TM
Sequence of Events Recorder
IB-SER32e-02
Jan-2022
20
© 2010-2022 Cyber Sciences, Inc. All rights reserved.
Event Log Contents
The CyTime SER-32e features an event log file system containing up to 8192 event
records. Each record consists of 8 registers describing the event:
●
date and time of the event (adjusted for local time, if applicable)
●
input name
●
event type
●
input status
●
time quality at time of the event
●
unique record sequence number
3—ACCESSING THE SER EVENT LOG
File Record Access
The primary method for retrieving SER events is “file record access” using Modbus
function code 20. The SER event log memory stores event records in “circular” fash-
ion, rolling over after 8192 events, in a first-in-first-out (FIFO) stack. The total number
of events is stored in holding register 402001, with record pointers in 402002 and
402003. First, these values are read (e.g., function code 03), then event records are
accessed one at a time using function code 20, starting with the first event record
position (from register 402002) through 8191, and starting over at 0, if necessary,
up to the last event record position (stored in register 402003). To ensure reliable
software access even after rollover (excess of 8192 events), the sequence number of
last event record (registers 402004-402005) may be read periodically as well.
Description
Bytes
Request (hex)
Notes
Modbus Function Code 20
1 byte
0x14
function code 20 (hex 14) for file record access
Byte count
1 byte
0x07
always 0x07
Reference type
1 byte
0x06
always 0x06
File number
2 bytes
0x0001
always 0x0001
Record number
2 bytes
0x0000 to
0x1FFF
record position number of event to be read
(based on value in register 402002: starting position)
Record length
2 bytes
0x0008
always 0x0008 (8 registers)
Event # 1
Event # 2
Event # 3
Event # 5000
0
Event
record
address
8191
Example 1:
Total # of events = 5000
First event
(position = 0)
Last event
(position = 4999)
Event # 5192
Event # 5193
Event # 5194
Event # 5191
0
Event
record
address
8191
Example 2:
Total # of events = 8192
First event
(position = 3001)
Last event
(position = 3000)
Event # 8192
Event # 1
Table 3-1 – File Record Access (FC 20) Example