6/21/2016 7:16 PM | |
Joined: 3/14/2008 Last visit: 11/6/2024 Posts: 2123 Rating: (950)
|
Hello STB601, What you want to do is very much possible. What you must look out for is readability of the code and the execution of the code. The power of PCS7 is mainly the use of SFC's, because the SFC's can be read by the operator as well. But, when some AND/OR conditions are set in a step, the operator finds it hard to see what is executed in a certain step. So, if this SFC must be known and visible to the operator, you must find a way that the operator understands it. One thing to remember is the execution of the code as well. What happens when a SFC is aborted? You must reset the execution of the code in the end step or work with "initialization" and "termination" logic. In "initialization" you will set a signal and in "termination" you reset the signal. If you need the same signal in the next step, you will use the same logic. You are sure that a signal is set and reset in one step. But, readability will decrease. In my opinion, I don't like to use this code. One way I've seen before is the following: In each step, you wil set a "step number". Step 1= 1.0, Step 2 = 2.0 etc. You can use a simple MonAnL to set this number. Next, you can use a equalizer (Compare real) for each stepnumber (Equal to). When this is the case, you can use the output of the comparator to set an action. You can also combine steps like: Pump on when Stepnumber is 1.0 OR 2.0 OR 3.0. But again, this is for me "programming under the hood". If the SFC must be tracked by the operator, is not handy to do this, but if this is an intern SFC, you can use this. Maybe one other way is to use SFC types. When you have an instance of the SFC type, you can just insert this like any normal block in CFC. Thus, you can connect things easily and you can expand the "standard IO" of an SFC by your own like timers, bit logic, setpoints, process values etc. The disadvantage is that an SFC is a bit more work. Also, the big advantage is that you have to configure one SFC type, and then you can use 1, 10, 100 instances of the SFC type. SFC instances are updated all at once. The disadvantage is then that when you change the SFC type, all instances must be set to idle when downloading the changes. So, all SFC's must be terminated. This is only needed when subsequent changes are made, like changing steps, adding steps like a normal SFC chart.
|
Last edited by: Oreca at: 6/21/2016 7:48:10 PMIf I could help you, you can use the RATE button. Thank you. |
|
This contribution was helpful to1 thankful Users |
6/22/2016 9:14 AM | |
Posts: 18 Rating: (3) |
Thanks Oreca, I'll give a look at the SFC types. |
Last edited by: STB601 at: 6/22/2016 12:14:07 PM |
|
Follow us on