Hi everyone,
I was writing some STL code and then I got stuck and even though I have read Festo’s FCC60 manual and I cannot logically account for what the PLC is doing and why it is doing it.
So as you can see, I am using a stepwise STL. Based on my understanding of the STL format, the PLC should stay on a current step if the conditions of that step have not been satisfied and therefore it will not be fully executed. Moreover, my teacher told me that as long as the condition section of a step remains true, the executive part of that step will keep executing. For example on “Step 2”, as long as “level2” remains “ON” the timer “T1” should keep restarting with its preset value of “10s”.
I would really appreciate it if you guys could confirm this.
But the real issue is quite strange. So what happens is that the STL reaches “Step 3” and does not go into “Step 3”. Meanwhile, Timer 1 “T1” keeps finishing 10 seconds over and over again. So when 10 seconds finish another 10 seconds start.
I thought this is because of keeping “level2” “ON”, so I turned it “OFF”, but the programed went back to “Step 1” and stopped in the beginning of “Step 2”, which makes sense. Wait for it, it gets funnier. I ran the program once more and got stuck in the same place again. However, this time I turned “level3” “ON” and all of the sudden the program finished “Step 3”, BUT now it got stuck at the beginning of “Step 4”. I cannot see why all of this is happening. Why I got stuck before “Step 3” before? Technically, “level3” should have nothing to do with execution of “Step 3”, so why does it get stuck at the beginning of “Step 3”. Is the PLC actually seeing ahead two steps and then deciding to move on or not? And finally, when the program eventually finishes “Step 3” after turning “level3” “ON”, why does it get stuck in the beginning of “Step 4” and does not go through it?
Here is the code:
I was writing some STL code and then I got stuck and even though I have read Festo’s FCC60 manual and I cannot logically account for what the PLC is doing and why it is doing it.
So as you can see, I am using a stepwise STL. Based on my understanding of the STL format, the PLC should stay on a current step if the conditions of that step have not been satisfied and therefore it will not be fully executed. Moreover, my teacher told me that as long as the condition section of a step remains true, the executive part of that step will keep executing. For example on “Step 2”, as long as “level2” remains “ON” the timer “T1” should keep restarting with its preset value of “10s”.
I would really appreciate it if you guys could confirm this.
But the real issue is quite strange. So what happens is that the STL reaches “Step 3” and does not go into “Step 3”. Meanwhile, Timer 1 “T1” keeps finishing 10 seconds over and over again. So when 10 seconds finish another 10 seconds start.
I thought this is because of keeping “level2” “ON”, so I turned it “OFF”, but the programed went back to “Step 1” and stopped in the beginning of “Step 2”, which makes sense. Wait for it, it gets funnier. I ran the program once more and got stuck in the same place again. However, this time I turned “level3” “ON” and all of the sudden the program finished “Step 3”, BUT now it got stuck at the beginning of “Step 4”. I cannot see why all of this is happening. Why I got stuck before “Step 3” before? Technically, “level3” should have nothing to do with execution of “Step 3”, so why does it get stuck at the beginning of “Step 3”. Is the PLC actually seeing ahead two steps and then deciding to move on or not? And finally, when the program eventually finishes “Step 3” after turning “level3” “ON”, why does it get stuck in the beginning of “Step 4” and does not go through it?
Here is the code: