TwinCAT PLC Library Hydraulics - Version 1.4 — 4.4.3.5 MC_AxRtReadPressureSingle_BkPlcMc (from V3.0)

PLCopen Motion Control Now determine and log the values for AdcValueA and AdcValueB . The tank pressure – and therefore the ambient pressure – should be present both on the A-side and on the B-side. Should this not be the case for some reason, the pressures on the A- and B-side should be determined through measurement. Use the values found in this way as MIN values in the equations mentioned above. Take the pressure for the upper limit of the electrical signal (10 V, 20 mA) from the data sheet specifications for the pressure sensors. Use the upper limit value for the converted electrical value as AdcValueA and AdcValueB . Use these values as MAX values in the equations mentioned above.

The parameters to be entered can then be calculated as described above. 4.4.3.5 MC_AxRtReadPressureSingle_BkPlcMc (from V3.0) The function block handles determination of the actual pressure of the axis from the input data of an analog input terminal. VAR_INPUT AdcValue: INT:=0; ScaleFactor: LREAL:=0.0; ScaleOffset: LREAL:=0.0; ReadingMode: E_TcMcPressureReadingMode:=iTcHydPressureReadingDefault; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; END_VAR VAR_OUTPUT Error: BOOL; ErrorID: UDINT; END_VAR Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. AdcValue :

These parameters are used to transfer the input data of the analog terminal. ScaleFactor : [bar/ADC_INC] This value represents the weighting. It determines which pressure increase corresponds to a stage of the AD converter. ScaleOffset : [bar] This offset is used to correct the zero point of the pressure scale. ReadingMode : The actual value to be determined can be specified here. Axis_Ref_BkPlcMc [ } 67] . ST_TcHydAxRtData [ } 99] . fActPressure is selected as default value. Axis : Here, the address of a variable of type Axis_Ref_BkPlcMc [ } 67] should be transferred. Behaviour of the function block:

The function block investigates the axis interface that has been passed to it every time it is called. During this process, a problem may be detected and reported: If the pointer pStAxRtData in Axis_Ref_BkPlcMc [ } 67] is not initialised, the function block reacts with an Error and ErrorID :=dwTcHydErrCdPtrMcPlc. In this case, the axis cannot be placed into a fault state. PLC Library Hydraulics 158 Version: 1.4 Note If separate input signals are available for the A- and B-sides, a function block of type MC AxRtReadPressureDiff BkPlcMc [} 156] should be used. _ _