// Here we use 'real encoder with direct PWM'. Further the axis are scaled // in this configuration, the PID gives 'torque' to iqCmd. // the phasePos is received from tne encoder on the motor shaft. // The idCmd is set to 0 // the PID regulates the position by setting torque, if the motor is not at the desired position // Compared to 'real encoder with direct microstepping', following main elements have to be reconfigured: // SlipGain=0 (instead 0.25) ,PhasePosSf= calculated value (instead of 0) // look also at PwmSf,PhaseMode,PhaseCtrl, // -> PhasePosSf is calculated as follows: (2048*pole_cycle)/(256*enc_step) = 8*pole_cycle/enc_step // e.g. Motor[x].pPhaseEnc -> PowerBrick[.].Chan[.].PhaseCapt.a // 1 rev = 8192 phase_step = 4 pole_cycle = 512000 PhaseCapt =256*2000 (256=scaling of encTable, 2000=enc_step/rev) // PhasePosSf 8*4/2000=0.016 // x einraster == -> x-N and x-S poles =2*x poles -> 1 rev = x*2048 ustep=phase_step // changing the polarity from S-N-S (one pole cycle) are 2048 phase_step. phase_step is also called ustep //Mot 1: Rotation stage LS Mecapion MDM-DC06DNC0H 32 poles = 1 rev = 16*2048=32768 phase_step //Enc 1: Rotation stage LS Mecapion 1 rev = 1048576 enc_steps //Mot 2: Stage X Parker MX80L D11 25mm one pole cycle = 13mm = 2048 phase_step //Enc 2: Stage X Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step) //Mot 3: Stage Y Parker MX80L D11 25mm one pole cycle = 13mm = 2048 phase_step //Enc 3: Stage Y Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step) //Mot 4: Test Servo: Trinamic QBL 4208 motor 8 poles 1 rev = 4*2048=8192 phase_step //Enc 4: Test Servo: Incremental encoder mounted with motor 1 1 rev = 2000 enc count (500 inc_ quadrature encoder) //Enc 5: Test Servo: Trinamic QBL 4208 hall sensor 1 rev = 24 enc count (hall sensor encoder) //Mot 6: Test Stepper: Vextra PK244M 200 poles 1 rev = 100*2048 phase_step (2 stepper motor) //Enc 6: Test Stepper: inc_enc 1 rev = 1600 enc_step //Mot 7: Test Stepper: Vextra PK244M 200 poles 1 rev = 100*2048 phase_step (2 stepper motor) //Enc 7: Test Stepper: ssi_enc multiturn 1 rev = 4096 enc_step $$$*** !common() !torqueCtrl() !sh sleep 1 #1,2,3,4,6j/