EtherCAT: What does APRD/APWR mean?
- APRD means Auto-Increment Physical Read.
- APWR means Auto-Increment Physical Write
These are low-level EtherCAT requests issues by a EtherCAT master and sent to a EtherCAT slave.
They perform reads and writes to the slave’s memory using physical addresses (as opposed to logical addresses).
The master selects the slave by its position number in the daisy chain.
The process of reading/writing using APRD/APWR is called Positional physical read/write, with positional referring to addressing by the slave’s position in the daisy chain as opposed to the slave’s configured station address (which the master can choose during initialization).
When you’ve got the station address instead of the physical position, you can use the FPRD command.
What does “auto-increment” mean?
Auto-increment has nothing to do with incrementing the physical memory address to read from or write to.
Instead, it refers to each slave automatically incrementing the address field of the request by 1. If a slave gets an slave address field (correctly known as Ordinal Device Number) of 0, it processes the request and forwards it to the next slave with the address field set to 1.
Important: No slave will ever change the physical memory address field of the request. This is a common misconception, but the physical address is fixed by the master and may never be modified by the slave.
Example
If the master wants to address the 3rd slave, it will send a request with the address set to -2. The first 2 slaves in the chain will increment this to -1 and then to 0 (but not process the request), at which point the 3rd slave will see an address of 0, process the request, and forward it with an address of 1 and so on.
Source: ETG1000.3 V1.0.32 - requires free ETG membership.
- The example is in section
4.3.2 Position addressing - The meaning of the names is in table `3.4