A list of ladder diagram instruction symbols |
We have six comparison instructions list above,
- if equal
- if not equal
- if greater than
- if less than
- if greater than or equal
- if less than or equal
When the input to the instruction is true, it make a comparison between two operands as set in its property. This instruction will output true whenever the result of the comparison returns true.
For a simple example to test this instruction, I use the if equal ladder diagram instruction to compare between the preset characters and the received characters from UART. If the comparison is true the program will turn on/off the output coil.
Ladder diagram example |
In this example we use internal set and reset output coils to control an external output coil.
Schematic diagram |
Click here to download the zip file of this working example.
No comments:
Post a Comment