User manual

Toolbox 32 User Manual 1.47d www.cse-semaphore.com/mykingfisher
Page
116
Example - Polling Event Logs
An Rx Update block can be used to poll event logs and data from up to 16 RTUs. The system parameters -
Update Register Blocks and Update Hardware Blocks are configured in the outstation RTU to control which
of the data blocks will be checked or read from the RTU (please see the topic Configuration - System
Parameters for more information). The RX Update block can also poll all the event logs that match the
configured priority and user type until the maximum limit is reached or until there are no more event logs. In
order to use the Rx Update block, the RTU requires the RX Update driver - RXUPDxx.Dxx to be loaded.
In the example shown below, the RTU checks if the Rx Update block is finished (ie. all the pending flags are
set off) before initiating a new Rx Update. This avoids initiating multiple RX Update messages which could
cause unpredictable results (event logs may be lost or overwritten). A single Rx Update block can generate
many messages causing the port pending bit to be set and reset many times. New message blocks should
not be initiated from the same port until the Rx Update block is completely finished.
#R52 is used for the Pending Flags register in the Rx Update block. On the first ladder scan, #R52 is
initialised to zero as #R52 is not reset to zero after a warm start. This clears any pending flags that may still
be set if the RTU was stopped in the middle of an RX Update.
Initialise RX Update Pending Flags On First Ladder Scan
DoOn1stScan PendingFlags
#YSYS.SCAN1 #R52
├─────┤ ├────────────────────────────────────────────────────────────(Copy)────┤
0
Poll Data and Event Logs From Outstation RTUs
DoEveryHour DoRxUpdate
#YTICK.HOUR #R99.1
├─────┤ ├──────────────────────────────────────────────────────────────(S)─────┤
DoRxUpdate RxUpFinished Poll Logs
#R99.1 #R52 RTU 2
├─────┤ ├──────────[=]───────────────────────────────────────────┬─(RX_UPDAT)──┤
0
DoRxUpdate
#R99.1
└─────(R)─────┤
Figure: Example RX Update Ladder To poll multiple RTUs.
Figure: Rx Update block used above to poll event logs from RTUs 2, 3, 4.