Programmable Logic Controllers
Pico Controllers
Table Function for Pico GFX

Symbol in the function
block diagram
The devices provide 32 table function blocks TB01...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.
Writing to a table
The function block is activated when the EN coil = 1 When the function block is activated and there is a rising edge at the WP coil, the current value at the double word input I1 is transferred to the table. A double word is (32 bit) is assigned with each rising edge.
The EN coil and the WP coil can be activated simultaneously with a rising edge.
Each new table entry is appended behind the last entry until the sixteenth entry is reached. The QN output is incremented by 1 at the same time to indicate the current number of entries. The QV output provides the last input value entered to indicate that the transfer from I1 was successful.
No further data is transferred to the table if the maximum number of 16 table entries is reaches. If you then wish to make further table entries you must clear the entire table beforehand with a rising edge at the RE coil. The QN output is set to 0.
Reading from the table
A table can be read from the start of the table or from the end.
A rising edge at the RF coil causes the oldest value entered in the table to be read and output at QV (FIFO function).
The read operation also 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 coil causes the most recent value entered in the table to be output at QV (LIFO function).
The read operation also deletes this value from the table and the actual number of entries is decremented by 1 at the QN output.
Linking and Parameter Assignment of a Table Function Block
Requirements: You have included a control relay or visualization device in the project and have switched to Circuit Diagram View.
- Position a TB function block on a coil field in your circuit diagram.
- In the Properties field window select the required function block number on the Circuit Diagram Element tab.
- Assign a word operand to the function block input I1 so that a value can be transferred.
- Connect the coils TBxxEN, TBxxWP, TBxxRF etc. with the contact suitable for activation.
- If required, write a comment for the selected operand.
If you wish to check if a table is full or empty, you must also program this function block as a contact.
- Position the function block on a contact field and select the same function block number in the Circuit Diagram Element tab that you have assigned to the coil.
- If required, change the switch function of the contact from break to make contact.
- If necessary, position the function block on a contact field and associate TBxxTE (table empty) and TBxxTF (table full) with a Boolean operand suitable for evaluation tasks.
Whether you position the function relay first of all in a coil field or contact field or whether you make the entries in the Parameters tab of a coil or a contact is not important. It is only important that you have selected the same function block number if you also want to configure the same function block.
Circuit diagram elements and parameters
| Description | Note | |
|---|---|---|
| Function block input (DWord) | ||
| I1 | Input value to be transferred to the table. Value range: -2 147 483 648...+2 147 483 647 | |
| Function block outputs (DWord) | ||
| QV | Read operation: The value read from the start or end of the table. Write operation: The input value just entered. |
|
| QN | Actual number of table entries present: Value range: 0...16 | |
| Coil function (bit input) | ||
| EN | Enable coil Activates the function block on EN = 1. |
|
| WP | Trigger coil A rising edge (trigger) and EN = 1 enters the value into the table. |
QN is incremented by 1 with each write operation. |
| RF | Trigger coil A rising edge (trigger) and EN = 1 causes the oldest value entered in the table to be read and output at QV (FIFO function). |
QN is decremented by 1 with each read operation. |
| RL | Trigger coil A rising edge (trigger) and EN = 1 causes the most recent value entered in the table to be read and output at QV (LIFO function). |
QN is decremented by 1 with each read operation. |
| RE | Trigger coil A rising edge (trigger) clears the entire table. The QN output is set to 0. |
|
| Contact (bit output) | ||
| TE | Status 1 if the table is empty. | |
| TF | Status 1 if the table is full. | |
| Parameter set | ||
| Call enabled | Function block parameters can be viewed on the device. | |
| Simulation | ||
| Possible |
Memory Requirement
The table function block requires 112 bytes of memory plus 4 bytes per constant at the function block input.
Retention
The table function block does not recognize retentive data.
