Data Blocks Acquired Simultaneously

<< Click to Display Table of Contents >>

 

Data Blocks Acquired Simultaneously

In this mode, users can read variables from decimal tables with timestamps when there is a set of variables that were stored simultaneously. Thus, every set of variables with its linked time information forms a structure, which is repeated several times, hence forming a table. Every structure must be in the format described next.

Data 1 - HHMMSS (Example: 19:02 and 34 seconds are stored as 190234)
Data 2 - DDMMYY (Example: February 18th, 1998 is stored as 180298)
Data 3 - value 1
Data 4 - value 2
(...)
Data N - value N - 2

 

The maximum allowed size for a table is 255 integer operands, or 1020 bytes.

For example, on a table with 255 positions, users want to store several readings of 5 (five) analog variables with timestamps. Thus, that table after filled has the configuration described on the next table, assuming the current date is February 18th, 1998, 09:00:00, with acquisitions at every minute.

Example of a data structure with timestamps

Table Position

Value

Table Position

Value

Table Position

Value

0

090000

7

090100

14

090200

1

180298

8

180298

15

180298

2

Data

9

Data

16

Data

3

Data

10

Data

17

Data

4

Data

11

Data

18

Data

5

Data

12

Data

19

Data

6

Data

13

Data

20

Data

 

And so on, until the table is completely filled.

 

NOTE

Since there are only 2 (two) digits for the year, this Driver is only prepared to work up to 2098.

 

To control access to a table, there are 4 (four) bits of an auxiliary memory in a PLC:

BIT 0 (ask_reading_permission): Performs a request to access the table to a PLC

BIT 1 (reading_allowed): Checks if the request was granted

BIT 2 (clear): This Driver writes 1 (one) to this bit and the PLC is then responsible for zeroing the table and turn this bit back to 0 (zero)

BIT 3 (table_zeroed): This bit indicates whether that table is zeroed

 

To read stored data, users must use a Block Tag with the B2 parameter equal to 6000, where the B3 parameter indicates the initial position of the table and the B4 parameter indicates the address of the byte containing the auxiliary bits described earlier.

When reading, if there is more than one set of values or structures on that table, this Driver returns a list of values for an Elipse Software application, as in the previous example. Reading these structures continues until this Driver finds null values in the first two date and time fields, indicating the end of the table, or until it reaches the limit of 255 operands.

Using resources from the previous example is designed to work only with blocks, so in case of using a single variable, create a block with only one variable.

 

Sequence of Steps Performed by this Driver

1.Checks bit 3 (three, table zeroed). If it is equal to 1 (one), exits or continues otherwise.

2.Writes 1 (one) to bit 0 (zero, asks permission).

3.Checks bit 1 (one). If it is equal to 1 (one), continues or checks once again otherwise. If it is still not authorized, exits. In this case, the PLC must handle the pending request, changing bit 0 (zero, asks permission) to 0 (zero).

4.Reads the first n + 2 variables, in which n is the block size.

5.In case the first 2 (two) values represent a valid date, these values are copied.

6.Repeats the previous step until reaching the end of the table or when null values are found in the first 2 (two) fields.

7.Clears the table, in case at least 1 (one) structure was read, by writing 1 (one) to bit 2 (two, clear).

8.This Driver returns those values to an Elipse Software application.

Was this page useful?