calibrating 5Cam in ID lab

This commit is contained in:
2018-05-29 14:38:58 +02:00
parent c889da80aa
commit db8e9e8636
6 changed files with 119 additions and 54 deletions

View File

@@ -56,17 +56,19 @@ Motor[4].MaxSpeed=Motor[4].JogSpeed
Motor[5].MaxSpeed=Motor[5].JogSpeed
open forward
define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
//define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
define(AA1='L2',AA2='L1',AA3='L4',AA4='L5',AA5='L3')
define(r='L6',scl='L7')
define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15')
define(X='C6',Y='C7',U='C3',V='C4',W='C5')
r=$height/$width
scl=$exc/$sqrt2
S1=scl*sin(AA1*$camSf)
S2=scl*sin(AA2*$camSf)
S3=scl*sin(AA3*$camSf)
S4=scl*sin(AA4*$camSf)
S5=scl*sin(AA5*$camSf)
S1=scl*cos(AA1*$camSf)
S2=scl*cos(AA2*$camSf)
S3=scl*cos(AA3*$camSf)
S4=scl*cos(AA4*$camSf)
S5=scl*cos(AA5*$camSf)
//send 1"fwd_inp(%f) %f %f %f %f %f\\n",D0,AA1,AA2,AA3,AA4,AA5
//send 1"fwd_inp(%f) %f %f %f %f %f\\n",D0,S1,S2,S3,S4,S5
@@ -85,7 +87,8 @@ open forward
close
open inverse
define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
//define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
define(AA1='L2',AA2='L1',AA3='L4',AA4='L5',AA5='L3')
define(r='L6',scl='L7')
define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15')
define(X='C6',Y='C7',U='C3',V='C4',W='C5')
@@ -104,11 +107,11 @@ open inverse
S5= .5*$sqrt2*Y -.25*$sqrt2*U +.25*$sqrt2*W
scl=$sqrt2/$exc
AA1=asin(S1*scl)/$camSf
AA2=asin(S2*scl)/$camSf
AA3=asin(S3*scl)/$camSf
AA4=asin(S4*scl)/$camSf
AA5=asin(S5*scl)/$camSf
AA1=acos(S1*scl)/$camSf
AA2=acos(S2*scl)/$camSf
AA3=acos(S3*scl)/$camSf
AA4=acos(S4*scl)/$camSf
AA5=acos(S5*scl)/$camSf
//send 1"inv_res %f %f %f %f %f\\n",AA1,AA2,AA3,AA4,AA5

View File

@@ -7,25 +7,25 @@
//#4: homeoffset: -87830.7554146
//#5: homeoffset: -47956.2759182
!encoder_ssi(enc=1,numBits=18,posSf=-5625./4096.)
//!motor(mot=1,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=1,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!encoder_ssi(enc=1,numBits=18,posSf=-5625./4096)
//!motor(mot=1,dirCur=1000,JogSpeed=40,servoSf=256./9.,Pos2Sf=0,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=1,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=65477.)
!encoder_ssi(enc=2,numBits=18,posSf=-5625./4096.)
//!motor(mot=2,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=2,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!encoder_ssi(enc=2,numBits=18,posSf=-5625./4096)
//!motor(mot=2,dirCur=1000,JogSpeed=40,servoSf=256./9.,Pos2Sf=0,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=2,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=-154370.)
!encoder_ssi(enc=3,numBits=18,posSf=-5625./4096.)
//!motor(mot=3,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=3,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!encoder_ssi(enc=3,numBits=18,posSf=-5625./4096)
//!motor(mot=3,dirCur=1000,JogSpeed=40,servoSf=256./9.,Pos2Sf=0,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=3,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=-5248.)
!encoder_ssi(enc=4,numBits=18,posSf=-5625./4096.)
//!motor(mot=4,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=4,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!encoder_ssi(enc=4,numBits=18,posSf=-5625./4096)
//!motor(mot=4,dirCur=1000,JogSpeed=40,servoSf=256./9.,Pos2Sf=0,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=4,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=-46620.)
!encoder_ssi(enc=5,numBits=18,posSf=-5625./4096.)
//!motor(mot=5,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=5,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!encoder_ssi(enc=5,numBits=18,posSf=-5625./4096)
//!motor(mot=5,dirCur=1000,JogSpeed=40,servoSf=256./9.,Pos2Sf=0,InPosBand=0,FatalFeLimit=1000,HomeOffset=0.)
!motor(mot=5,dirCur=1000,JogSpeed=40,servoSf=256./9.,InPosBand=0,FatalFeLimit=1000,HomeOffset=93168.)
define(SP_RelBrk='15',SP_LockBrk='16')

View File

@@ -4,11 +4,19 @@
//!MX3_home()
//using 360000 for 1 rev. -> 1.7453292519943296e-05=np.pi/180000
//excentricity= 5mm
//height = 2mm ?
//width = 50cm ?
//length = 100cm ?
!MX3_coordTrf(exc=5000,height=2000,width=500000,length=1000000,camSf=1.7453292519943296e-05)
//height = 90+28mm = 118
//width = (450+305)/2=377.5
//length = 600mm
!MX3_coordTrf(exc=5000,height=118000,width=377500,length=600000,camSf=1.7453292519943296e-05)
//Motor 1 -> AA2
//Motor 2 -> AA1
//Motor 3 -> AA5
//Motor 4 -> AA3
//Motor 5 -> AA4
// define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5')
// define(AA1='L2',AA2='L1',AA3='L4',AA4='L5',AA5='L3')
Coord[1].Ta=10
Coord[1].Td=10
@@ -16,8 +24,6 @@ Coord[1].AltFeedRate=1000
Coord[1].Tm=-10000 //1000um/FeedTime -> 1mm/sec
Coord[1].FeedTime=1000 //default value 1000um
//motor current off (as cpxcall 16)
Motor[1].IdCmd=0;Motor[1].InPosBand=10
Motor[2].IdCmd=0;Motor[2].InPosBand=10
@@ -25,22 +31,28 @@ Motor[3].IdCmd=0;Motor[3].InPosBand=10
Motor[4].IdCmd=0;Motor[4].InPosBand=10
Motor[5].IdCmd=0;Motor[5].InPosBand=10
#1..5hmz
#1..5j/
//#1..5hmz
//#1..5j/
&1
//initialization code
open plc 0
if (Motor[1].ActPos-Motor[1].HomePos>180000)
Motor[1].HomePos=Motor[1].HomePos+360000
if (Motor[2].ActPos-Motor[2].HomePos>180000)
Motor[2].HomePos=Motor[2].HomePos+360000
if (Motor[3].ActPos-Motor[3].HomePos>180000)
Motor[3].HomePos=Motor[3].HomePos+360000
if (Motor[4].ActPos-Motor[4].HomePos>180000)
Motor[4].HomePos=Motor[4].HomePos+360000
if (Motor[5].ActPos-Motor[5].HomePos>180000)
Motor[5].HomePos=Motor[5].HomePos+360000
homez1..5
L0 = Sys.RunTime + .1
while (Sys.RunTime < L0){} //wait .1 sec
jog/1..5
while (Sys.RunTime < L0){} //wait .1 sec
if (Motor[1].ActPos-Motor[1].HomePos<-180000)
Motor[1].HomePos=Motor[1].HomePos-360000
if (Motor[2].ActPos-Motor[2].HomePos<-180000)
Motor[2].HomePos=Motor[2].HomePos-360000
if (Motor[3].ActPos-Motor[3].HomePos<-180000)
Motor[3].HomePos=Motor[3].HomePos-360000
if (Motor[4].ActPos-Motor[4].HomePos<-180000)
Motor[4].HomePos=Motor[4].HomePos-360000
if (Motor[5].ActPos-Motor[5].HomePos<-180000)
Motor[5].HomePos=Motor[5].HomePos-360000
disable plc 0
close // plc 0