TwinCAT PLC Library Hydraulics - Version 1.4 — 5.6 Sample programs (from V3.0)

Knowledge Base For TC3: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/ zip/9007204192368011.zip The example shows the use of a list of POINTER TO Axis_Ref_BkPlcMc. The use of MC_AxAdsPtrArrCommServer_BkPlcMc [ } 199] instead of MC_AxAdsCommServer_BkPlcMc [ } 198] makes it possible to distribute the axis references. The list must be updated in each cycle. This update must be carried out before calling MC_AxAdsPtrArrCommServer_BkPlcMc [ } 199] . Example 18: Locking PlcMcManager For TC2: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/zip/1599886091.zip For TC3:

https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/ zip/9007204192370571.zip It may be necessary to disable PlcMcManager commands such as Jog, MoveAbs or Stop. This can be done in the PLC with MC_AxRtCommandsLocked_BkPlcMc [ } 187] . Example 100: Electronic gearing For TC2: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/zip/1599888267.zip For TC3: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/ zip/9007204192404619.zip The example shows how two slave axes can be coupled by an electronic gearing via a master axis (axis 3). The coupling is created and released by MC_GearIn_BkPlcMc [ } 51] and MC_GearOut_BkPlcMc [ } 55] .

It must be ensured that the dynamic parameters of the master and slave are compatible with each other, otherwise the slave cannot follow the master. To establish the coupling, the master and slave must be in idle state. The coupling can be released during the motion. The master axis moves to the target and the slave axis is stopped when the coupling is released. Example 101: Electronic cam plate For TC2: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/zip/1599890443.zip For TC3: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/ zip/9007204192407179.zip Axes 1 and 2 are coupled to virtual axis 3 via a cam plate.

In this example, the coupling parameters for axis 1 are stored in the text file TcPlcMcEx_101_2.txt . For axis 2, the coupling parameters are calculated in function block "FB_CalculateCamTable2". MC_CamTableSelect_BkPlcMc [ } 46] is used to specify the master and slave axis and the cam table. In function block MC_CamIn_BkPlcMc [ } 44] the coupling is generated and the set values for the slave are calculated. If the master axis is moved via the PlcMcManager, the slave axis follows the corresponding cam plate. The coupling is canceled with MC_CamOut_BkPlcMc [ } 45] . Example 103: Flying gear coupling For TC2:

https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/zip/1599892619.zip For TC3: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/ zip/9007204192409739.zip Demonstration of an activated flying gear coupling with function blocks MC_GearInPos_BkPlcMc [ } 53] and MC_GearOut_BkPlcMc [ } 55] . Example 104: Synchronization control For TC2: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/zip/1599894795.zip For TC3: https://infosys.beckhoff.com/content/1033/tcplcLibhydraulics30/Resources/ zip/9007204192412299.zip PLC Library Hydraulics 259 Version: 1.4