Closed zarfld closed 2 years ago
i struggled some time now to get the steppers finally moving. in the moment i'm using pos-cmd & pos-fb. (as i'm still "open loop" )
what i observe now that the currentposition will be reset to 0 after some time. I assume the reason is that the pokeys-PEv2 is not homed (and misses the referenceposition) (pokeys)
my idea to solve this would be using Homing-functioniality of pokeys during homing procedure of EMC. (Similar for Jog operation)
i found HalPins
solved
current implementation does not use a Counter (for Closed-Loop) for correct velocity mode.
and tries to use PositionMode instead. currently following calculation is used: PEv2.ReferencePositionSpeed[i] = joint_pos_cmd[i] * STEP_SCALE[i]; joint_pos_fb[i] = PEv2.CurrentPosition[i] / STEP_SCALE[i];
(Calculation assumes that pos_cmc & pos_fb use "mm/inch" (mm/s, mm/s²,...) while PEv2 expects "pulses" (pulses/s, pulses/s²,...)
need more detailed debugging. could be because of vel-FB is still calculated - maybe just disconnectig halSignal for Velocity-Mode is sufficiant