usr_servo code generation

This commit is contained in:
2018-11-02 16:56:25 +01:00
parent 8807ccbd85
commit d7e0cf7764
12 changed files with 863 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
function [pb]=simFxFyStage(mot,motid)
function [pb]=simFxFyStage(mot)
% !!! first it need to run: [mot1,mot2]=identifyFxFyStage() tobuild a motor object !!!
%
%loads the current (11.10.2018) controller settings of the
@@ -9,7 +9,7 @@ function [pb]=simFxFyStage(mot,motid)
Ts=2E-4; % 0.2ms=5kHz
MaxDac=2011.968;
MaxPosErr=10000;
if motid==1
if mot.id==1
%!motor_servo(mot=1,ctrl='ServoCtrl',Kp=25,Kvfb=400,Ki=0.02,Kvff=350,Kaff=5000,MaxInt=1000)
%!motor(mot=1,dirCur=0,contCur=800,peakCur=2400,timeAtPeak=1,IiGain=5,IpfGain=8,IpbGain=8,JogSpeed=10.,numPhase=3,invDir=True,servo=None,PhasePosSf=1./81250,PhaseFindingDac=100,PhaseFindingTime=50,SlipGain=0,AdvGain=0,PwmSf=10000,FatalFeLimit=200,WarnFeLimit=100,InPosBand=2,homing='enc-index')
Kp=25;Kvfb=400;Ki=0.02;Kvff=350;Kaff=5000;MaxInt=1000;