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 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.

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

wDriveID

WORD

1

Identifier of drive

iMovementType

SMC_MOVEMENTTYPE

ANY_TO_INT(SMC_AXIS_TYPE.finite)

motorType

SMC_MOTOR_TYPE

fPositionPeriod

LREAL

360.0

Length of Period for modulo drives in technical units [u]

eRampType

SMC_RAMPTYPE

trapez

Velocity ramp

fSWMaxVelocity

LREAL

Maximum velocity (software limit) in [u/s]

fSWMaxAcceleration

LREAL

Maximum acceleration (software limit) in [u/s²]

fSWMaxDeceleration

LREAL

Maximum deceleration (software limit) in [u/s²]

fSWMaxJerk

LREAL

Maximum jerk (software limit) in [u/s³]

fSWMaxTorque

LREAL

FPU.GetLRealSpecialVal(FPU.ESpecial_FP_Value.PosInf)

Maximum torque or force (software limit) in [Nu] or [N]

fSWLimitPositive

LREAL

1000.0

Position limit in positive direction in techn. units [u]

fSWLimitNegative

LREAL

0.0

Position limit in negative direction in techn. units [u]

fSWLimitDeceleration

LREAL

0

Deceleration [techn. units/s²] which the system will brake with in case of a software limit.

bSWLimitEnable

BOOL

FALSE

TRUE: Enables software end switches.

fSWErrorMaxDistance

LREAL

0

Maximum deceleration distance for ramping down in case of an error [u].

Output

Axis

AXIS_REF_VIRTUAL_SM3

bError

BOOL