Chapter 6 Motion Function Blocks
6.6.11 Write ESC (LS_WriteEsc)
LS
_
WriteEsc
Adp
Ado
Done BOOL
UINT
UINT
BOOL Execute
UINT Length
Busy
BOOL
Error BOOL
ErrorID WORD
UINT EcatCmd Wkc UINT
UDINT Value
Give the ESC writing command to the slave controller in the rising Edge.
Set the slave controller address according to the EcatCmd.
Set the slave controller ESC address.
Set the data length to write. (1 ~ 4 Byte)
Set the EtherCAT command. (2: APWR, 5: FPWR, 8: BWR)
Output the ESC writing value of the slave controller
This represents successful ESC writing to complete normally.
Indicate that the execution of motion function block is not completed.
Indicate whether an error occurs or not.
Output the number of error occurred while motion function block is running.
After the execution of the command, Working Counter value is displayed.
(1) This motion function block writes data using the address set by Ado to ESC (EtherCAT Slave Controller) of the slave device
set by Adp.
(2) Wkc value is displayed as 0 when the motion function block is executed, and the Working Counter value is displayed when
execution is completed (Done output is on). Wkc increases by 1 through each slave device designated by EcatCmd and Adp.
(3) Adp input designates the EtherCAT slave device address. The following values can be set depending on EcatCmd setting. If
EcatCmd setting is 8(BWR), Adp input value is ignored. If a value outside the range is set for Adp input, “Error 0x0F70”
occurs.
2 (APWR)
0x0000: The first slave connected
0xFFFF: The second slave connected
0xFFFE: The third slave connected
:
0xFFC1: 64th slave connected
1~64: slave 1~slave 64
(4) (Length can be set to between 1 and 4, which means 1-4 bytes. Setting a value outside the above range will cause "Error
0x0F71".
(5) At EcatCmd, set the type of command to use when reading ESC (EtherCAT Slave Controller). The following write
commands can be used. Setting a value outside the range at EcatCmd will cause "Error 0x0F72”.