christophertedjo Posted November 15, 2016 Report Posted November 15, 2016 how to make looping in ladder logic? but i want to make the data +1 each time until 3 and return back to 0 after reaching 3.
Crossbow Posted November 15, 2016 Report Posted November 15, 2016 There are FOR NEXT loops in most Mitsubishi PLCs. Or you can use JUMP, but a loop is a better choice.
Luke.S Posted November 16, 2016 Report Posted November 16, 2016 -----Mov K0 D0 -----[FOR K3] -----INC D0 -----[NEXT] D0 will be 0,1,2,3. This will happen every scan and you will only be able to use the final evaluated value D0=3 (unless you move the intermediate values to other locations using index registers).
Andrei Blagaila Posted November 16, 2016 Report Posted November 16, 2016 I use a more basic but time consuming method. MOV K0 D0 =K0 D0 Instructions and after MOV K1 D0 =K1 D0 Instructions and after MOV K2 D0 =K2 D0 instructions and after MOV K3 D0 =k3 D0 -> Mov K0 D0 And it goes in a loop
Bryll Posted November 16, 2016 Report Posted November 16, 2016 21 hours ago, christophertedjo said: how to make looping in ladder logic? but i want to make the data +1 each time until 3 and return back to 0 after reaching 3. I suspect that you would like to do something in your program depending on the value in your counting register. Then you might want to increment the value after a time delay or perhaps a status change. This will change your value after one seconds delay. |--(M8013)--[INCP D0]- Increment value in D0 on rising edge of M8013 (Seconds pulse in the FX systems) |--(D0 > K3)--[RST D0]- Clear D0 if the value of D0 is greater than 3.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now