In the PLC ladder diagram instruction, a look-up table is combined in only one instruction.
|  | 
| Look-up table instruction | 
- A dest (destination) is any variable to copy the content to.
- LUT[i] is a table with its index i.
The look-up table must have a name, a specific size i with its index i-1. When the input to this instruction true, it sends an element with a specific index to the destination. The overall parameters list below.
  
  |  | 
| Parameters of look-up table instruction | 
In a simple ladder diagram below, I use this instruction to store a set of ASCII character. It's five in size. The element content of initial index 0 is 65 denotes the ASCII character 'A' and vice versa.
|  | 
| Look-up table ladder diagram example | 
Every one second the PLC send the letter from A to E to the host PC over UART repeatedly.
|  | 
| Schematic Diagram | 
Click here to download this ladder diagram programming example.
 
No comments:
Post a Comment