Skip to content

DUTs

ENUMs

E_CamAxisState

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_CamAxisState : (
        eCamAxisState_Disabled := 0,
        eCamAxisState_ReadMasterParameters,
        eCamAxisState_ReadSlaveParameters,
        eCamAxisState_AxisInitDone,
        eCamAxisState_WaitForCommand,
        eCamAxisState_DecoupleBeforeStart,
        eCamAxisState_CheckTableSelect,
        eCamAxisState_LoadCamTable,
        eCamAxisState_CheckAxisStatus,
        eCamAxisState_ReadSlaveDynamics,
        eCamAxisState_DetermineSyncMove,
        eCamAxisState_SlaveSyncMove,
        eCamAxisState_CoupleSlave,
        eCamAxisState_SetChangeMode,
        eCamAxisState_WaitForChangeCommand,
        eCamAxisState_WriteNewTable,
        eCamAxisState_WaitForActive,
        //eCamAxisState_DecoupleSlave,

        //eCamAxisState_HaltSlave,
        eCamAxisState_Error
    ) UDINT;
END_TYPE

E_CamSyncMode

When StartSync() is called, a modulo move will be performed to position the slave according to the selected cam table. ST_CamParameters.SyncMode specifies how this move should be executed.

1
2
3
4
5
6
7
8
TYPE E_CamSyncMode : (
        eCamSyncMode_ShortestWay    := 0, // Move the Shortest Distance
        eCamSyncMode_Forward        := 1, // Move Only in the Forward Direction
        eCamSyncMode_Reverse        := 2, // Move Only in the Reverse Direction
        eCamSyncMode_Window_Forward := 3, // Move Shortest Distance If In Window Else Move Forward
        eCamSyncMode_Window_Reverse := 4  // Move Shortest Distance If In Window Else Move Reverse
    );
END_TYPE

STRUCTs

ST_AbsHomeParameters

1
2
3
4
5
6
7
TYPE ST_AbsHomeParameters :
    STRUCT
        PositionBias           : LREAL;
        PositionLimit_Positive : LREAL;
        PositionLimit_Negative : LREAL;
    END_STRUCT
END_TYPE

ST_CamParameters

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
TYPE ST_CamParameters :
    STRUCT
        // Table Must Be Constructed of Motion Functions
        MasterPos     : LREAL         := 0.1;                                    // Position of Master For Which Corresponding Slave Position Is Found For
        SyncMode      : E_CamSyncMode := E_CamSyncMode.eCamSyncMode_ShortestWay; // Specifies Which Direction Slave Moves To Synchronize With the Master
        SyncWindow    : LREAL         := 10.0;                                   // Used In Conjunction With Sync Mode
        SyncVelocity  : LREAL         := 10.0;                                   // Used When Slave Moves To Synchronization Position
        SyncAccel     : LREAL         := 100.0;                                  // Used When Slave Moves To Synchronization Position
        SyncDecel     : LREAL         := 100.0;                                  // Used When Slave Moves To Synchronization Position
        SyncJerk      : LREAL         := 1000.0;                                 // Used When Slave Moves To Synchronization Position
        TableSelect   : UDINT         := 1;                                      // Selects Which of Five Cam Tables To Use
        CamTableId    : MC_CAM_ID     := 1;                                      // Make Sure All Your Id's are Unique
        CamTable      : ARRAY[1..Parameters_NCCamAxis.CAM_SLAVE_AXIS_TABLES] OF ST_CamPoints;
        Periodic      : BOOL         := TRUE;
        MasterOffset  : LREAL        := 0.0;
        SlaveOffset   : LREAL        := 0.0;
        MasterScaling : LREAL        := 1.0;
        SlaveScaling  : LREAL        := 1.0;
        StartMode     : MC_StartMode := MC_STARTMODE_ABSOLUTE;
        BufferMode    : MC_BufferMode;
        CamInOptions  : ST_CamInOptions;
        ChangeOptions : ST_CamInOptions; // Used for MC_SetCamOnlineChangeMode; Change Mode is Set After Cam In
    END_STRUCT
END_TYPE
ST_CamParameters

ST_CamPoints

1
2
3
4
5
6
TYPE ST_CamPoints :
    STRUCT
        Points         : ARRAY[1..Parameters_NCCamAxis.CAM_SLAVE_AXIS_MAX_CAM_POINTS] OF MC_MotionFunctionPoint; // Array of Points 
        NumberOfPoints : DINT;                                                                                   // Quantity of Points 
    END_STRUCT
END_TYPE

ST_StepBlockLagBasedParameters

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
TYPE ST_StepBlockLagBasedParameters :
    STRUCT
        Direction               : MC_Home_Direction := mcNegativeDirection;
        Velocity                : LREAL             := 10;
        Acceleration            : LREAL             := 100;
        Deceleration            : LREAL             := 100;
        Jerk                    : LREAL             := 1000;
        DetectionVelocityLimit  : LREAL             := 5;
        DetectionVelocityTime   : TIME              := T#500MS;
        TimeLimit               : TIME;
        DistanceLimit           : LREAL;
        TorqueLimit             : LREAL := 10;
        LagLimit                : LREAL := 10;
        ClearPositionLag        : BOOL;         // ST_Home_Options
        DisableDriveAccess      : BOOL;         // ST_Home_Options2 // ST_Home_Options3
        InstantLagReduction     : BOOL := TRUE; // ST_Home_Options3
        TorquePolarityInverted  : BOOL;         // ST_Home_Options3
        EnableLagErrorDetection : BOOL;         // ST_Home_Options4
    END_STRUCT
END_TYPE
Member Type Description
Direction LREAL Enumeration that defines the initial direction of movement for the search procedure
Velocity LREAL Maximum travel velocity (>0).
Acceleration LREAL Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used.
Deceleration LREAL Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used.
Jerk LREAL Jerk (≥0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used.
DetectionVelocityLimit LREAL Velocity that must be fallen below for the time DetectionVelocityTime in order to detect driving against the fixed stop
DetectionVelocityTime LREAL Time for detecting the velocity undershoot when driving against the fixed stop.
TimeLimit LREAL Exceeding this time leads to the search procedure being aborted.
DistanceLimit LREAL Exceeding this distance in relation to the start position leads to the search procedure being aborted.
TorqueLimit LREAL The motor torque is limited to this value, in relation to the weight counterbalance that is possibly parameterized in the drive, in order to avoid mechanical damage.
LagLimit LREAL Position lag value which, if exceeded, leads to detection of driving against the fixed stop
InstantLagReduction Bool InstantLagReduction: When referencing to a mechanical fixed stop, the sudden stop produces a position lag in the NC axis, which is dissipated with the parameterized dynamic values in the further course. This can lead to an assumed delay when observing the sequence, but it is purposeful in particular with "soft" fixed stops. The position lag is dissipated abruptly by setting this flag
ClearPositionLag BOOL Clear Position lag after homing.
DisableDriveAccess BOOL Set to FALSE for Beckhoff drives, usually to TRUE for third-party drives.
TorquePolarityInverted BOOL
EnableLagErrorDetection BOOL In the step functions, the lag error detection is switched off in order to ensure a smooth referencing process. If it would be useful to keep the lag error detection active in an application, this can be achieved by setting this flag.