The PLCs, running in the deployment PCs which are connected to the controlled plants, are in charge of closing the control loop over the plant, by means of the functionality implemented in them by the professor using Structured Text.
The PLCs that have been developed so far are characterized by acting periodically and accondingly with the classic feeback loop presented in the following figure. That is, they read the plant output, obtain the control signal taking into account the plant output and the reference signal (which is also generated by the PLC), and apply the control signal over the plant input. To implement the periodic behavior of the controller and of some of the available reference signals, we configure two PLC timers with the purpose of letting the external application define the period of the system. Besides, other configuration parameters such as those that define the reference signals and the controllers properties are stored in structured variables that are modified from an external application (in our case the EJS applet) to change the characteristics of the controller. Finally, all the information that is monitorized periodically be the external application is stored in another structure with the purpose of letting the application obtain all its data in a single reading operation.
Finally, it is worth highliting that the PLC runs independently of the external application, which only access its parametrization structure variables to modify their values and its evolution structure variable to observe the controller and system evolution. In other words, the control loop is closed by the PLC and the extern application is only in charge of sporadically changing the properties of the controllers and of monitorizing its state.
