Block Tags with PLC-Provided Timestamps

<< Click to Display Table of Contents >>

 

Block Tags with PLC-Provided Timestamps

To automatically transfer values with their own timestamp to an application, users must create a queue in any area of a PLC's memory, with the following features:

It must be a continuous area formed by cells in the following format, for a Block Tag with size N:

Month × 100 + Day

Hour × 100 + Minute

Year × 100 + Second

Value of Element 0 (zero)

Value of Element 1 (one)

Value of Element N

Checksum

 

A checksum is calculated as a simple sum of all Elements of that cell.

Two control words must be placed in two consecutive memory addresses. The first one is a reading status. When starting the queue reading, the application writes 1 (one) to this memory position. When finishing this reading, it writes the value 2 (two), indicating that data was successfully read, and it can be discarded from the queue. When zeroing the queue, the PLC must set this variable to 0 (zero). The second control word contains the size of the queue in Words. Thus, if there is an N-sized block, each cell must have a size of N + 4, that is, N Elements + Month + Hour + Year + checksum, and the total size of the queue is, therefore, the number of cells multiplied by N + 4.

When configuring the first control variable to 1 (one), the application indicates to the PLC that it started a reading process. While this operation is executing, new data must not be added to the queue. In this case, data must be stored in another area and transferred to the queue after finishing this operation, that is, after the application configures the variable to 2 (two) and the PLC zeroed the queue.

To avoid problems in case of reading errors, the PLC must reset the control variable to its initial position (zero) three minutes after starting the operation.

Was this page useful?