Requirements

<< Click to Display Table of Contents >>

 

Requirements

For the correct usage of this feature in this Driver, the PLC program must keep the following variables:

W03, on address 8206h: Pointer to write to the circular buffer. It must be updated by the PLC program whenever a new event is added to the buffer.

W04, on address 8208h: Pointer to read from the circular buffer. It must be reset by the PLC when it is turned on. Whenever the PLC adds an event to the buffer, the overflow counter must be incremented if an overflow is detected, that is, if W03 is equal to W04. Before downloading the buffer, the application checks the overflow counter. If it is different from 0 (zero), then the pointer to read is not considered and the whole buffer is considered valid.

W05, on address 820Ah: Overflow counter of the circular buffer. It must be reset by the PLC when it is turned on. Whenever the PLC adds an event to the buffer, the overflow counter must be incremented if an overflow is detected, that is, if W03 is equal to W04. Before downloading the buffer, the application checks the overflow counter. If it is different from 0 (zero), then the pointer to read is not considered and the whole buffer is considered valid.

W06 or W07, on address 820Ch or 820Eh: Stores the last time base used by the application, a 32-bit DWord. It must be reset by the PLC when it is turned on. At each buffer download, the application updates this variable. The W06 variable contains the 16 least significant bits and the W07 variable contains the 14 most significant bits. This base is considered by the application if there is an overflow in the circular buffer.

W08 or W09, on address 8210h or 8212h: Next time base to use, a 32-bit DWord. It must be reset by the PLC when it is turned on. The application updates this variable before sending a clock sync command, which is an activation of an output from one of the PLCs, which must be connected to a specific input in all other PLCs. Activating this input must be interpreted by the application as a clock sync command. When the PLC receives a sync command, it must add an event to switch the time base, a sync command, containing the value of these memories. The W08 variable contains the 16 least significant bits and the W09 variable contains the 14 most significant bits. This command must be added periodically by the application, due to imprecision in controller clocks.

Buffer, on address 8A00h and higher: Buffer to store events. This is a circular buffer, with its reading and writing indexes returning 0 (zero) after reaching its end. The size to allocate for this buffer depends on the number of events defined on this Driver's configuration window.

 

NOTE

Time bases, 32-bit DWords, contain the number of seconds since 1/1/1998 00:00:00. Only the 30 least significant bits are used, allowing a representable date interval ranging from 1/1/1998 00:00:00 to 01/10/2032 13:37:03. PLCs do not need to manipulate these numbers, only copy them if necessary.

Was this page useful?