涉及的从站寄存器:Configured Station Address (0x0010:0x0010)。
使用场景举例:
IgH启动后,通过“配置从站地址”报文将所有从站地址清零,然后通过APWR指令+“配置从站地址”报文,设置各个从站的地址。
[18773.710658] EtherCAT DEBUG 0: frame size: 46 [18773.710658] EtherCAT DEBUG 0: Sending frame: [18773.710659] EtherCAT DEBUG: FF FF FF FF FF FF 6C 24 08 29 52 19 88 A4 0E 10? [18773.710663] EtherCAT DEBUG: 08 01 00 00 10 00 02 00 00 00 00 00 00 00 00 00? [18773.710668] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00? [18773.710672] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00? |
[18773.818568] EtherCAT DEBUG 0: Received frame: [18773.818569] EtherCAT DEBUG: FF FF FF FF FF FF 6E 24 08 29 52 19 88 A4 0E 10? [18773.818575] EtherCAT DEBUG: 08 01 01 00 10 00 02 00 00 00 00 00 01 00 00 00? [18773.818580] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00? [18773.818584] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00? |
IgH主站广播了设置从站地址的命令,从站0x0001收到后,将本机地址改成了0x0000,以后FPRD/FPWR/FPRW/FRMW需要通过0x0000地址才能访问到该从站。