Before any code is written, it is important to have a controls architecture in place. Essentially, architecture allows you to design your building blocks for creating an overall control system and should be based on a requirements document that is designed first with the basic controls components defined then more complicated controls blocks defined later. These basic components could be the mechanical & electrical components which are the most fundamental blocks of the controls design. Examples of mechanical & electrical controls components could be the individual valves on a valve manifold unit, or it could be the pump or VFD portion of a pump unit or the motor on a conveyor unit, or it could be the flow/encoder sensors on a pump. Other examples include the Low Voltage contactors that control the Low Voltage power to a control system. It matters that you define and design these basic blocks first before more complicated control blocks are designed.
The next step is to define and design a unit function block. A unit or unit function block consists of the mechanical and electrical components associated with the functionality of a unit. For example, a pump unit consists of the VFD, motor, gear box, and pump with flow or pressure sensors associated with that pump unit. A conveyor unit consists of the motor, gear box, and belt with position or speed sensors associated with that conveyor unit. These units may have functionality to set speed or flow values and decode the inputs signals from the mechanical & electrical components. Finally, a process or motion control block is defined and designed. A process or motion control block may contain many of these function block units that controls the function block units in a way a maestro conducts an orchestra in synchronization. In this way, we design controls code with a parent-child tree structure with PLC Inputs from sensors & PLC Outputs to actuators associated with the children function blocks and the parent function blocks then calling the children function blocks. This makes the code much easier to manage, debug, and expand upon on and mitigates the development of spaghetti code where children call parents.
0 Comments
|
AuthorGraham is a control system engineer enthusiastic about controls, design, hockey, and art! Archives
April 2023
Categories |