From 5b4848f6dcd99dc48cf3df4c720faebe60573a10 Mon Sep 17 00:00:00 2001 From: Thierry Zamofing Date: Thu, 15 Dec 2016 10:49:52 +0100 Subject: [PATCH] same devices with "direct microstepping" (fixed idCmd, iqCmd used to control speed) --- Readme.md | 355 +-------------------------------------------- cfg/mx-stage.cfg | 101 ++++++------- cfg/simEncoder.cfg | 84 +++++++++++ logbook.md | 355 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 493 insertions(+), 402 deletions(-) create mode 100644 cfg/simEncoder.cfg create mode 100644 logbook.md diff --git a/Readme.md b/Readme.md index 2fa8c1c..4acba3e 100644 --- a/Readme.md +++ b/Readme.md @@ -27,364 +27,15 @@ http://www.inmoco.co.uk/Upload/product/1037_DD_Series_Motors_79.pdf - encoder is biss 20 bit - Rated Current 1.46 Arms - Max Current 4.38 Arms -- 16 pole (8 einraster per rev) +- 32 pole (16 einraster per rev) Servo Test Motor QBL -------------------- - 8 pole (4 einraster per rev) -2Phase Stepper Test Motor -------------------------- +2Phase Stepper Test Motor Vextra PK244M +--------------------------------------- - 200 pole (100 einraster per rev) ************************ - -Parker stage -============ - -Using IDE ---------- -1 detect current sensor direction - Motor[1].PhaseOffset 683 - Motor[1].PwmSf 2154 -2 current bias - Motor[1].IaBias=0 - Motor[1].IbBias=0 -3 Voltage six step - Motor[1].PhaseOffset -683 - Motor[1].PwmSf -2154 - Motor[1].PhasePosSf=2048/(1*256*213333.3333) -4 Tune Current Loop (Mag=200, dur=50) - Motor[1].IiGain 10.5 - Motor[1].IpfGain=0 - Motor[1].IpbGain=14.7 -5 Current six step - Motor[1].PhasePosSf=2048/(1*1*61440000.) -6 Phase ref search - Motor[1].PhaseFindingDac=160.95 - Motor[1].PhaseFindingTime=50 - - - -Open Loop ---------- -20mm = 1003994 enc_step -20mm = 1'000'000 enc_step -> 20nm/enc step -1 pole= 600'000 enc_step -> 12mm - - ->>>>>>>>>> DONT FORGET <<<<<<<<<<< -$$$*** -!common() - ->>> open loop with encoder counts <<< -!encoder_sim(enc=1,tbl=1,mot=1) -!encoder_inc(enc=1,tbl=9,mot=9,encctrl=7,posSf=1./1) -!motor(mot=1,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True) -#1j/ -#1,9hmz - -#1j:2048 -> moves one pole= 650'000 enc_step =13mm (Electrical Pitch in MX80 doc) - -512= 90deg -> check phase * - - * o x * o x - * * o o x x * * o o x x - * o* xo x * o* xo x - * o * x o x * o * x o x - * o x * o x * o x * o x -*------o------x-----*------o------x-----*------o------x-----*------o------x-----*------o------x-----*------o------x - * o x * o x * o x * o x * o x * o x - * o * x o x * o * x o x * o * x o x - * o* xo x * o* xo x * o* xo x - * * o o x x * * o o x x * * o o x x - * o x * o x * o x -0 512 1024 1536 2048 - ->>> scaling encoder etc to um <<< -!encoder_sim(enc=1,tbl=1,mot=1,posSf=12000./2048) -!encoder_inc(enc=1,tbl=9,mot=9,encctrl=7,posSf=12000./600000) -!motor(mot=1,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.*12000./2048,numPhase=3,invDir=True) - -JogSpeed=1.*12000./2048 6um/ms =6mm/s - - ->>> close the loop with inc-encoder <<< -servoSf : motorusteps/userUnits - -!encoder_sim(enc=1,tbl=9,mot=9,posSf=12000./2048) -!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) -!motor(mot=1,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.) - ->>> close the loop with inc-encoder removing direct current<<< -$$$*** -!common() -!encoder_sim(enc=1,tbl=9,mot=9,posSf=12000./2048) -!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) -!motor(mot=1,dirCur=0,contCur=500,peakCur=800,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.) - -Motors are not moving, because no current will be set due to some wrong parameters. -But the servoloop is running and gives output: -ServoOut set value from 0.5099 to -0.5099 (= MaxPosErr*Kp) when moving at different position -Motor[1].Servo.MaxPosErr=1000.0169 -Motor[1].Servo.Kp=0.000512 -1000.0169*0.000512=0.5120086528 - -Motor[1].Servo.Kp=0.0007 -Motor[1].Servo.MaxPosErr=1000.0169 -1000.0169*0.0007=0.70001183 - -Now some elements have to be reconfigured: -SlipGain,PwmSf,PhaseMode,PhaseCtrl,PhasePosSf - - -Motor[1].pPhaseEnc = PowerBrick[0].Chan[0].PhaseCapt.a //is default -use configuration open loop with encoder counts -#1j/ -Read PowerBrick[0].Chan[0].PhaseCapt 130559 -move one pole (13mm) -Read PowerBrick[0].Chan[0].PhaseCapt 166599808 -difference = 166599808-130559= 166469249 - 166469249/256 = 650270 =650000incr = 13mm -1 commutation cycle=163537664 PhaseCapt = 2048 com_cycl_units -PhasePosSf= 2048./166469249 = 1.2303e-05 or precise: 2048/(256*650000)=1.23077e-05 - -servoSf : motorusteps/userUnits - -servoSf=2048/12000.,PhaseCtrl=4,SlipGain=0,PhasePosSf=1.23077e-05 - - -******************************* -****** WORKS !!!!!!!!!!!! ***** -** But positioning has very bad performance ** -******************************* - -// controlling speed/velocity on iqCmd and constant current(=torque) on idCmd -//precission +-1 step in steady state -$$$*** -!common() -!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) -!motor(mot=1,dirCur=300,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.) - - -// controlling torque(=current) on iqCmd and idCmd=0 -//precission +-100 and more step in steady state -$$$*** -!common() -!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) -!motor(mot=1,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.,PhaseCtrl=4,SlipGain=0,PhasePosSf=1.23077e-05,PhaseMode=0,PhaseFindingDac=200,PhaseFindingTime=22.586512) - -#1out10 -!!! HOLD BY HAND TO LIMIT THE SPEED !!! - Motor[1].Servo.Kp=1 -Motor[1].InPosBand=0 -Motor[1].Servo.BreakPosErr=0 -#1j/ -#1j:1000 -******************************* - - - --> Tadejs input: use simulated encoder for the phasing - - -Motor[1].Servo.BreakPosErr=0 -Motor[3].Servo.Kp=2000 - -///Motor[3].Servo.BreakPosErr=0 -//Motor[3].Servo.Kp=2000 -//#3out5 - - -Testing IDE with QBL test motor -=============================== - ->>> close the loop with inc-encoder removing direct current<<< - --> the current/speed must be set with that PWM-scale factor - -Motor idx 1 3 -Motor[x].AdvGain 0.020479999 0 -Motor[x].PhasePosSf 0 0.0160000000000000003 -Motor[x].PhaseCtrl 6 4 -Motor[x].PhaseMode 1 0 -Motor[x].PwmSf -15134.891 4309 -Motor[x].SlipGain 0.25 0 -Motor[x].PhaseFindingDac 0 95.976563 -Motor[x].PhaseFindingTime 0 22.586512 - ->>> origin setup by ide+ tweaks <<< -!encoder_inc(enc=3,tbl=3,mot=3,encctrl=7,posSf=1./2000) -!motor_servo(mot=3,ctrl='ServoCtrl',Kp=4.0424199*2000, Kvfb=160.43646*2000,Kvff=160.43646*2000,Kaff=3184.5818*2000) -!motor(mot=3,numPhase=3,servo=None, homing=None,dirCur=0,contCur=1790,peakCur=5400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,PhasePosSf=0.016,PhaseCtrl=4,PhaseMode=0,PwmSf=4309,SlipGain=0,PhaseFindingDac=95.976563,PhaseFindingTime=22.586512) - -AdvGain -PhasePosSf 0 does not work at all -> must be calculated correctly as below -PhaseCtrl 6 not working. must be 4 for phase feedback and 6 for direct microstepping -PhaseMode 0,1 both are working, should be 0 for 3 phase -PwmSf 0 2000 4309 -> the higher, the more torque on error -SlipGain 0.25 squeezing -PhaseFindingDac 0 no change -PhaseFindingTime 0 no change -$$$*** -!common() -!encoder_inc(enc=3,tbl=3,mot=3,encctrl=7,posSf=1./2000) -!motor_servo(mot=3,ctrl='ServoCtrl',Kp=4.0424199*2000, Kvfb=160.43646*2000,Kvff=160.43646*2000,Kaff=3184.5818*2000) -!motor(mot=3,numPhase=3,servo=None, homing=None,dirCur=0,contCur=1790,peakCur=5400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,PhasePosSf=0.016,PhaseCtrl=6,PhaseMode=1,PwmSf=1000,SlipGain=0,PhaseFindingDac=0,PhaseFindingTime=0) -!sh sleep 1 -#3j/ -!sh sleep 10 -#3j:100 - -#3out10 sets directly the Motor[3].ServoOut value , sets to 10% of Motor[x].MaxDac -Motor[3].MaxDac=4526.9282 - Out ServoOut iqCmd IqVolts -#3out100 -> 4526.9 set to 100 %of Motor[x].MaxDac -#3out50 -> 2263.46411 2263.4641 -#3out10 -> 452.692822 452.69281 - -iqMeas=iqCmd if motor is blocked, when motor moves, iqCmd stays and iqMeas drops -PwmSf IqCmd iqMeas(when blocked) -Motor[3].PwmSf;Motor[3].IqCmd;Motor[3].IqMeas;Motor[3].IqVolts -PwmSf=500 IqCmd=2263.4641 IqMeas=232.44925 IqVolts=34406.398 -PwmSf=1000 IqCmd=2263.4641 IqMeas=779.05316 IqVolts=34406.398 -PwmSf=2000 IqCmd=2263.4641 IqMeas=1944.9929 IqVolts=34406.398 -PwmSf=3000 IqCmd=2263.4641 IqMeas=2234.2734 IqVolts=34406.398 - - -Motor[x].PhasePosSf scale factor to convert encoder position to phase position -Motor[3].pPhaseEnc=PowerBrick[0].Chan[2].PhaseCapt.a -Motor[3].PhaseEncLeftShift=0 -Motor[3].PhaseEncRightShift=0 -1 rev=2000*256 enc_steps (PowerBrick[0].Chan[2].PhaseCapt) - -4 Pole magnet, 2000 enc_steps/rev -encoder configured to have 1 enc_step per revolution -PhasePosSf=0.016=1/62.5=32/2000= (4*2048)/(256*2000) = (numPoles*const)/(256*2000) -const=Power PMAC divides a commutation cycle into 2048 parts - -Motor[3].PhasePos position of the phase: 0..2048 this does not change if the motor is blocked - - ->>>>>>find PhasePosSf <<<<<<<<<<< -$$$*** -!common() -!encoder_sim(enc=3,tbl=3,mot=3) -!encoder_inc(enc=3,tbl=11,mot=11,encctrl=7,posSf=1./2000) -!motor(mot=3,numPhase=3, dirCur=500,contCur=1790,peakCur=2400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,PhasePosSf=0.0,PhaseCtrl=4,PhaseMode=0,SlipGain=0) - -Do manually one revolution -feeling 4 pole changes -> 8 poles (locks on N-S S-N positions, moves on N-N S-S position) -Motor[3].pPhaseEnc -> Motor[3].pPhaseEnc=PowerBrick[0].Chan[2].PhaseCapt.a - -PowerBrick[0].Chan[2].PhaseCapt after one revolution -1535488-1022464=513024=512000 - -Phase_step = change pole from N->S->N -1 Phase_step = 2048 Phase_uStep -512000 PhaseEnc_step == 4 pole changes = 4*2048 Phase_uStep -PhasePosSf=Phase_uStep/PhaseEnc_step=4*2048/512000==0.016 - - -!encoder_inc(enc=3,tbl=3,mot=3,encctrl=7,posSf=1./2000) -!motor(mot=3,numPhase=3, dirCur=0,contCur=1790,peakCur=2400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,servoSf=2000./1,PhasePosSf=0.016,PhaseCtrl=4,PhaseMode=0,PwmSf=4309,SlipGain=0,PhaseFindingDac=95.976563,PhaseFindingTime=22.586512) -Motor[3].Servo.BreakPosErr=0 -Motor[3].Servo.Kp=2000 -#3out5 - - - - - - - -#3j/ - - -PowerBrick[0].AdcAmpCtrl = $f00cfe00 $f00cfe00 -PowerBrick[0].Chan[0].InCtrl = $47 $47 -PowerBrick[0].Chan[0].OutCtrl = $f000001 $f000101 -PowerBrick[1].AdcAmpCtrl = $f00cfe00 $f00cfe00 -Motor[1].Servo.Kp = 4.0424199 4.0424199 -Motor[1].Servo.Kvifb = 0 0 -Motor[1].Servo.Kviff = 0 0 -Motor[1].Servo.Kvfb = 160.43646 40.951927 -Motor[1].Servo.Kvff = 160.43646 40.951927 -Motor[1].Servo.Kafb = 0 0 -Motor[1].Servo.Kaff = 3184.5818 207.48897 -Motor[1].Servo.Ki = 2.6301687e-4 0.0010304153 -Motor[1].Servo.Kfff = 0 0 -Motor[1].PhasePosSf = 0.0160000000000000003 1.59999999999999993e-5 -Motor[1].IiGain = 1.0628819 0.2278125 -Motor[1].IpbGain = 6.5684085 0.0099999998 -Motor[1].MotorTa = -10 -10 -Motor[1].MotorTs = -50 -50 -Motor[1].I2tSet = 1499.7477 418.92395 -Motor[1].I2tTrip = 18220758 2632459 -Motor[1].JogOffset = 0 0 -Motor[1].AdcMask = $fffc0000 $fffc0000 -Motor[1].PhaseOffset = 683 -683 -Motor[1].Stime = 0 0 -Motor[1].PwmSf = 4309 -2154 -Motor[1].MaxDac = 4524.3784 1675.6958 -Motor[1].PhaseFindingDac = 95.976563 0 -Motor[1].PhaseFindingTime = 22.586512 1 -Motor[1].TraceSize = 0 0 -Motor[1].Control[0] = $14000100 $14000100 -Motor[1].Control[1] = $0 $0 -Node15[0].MasterNum = 255 255 -Node15[1].MasterNum = 255 255 -Node15[2].MasterNum = 255 255 -Node15[3].MasterNum = 255 255 - - - - -IDE Setup -> changed variables ------------------------------- -*Command/Feedback(3) -Motor[3].pAbsPhasePos=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 -Motor[3].AbsPhasePosFormat=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 -Motor[3].AbsPhasePosSf=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 -Motor[3].AbsPhasePosOffset=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 -Motor[3].PhaseFindingTime=1 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 -Motor[3].PhaseFindingDac=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 - -*Hardware Interface -Motor[3].pLimits=PowerBrick[0].Chan[2].Status.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pEnc= EncTable[3].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pEnc2= EncTable[3].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].EncType= 5 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pDac=PowerBrick[0].Chan[2].Pwm[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pAdc=PowerBrick[0].Chan[2].AdcAmp[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pAmpEnable=PowerBrick[0].Chan[2].OutCtrl.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].ServoCtrl = 1 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PhaseCtrl = 4 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Gate3[0].Chan[2].PackIndata = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Gate3[0].Chan[2].PackOutdata = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PhaseMode = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pPhaseEnc=PowerBrick[0].Chan[2].PhaseCapt.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -BrickLV.Chan[2].TwoPhaseMode=0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PhaseSplineCtrl = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pSineTable = Sys.SineTable[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pVoltSineTable = Sys.SineTable[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PwmDbComp = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PwmDbI = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -PowerBrick[0].Chan[2].OutputMode = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PwmSf =7618.5 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].AmpEnableBit = 8 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].AmpFaultBit = 7 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].AmpFaultLevel = 1 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].pAmpFault=PowerBrick[0].Chan[2].Status.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].LimitBits = 9 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].DacShift=0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].AdcMask = $FFFC0000 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].ctrl=Sys.servoctrl // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].DtOverRotorTc = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].IxCoupleGain = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].SlipGain = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].AdvGain = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].Stime = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -Motor[3].PhaseOffset =-683 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 -BrickLV.Reset = 1 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 diff --git a/cfg/mx-stage.cfg b/cfg/mx-stage.cfg index 98d3401..baed85e 100644 --- a/cfg/mx-stage.cfg +++ b/cfg/mx-stage.cfg @@ -1,84 +1,85 @@ -//Mot 1: Rotation stage LS Mecapion MDM-DC06DNC0H -//Enc 1: Rotation stage LS Mecapion -//Mot 2: Stage X Parker MX80L D11 25mm -//Enc 2: Stage X Parker MX80L D11 inc_enc 20nm +// x einraster == -> x-N and x-S poles =2*x poles -> 1 rev = x*2048 ustep=phase_steps -//Mot 3: Stage Y Parker MX80L D11 25mm -//Enc 3: Stage Y Parker MX80L D11 inc_enc 20nm +//Mot 1: Rotation stage LS Mecapion MDM-DC06DNC0H 32 poles = 1 rev= 16*2048 usteps +//Enc 1: Rotation stage LS Mecapion 1 rev = 1048576 enc_steps -//Mot 4: Test Servo: Trinamic QBL 4208 motor -//Enc 4: Test Servo: Incremental encoder mounted with motor 1 -//Enc 5: Test Servo: Trinamic QBL 4208 hall sensor +//Mot 2: Stage X Parker MX80L D11 25mm one pole cycle = 13mm = 2048usteps +//Enc 2: Stage X Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step) -//Mot 6: Test Stepper: Vextra PK244M -//Enc 6: Test Stepper: inc_enc +//Mot 3: Stage Y Parker MX80L D11 25mm one pole cycle = 13mm = 2048usteps +//Enc 3: Stage Y Parker MX80L D11 inc_enc 20nm one pole cycle = 13mm = 650000 enc_step (20nm/enc_step) -//Mot 7: Test Stepper: Vextra PK244M -//Enc 7: Test Stepper: ssi_enc multiturn +//Mot 4: Test Servo: Trinamic QBL 4208 motor 8 poles 1 rev = 8*2048 usteps +//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 usteps (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 usteps (2 stepper motor) +//Enc 7: Test Stepper: ssi_enc multiturn 1 rev = 4096 enc_step $$$*** !common() //rot stage //--------- - -!encoder_sim(enc=1,tbl=1,mot=1) -!encoder_biss(enc=1,tbl=9,mot=9,numBits=20,posSf=1.) -//real limits in closed loop (does not work with simulated encoder) -//!motor(mot=5,dirCur=0,contCur=1460,peakCur=4380,timeAtPeak=.5,JogSpeed=32.,numPhase=3) -!motor(mot=1,dirCur=200,contCur=500,peakCur=1000,timeAtPeak=.5,JogSpeed=8.,numPhase=3,invDir=True) -//8 einraster -> 8N 8S poles -> 16 poles ->16*2048=1 rev -//#1j:32768 // = 1 rev = 1048576 enc_steps - +//use 360'000 for 360 deg as motor unit +!encoder_sim(enc=1,tbl=9,mot=9,posSf=360000./32768) +!encoder_biss(enc=1,tbl=1,mot=1,numBits=20,posSf=360000./1048576) +!motor(mot=1,dirCur=200,contCur=500,peakCur=1000,timeAtPeak=.5,JogSpeed=8.,numPhase=3,invDir=True,servoSf=32768/360000.) +//#1j:90000 // = moves 90 deg //Stage X Parker MX80L //-------------------- -!encoder_sim(enc=2,tbl=2,mot=2) -!encoder_inc(enc=2,tbl=10,mot=10,posSf=1.) -//!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=.5,JogSpeed=32.,numPhase=3) -!motor(mot=2,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True) -//#2j:2048 -> moves one pole cycle= 650000 enc_step =13mm (Electrical Pitch in MX80 doc) - +!encoder_sim(enc=2,tbl=10,mot=10,posSf=13000./2048) +!encoder_inc(enc=2,tbl=2,mot=2,posSf=13000./650000) +!motor(mot=2,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True,servoSf=2048/13000.) +//#2j:1000 -> moves 1000um //Stage Y Parker MX80L //-------------------- -!encoder_sim(enc=3,tbl=3,mot=3) -!encoder_inc(enc=3,tbl=11,mot=11,posSf=1.) +!encoder_sim(enc=3,tbl=11,mot=11,posSf=13000./2048) +!encoder_inc(enc=3,tbl=3,mot=3,posSf=1.,posSf=13000./650000) //!motor(mot=3,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=.5,JogSpeed=32.,numPhase=3) -!motor(mot=3,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True) -//#3j:2048 -> moves one pole cycle= 650000 enc_step =13mm (Electrical Pitch in MX80 doc) +!motor(mot=3,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True,servoSf=2048/13000.) +//#3j:1000 -> moves 1000um //Test Servo: Trinamic QBL 4208 motor //----------------------------------- -!encoder_sim(enc=4,tbl=4,mot=4) -!encoder_inc(enc=4,tbl=12,mot=12,posSf=1.) // incremental encoder -!encoder_inc(enc=5,tbl=13,mot=13,encctrl=15) //encctrl=11 Hall sensor encoder - -//real limits in closed loop (does not work with simulated encoder) -//!motor(mot=4,dirCur=0,contCur=1790,peakCur=5400,timeAtPeak=.5,JogSpeed=32.,numPhase=3) -!motor(mot=4,dirCur=200,contCur=500,peakCur=1000,timeAtPeak=.5,JogSpeed=32.,numPhase=3) -//#4j:2048 -> moves one pole cycle= 90deg -> 8 poles -//#4j:8192 -> moves 1 rev +//use 360 for 360 deg as motor unit +!encoder_sim(enc=4,tbl=12,mot=12,posSf=360./8192) +!encoder_inc(enc=4,tbl=4,mot=4,posSf=360./2000) // incremental encoder +!encoder_inc(enc=5,tbl=13,mot=13,encctrl=15,posSf=360./24) //Hall sensor encoder +!motor(mot=4,dirCur=400,contCur=500,peakCur=1000,timeAtPeak=.5,JogSpeed=8.,numPhase=3,servoSf=8192/360.) +//#4j:360 -> moves 1 rev +// 1 rev = 8 poles (4 lock pos) = 4*2048 ustep=phase_step // 1 rev = 2000 enc count (500 inc_ quadrature encoder) // 1 rev = 24 enc count (hall sensor encoder) //Test Stepper: Vextra PK244M inc_enc //----------------------------------- -!encoder_sim(enc=6,tbl=6,mot=6) -!encoder_inc(enc=6,tbl=14,mot=14) -!motor(mot=6,dirCur=100,contCur=400,peakCur=600,timeAtPeak=1,numPhase=2,invDir=False) -//#6j:2048 ->moves one pole cycle -> #6j:204800 moves 1 rev +//use 360 for 360 deg as motor unit +!encoder_sim(enc=6,tbl=14,mot=14,posSf=360./204800) +!encoder_inc(enc=6,tbl=6,mot=6,posSf=360./1600) +!motor(mot=6,dirCur=200,contCur=400,peakCur=600,timeAtPeak=1,numPhase=2,invDir=False,servoSf=204800/360.) +//#6j:360 -> moves 1 rev +// 1 rev = 200 poles = 100 lock pos = 100*2048 ustep=phase_step // 1 rev = 1600 enc count (400 inc_ quadrature encoder) //Test Stepper: Vextra PK244M abs_enc //----------------------------------- -!encoder_sim(enc=7,tbl=7,mot=7) -!encoder_ssi(enc=7,tbl=15,mot=15,numBits=25) -!motor(mot=7,dirCur=100,contCur=400,peakCur=600,timeAtPeak=1,numPhase=2,invDir=False) -//#7j:2048 ->moves one pole cycle -> #6j:204800 moves 1 rev -// 1 rev = 4096 enc count +//use 360 for 360 deg as motor unit -> JogSpeed=2048./204800*360 +!encoder_sim(enc=7,tbl=7,mot=7,posSf=360./204800) +!encoder_ssi(enc=7,tbl=15,mot=15,numBits=25,posSf=360./4096) +!motor(mot=7,dirCur=100,contCur=400,peakCur=600,timeAtPeak=1,numPhase=2,invDir=False,servoSf=204800/360.,JogSpeed=3.6) +//#7j:360 -> moves 1 rev +// 1 rev = 4096 enc count = 204800 ustep=phase_step = 360 deg + + + diff --git a/cfg/simEncoder.cfg b/cfg/simEncoder.cfg new file mode 100644 index 0000000..142f59b --- /dev/null +++ b/cfg/simEncoder.cfg @@ -0,0 +1,84 @@ +//Mot 1: Rotation stage LS Mecapion MDM-DC06DNC0H +//Enc 1: Rotation stage LS Mecapion + +//Mot 2: Stage X Parker MX80L D11 25mm +//Enc 2: Stage X Parker MX80L D11 inc_enc 20nm + +//Mot 3: Stage Y Parker MX80L D11 25mm +//Enc 3: Stage Y Parker MX80L D11 inc_enc 20nm + +//Mot 4: Test Servo: Trinamic QBL 4208 motor +//Enc 4: Test Servo: Incremental encoder mounted with motor 1 +//Enc 5: Test Servo: Trinamic QBL 4208 hall sensor + +//Mot 6: Test Stepper: Vextra PK244M +//Enc 6: Test Stepper: inc_enc + +//Mot 7: Test Stepper: Vextra PK244M +//Enc 7: Test Stepper: ssi_enc multiturn + +$$$*** +!common() +//rot stage +//--------- + +!encoder_sim(enc=1,tbl=1,mot=1) +!encoder_biss(enc=1,tbl=9,mot=9,numBits=20,posSf=1.) +//real limits in closed loop (does not work with simulated encoder) +//!motor(mot=5,dirCur=0,contCur=1460,peakCur=4380,timeAtPeak=.5,JogSpeed=32.,numPhase=3) +!motor(mot=1,dirCur=200,contCur=500,peakCur=1000,timeAtPeak=.5,JogSpeed=8.,numPhase=3,invDir=True) +//16 einraster -> 16N 16S poles -> 1 rev = 16*2048 +//#1j:32768 // = 1 rev = 1048576 enc_steps + + +//Stage X Parker MX80L +//-------------------- +!encoder_sim(enc=2,tbl=2,mot=2) +!encoder_inc(enc=2,tbl=10,mot=10,posSf=1.) +//!motor(mot=2,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=.5,JogSpeed=32.,numPhase=3) +!motor(mot=2,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True) +//#2j:2048 -> moves one pole cycle= 650000 enc_step =13mm (Electrical Pitch in MX80 doc) + + + +//Stage Y Parker MX80L +//-------------------- +!encoder_sim(enc=3,tbl=3,mot=3) +!encoder_inc(enc=3,tbl=11,mot=11,posSf=1.) +//!motor(mot=3,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=.5,JogSpeed=32.,numPhase=3) +!motor(mot=3,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True) +//#3j:2048 -> moves one pole cycle= 650000 enc_step =13mm (Electrical Pitch in MX80 doc) + + +//Test Servo: Trinamic QBL 4208 motor +//----------------------------------- + +!encoder_sim(enc=4,tbl=4,mot=4) +!encoder_inc(enc=4,tbl=12,mot=12,posSf=1.) // incremental encoder +!encoder_inc(enc=5,tbl=13,mot=13,encctrl=15) //encctrl=11 Hall sensor encoder + +//real limits in closed loop (does not work with simulated encoder) +//!motor(mot=4,dirCur=0,contCur=1790,peakCur=5400,timeAtPeak=.5,JogSpeed=32.,numPhase=3) +!motor(mot=4,dirCur=200,contCur=500,peakCur=1000,timeAtPeak=.5,JogSpeed=32.,numPhase=3) +//#4j:2048 -> moves one pole cycle= 90deg -> 8 poles +//#4j:8192 -> moves 1 rev +// 1 rev = 2000 enc count (500 inc_ quadrature encoder) +// 1 rev = 24 enc count (hall sensor encoder) + +//Test Stepper: Vextra PK244M inc_enc +//----------------------------------- + +!encoder_sim(enc=6,tbl=6,mot=6) +!encoder_inc(enc=6,tbl=14,mot=14) +!motor(mot=6,dirCur=100,contCur=400,peakCur=600,timeAtPeak=1,numPhase=2,invDir=False,JogSpeed=2048) +//#6j:2048 ->moves one pole cycle -> #6j:204800 moves 1 rev +// 1 rev = 1600 enc count (400 inc_ quadrature encoder) + + +//Test Stepper: Vextra PK244M abs_enc +//----------------------------------- +!encoder_sim(enc=7,tbl=7,mot=7) +!encoder_ssi(enc=7,tbl=15,mot=15,numBits=25) +!motor(mot=7,dirCur=100,contCur=400,peakCur=600,timeAtPeak=1,numPhase=2,invDir=False,JogSpeed=2048) +//#7j:2048 ->moves one pole cycle -> #7j:204800 moves 1 rev +// 1 rev = 4096 enc count diff --git a/logbook.md b/logbook.md new file mode 100644 index 0000000..351d932 --- /dev/null +++ b/logbook.md @@ -0,0 +1,355 @@ +Text that was in readme and not used any more is stored here +============================================================ + + +*** 14.12.2016 *** +================== + +Parker stage +============ + +Using IDE +--------- +1 detect current sensor direction + Motor[1].PhaseOffset 683 + Motor[1].PwmSf 2154 +2 current bias + Motor[1].IaBias=0 + Motor[1].IbBias=0 +3 Voltage six step + Motor[1].PhaseOffset -683 + Motor[1].PwmSf -2154 + Motor[1].PhasePosSf=2048/(1*256*213333.3333) +4 Tune Current Loop (Mag=200, dur=50) + Motor[1].IiGain 10.5 + Motor[1].IpfGain=0 + Motor[1].IpbGain=14.7 +5 Current six step + Motor[1].PhasePosSf=2048/(1*1*61440000.) +6 Phase ref search + Motor[1].PhaseFindingDac=160.95 + Motor[1].PhaseFindingTime=50 + + + +Open Loop +--------- +20mm = 1003994 enc_step +20mm = 1'000'000 enc_step -> 20nm/enc step +1 pole= 600'000 enc_step -> 12mm + + +>>>>>>>>>> DONT FORGET <<<<<<<<<<< +$$$*** +!common() + +>>> open loop with encoder counts <<< +!encoder_sim(enc=1,tbl=1,mot=1) +!encoder_inc(enc=1,tbl=9,mot=9,encctrl=7,posSf=1./1) +!motor(mot=1,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.,numPhase=3,invDir=True) +#1j/ +#1,9hmz + +#1j:2048 -> moves one pole= 650'000 enc_step =13mm (Electrical Pitch in MX80 doc) + +512= 90deg -> check phase * + + * o x * o x + * * o o x x * * o o x x + * o* xo x * o* xo x + * o * x o x * o * x o x + * o x * o x * o x * o x +*------o------x-----*------o------x-----*------o------x-----*------o------x-----*------o------x-----*------o------x + * o x * o x * o x * o x * o x * o x + * o * x o x * o * x o x * o * x o x + * o* xo x * o* xo x * o* xo x + * * o o x x * * o o x x * * o o x x + * o x * o x * o x +0 512 1024 1536 2048 + +>>> scaling encoder etc to um <<< +!encoder_sim(enc=1,tbl=1,mot=1,posSf=12000./2048) +!encoder_inc(enc=1,tbl=9,mot=9,encctrl=7,posSf=12000./600000) +!motor(mot=1,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=1.*12000./2048,numPhase=3,invDir=True) + +JogSpeed=1.*12000./2048 6um/ms =6mm/s + + +>>> close the loop with inc-encoder <<< +servoSf : motorusteps/userUnits + +!encoder_sim(enc=1,tbl=9,mot=9,posSf=12000./2048) +!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) +!motor(mot=1,dirCur=400,contCur=500,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.) + +>>> close the loop with inc-encoder removing direct current<<< +$$$*** +!common() +!encoder_sim(enc=1,tbl=9,mot=9,posSf=12000./2048) +!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) +!motor(mot=1,dirCur=0,contCur=500,peakCur=800,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.) + +Motors are not moving, because no current will be set due to some wrong parameters. +But the servoloop is running and gives output: +ServoOut set value from 0.5099 to -0.5099 (= MaxPosErr*Kp) when moving at different position +Motor[1].Servo.MaxPosErr=1000.0169 +Motor[1].Servo.Kp=0.000512 +1000.0169*0.000512=0.5120086528 + +Motor[1].Servo.Kp=0.0007 +Motor[1].Servo.MaxPosErr=1000.0169 +1000.0169*0.0007=0.70001183 + +Now some elements have to be reconfigured: +SlipGain,PwmSf,PhaseMode,PhaseCtrl,PhasePosSf + + +Motor[1].pPhaseEnc = PowerBrick[0].Chan[0].PhaseCapt.a //is default +use configuration open loop with encoder counts +#1j/ +Read PowerBrick[0].Chan[0].PhaseCapt 130559 +move one pole (13mm) +Read PowerBrick[0].Chan[0].PhaseCapt 166599808 +difference = 166599808-130559= 166469249 + 166469249/256 = 650270 =650000incr = 13mm +1 commutation cycle=163537664 PhaseCapt = 2048 com_cycl_units +PhasePosSf= 2048./166469249 = 1.2303e-05 or precise: 2048/(256*650000)=1.23077e-05 + +servoSf : motorusteps/userUnits + +servoSf=2048/12000.,PhaseCtrl=4,SlipGain=0,PhasePosSf=1.23077e-05 + + +******************************* +****** WORKS !!!!!!!!!!!! ***** +** But positioning has very bad performance ** +******************************* + +// controlling speed/velocity on iqCmd and constant current(=torque) on idCmd +//precission +-1 step in steady state +$$$*** +!common() +!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) +!motor(mot=1,dirCur=300,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.) + + +// controlling torque(=current) on iqCmd and idCmd=0 +//precission +-100 and more step in steady state +$$$*** +!common() +!encoder_inc(enc=1,tbl=1,mot=1,encctrl=7,posSf=12000./600000) +!motor(mot=1,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.,PhaseCtrl=4,SlipGain=0,PhasePosSf=1.23077e-05,PhaseMode=0,PhaseFindingDac=200,PhaseFindingTime=22.586512) + +#1out10 +!!! HOLD BY HAND TO LIMIT THE SPEED !!! + Motor[1].Servo.Kp=1 +Motor[1].InPosBand=0 +Motor[1].Servo.BreakPosErr=0 +#1j/ +#1j:1000 +******************************* + + + +-> Tadejs input: use simulated encoder for the phasing + + +Motor[1].Servo.BreakPosErr=0 +Motor[3].Servo.Kp=2000 + +///Motor[3].Servo.BreakPosErr=0 +//Motor[3].Servo.Kp=2000 +//#3out5 + + +Testing IDE with QBL test motor +=============================== + +>>> close the loop with inc-encoder removing direct current<<< + +-> the current/speed must be set with that PWM-scale factor + +Motor idx 1 3 +Motor[x].AdvGain 0.020479999 0 +Motor[x].PhasePosSf 0 0.0160000000000000003 +Motor[x].PhaseCtrl 6 4 +Motor[x].PhaseMode 1 0 +Motor[x].PwmSf -15134.891 4309 +Motor[x].SlipGain 0.25 0 +Motor[x].PhaseFindingDac 0 95.976563 +Motor[x].PhaseFindingTime 0 22.586512 + +>>> origin setup by ide+ tweaks <<< +!encoder_inc(enc=3,tbl=3,mot=3,encctrl=7,posSf=1./2000) +!motor_servo(mot=3,ctrl='ServoCtrl',Kp=4.0424199*2000, Kvfb=160.43646*2000,Kvff=160.43646*2000,Kaff=3184.5818*2000) +!motor(mot=3,numPhase=3,servo=None, homing=None,dirCur=0,contCur=1790,peakCur=5400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,PhasePosSf=0.016,PhaseCtrl=4,PhaseMode=0,PwmSf=4309,SlipGain=0,PhaseFindingDac=95.976563,PhaseFindingTime=22.586512) + +AdvGain +PhasePosSf 0 does not work at all -> must be calculated correctly as below +PhaseCtrl 6 not working. must be 4 for phase feedback and 6 for direct microstepping +PhaseMode 0,1 both are working, should be 0 for 3 phase +PwmSf 0 2000 4309 -> the higher, the more torque on error +SlipGain 0.25 squeezing +PhaseFindingDac 0 no change +PhaseFindingTime 0 no change +$$$*** +!common() +!encoder_inc(enc=3,tbl=3,mot=3,encctrl=7,posSf=1./2000) +!motor_servo(mot=3,ctrl='ServoCtrl',Kp=4.0424199*2000, Kvfb=160.43646*2000,Kvff=160.43646*2000,Kaff=3184.5818*2000) +!motor(mot=3,numPhase=3,servo=None, homing=None,dirCur=0,contCur=1790,peakCur=5400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,PhasePosSf=0.016,PhaseCtrl=6,PhaseMode=1,PwmSf=1000,SlipGain=0,PhaseFindingDac=0,PhaseFindingTime=0) +!sh sleep 1 +#3j/ +!sh sleep 10 +#3j:100 + +#3out10 sets directly the Motor[3].ServoOut value , sets to 10% of Motor[x].MaxDac +Motor[3].MaxDac=4526.9282 + Out ServoOut iqCmd IqVolts +#3out100 -> 4526.9 set to 100 %of Motor[x].MaxDac +#3out50 -> 2263.46411 2263.4641 +#3out10 -> 452.692822 452.69281 + +iqMeas=iqCmd if motor is blocked, when motor moves, iqCmd stays and iqMeas drops +PwmSf IqCmd iqMeas(when blocked) +Motor[3].PwmSf;Motor[3].IqCmd;Motor[3].IqMeas;Motor[3].IqVolts +PwmSf=500 IqCmd=2263.4641 IqMeas=232.44925 IqVolts=34406.398 +PwmSf=1000 IqCmd=2263.4641 IqMeas=779.05316 IqVolts=34406.398 +PwmSf=2000 IqCmd=2263.4641 IqMeas=1944.9929 IqVolts=34406.398 +PwmSf=3000 IqCmd=2263.4641 IqMeas=2234.2734 IqVolts=34406.398 + + +Motor[x].PhasePosSf scale factor to convert encoder position to phase position +Motor[3].pPhaseEnc=PowerBrick[0].Chan[2].PhaseCapt.a +Motor[3].PhaseEncLeftShift=0 +Motor[3].PhaseEncRightShift=0 +1 rev=2000*256 enc_steps (PowerBrick[0].Chan[2].PhaseCapt) + +4 Pole magnet, 2000 enc_steps/rev +encoder configured to have 1 enc_step per revolution +PhasePosSf=0.016=1/62.5=32/2000= (4*2048)/(256*2000) = (numPoles*const)/(256*2000) +const=Power PMAC divides a commutation cycle into 2048 parts + +Motor[3].PhasePos position of the phase: 0..2048 this does not change if the motor is blocked + + +>>>>>>find PhasePosSf <<<<<<<<<<< +$$$*** +!common() +!encoder_sim(enc=3,tbl=3,mot=3) +!encoder_inc(enc=3,tbl=11,mot=11,encctrl=7,posSf=1./2000) +!motor(mot=3,numPhase=3, dirCur=500,contCur=1790,peakCur=2400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,PhasePosSf=0.0,PhaseCtrl=4,PhaseMode=0,SlipGain=0) + +Do manually one revolution +feeling 4 pole changes -> 8 poles (locks on N-S S-N positions, moves on N-N S-S position) +Motor[3].pPhaseEnc -> Motor[3].pPhaseEnc=PowerBrick[0].Chan[2].PhaseCapt.a + +PowerBrick[0].Chan[2].PhaseCapt after one revolution +1535488-1022464=513024=512000 + +Phase_step = change pole from N->S->N +1 Phase_step = 2048 Phase_uStep +512000 PhaseEnc_step == 4 pole changes = 4*2048 Phase_uStep +PhasePosSf=Phase_uStep/PhaseEnc_step=4*2048/512000==0.016 + + +!encoder_inc(enc=3,tbl=3,mot=3,encctrl=7,posSf=1./2000) +!motor(mot=3,numPhase=3, dirCur=0,contCur=1790,peakCur=2400,timeAtPeak=1,IiGain=1.0628819,IpfGain=0,IpbGain=6.5684085,AdvGain=0,FatalFeLimit=2000,WarnFeLimit=1000,InPosBand=0,servoSf=2000./1,PhasePosSf=0.016,PhaseCtrl=4,PhaseMode=0,PwmSf=4309,SlipGain=0,PhaseFindingDac=95.976563,PhaseFindingTime=22.586512) +Motor[3].Servo.BreakPosErr=0 +Motor[3].Servo.Kp=2000 +#3out5 + + + + + + + +#3j/ + + +PowerBrick[0].AdcAmpCtrl = $f00cfe00 $f00cfe00 +PowerBrick[0].Chan[0].InCtrl = $47 $47 +PowerBrick[0].Chan[0].OutCtrl = $f000001 $f000101 +PowerBrick[1].AdcAmpCtrl = $f00cfe00 $f00cfe00 +Motor[1].Servo.Kp = 4.0424199 4.0424199 +Motor[1].Servo.Kvifb = 0 0 +Motor[1].Servo.Kviff = 0 0 +Motor[1].Servo.Kvfb = 160.43646 40.951927 +Motor[1].Servo.Kvff = 160.43646 40.951927 +Motor[1].Servo.Kafb = 0 0 +Motor[1].Servo.Kaff = 3184.5818 207.48897 +Motor[1].Servo.Ki = 2.6301687e-4 0.0010304153 +Motor[1].Servo.Kfff = 0 0 +Motor[1].PhasePosSf = 0.0160000000000000003 1.59999999999999993e-5 +Motor[1].IiGain = 1.0628819 0.2278125 +Motor[1].IpbGain = 6.5684085 0.0099999998 +Motor[1].MotorTa = -10 -10 +Motor[1].MotorTs = -50 -50 +Motor[1].I2tSet = 1499.7477 418.92395 +Motor[1].I2tTrip = 18220758 2632459 +Motor[1].JogOffset = 0 0 +Motor[1].AdcMask = $fffc0000 $fffc0000 +Motor[1].PhaseOffset = 683 -683 +Motor[1].Stime = 0 0 +Motor[1].PwmSf = 4309 -2154 +Motor[1].MaxDac = 4524.3784 1675.6958 +Motor[1].PhaseFindingDac = 95.976563 0 +Motor[1].PhaseFindingTime = 22.586512 1 +Motor[1].TraceSize = 0 0 +Motor[1].Control[0] = $14000100 $14000100 +Motor[1].Control[1] = $0 $0 +Node15[0].MasterNum = 255 255 +Node15[1].MasterNum = 255 255 +Node15[2].MasterNum = 255 255 +Node15[3].MasterNum = 255 255 + + + + +IDE Setup -> changed variables +------------------------------ +*Command/Feedback(3) +Motor[3].pAbsPhasePos=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 +Motor[3].AbsPhasePosFormat=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 +Motor[3].AbsPhasePosSf=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 +Motor[3].AbsPhasePosOffset=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 +Motor[3].PhaseFindingTime=1 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 +Motor[3].PhaseFindingDac=0 // Encoder //12/9/2016 :8:51 AM - 129.129.144.138 + +*Hardware Interface +Motor[3].pLimits=PowerBrick[0].Chan[2].Status.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pEnc= EncTable[3].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pEnc2= EncTable[3].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].EncType= 5 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pDac=PowerBrick[0].Chan[2].Pwm[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pAdc=PowerBrick[0].Chan[2].AdcAmp[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pAmpEnable=PowerBrick[0].Chan[2].OutCtrl.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].ServoCtrl = 1 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PhaseCtrl = 4 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Gate3[0].Chan[2].PackIndata = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Gate3[0].Chan[2].PackOutdata = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PhaseMode = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pPhaseEnc=PowerBrick[0].Chan[2].PhaseCapt.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +BrickLV.Chan[2].TwoPhaseMode=0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PhaseSplineCtrl = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pSineTable = Sys.SineTable[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pVoltSineTable = Sys.SineTable[0].a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PwmDbComp = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PwmDbI = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +PowerBrick[0].Chan[2].OutputMode = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PwmSf =7618.5 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].AmpEnableBit = 8 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].AmpFaultBit = 7 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].AmpFaultLevel = 1 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].pAmpFault=PowerBrick[0].Chan[2].Status.a // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].LimitBits = 9 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].DacShift=0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].AdcMask = $FFFC0000 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].ctrl=Sys.servoctrl // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].DtOverRotorTc = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].IxCoupleGain = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].SlipGain = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].AdvGain = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].Stime = 0 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +Motor[3].PhaseOffset =-683 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138 +BrickLV.Reset = 1 // Hardware Interface //12/9/2016 :8:53 AM - 129.129.144.138