SMC_FreeEncoder (FB)¶
FUNCTION_BLOCK SMC_FreeEncoder
the need to add it to the device tree.
Use the output variable
Encoderof type FREE_ENCODER_REF as the encoder
axis.
If the function block is restarted, the free encoder is reinitialized.
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
ExecuteBOOLStarts the execution of the function block.
diEncoderPositionDINTThe encoder position in increments.
bDelayActivationBOOLDuring startup, communication state 90 will not be reached as long as this value is TRUE.
wDriveIDWORD1
Identifier of the drive.
iMovementTypeSMC_AXIS_TYPE.modulo
The type (finite or modulo) of axis.
fPositionPeriodLREAL360.0
Length of period for modulo drives in technical units [u].
dwRatioTechUnitsDenomDWORD16#10000
The number of encoder increments per iRatioTechUnitsNum.
iRatioTechUnitsNumDINT360
The number of technical units [u] per dwRatioTechUnitsDenom.
usiEncoderBitWidthUSINT32
The bit width of the encoder signal.
Output
InitializedBOOLThe encoder axis is intialized and can be used.
ErrorBOOLThere is an error.
EncoderThe encoder axis.