Jump to content

Recommended Posts


Posted

-----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).

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...