Applying a new configuration of user units
During startup, the configuration of the user units of the axis is also transferred to local variables of the "camming" operating mode when the axis is initialized. This affects the following configuration data:
- Modulo minimum
- Modulo maximum
- Number of decimal places of the position value
- Time base for speed
- Time base for acceleration
If these configuration data of the axis are changed subsequently by the application program, then these changes are not taken over into the "camming" operating mode for runtime reasons (not even by deactivating and then activating via ProfileGeneration.Camming.In.xActivate).
To transfer changed configuration data to "camming" mode, the GetNewUserUnits() method must be called. This requires the following steps:
- Request the "ICammingProfileFct7" interface on the axis.
- Get the "ICammingProfile7" interface via the "itfCammingProfile7" property implemented by this interface.
- Use this interface to execute the desired GetNewUserUnits() method.
For this purpose, the following local variables are declared:
VAR
_itfCammingProfile7Fct:
SEW_MK_MultiMotionCam.SEW_ICam.ICammingProfileFct7;
_itfCammingProfile7:
SEW_MK_MultiMotionCam.SEW_ICam.ICammingProfile7;
END_VAR
The corresponding program code looks like this, for example:
IF __QUERYINTERFACE(Axis1, _itfCammingProfile7Fct) THEN
_itfCammingProfile7 :=
_itfCammingProfile7Fct.itfCammingProfile7;
IF (_itfCammingProfile7 <> 0) THEN
_itfCammingProfile7.GetNewUserUnits();
END_IF
END_IF