Test configuration : rot stage, xy stage, servo test motor,stepper inc, stepper abs motor. ALL IN OPEN LOOP SIMULATED ENCODER
This commit is contained in:
342
Readme.md
342
Readme.md
@@ -10,7 +10,7 @@ Stall Current Continuous 0.8
|
||||
Peak Current Amps RMS 2.4 (->sqrt(2)*2.4=3.39A_peak)
|
||||
Resistance Ohms 8.8
|
||||
Inductance mH 2.4
|
||||
|
||||
Max.BuxVoltage V 80
|
||||
|
||||
Mecapion rot stage
|
||||
------------------
|
||||
@@ -27,6 +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)
|
||||
|
||||
Servo Test Motor QBL
|
||||
--------------------
|
||||
- 8 pole (4 einraster per rev)
|
||||
|
||||
2Phase Stepper Test Motor
|
||||
-------------------------
|
||||
- 200 pole (100 einraster per rev)
|
||||
|
||||
|
||||
************************
|
||||
@@ -76,7 +85,7 @@ $$$***
|
||||
#1j/
|
||||
#1,9hmz
|
||||
|
||||
#1j:2048 -> moves one pole= 600'000 enc_step =12mm
|
||||
#1j:2048 -> moves one pole= 650'000 enc_step =13mm (Electrical Pitch in MX80 doc)
|
||||
|
||||
512= 90deg -> check phase *
|
||||
|
||||
@@ -108,14 +117,15 @@ servoSf : motorusteps/userUnits
|
||||
!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<<<
|
||||
servoSf : motorusteps/userUnits
|
||||
|
||||
$$$***
|
||||
!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=2400,timeAtPeak=1,IiGain=1,IpfGain=0,IpbGain=2,JogSpeed=6.,numPhase=3,invDir=True,servoSf=2048/12000.)
|
||||
!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
|
||||
@@ -125,6 +135,70 @@ 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<<<
|
||||
|
||||
@@ -140,9 +214,12 @@ 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
|
||||
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
|
||||
@@ -154,7 +231,7 @@ $$$***
|
||||
!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=95,PhaseFindingTime=22)
|
||||
!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
|
||||
@@ -190,26 +267,41 @@ 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
|
||||
|
||||
|
||||
*************
|
||||
>>> origin setup by ide+ tweaks <<<
|
||||
>>>>>>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_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)
|
||||
!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
|
||||
@@ -249,156 +341,50 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user