zarfld / LinuxCnc_PokeysLibComp

Pokeys comp for LinuxCnc using https://bitbucket.org/mbosnak/pokeyslib.git
MIT License
5 stars 0 forks source link

PEv2 / PoExtBusOC16CNC - Internal Motioncontroller: Position Mode - still FERROR #3

Closed zarfld closed 2 years ago

zarfld commented 2 years ago

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

zarfld commented 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

zarfld commented 2 years ago

solved