Difference between revisions of "How to setup Position Error Delay"
(Added calculation of 4.05[cycles]) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
{{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT pay attention that in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}} | {{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT pay attention that in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}} | ||
+ | |||
+ | |||
Line 21: | Line 23: | ||
Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5''' | Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5''' | ||
− | + | Note: in case of a simulated axis the same procedure will work, typically results will show round cycle of 1. e.g.: | |
− | e.g.: | + | <pre>PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle</pre> |
− | <pre> | + | |
− | |||
− | </pre> | ||
− | |||
== Second Step == | == Second Step == | ||
Line 32: | Line 31: | ||
Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again: | Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again: | ||
− | [[ | + | [[File:PE PEDEL5.PNG|800px|PE PEDEL5.PNG]] |
again estimate the error: | again estimate the error: | ||
− | + | <pre>PE/VCMD = 0.18/57.74*1000 = 0.317 ms | |
− | <pre> | ||
− | PE/VCMD = 0.18/57.74*1000 = 0.317 ms | ||
</pre> | </pre> | ||
− | {{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}} | + | {{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}}<br/> <br/> |
− | |||
− | which is in units of one sample | + | which is in units of one sample equal: |
− | <pre> | + | <pre>0.317[ms]/4[ms/cycle] = 0.078[cycles] |
− | 317/ | ||
</pre> | </pre> | ||
Latest revision as of 10:33, 26 January 2024
Contents
How to SetUp Position Error Delay
WARNING | |
If working with CDHD Servotronix family of drives over EtherCAT pay attention that in order to get position proper error values it is extremely important to switch off the CDHD's smoothing feature by setting MOVESMOOTHMODE to 0. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values). |
First Step
- set PEDEL to 1 (minimum value)
- set high value in PeMax
- Run the axis back and forth and record PE and VCMD as :
Command Velocity recordings
Position Error recordings
Compute PEDEL as PE/VCMD, in this case it will be:
PE/VCMD = 0.94/57.74*1000 = 16.2 ms 16.2[ms]/4[ms/cycle] = 4.05[cycles]
Taking into account the used value of PEDEL (1) and the sampling time of 4ms we get the new PEDEL value of 5, e.i. PEDEL = 1 + 4 = 5
Note: in case of a simulated axis the same procedure will work, typically results will show round cycle of 1. e.g.:
PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle
Second Step
Change the PEDEL(5) to the integer value estimated before and run the test again:
again estimate the error:
PE/VCMD = 0.18/57.74*1000 = 0.317 ms
IMPORTANT | |
This means the non-integer communication delay of the drive is 317 micro-seconds. |
which is in units of one sample equal:
0.317[ms]/4[ms/cycle] = 0.078[cycles]
Final
So setting PEDEL to 5.078 we get:
Example File
PDLtune.prg
'
common shared Ax as generic Axis
program
dim i as long
Ax = A1
with Ax
Attach
Pedel = 1 ' first run
Pedel = 1 + round(1.68 / 100.0 * 1000.0 / (bus[0].cycleTime/1000)) ' 2nd run. extracted from recordings
Pedel = Pedel + 0.075 / 100.0 * 1000.0 / (bus[0].cycleTime/1000) ' 3rd run. extracted from recordings
PeMax = 10
En=1
Sleep 100
Move 0 Vcruise=100 Abs=TRUE
call waitMotion
Record ax_PE.rec 100000 Gap=1 RecData = Ax.Pe, Ax.Vcmd
RecordOn
Sleep 100
for i = 1 to 3
Move 100 Vcruise=100 Abs=TRUE
call waitMotion
Sleep 100
Move 0 Vcruise=100 Abs=TRUE
call waitMotion
Sleep 100
next
RecordClose
En=FALSE
Sleep 100
PeMax = 0.1
Detach
end with
terminate program
sub waitMotion
while Ax.IsMoving
Sleep 1
end while
end sub
Expected Values For Different Devices
NOTE | |
These values are approximations to the values expected to be obtained with the script provided, and the values may vary depending on the system settings used. |
Drivel Model | PEDEL [Motion-Bus cycle times] |
Derive Version |
CDHD CAN | 5.23 | 1.41.17 |
CDHD ETH | 4.11 | 1.41.17 |
CDHD2 ETH | 4.404 | 2.15.3a9.2.22 |
DDHD CAN | 5.06 | 1.41.16L0.0.58BOCHU |
stepIM CAN | 4.37 | 23: 0.0.3.38 |