EtherCAT Programming Guide MPG Operation
March, 2017 33-5
33
33.2 _ECAT_Slave_R1_EC5614_Set_MJ_Enable
Syntax
U16 PASCAL _ECAT_Slave_R1_EC5614_Set_MJ_Enable (U16 CardNo, U16 MJNo,
U16 Enable)
Purpose
This is for enabling/disabling the MPG function.
Note: Before enabling the MPG function, please set the parameters of
_ECAT_Slave_R1_EC5614_Set_MJ_Config in section 33.1.
Parameter
Name Data type Property Description
CardNo U16
Number
Card number
MJNo U16
Number
Group number of MPG function. It supports max. 8
groups, numbered from 0 to 7.
Enable U16
Option
0: Disable MPG function
1: Enable MPG function
Example
U16 Status = 0, CardNo = 16, NodeID = 0, SlotNo = 0, AxisNum = 2, MJNo = 1, MJType= 1;
U16 Enable = 1;
U16 AxisArray[2] = {1, 2};
U16 SlotArray[2] = {0, 0};
I32 MaxSpeedArray[2] = {100000, 200000};
F64 TaccArray[2] = {0.1, 0.1};
F64 RatioArray[2] = {1, 1};
// Relevant parameters setting is required.
Status = _ECAT_Slave_R1_EC5614_Set_MJ_Config( CardNo, NodeID, SlotNo, MJNo,
MJType, AxisNum, AxisArray, SlotArray, MaxSpeedArray, TaccArray, RatioArray );
// It can be enabled after setting complete.
If(Status == 0)
Status = _ECAT_Slave_R1_EC5614_Set_MJ_Enable(CardNo, MJNo, Enable);