SMC_VIRTUAL_AXIS (FB)¶
FUNCTION_BLOCK SMC_VIRTUAL_AXIS
without the need to add a virtual axis device to the “Softmotion general axis pool”.
Use the output variable
Axisof type AXIS_REF_VIRTUAL_SM3 instead
- of a virtual axis.
Axisis 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.
Note that instances of this function block must not be assigned to other instances of the same function block. If you create your own function block containing this function block, it is recommended to add the attribute ‘no_assign’ to your function block as well.
- InOut:
Scope
Name
Type
Initial
Comment
Input
wDriveIDWORD1
Identifier of drive
iMovementTypeANY_TO_INT(SMC_AXIS_TYPE.finite)
motorTypefPositionPeriodLREAL360.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³]
fSWMaxTorqueLREALFPU.GetLRealSpecialVal(FPU.ESpecial_FP_Value.PosInf)
Maximum torque or force (software limit) in [Nu] or [N]
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