SMC_VIRTUAL_AXIS (FB)¶
FUNCTION_BLOCK SMC_VIRTUAL_AXIS IMPLEMENTS ICmpEventCallback
This function block has been created in order to use a virtual axis without the need to add a virtual axis device to the “Softmotion general axis pool”.
Use the output variable Axis of type AXIS_REF_VIRTUAL_SM3 instead of a virtual axis.
Axis is being initialized by once calling this FB with the desired axis properties (the default values correspond to the virtual axis device description).
Calling this FB again does not have any effect (apart from changing the input variables): Axis won’t be touched again.
- InOut:
Scope
Name
Type
Initial
Comment
Input
wDriveIDWORD1
Identifier of drive
iMovementTypeANY_TO_INT(SMC_AXIS_TYPE.finite)
fPositionPeriodLREAL360.0
Length of Period for modulo drives in technical units [u]
eRampTypetrapez
Velocity ramp
fSWMaxVelocityLREALMaximum velocity (software limit) in [u/s]
fSWMaxAccelerationLREALMaximum acceleration (software limit) in [u/s²]
fSWMaxDecelerationLREALMaximum deceleration (software limit) in [u/s²]
fSWMaxJerkLREALMaximum jerk (software limit) in [u/s³]
fSWLimitPositiveLREAL1000.0
Position limit in positive direction in techn. units [u]
fSWLimitNegativeLREAL0.0
Position limit in negative direction in techn. units [u]
fSWLimitDecelerationLREAL0
Deceleration [techn. units/s²] which the system will brake with in case of a software limit.
bSWLimitEnableBOOLFALSE
TRUE: Enables software end switches.fSWErrorMaxDistanceLREAL0
Maximum deceleration distance for ramping down in case of an error [u].
Output
AxisbErrorBOOL