I'm at the beginning of a project and have opportunity to develop the code from scratch. The control system consists of instruments (pressure, temperature, etc.), ON/OFF valves, Control Valves, simocodes, etc. Not a complicated one but quite a few devices is to be used.
For practical reasons (easier to test, maintain and connect with SCADA) basic operation of each device will be programmed in its FB. Of course the same FB will be used for the same type of device. The process logic will be done in FCs and FBs 'above' devices level.
I'm bit uncertain how to approach and organise Control Valve FB where PID control is to be implemented as well. As SFB41 must be called from OB3x, is it better to store PID parameters in CV FB and pass it to PID each time or all the parameters store in DBs relevant for SFB41? The answer would be simpler if only one set of parameters was used for one CV. In this project few modes are available for one CV, each mode forces different PID settings, setpoints, process values, etc. There should be manual mode on top of this as well as fixed position mode forced by a system.
I'm sort of half way and cannot make decision what solution would be better - could you please share your experience and describe the way your codes are organised when it comes to a similar system?
Thanks!
For practical reasons (easier to test, maintain and connect with SCADA) basic operation of each device will be programmed in its FB. Of course the same FB will be used for the same type of device. The process logic will be done in FCs and FBs 'above' devices level.
I'm bit uncertain how to approach and organise Control Valve FB where PID control is to be implemented as well. As SFB41 must be called from OB3x, is it better to store PID parameters in CV FB and pass it to PID each time or all the parameters store in DBs relevant for SFB41? The answer would be simpler if only one set of parameters was used for one CV. In this project few modes are available for one CV, each mode forces different PID settings, setpoints, process values, etc. There should be manual mode on top of this as well as fixed position mode forced by a system.
I'm sort of half way and cannot make decision what solution would be better - could you please share your experience and describe the way your codes are organised when it comes to a similar system?
Thanks!