mister x

What is wrong with this SFC

4 posts in this topic

I have been working at learning programming languages, and one of the books I have been reading has the following code.  But it doesn't run when I load it to a Softlogix CPU.  It won't go beyond the first step.  When I try to force the Tran_000 trigger (BACKWASH_START_PB) to a 1, it flips back to 0 instantly.  It's that tag that is the problem, because I made a tag not used elsewhere in the routine in it's place and it will run the program no problem.  What is wrong here?  thx

Why won't this work.PNG

Share this post


Link to post
Share on other sites

Step 0 is set to a type N - non-stored which means the code in the step is continually scanned, so every time you set BACKWASH_START_PB to a 1 the code in step 0 sets it back to a zero. 

If you click the square box next to the N you can set the Qualifier to Pulse (Rising Edge) which means the code in step 0 will only be scanned on the rising edge of the step becoming true.

 

Share this post


Link to post
Share on other sites

Thx, that was a good first step to figuring this out.  The next problem is that the routine blows by the timer I set for Step_001 and goes straight through to the end.  Here is my setting downloaded to the CPU.  I thought this would pause at Step_001 for 30 seconds....?

Timer.PNG

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