MC_AxTableReadOutNonCyclic_BkPlcMc (from V3.0)

MC_AxTableReadOutNonCyclic_BkPlcMc (from V3.0) 1:

The function block determines the slave values assigned to a master value with the aid of a table.

MC_AxTableReadOutNonCyclic_BkPlcMc (from V3.0) 2:

This function block is a component of cam plates or similar non-linear couplings. It is generally not called direct by an application.

MC_AxTableReadOutNonCyclic_BkPlcMc (from V3.0) 3: Inputs

VAR_INPUT
    pTable:         POINTER TO LREAL:=0;
    fMasterValue:   LREAL:=0.0;
    nFirstIdx:      UDINT:=1;
    nLastIdx:       UDINT:=1;
    bReInit:        BOOL:=FALSE;
END_VAR

Name

Type

Description

pTable

POINTER TO LREAL

This parameter is used to transfer the address of an ARRAY[nFirstIdx..nLastIdx,1..2].

An incorrect specification at this point causes the PLC application to crash by triggering serious runtime errors (Page Fault Exception).

fMasterValue

LREAL

Here the value of the master is to be transferred, for which the associated slave

nFirstIdx

UDINT

This parameter is used to transfer the lower index of the ARRAY, whose address is transferred as pTable.

An incorrect specification at this point causes the PLC application to crash by triggering serious runtime errors (Page Fault Exception).

nLastIdx

UDINT

This parameter is used to transfer the upper index of the ARRAY, whose address is transferred as pTable.

An incorrect specification at this point causes the PLC application to crash by triggering serious runtime errors (Page Fault Exception).

bReInit

BOOL

This input indicates to the function block that the search procedure should start at the top of the table.

MC_AxTableReadOutNonCyclic_BkPlcMc (from V3.0) 4: Outputs

VAR_OUTPUT
    fSlaveValue:    LREAL:=0.0;
    fSlaveGear:     LREAL:=0.0;
    bUnderRange:    BOOL;
    bOverRange:     BOOL;
END_VAR

Name

Type

Description

fSlaveValue

LREAL

This parameter is used to output the slave value belonging to fMasterValue.

fSlaveGear

LREAL

This parameter is used to output the local slope of the slave values at the point in the table specified by the master.

bUnderRange

BOOL

This output becomes TRUE, if the master value reaches the bottom of the table or falls below it.

bOverRange

BOOL

This output becomes TRUE, if the master value reaches the top of the table or exceeds it.

Behavior 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 assigned to the lowest point of the table. 0.0 is returned as fSlaveGear.

If the fMasterValue is above the range of values described by the table, bOverRange is indicated. The value output as fSlaveValue is the value assigned to the top 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 function block is preferable for this purpose.