MODTURNS

MODTURNS 1:

The MODTURNS function carries out a modulo division and determines the signed integral component (modulo periods, modulo rotations).

Examples

MODTURNS (800.56, 360) = 2

MODTURNS (-400.56, 360) = -2

MODTURNS 2:

The MODTURNS function can be used to calculate the number of modulo rotations of an NC axis from its absolute set position.

ModuloSetTurns := MODTURNS ( NcToPlc.fPosSoll, 360 );

FUNCTION MODTURNS : LREAL

MODTURNS 3: Inputs

VAR_INPUT
    lr_Value : LREAL;
    lr_Arg : LREAL;
END_VAR

Name

Type

Description

lr_Value

LREAL

Input value

lr_Arg

LREAL

Modulo range

MODTURNS 4:

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Math