爲了傳輸故障代碼、電流、溫度等信息。一般須要使用擴展報文的方式來發送這些信息。在驅動數量較少的狀況下,能夠進行手動配置。
若是驅動數量不少,能夠使用腳本script的方式來配置擴展報文。code
注意下圖中的Drive Number,表示驅動在 CU(control unit)中的編號, 腳本中須要使用這個編號blog
如下腳本,給報文增長以下內容
receive word 10, r80 電機扭矩
receive word 11, r2131 驅動故障代碼
receive word 12, r2132 電機扭矩
receive word 13, r80 電機扭矩
receive word 14, r68 電機電流
receive word 15, r35 電機溫度ip
使用如下腳本時,須要it
' Script_1 'r80 torque actual value PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_IC_4").Parameters(2051,10) = "80 : 0 : 2" ' receive word 10 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_PC_4").Parameters(2051,10) = "80 : 0 : 3" ' receive word 10 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_Infeed_IN").Parameters(2051,10) = "80 : 0 : 4" ' receive word 10 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_UNWinder").Parameters(2051,10) = "80 : 0 : 5" ' receive word 10 'r2131 fault number PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_IC_4").Parameters(2051,11) = "2131 : 0 : 2" ' receive word 11 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_PC_4").Parameters(2051,11) = "2131 : 0 : 3" ' receive word 11 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_Infeed_IN").Parameters(2051,11) = "2131 : 0 : 4" ' receive word 11 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_UNWinder").Parameters(2051,11) = "2131 : 0 : 5" ' receive word 11 'r2132 alarm number PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_IC_4").Parameters(2051,12) = "2132 : 0 : 2" ' receive word 12 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_PC_4").Parameters(2051,12) = "2132 : 0 : 3" ' receive word 12 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_Infeed_IN").Parameters(2051,12) = "2132 : 0 : 4" ' receive word 12 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_UNWinder").Parameters(2051,12) = "2132 : 0 : 5" ' receive word 12 'r80 torque actual value PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_IC_4").Parameters(2051,13) = "80 : 0 : 2" ' receive word 13 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_PC_4").Parameters(2051,13) = "80 : 0 : 3" ' receive word 13 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_Infeed_IN").Parameters(2051,13) = "80 : 0 : 4" ' receive word 13 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_UNWinder").Parameters(2051,13) = "80 : 0 : 5" ' receive word 13 'r68 current PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_IC_4").Parameters(2051,14) = "68 : 0 : 2" ' receive word 14 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_PC_4").Parameters(2051,14) = "68 : 0 : 3" ' receive word 14 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_Infeed_IN").Parameters(2051,14) = "68 : 0 : 4" ' receive word 14 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_UNWinder").Parameters(2051,14) = "68 : 0 : 5" ' receive word 14 'r35 motor temperature PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_IC_4").Parameters(2051,15) = "35 : 0 : 2" ' receive word 15 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_PC_4").Parameters(2051,15) = "35 : 0 : 3" ' receive word 15 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_Infeed_IN").Parameters(2051,15) = "35 : 0 : 4" ' receive word 15 PROJ.Devices("S120xCU320x2xPN4").TOs("DRV_UNWinder").Parameters(2051,15) = "35 : 0 : 5" ' receive word 15