
|
|
|
|
|
|
|
|
|
|
|
|
|
| Appendix D How to Use PLC Function | |||||||||
Program Example: |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
| Ladder diagram: |
|
| Command code: |
| Operation: |
|
|
|
| |||||||||||||
|
|
|
| X0 | Y1 | LD |
| X0 |
| Load contact A of X0 |
|
| |||||||||||
|
|
|
|
|
|
|
| ||||||||||||||||
|
|
|
|
|
|
|
|
|
| OR |
| X1 |
| Connect to contact A of |
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
|
|
|
| X1 |
|
|
|
|
|
|
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| X1 in parallel |
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| OUT |
| Y1 |
| Drive Y1 coil |
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
| Mnemonic |
|
|
|
|
|
| Function |
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
|
| ORI |
|
| Parallel connection- B contact |
|
|
|
| ||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
| Operand | X0~X17 |
| Y0~Y17 | M0~M159 |
| T0~15 |
| C0~C7 |
| D0~D29 | ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
| 9 |
|
| 9 |
|
| 9 |
| 9 |
| 9 |
| ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Explanations:
The ORI command is used in the parallel connection of B contact. The function of the command is to readout the status of present specific series connection contacts, and then to perform the “OR” calculation with the logic calculation result before the contacts, thereafter, saving the result into the accumulative register.
Program Example: |
|
|
|
|
|
|
|
| ||||||||
| Ladder diagram: |
|
| Command code: | Operation: | |||||||||||
|
|
|
| X0 | Y1 |
| LD |
| X1 | Load contact A of X0 | ||||||
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
| ORI |
|
| X1 |
| Connect to contact B of | |
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
| X1 |
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| X1 in parallel | ||
|
|
|
|
|
|
|
|
|
|
| OUT |
| Y1 | Drive Y1 coil | ||
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
| |||||||
| Mnemonic |
|
|
|
|
|
| Function |
| |||||||
|
|
|
|
|
| |||||||||||
|
| ANB |
|
| Series connection (Multiple Circuits) | |||||||||||
|
|
|
|
|
|
|
|
|
| |||||||
| Operand |
|
|
|
|
|
| None |
| |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Explanations:
To perform the “ANB” calculation between the previous reserved logic results and contents of the accumulative register.
Revision June 2008, 04EE, |