When the input goes to this rung is true, it causes the program to rung N or any rung with the label.
For example GOTO(N),
- When N==0, the program jumps to the beginning to the PLC cycle. It clear the watch dog timer, then it continuous to rung 1.
- When N==0, the program jumps to the address 0. It's a soft reset of the PLC program.
- When N is any label, the program jumps the the rung with that label.
For more information, click here to see the original post from GitHub.
For an introductory example, I use the GOTO instruction to jump to rung 4 of PLC ladder diagram.
GOTO LABEL ladder diagram example |
In the ladder diagram example above,
- At rung 1, the program is commanded to skip the two remanding rungs 2 and 3.
- It jumps to rung 4 and stay there until the next reset.
This ladder program could be considered as non-sense. However, we can make a circuit just of leisure.
Ladder Diagram Example |
The result of this program shown below.
Ladder diagram program simulation result |
Since rung 2 and 3 are skipped, these rungs are not active. The program jumps to rung 4, activating the output coil that connect to RC2 of PIC16F876A.
Click here to download the zip file of this example.
No comments:
Post a Comment