Axis_REF_SML (FB)¶
FUNCTION_BLOCK Axis_REF_SML EXTENDS Axis_REF_Base_SML
The Axis_REF_SML function block serves as the interface for all public function blocks that work on the axis. It contains the parameters and other members needed by every Axis_REF implementation.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
fbeFBErrorARRAY [0..(g_SML_NUMBER_FB_ERRORS - 1)] OF SML_FBERROR
FB error Id numbers, parameter 1035
Axis_REF_Base_SML
nAxisStateThe axis state, parameter 1000
eSetOpmodeThe set opmode, parameter 2000
eActOpmodeThe actual opmode, parameter 2001
bRegulatorOnBOOLRegulator (power) on/off, parameter 1010
bDriveStartBOOLDeactivate (
TRUE) or activate (FALSE) software halt/quickstop, parameter 1011bCommunicationBOOLWhether communication is OK, parameter 1012
wCommunicationStateWORD16#FFFF
The state of the communication state machine, parameter 1013
uiDriveInterfaceErrorUINTDrive interface error number, parameter 1014
strDriveInterfaceErrorSTRINGbRegulatorRealStateBOOLEffective state of the power stage of the axis, parameter 1015
bDriveStartRealStateBOOLEffective state of the software halt/quickstop of the axis (
TRUE: deactivated,FALSE: activated), parameter 1016bErrorBOOLAxis error, parameter 1030
bErrorAcknBOOLAcknowledge error (fault reset), parameter 1032
dwRatioTechUnitsDenomDWORDThe number of increments [inc] that correspond to
iRatioTechUnitsunits, parameter 1051iRatioTechUnitsNumDINTThe number of technical units [u] that correspond to
dwRatioTechUnitsDenomincrements, parameter 1052fScalefactorLREALThe factor by which the position in [u] is multiplied to convert to axis units, [inc/u], parameter 1054
fScalefactorVelLREALThe factor by which the velocity in [u/s] is multiplied to co convert to axis units, [?/u], parameter 1055. Built from
fScalefactor(1054) andfConstVelFactor(2210) during initialization. May be overwritten by the user.fScalefactorAccLREALThe factor by which the set acceleration is multiplied to co convert to axis units, [?/u], parameter 1056. Built from
fScalefactor(1054) andfConstAccFactor(2220) during initialization. May be overwritten by the user.iMovementTypeThe movement type:
SML_MT_MODULOorSML_MT_FINITE, parameter 1060fModuloPeriodULREALLength of a modulo period in [u], parameter 1061
eRampTypeVelocity ramp type, parameter 1062
fActPositionLREALActual position in [u], only needed for modulo axes, parameter 1101
diActPositionDINTActual position in [inc], only needed for modulo axes, parameter 1109
rpHomeOffsetSML_RmtPrmThe home offset in [u], parameter 1211
dwModuloOffsetIntDWORDOffset of start of closest modulo period, integral part, parameter 1230
udiModuloPeriodIncIntUDINTLength of a modulo period in [inc], integral part, parameter 1231
udiModuloPeriodIncNumUDINTLength of a modulo period in [inc], numerator of fractional part, parameter 1234
udiModuloOffsetNumUDINTOffset of start of closest modulo period, numerator of fractional part, parameter 1235
bNewSetPointBOOLTells the axis that a new set point has been given, only used in position mode, parameter 2010
bRelativeSetPointBOOLTells the axis whether the set point is relative, only used in position mode, parameter 2011
bStartHomingBOOLTells the axis to start homing, only used in homing mode, parameter 2012
bHaltBOOLTells the axis to halt using a quick stop, used in all modes, parameter 2013
bSetPointAckBOOLSet if the new set point has been acknowledged, only used in position mode, parameter 2020
bTargetReachedBOOLSet if the target is reached, only set in position and homing mode, parameter 2021
bInVelocityBOOLSet if it has reached the commanded velocity, only set in velocity mode, parameter 2022
bHomingDoneBOOLSet if homing has been performed successfully (implies bTargetReached), only set in homing mode, parameter 2023
bErrorInOperationBOOLSet if an error occured, used in all modes, parameter 2024
rpTargetPosDistSML_RmtPrmThe target position or distance in [u], parameter 2030
rpTargetVelocitySML_RmtPrmThe target velocity in [u/s], used in velocity mode, parameter 2040
rpProfileVelocitySML_RmtPrmThe profile velocity in [u/s], used in position mode, parameter 2050
rpProfileAccelerationSML_RmtPrmThe profile acceleration in [u/s²], parameter 2060
rpProfileDecelerationSML_RmtPrmThe profile deceleration in [u/s²], parameter 2070
rpQuickStopDecelerationSML_RmtPrmThe deceleration for a quick stop in [u/s²], parameter 2090
fModuloOffsetIncLREALThe modulo offset in increments, built from
dwModuloOffsetIntandudiModuloOffsetNum, parameter 2100bInvertHomeOffsetBOOLWhether the home offset is inverted when writing it to or reading it from the drive, parameter 2200
fConstVelFactorLREALA constant factor multiplied to the velocity scale factor (parameter 1055), dimensionless. Example: the drive expects the velocity in inc/(64*s) instead of inc/s. Then this parameter should be set to 64. The value is only used during initialization to compute
fScalefactorVel(1055). Parameter 2210.fConstAccFactorLREALA constant factor multiplied to the acceleration scale factor (parameter 1056), dimensionless. Example: the drive expects the velocity in 16*inc/(s) instead of inc/s. Then this parameter should be set to 1/16. The value is only used during initialization to compute
fScalefactorAcc(1056). Parameter 2220.usiLogicalDeviceUSINTThe 0-based logical device index (6000)
Methods:
Structure: