wip
This commit is contained in:
@@ -68,8 +68,8 @@ open forward
|
||||
S4=scl*sin(AA4*$camSf)
|
||||
S5=scl*sin(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
|
||||
//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
|
||||
|
||||
|
||||
//X=D^-1*S
|
||||
@@ -79,7 +79,7 @@ open forward
|
||||
V=-1.*S1 +1.*S2 +1.5*S3 -.5*S4 -.5*$sqrt2*S5
|
||||
W=-1.*S1 -1.*S2 +.5*S3 +.5*S4 +.5*$sqrt2*S5
|
||||
|
||||
send 1"fwd_res %f %f %f %f %f\\n",X,Y,U,V,W
|
||||
//send 1"fwd_res %f %f %f %f %f\\n",X,Y,U,V,W
|
||||
|
||||
D0=$$000000f8; //U=$$8 V=$$10 W=$$20 X=$$40 Y=$$80 hex(8+int('10',16)+int('20',16)+int('40',16)+int('80',16)) -> '0xf8'
|
||||
close
|
||||
@@ -93,7 +93,7 @@ open inverse
|
||||
//if(D0>0)
|
||||
// send 1"Velocity calculation NOT SUPPORTED\\n"
|
||||
|
||||
send 1"inv_inp(%f) %f %f %f %f %f\\n",D0,X,Y,U,V,W
|
||||
//send 1"inv_inp(%f) %f %f %f %f %f\\n",D0,X,Y,U,V,W
|
||||
|
||||
r=$height/$width
|
||||
|
||||
@@ -110,7 +110,7 @@ open inverse
|
||||
AA4=asin(S4*scl)/$camSf
|
||||
AA5=asin(S5*scl)/$camSf
|
||||
|
||||
send 1"inv_res %f %f %f %f %f\\n",AA1,AA2,AA3,AA4,AA5
|
||||
//send 1"inv_res %f %f %f %f %f\\n",AA1,AA2,AA3,AA4,AA5
|
||||
|
||||
close
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ open subprog SP_LockBrk
|
||||
{
|
||||
if(Coord[1].InPos)
|
||||
{
|
||||
send 1"inPos\n"
|
||||
//send 1"inPos\n"
|
||||
break
|
||||
}
|
||||
//if(Motor[1].InPos && Motor[2].InPos&& Motor[3].InPos&& Motor[4].InPos&& Motor[5].InPos)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
X3_setup()
|
||||
!MX3_setup_sim() // comment out !MX3_setup() when this is active
|
||||
!MX3_setup()
|
||||
//!MX3_setup_sim() // comment out !MX3_setup() when this is active
|
||||
//!MX3_home()
|
||||
//using 360000 for 1 rev. -> 1.7453292519943296e-05=np.pi/180000
|
||||
//excentricity= 5mm
|
||||
@@ -29,4 +29,21 @@ Motor[5].IdCmd=0;Motor[5].InPosBand=10
|
||||
#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
|
||||
disable plc 0
|
||||
close plc 0```
|
||||
|
||||
enable plc 0
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ debug {
|
||||
debug0 {
|
||||
out "%s";
|
||||
}
|
||||
# end
|
||||
|
||||
moveXYUVW {
|
||||
out "cpx abs linear;call 15; X(%(\$1X.VAL)f)Y(%(\$1Y.VAL)f)U(%(\$1U.VAL)f)V(%(\$1V.VAL)f)W(%(\$1W.VAL)f);call 16";
|
||||
|
||||
Reference in New Issue
Block a user