6. Function blocks
6.1 Manufacturer function blocks
6.1.5.7 TB - Table function
General
easyE4 base devices provide 32 table function function blocks,
TB01 through TB32.
The table function block allows you to easily create and read
table entries in the form of double words (32 bit).
You can select a LIFO or FIFO function for read operations.
A table can contain up to 16 double words.
Operating principle
Writing to a table
The function block is enabled when EN=1. When the function block is enabled and
there is a rising edge at the function block input, the current value at function block
input I1 will be added to the table. Every time there is an edge, a double word (32 bits)
will be assigned a value.
It is permissible to simultaneously activate the module inputs WN and WP with a
rising edge.
Every new table entry will be appended after the last entry until the sixteenth entry is
reached. At the same time, function block output QN will be incremented by 1 . QN
indicates the current number of entries. If I1 is added successfully, the input value
that was just entered will be output at function block output QV.
Once the maximum number of 16 table entries is reached, no more data will be added
to the table. If you want to keep making table entries in this scenario, you will first
need to clear the entire table with a rising edge at function block input RE. Function
block output QN will be set to 0 in this case.
Reading from the table
A table can be read from the table's beginning or end.
When there is a rising edge at the RF function block input, the oldest value in the
table will be read and output at output QV (FIFO function).
The read operation deletes this value from the table and the actual number of entries
is decremented by 1 at the QN output.
A rising edge at the RL function block input causes the most recent value entered in
the table to be output at QV (LIFO function).
The read operation deletes this value from the table and the actual number of entries
is decremented by 1 at the QN output.
easyE402/24 MN050009ENEaton.com
447