Files
PBSwissMX/cfg/mx-stage.cfg

153 lines
4.1 KiB
INI

// 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()
&1
//#1-> 0.00001X+ 0.00001Y + A
//#2-> +1. X + .5Y + 0.01A
//#3-> + .5X +1. Y + 0.01A
#1-> A
#2-> X
#3-> Y
Coord[1].AltFeedRate=0
Coord[1].Tm=1 //1ms time
Motor[1].MaxSpeed=360
Motor[2].MaxSpeed=50
Motor[3].MaxSpeed=50
open prog 1
//this uses jogspeed
rapid abs
X(10000) Y(0) A(0)
X(0) Y(10000) A(0)
X(0) Y(0) A(36000)
X(0) Y(0) A(0)
close
open prog 2
//this uses Coord[1].Tm and limits with MaxSpeed
linear abs
X(10000) Y(0) A(0)
X(0) Y(10000) A(0)
X(0) Y(0) A(0)
X(0) Y(0) A(36000)
X(0) Y(0) A(0)
close
open prog 2
//this uses Coord[1].Tm and limits with MaxSpeed
linear abs
X(10000) Y(0) A(0)
X(0) Y(10000) A(0)
X(0) Y(0) A(0)
X(0) Y(0) A(36000)
X(0) Y(0) A(0)
close
open prog 3
Gather.Enable=2
//this uses Coord[1].Tm and limits with MaxSpeed
linear abs
X(10000) //Y(0)
//X(0) Y(0)
//dwell 0
X(0) Y(10000)
X(0) Y(0)
X(10000) Y(10000)
X(0) Y(0)
dwell 100
Gather.Enable=0
close
open prog 4
Gather.Enable=2
//this uses Coord[1].Tm and limits with MaxSpeed
linear abs
X(100) Y(100)
X(200) Y(110)
X(300) Y(140)
X(400) Y(130)
X(500) Y(134)
X(600) Y(146)
X(700) Y(178)
X(800) Y(143)
X(900) Y(133)
X(1000) Y(147)
X(1100) Y(196)
X(1200) Y(104)
X(1300) Y(183)
X(1400) Y(135)
X(1500) Y(134)
X(1600) Y(195)
X(1700) Y(116)
X(1800) Y(150)
X(1900) Y(127)
X(1900) Y(272)
X(1800) Y(215)
X(1700) Y(232)
X(1600) Y(276)
X(1500) Y(215)
X(1400) Y(298)
X(1300) Y(235)
X(1200) Y(297)
X(1100) Y(256)
X(1000) Y(244)
X(900) Y(279)
X(800) Y(238)
X(700) Y(265)
X(600) Y(279)
X(500) Y(234)
X(400) Y(235)
X(300) Y(297)
X(200) Y(227)
X(100) Y(256)
dwell 100
Gather.Enable=0
close