CMC_Modulo2Binary (FB)
FUNCTION_BLOCK CMC_Modulo2Binary
Convert a <32 bit value to 32 bit for use as Actual_Position.
- Purpose
Convert Value which is 0 <= Value <= Modulo_Range to Binary_Value (with 32-Bit overflow)
- Precondition
Enable the block together with CMC_Binary2Modulo, use the two blocks as a pair
- Use case
A drive configured as a rollover axis delivers the actual position in a modulo style while the CMC_Basic_Kernel expects a binary, or an absolute encoder with <32 bit position value is used as actual position. Use this block to convert the position to a 32 bit value.
- InOut:
Scope
Name
Type
Comment
Input
EnableBOOLEnable the block execution. Enable = FALSE => Binary_Value := Modulo_Value
Modulo_ValueDINTActual value
Modulo_RangeDINT(Max allowed value for Modulo_Value)+1
Output
Binary_ValueDINTBinary value