AUTOMATION OF PLC PROGRAMMING WHEN IMPLEMENTING ALGORITHMS OF GUARANTEEING

During developing programs for programmable logic controllers (PLCs) the concept of model-oriented design is increasingly used. In particular, usage of Simulink PLC Coder is giving the opportunity to get SCL program code from Simulink model which contains certain dynamic elements. Then, for example, this SCL code can be transformed to functional blocks of the Simatic S7-300 (VIPA 300) PLC. This significantly reduces the time required to develop code in the language of SCL and reduces requirements for specialists’ qualification when developing control systems. In this article we provide an example of PLC programming automation when implementing algorithms of guaranteeing control (AGC). For certain types of technological processes it is typical to contain monotonically increasing function of the effectiveness with fixed one-way restriction in regulations. For example, in the grinders, presses, extruders the load current of the drive is stabilized using the change of feed. Energy efficiency of these plants will increase with increasing of the set point (SP) to the controller of the drive load current stabilization loop. However, an increase in SP increases the probability of triggering appropriate protection, for example, as a result of random changes in the properties of raw materials. Therefore, to avoid this accident, the power of driving motors is often unreasonably overrated. And in this case they are used with currents equal to the half of rated.Systems of guaranteeing control (SGC) are used to solve the contradiction between the need to improve the efficiency and increasing probability of an accident. In [1] the SGC theory basics are represented. SGC ensure the maximum approach of the process value


Abstract
During developing programs for programmable logic controllers (PLCs) the concept of model-oriented design is increasingly used.In particular, usage of Simulink PLC Coder is giving the opportunity to get SCL program code from Simulink model which contains certain dynamic elements.Then, for example, this SCL code can be transformed to functional blocks of the Simatic S7-300 (VIPA 300) PLC.This significantly reduces the time required to develop code in the language of SCL and reduces requirements for specialists' qualification when developing control systems.In this article we provide an example of PLC programming automation when implementing algorithms of guaranteeing control (AGC).For certain types of technological processes it is typical to contain monotonically increasing function of the effectiveness with fixed one-way restriction in regulations.For example, in the grinders, presses, extruders the load current of the drive is stabilized using the change of feed.Energy efficiency of these plants will increase with increasing of the set point (SP) to the controller of the drive load current stabilization loop.However, an increase in SP increases the probability of triggering appropriate protection, for example, as a result of random changes in the properties of raw materials.Therefore, to avoid this accident, the power of driving motors is often unreasonably overrated.And in this case they are used with currents equal to the half of rated.Systems of guaranteeing control (SGC) are used to solve the contradiction between the need to improve the efficiency and increasing probability of an accident.In [1] the SGC theory basics are represented.SGC ensure the maximum approach of the process value Problem statement: for certain types of technological processes it is typical to contain monotonically increasing function of the effectiveness with fixed one-way restriction in regulations.For example, in the grinders, presses, extruders the load current of the drive is stabilized using the change of feed.Energy efficiency of these plants will increase with increasing of the set point (SP) to the controller of the drive load current stabilization loop.
However, an increase in SP increases the probability of triggering appropriate protection, for example, as a result of random changes in the properties of raw materials.Therefore, to avoid this accident, the power of driving motors is often unreasonably overrated.And in this case they are used with currents equal to the half of rated.Systems of guaranteeing control (SGC) are used to solve the contradiction between the need to improve the efficiency and increasing probability of an accident.
In [1] the SGC theory basics are represented.SGC ensure the maximum approach of the process value   Using SGC makes sense if we consider the events   lim t) ( y y as rare.In accordance with Poisson distribution, probability that on the time interval T will be no event as , is defined by the expression: From ( 1) and (3) we get: Probability characteristics of t) ( y and of error ER(t) stochastic components subject to (1) are identical.Probability characteristic evaluation module (PCEM) on moving time interval evaluates ) (t ER using equations similar to (6).Set point calculation module (SPCM) operates in accordance with (4).
For control systems specialists it is usual to make models of the control systems in Simulink environment of MatLab package.Taking into consideration, that PLC Coder package [2] is also component of MatLab, we have an opportunity to convert equations ( 4), ( 6 absence, i.e. absence of "spikes" time interval.The article discusses:  block diagram of a closed-loop SGC with a calculation of permissible set point value SP;  violations of regulations math models;  Simulink models of probability characteristic evaluation module (PCEM) on moving time interval and set point calculation module (SPCM).Is is described how to get Simatic S7-300 PLC functional blocks using Simulink PLC Coder.A LAD program of SGC implementation is shown.Key words Systems of guaranteeing control, Simulink PLC Coder, Step 7, PLC.
Problem solution: as an example, a block diagram is provided showing a closed-loop SGC with calculation of permissible set point SP using model of regulations violations[1, p. 47].

Fig. 1
Fig. 1 Block diagram of a closed-loop SGC ) from Simulink models to SCL program code and then use it in Step 7 package during Simatic PLCs programming.It is necessary to make models of low frequency filters and differenciator using Z-transfer functions.On fig. 2, 3 models of PCEM and SPCM in Simulink are shown.For code generating models shown on fig.2, 3 are converted to Subsystems.And then using command generate code we get SCL program code, which is fully compatible with Step 7 programming environment.After compilation this program code can be presented in functional blocks which can be uploaded to the Simatic S7 300 or Vipa 300 PLCs.