CMC_Binary2Modulo (FB)

FUNCTION_BLOCK CMC_Binary2Modulo

Convert a 32 bit value (Position_Reference) to Modulo_Range.

Purpose

Convert Value to 0 <= Modulo_Value <= Modulo_Range

Precondition

Enable the block together with CMC_Modulo2Binary, use the two blocks as a pair

Use case

A drive configured as a rollover axis expects the position reference in a modulo style. Use this block to convert the position refrence.

InOut:

Scope

Name

Type

Comment

Input

Enable

BOOL

Enable the block execution

Binary_Value

DINT

32 bit value

Modulo_Range

DINT

Max used value for Modulo_Value

Output

Modulo_Value

DINT

Modulo value