Chickenkiller91

plc startup ob? run program only 1 time at start

3 posts in this topic

Hello!

Is it possible to run a program only 1 time when i turn on the plc?

In siemens it was ob 100 or soemthing like that, that program only runs one cycle at startup of plc.

I want to make sure some bits are off at startup to be in safe position

Thank you for your help!.

Share this post


Link to post
Share on other sites

Yes - use the first scan flag for setting anything up.

Share this post


Link to post
Share on other sites

You can use the P_First_Cycle flag to turn the bits off directly as Bob suggested.

You can also use the TKON(820) & TKOF(821) instructions to turn on and off an entire task at any time you want. I often create an initialize task that runs once at startup and turns itself off with the TKOF instruction when complete. This works best if you assign the startup task as cyclic task 00 with Operation Start checked (default) and include a TKOF instruction as the last rung of the task immediately before the END(001) instruction.

Share this post


Link to post
Share on other sites

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