PLCopen Motion Control Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. Axis : Here, the address of a variable of type Axis_Ref_BkPlcMc [ } 67] should be transferred. Behaviour of the function block: TRUE at Reset puts the function block in an idle state, irrespective of the other control signals. Active is then FALSE and Response := 0.0, since both the P component and the I component are deleted. The input ReadingMode determines which variable is assigned the parameter to be controlled in the stAxRtData structure. iTcHydPressureReadingDefault, iTcHydPressureReadingActPressure: fActPressure is controlled.
iTcHydPressureReadingActForce: fActForce is controlled. Any other value deactivates the controller. NOTE! The set value has to be specified in fSetPressure in the stAxRtData structure of the axis. During active operation the behavior of the function block is determined by the inputs EnableP and EnableM . They determine whether the function block should intervene in positive or negative direction during a motion. Note that the function block is tasked to counteract an active travelling motion. EnableP should therefore be set if travelling motion in positive direction should not exceed a specified pressure.
In opposite direction of travel EnableM enables a pressure-limiting controller response in positive direction. First, the function block determines whether it has to assume or quit the active state. To this end the signals EnableP , EnableM , the sign of ST_TcHydAxRtData [ } 99] .fSetSpeed and the difference between SetPressure and the selected actual value are evaluated. During transition to the active state the I component is initialized with PreSet . It is loaded with a starting value, which in combination with ST_TcHydAxRtData [ } 99] .fSetSpeed results in the value of PreSet .
If the output value matching fSetPressure is known, it can be utilized for reaching the compensated state more quickly. In practice, the choice of this parameter should be made dependent on the behavior of the controlled system. This is mainly influenced by the flexibility of the pressed in object, but also by the selected velocity. If the increase is rather slow compared with the Tn used, the current control value from ST_TcHydAxRtData [ } 99] .fSetSpeed should be used as preset value. If the actual pressure responds with a rapid increase, it is advisable to use a value, which takes into account the set pressure and the pressure amplification of the valve.
A P component is then calculated with kP, an I component with Tn . The sum of these controller components is output as Response, and the state of the controller is indicated as TRUE at Active . The transition to the inactive state results in deletion of the controller components and is indicated with FALSE at Active . Integration of the function block in the application A function block of this type must be called after the actual value and actual pressure acquisition, and after the control value generation.
If function blocks are called for velocity or position control, these must also be positioned before the pressure regulator function block, or the responses of the controllers should be coordinated with due diligence. Although the pressure regulator calculates a response, it is not entered in the ST_TcHydAxRtData [ } 99] structure. This is done by the application, depending on Active and taking into account signals of other controllers. Usually, Response is assigned to the variable ST_TcHydAxRtData [ } 99] .fLagCtrlOutput. The MC_AxRtFinish_BkPlcMc [ } 175] function block to be positioned after the controller function block then considers the response automatically. NOTE!
A value greater than 0 in FirstAuxParamIdx can be used to instruct the function block to use three consecutive values in the fCustomerData of the parameter structure as Tn, kP and PreSet. If the address of a suitable ARRAY[..] OF STRING() is entered in Axis.pStAxAuxLabels, the parameters are automatically assigned a name. PLC Library Hydraulics 120 Version: 1.4