11/13/2019 3:59 PM | |
Joined: 9/9/2015 Last visit: 9/4/2024 Posts: 727 Rating:
|
Dear ashadako, Let me further add value to this post. For SFC, it is a combination of step and transition. In steps, there is initialization, processing (execution), and termination (completion). In transition, there is for a condition to go to the next step. When the SFC start, Initialization will run one cycle to execute all the steps/commands for one time. Then, it will go to processing. Processing will be executing the command continuously until the condition in the transition fulfilled. Then, it will go to termination, run for one cycle for one time before entering the initialization of the next steps again. Lets say you have an application to open a valve, Vlv1. There is two types of command in APL, button mode (Default, pulse mode) and switch mode (Static mode). if you have a Switch (static) mode, you will have AutModLi, OpenAut only. When you set AutModLi to 1, it means Auto. When you reset to 0, it means manual. OpenAut =1 , means open the valve. OpenAut = 0, means close the valve. To open the valve, wait for the feedback, and move to the next step, you can either put your "AutModLi =1" and “OpenAut=1" into initialization phase or Processing phase. Then the open command will be sent to the valve to open. When feedback received (condition fulfilled), it will execute the termination phase and move on to the initialization of the next phase. But since it is a switch mode, you do not need to programmed "OpenAut=0" into the termination phase, it will close the valve. If you have a button mode (the default mode), then you will have two extra inputs, which is ManModLi and CloseAut. It is a pulse mode. You will need to put the "OpenAut" = 0 into the termination phase to make sure the "OpenAut" =0 all the time. If this is not done, the next time you want to set the "OpenAut" to 1, it will no longer take effect because it does not have a rising edge. Then you must reset the command you sent in termination phase. I hope this is helpful for you, if you need more clarifications, I can explain more examples. Good luck! |
Please give me 5 stars Rating if my post is helpful for you. :) |
|
This contribution was helpful to
5 thankful Users |
Follow us on