I want to measure the time between a) setting a target position for my axis on my computer and b) the variable is set on the axis.
I Setup the scope view of TwinCAT3 and displayed the SetPos variable (from the axis) and the setTarget Variable from the EtherCAT slave. I expected a delay of 500us I got 30ms.
The Scope view of TwinCAT3 is showing the SetPos (generated out of GUI the axis functions of TwinCAT3 (reverse sequencing)) and the target position variable inside my embedded system. There is no inertia involved, it is just the variable.
The delay is about 30ms as shown in the screenshot. The EtherCAT Servo is in DC-Mode with a cycle of 500us. The setTarget position variable is wirten inside the Sync0 ISR. The setTarget (PDO) variable is getting captured in 50us.
I am quite sure, that this 30ms delay is coming from TwinCAT itself. Maybe something from generating the SetPoint to transfer it to EtherCAT?
Thanks for your answers! Chris
Maybe it has something to do with the setpoint generator. There are two tasks involved in the setpoint generation: the SVB task and the SAF task. Read more about it here.
The document mentions about the SVB Task:
Therefore possible causes might be the:
What if you change the limits or the cycle time of this task?