1. Right-click the References node > Add library...
2. In the Add Library dialog under Motion→MC3, make the choice of the Tc3_Mc3FluidPower and Tc3_Mc3Ptp libraries and click OK to confirm.
PLC implementation
Create one instance each of Tc3_Mc3FluidPower.MC_ValveCharacteristicCurve (see MC_ValveCharacteristicCurve), Tc3_Mc3FluidPower.MC_ValveCharacterization (see MC_ValveCharacterization), Tc3_Mc3FluidPower.ValveCharacterizationOptions (see ValveCharacterizationOptions), and the desired number of characteristic curve points numberOfValveCharacteristicCurvePoints.
Make a connection between the reference Tc3_Mc3FluidPower.MC_ValveCharacteristicCurve and the Valve Characteristic Curve object of the FluidPower axis
Powering the FluidPower axis
Setting the options and starting the characterization of the valve characteristics
After successfully identifying the characteristic curve, activate the characteristic curve
VAR FluidPowerAxis : AXIS_REF;
fbPower : MC_Power;
fbValveCharacteristicCurve : MC_ValveCharacteristicCurve; // reference to valve characteristic curve object fbValveCharacterization : MC_ValveCharacterization; // handling of valve curve characterization stValveCharacterizationOptions : ValveCharacterizationOptions; // options for valve curve characterization
numberOfValveCharacteristicCurvePoints : UDINT := 41; // number of curve points, must be an odd number nErrorId : UDINT;
IF NOT bInit THEN //connect valve characteristic curve object of MC3 axis nErrorId := fbValveCharacteristicCurve.Connect(); bInit:= fbValveCharacteristicCurve.IsConnected; END_IF
CASE nState OF 0: //enable IF bStart AND fbValveCharacteristicCurve.IsConnected THEN IF NOT fbPower.Status THEN fbPower.Enable := TRUE; fbPower.EnableNegative := TRUE; fbPower.EnablePositive := TRUE; ELSE bStart := FALSE; nState := nState + 1; END_IF END_IF
2: //enable valve characteristic curve IF NOT fbValveCharacterization.Busy THEN IF fbValveCharacterization.Done THEN fbValveCharacterization.Execute := FALSE; fbValveCharacteristicCurve.Enable(); nState := nState + 1; END_IF END_IF