如果有126个轴,你程序里挨个添加轴很麻烦。
可以用轴组批量添加。【数组】
CAN驱动器 + 0x164 就是下个驱动器
p_CAN主站地址:=ADR(IoConfig_Globals.CANopen_Manager_SoftMotion);p_CAN从站地址1:=ADR(IoConfig_Globals.DMA882_CAN);p_CAN从站地址2:=ADR(IoConfig_Globals.ASDA_A2_Drive);p_CAN从站地址3:=ADR(IoConfig_Globals.DMA882_CAN_1);p_CAN从站地址4:=ADR(IoConfig_Globals.ASDA_A2_Drive_1);
PROGRAM 轴组泛型
VARp_CAN主站地址 : POINTER TO _3SCOS.CANopenManager;p_CAN从站地址1:POINTER TO _3SCOS.CANRemoteDevice;p_CAN从站地址2:POINTER TO _3SCOS.CANRemoteDevice;p_CAN从站地址3:POINTER TO _3SCOS.CANRemoteDevice;p_CAN从站地址4:POINTER TO _3SCOS.CANRemoteDevice;END_VAR