RMA
Member
On restart of the PLC, I want to go through all the modules in the system and open all the motor driven switches. I've already got the FC to do this for one module which I use for the case when a module comes back on-line after having been powered down or had a DP fault. The number of the module concerned is passed to the FC as a parameter.
The simplest way to handle this seems to be to write another FC which initialises the Module Number with 21 (the highest module number) and then calls the existing FC to do the actual switching before LOOP-ing back to the start and repeating the process with the next lower Module number.
The problem is that the actual switching FC has a 1 sec Timer to create the Pulse which starts the motor in the switch. What happens if the FC is called again while this timer is running. Does S7 automatically create another instance of the FC, or do I have to wait until the timer has finished before calling the FC again?
The simplest way to handle this seems to be to write another FC which initialises the Module Number with 21 (the highest module number) and then calls the existing FC to do the actual switching before LOOP-ing back to the start and repeating the process with the next lower Module number.
The problem is that the actual switching FC has a 1 sec Timer to create the Pulse which starts the motor in the switch. What happens if the FC is called again while this timer is running. Does S7 automatically create another instance of the FC, or do I have to wait until the timer has finished before calling the FC again?
Last edited: