MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28)

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 1:

The function block automatic determines a number of axis parameters.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 2: Inputs

VAR_INPUT
    Execute: BOOL;
    Wait: BOOL;
END_VAR

Name

Type

Description

Execute

BOOL

A rising edge at this input triggers the identification.

Wait

BOOL

(From TC2 V3.0.44 / TC3 V3.3.1.22) If this input is set to TRUE, the internal sequence processor does not go outside the recovery time. This prevents the output value from ramping up when the valves are not yet switched.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 3: Inputs/outputs

VAR_INOUT
    Axis: Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

Axis

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 4: Outputs

VAR_OUTPUT
    Busy: BOOL;
    Done: BOOL;
    Error: BOOL;
    ErrorID: UDINT;
    Step: INT;
    InRecovery: BOOL;
END_VAR

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

Done

BOOL

This indicates successful identification.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Step

INT

The current step of the internal sequence processor.

InRecovery

BOOL

(From TC2 V3.0.44 / TC3 V3.3.1.22) This indicates that a recovery time (defined by ValveCharacteristicRecovery) has elapsed.

Behavior of the function block

The function block checks whether the pointer Axis_Ref_BkPlcMc.pStAxAutoParams was initialized. If this is the case, it performs a number of initializations when a rising edge is detected at the Execute input and then commences the parameter identification. The individual steps of the identification are determined by the values in ST_TcMcAutoIdent.

EnableEndOfTravel: If this boolean parameter is set, the mechanical travel limits are determined automatically. First, the system ensures that the axis can move freely or is at the positive function block. The axis is now moved with a negative control voltage until it has reached the function block. The axis is then operated with a positive control voltage until the positive function block has been detected. The control voltage is limited to EndOfTravel_NegativLimit and EndOfTravel_PositivLimit. If the positive travel limit falls below the negative limit, the values are swapped, and Axis.stAxParams.bDrive_Reversed is inverted.

EnableOverlap, EnableZeroAdjust: If one of these boolean parameter is set, the cover or the offset voltage of the valve is determined.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 5:

Thus operation is influenced by EndOfTravel_Negative and EndOfTravel_Positive.

First, the axis is moved into a position window that is located in the middle between EndOfTravel_Positiv and EndOfTravel_Negativ. The width of the window is 80% of the area defined by these parameters. The output polarity of the drive is inverted, if required. Now, the output voltage is determined, at which the axis starts moving in positive direction. Then, the corresponding negative voltage is determined. By offsetting these parameter, both the cover and the offset voltage are determined. The type of entry in the axis parameter is controlled through EnableOverlap and EnableZeroAdjust.

EnableArreaRatio: If this boolean parameter is set, the direction-dependent velocity ratio is determined. First, the axis is moved into a position window, which is located in the middle between pStAxAutoParams. EndOfTravel_Positiv and pStAxAutoParams. EndOfTravel_Negativ. The width of the window is 80% of the area defined by these parameters. Then, the axis is moved in positive and negative direction for one second with a control voltage of 1 V. The velocities determined during this movement are divided, in order to determine the velocity ratio.

EndOfTravel_Negativ: [mm] If determination of the travel limits is activated, this value is determined by the function block. If it is disabled, the application must specify the value here.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 6:

This parameter influences the determination of the offset voltage and the area ratio.

EndOfTravel_Positiv: [mm] If determination of the travel limits is activated, this value is determined by the function block. If it is disabled, the application must specify the value here.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 7:

This parameter influences the determination of the offset voltage and the area ratio.

EndOfIncrements_Negativ: [1] If determination of the travel limits is activated, this value is determined by the function block. It then matches EndOfTravel_Negativ, but it is the raw encoder value in increments.

EndOfIncrements_Positiv: [1] If determination of the travel limits is activated, this value is determined by the function block. It then matches EndOfTravel_Positiv, but it is the raw encoder value in increments.

EndOfTravel_NegativLimit: [V] This parameter limits negative output voltages.

EndOfTravel_PositivLimit: [V] This parameter limits positive output voltages.

EndOfTravel_PositivDone: This signal is set by the function block, if determination of the travel limits is disabled or the positive travel limit was determined.

EndOfTravel_NegativDone: This signal is set by the function block, if determination of the travel limits is disabled or the negative travel limit was determined.

EndOfVelocity_NegativLimit: [mm/s] This parameter limits negative velocities. If this velocity is reached or exceeded during the measurement, the current measurement is completed, but no further measurement in this direction is performed.

EndOfVelocity_PositivLimit: [mm/s] This parameter limits positive velocities. If this velocity is reached or exceeded during the measurement, the current measurement is completed, but no further measurement in this direction is performed.

DecelerationFactor: [1] After the measuring stroke, the axis is moved to the end of the measuring path for the next measuring stroke. The regular axis parameter fMaxAcc and fMaxDec, which are weighted with this factor, are used.

EnableValveCharacteristic: If this boolean parameter is set, the characteristic velocity curve is determined automatically.

ValveCharacteristicTable: This ARRAY[1..2,1..100] contains the value pairs of the linearization table. ValveCharacteristicTable[nnn,1] is the normalized velocity value, ValveCharacteristicTable[nnn,2] is the normalized output value. Within the table, the value pairs with increasing index have increasing values for the velocity value and the output value. The first value pair therefore describes the fastest negative point, the last active value pair the fastest positive point. During automatic determination, the control voltage is limited to EndOfTravel_NegativLimit and EndOfTravel_PositivLimit and the velocity to EndOfVelocity_NegativLimit and EndOfVelocity_PositivLimit. The further points of the table are determined through extrapolation from the last two measuring points.

ValveCharacteristicType: The identification can be adapted here to special valve variants or special conditions of the axis. See also E_TcMcValveType.

ValveCharacteristicTblCount: This parameter specifies the number of value pairs to be determined in ValveCharacteristicTable. The value must be odd and between 3 and 99 (including).

ValveCharacteristicLowEnd: [mm] The lower end position of the range permitted for determining the characteristic curve.

ValveCharacteristicHighEnd: [mm] The upper end position of the range permitted for determining the characteristic curve.

ValveCharacteristicRamp: [s] This parameter specifies the ramp for establishing the measuring voltage for the characteristic curve determination. During the specified time the voltage is increased to 10 V. Since the actual voltages are generally lower, less time is usually required to establish the voltage. Please pay attention to the notes at the end of this document.

ValveCharacteristicSettling: [s] Once the control value has been ramped up to the test level for the measurement, the starting of the measurement can be delayed through this parameter. Please pay attention to the notes at the end of this document.

ValveCharacteristicRecovery: [s] This parameter defines a dwell time, which is adhered to before the measurement travel. This enables the supply to compensate a pressure drop that may have been caused by the previous measurement travel.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 8:

During this time the axis is not controlled.

From TC2 V3.0.44 / TC3 V3.3.1.22: The expiry of the dwell time is indicated at the InRecovery output.

ValveCharacteristicMinCycle: [mm] The measurement travel is only valid if the measuring voltage was established before the axis has moved towards the center of the measuring distance defined by ValveCharacteristicHighEnd and ValveCharacteristicLowEnd by less than the half of this value. Otherwise the effective measuring distance (without ramps) is less than this distance, and this measurement and all further measurements in this direction are replaced by a value calculated using the reference velocity of the axis.

Valve_LinLimitP, Valve_LinLimitM: [mm/s] The lowest velocity for using the linearization table. For lower velocities, the characteristic curve is replaced by a straight line that connects the zero point with the point for the velocity specified here.

Example: Diagram of a characteristic curve determination in TwinCAT ScopeView:

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 9:

Example: Display of a linearization in the PlcMcManager:

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 10:

The characteristic curve determined in this way can be used with an MC_AxRtFinishLinear_BkPlcMc function block for linearization at runtime.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 11:

The characteristic curve is stored in the parameter file of the axis and automatically read on system startup.

Irrespective of that, the linearization table can be imported from a text or binary file with an MC_LinTableImportFromAsciFile_BkPlcMc or MC_LinTableImportFromBinFile_BkPlcMc function block, or exported with an MC_LinTableExportToAsciFile_BkPlcMc or MC_LinTableExportToBinFile_BkPlcMc function block.

MC_AxUtiAutoIdent_BkPlcMc (from V3.0.28) 12:

If a lower velocity than at the previous measuring point is detected in the same direction during the measurement at a test output, a warning is issued regardless of the set logger limit. The measuring point is automatically corrected to avoid falling characteristic ranges. This correction has no influence on the validity of the characteristic curve. However, it should be checked whether the values in ValveCharacteristicRamp and ValveCharacteristicSettling are suitable for this axis.