TwinCAT PLC Library Hydraulics - Version 1.4 — 4.4.5.4 MC_AxTableFromBinFile_BkPlcMc (from V3.0)

PLCopen Motion Control Behaviour of the function block The function block searches inside the transferred table for a master pair of values, which matches or includes the transferred fMasterValue . Within the found intervals a linear intermediate interpolation is calculated. The result is output as fSlaveValue . The local slope determined in this calculation is output as fSlaveGear . If fMasterValue is below the value range described by the table, bUnderRange is indicated. The value output as fSlaveValue is the value allocated to the lowest point of the table. 0.0 is returned as fSlaveGear . If fMasterValue is above the value range described by the table, bOverRange is indicated.

The value output as fSlaveValue is the value allocated to the highest point of the table. 0.0 is returned as fSlaveGear . The return value fSlaveGear represents the ratio of the first derivatives of fMasterValue and fSlaveValue . If fMasterValue represents a position or a virtual time, the multiplication of master progress velocity and fSlaveGear returns the set slave velocity. This can be used to generate a pilot-control velocity. An MC_AxRtSetExtGenValues_BkPlcMc [ } 180] function block is preferable for this purpose. 4.4.5.4 MC_AxTableFromBinFile_BkPlcMc (from V3.0) The function block reads the contents of a table from a binary file. VAR_INPUT Execute: BOOL:=FALSE; pTable:

POINTER TO LREAL:=0; LowIdx: INT:=0; HighIdx: INT:=0; FileName: STRING(255):=''; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; END_VAR VAR_OUTPUT Busy: BOOL; Done: BOOL; Error: BOOL; ErrorID: UDINT; LastIdx: INT:=0; END_VAR Execute : A rising edge at this input starts the read process. pTable : This parameter is used to transfer the address of an ARRAY[nFirstIdx..nLastIdx.1..2]. LowIdx : This parameter is used to transfer the lower index of the ARRAY, whose address is transferred as pTable . HighIdx : This parameter is used to transfer the upper index of the ARRAY, whose address is transferred as pTable . FileName : This parameter can be used to specify a file name. Busy :

Indicates that a command is being processed. Done : Successful processing of the reference travel is indicated here. Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. PLC Library Hydraulics 165 Version: 1.4