Import LinuxCNC source tree
This commit is contained in:
32
configs/sim/axis/vismach/5axis/table-rotary-tilting/README
Normal file
32
configs/sim/axis/vismach/5axis/table-rotary-tilting/README
Normal file
@@ -0,0 +1,32 @@
|
||||
Switchable Table Rotary/Tilting (trt) Sim configs
|
||||
|
||||
xyzac-trt-switchkins
|
||||
xyzbc-trt-switchkins
|
||||
|
||||
Demonstrations:
|
||||
demos/xyzac_switchkins.ngc
|
||||
demos/xyzac_switchkins_test_1.ngc
|
||||
demos/xyzac_switchkins_test_2.ngc
|
||||
demos/xyzac_switchkins_test_3.ngc
|
||||
demos/boat-xyzac.ngc
|
||||
demos/impeller-7bl-xyzac.ngc
|
||||
|
||||
demos/xyzbc_switchkins.ngc
|
||||
demos/boat-xyzbc.ngc
|
||||
|
||||
***********************************************
|
||||
Note: IMPORTANT ini file requirements:
|
||||
|
||||
[HAL]
|
||||
HALCMD = net :kinstype-select <= motion.analog-out-0N => motion.switchkins-type
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./remap_subs
|
||||
REMAP = M428 modalgroup=10 ngc=428remap
|
||||
REMAP = M429 modalgroup=10 ngc=429remap
|
||||
|
||||
[HALUI]
|
||||
MDI_COMMAND = M429
|
||||
MDI_COMMAND = M428
|
||||
MDI_COMMAND = M430
|
||||
***********************************************
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
; zmax zmin r frate n a b c dist
|
||||
o<xyzac_switchkins_sub> call [10] [5] [10][1000][3][20][0][45][20]
|
||||
m2
|
||||
@@ -0,0 +1,39 @@
|
||||
; for debugging, use mdi to set global #<_switchkins_debug>=1
|
||||
|
||||
#<FRATE>=1000
|
||||
M429
|
||||
G0 X0 Y0 Z0 A0 C0
|
||||
G0 C90 X10 Y0
|
||||
G1 F#<FRATE> Z2
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M429
|
||||
G1 F#<FRATE> Z2
|
||||
G0 C90 X0 Y10
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z2
|
||||
|
||||
M429
|
||||
G1 F#<FRATE> Z0
|
||||
G0 C90 X10 Y30
|
||||
G1 F#<FRATE> Z2
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M429
|
||||
G1 F#<FRATE> Z2
|
||||
G0 C90 X30 Y10
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
M428
|
||||
G1 F#<FRATE> Z2
|
||||
M429
|
||||
G1 F#<FRATE> Z0
|
||||
|
||||
G0 X0 Y0 Z0 A0 C0
|
||||
M2
|
||||
@@ -0,0 +1,49 @@
|
||||
; for debugging, use mdi to set global #<_switchkins_debug>=1
|
||||
|
||||
#<FRATE>=1000
|
||||
M429 ;Trivkins
|
||||
G64 P0.01
|
||||
S1500 M3
|
||||
G0 X0 Y0 Z5 A0 C0
|
||||
G1 F#<FRATE> Z0
|
||||
G1 X20 Y0 F#<FRATE>
|
||||
|
||||
M428 ;XYZAC
|
||||
G1 C90
|
||||
G1 X20
|
||||
G1 Y20
|
||||
G1 X0
|
||||
G1 Y0
|
||||
G1 A20
|
||||
G1 X-20
|
||||
G1 Y-20
|
||||
G1 X0
|
||||
G1 Y0
|
||||
|
||||
(-------)
|
||||
G1 C45
|
||||
G1 X-15
|
||||
G1 Y15
|
||||
G1 X0
|
||||
G1 Y0
|
||||
G1 Y-15
|
||||
G1 X15
|
||||
G1 Y0
|
||||
G1 X0
|
||||
|
||||
(-------)
|
||||
G1 C90 X15
|
||||
G1 C180 Y15
|
||||
G1 C270 X0
|
||||
G1 C360 Y0
|
||||
G1 C0
|
||||
G1 C-90 X-15
|
||||
G1 C-180 Y-15
|
||||
G1 C-270 X0
|
||||
G1 C-360 Y0
|
||||
G1 Z5
|
||||
|
||||
M429 ;Trivkins
|
||||
|
||||
G1 X0 Y0 Z1 A0 C0
|
||||
M2
|
||||
@@ -0,0 +1,15 @@
|
||||
;# enable optional stop for m1
|
||||
m429 ;trivkins
|
||||
G0 X0 Y0 Z0 A0 C0
|
||||
G0 C90 X10 Y0
|
||||
G1 F1000 Z2
|
||||
(debug,A expect: 10 0 2) m1
|
||||
(debug,B expect: 10 0 2) m1
|
||||
m428 ;tcp
|
||||
(debug,C expect: 0 -10 2) m1
|
||||
g1f1000 z0
|
||||
(debug,D expect: 0 -10 0) m1
|
||||
(debug,E expect: 0 -10 0) m1
|
||||
m429 ;trivkins
|
||||
(debug,F expect: 10 0 0)
|
||||
m2
|
||||
@@ -0,0 +1,3 @@
|
||||
; zmax zmin r frate n a b c dist
|
||||
o<xyzbc_switchkins_sub> call [10] [5] [10][1000][3][0][20][45][20]
|
||||
m2
|
||||
@@ -0,0 +1,24 @@
|
||||
;M428 by remap: kinstype==1 (xyzac,xyzbc) (note: sparm=identityfirst)
|
||||
o<428remap>sub
|
||||
#<kinstype> = 1 ; xyzac,xyzbc
|
||||
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
|
||||
|
||||
o1 if [exists [#<_hal[motion.switchkins-type]>]]
|
||||
o1 else
|
||||
(debug,M428:Missing [RS274NGC]HAL_PIN_VARS=1)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o1 endif
|
||||
|
||||
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
|
||||
M66 E0 L0 ; force synch
|
||||
|
||||
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
|
||||
(debug,M428: Wrong motion.switchkins-type)
|
||||
(debug,or missing hal net to analog-out-0x)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o2 else
|
||||
o2 endif
|
||||
|
||||
o<428remap>endsub
|
||||
@@ -0,0 +1,24 @@
|
||||
;M429 by remap: kinstype==0 Identity kinematics
|
||||
o<429remap>sub
|
||||
#<kinstype> = 0
|
||||
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
|
||||
|
||||
o1 if [exists [#<_hal[motion.switchkins-type]>]]
|
||||
o1 else
|
||||
(debug,M429:Missing [RS274NGC]HAL_PIN_VARS=1)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o1 endif
|
||||
|
||||
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
|
||||
M66 E0 L0 ; force synch
|
||||
|
||||
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
|
||||
(debug,M429:Wrong motion.switchkins-type)
|
||||
(debug,or missing hal net to analog-out-0x)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o2 else
|
||||
o2 endif
|
||||
|
||||
o<429remap>endsub
|
||||
@@ -0,0 +1,24 @@
|
||||
;M430 by remap: kinstype==2 userk kins
|
||||
o<430remap>sub
|
||||
#<kinstype> = 2
|
||||
#<SWITCHKINS_PIN> = 3 ; set N as required: motion.analog-out-0N
|
||||
|
||||
o1 if [exists [#<_hal[motion.switchkins-type]>]]
|
||||
o1 else
|
||||
(debug,M430:Missing [RS274NGC]HAL_PIN_VARS=1)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o1 endif
|
||||
|
||||
M68 E#<SWITCHKINS_PIN> Q#<kinstype> ; set kinstype value
|
||||
M66 E0 L0 ; force synch
|
||||
|
||||
o2 if [[#<_task> EQ 1] AND [#<_hal[motion.switchkins-type]> NE #<kinstype>]]
|
||||
(debug,M430:Wrong motion.switchkins-type)
|
||||
(debug,or missing hal net to analog-out-0x)
|
||||
(debug,STOP)
|
||||
M2
|
||||
o2 else
|
||||
o2 endif
|
||||
|
||||
o<430remap>endsub
|
||||
@@ -0,0 +1,42 @@
|
||||
(info: tests for values of [xyz]-rot-point)
|
||||
o<centering>sub
|
||||
#<xstart> = #1 (=-2.5)
|
||||
#<ystart> = #2 (=-2.5)
|
||||
#<xlen> = #3 (= 5)
|
||||
#<ylen> = #4 (= 5)
|
||||
#<zfinal> = #5 (=60)
|
||||
#<n> = #6 (=12)
|
||||
#<f> = #7 (=1000 feed)
|
||||
#<angle> = 0
|
||||
#<delta_angle> = [360/#<n>]
|
||||
|
||||
o1 if [exists [#<_hal[xyzac-trt-kins.x-rot-point]>]]
|
||||
(debug,x-rot-point=#<_hal[xyzac-trt-kins.x-rot-point]>)
|
||||
(debug,y-rot-point=#<_hal[xyzac-trt-kins.y-rot-point]>)
|
||||
(debug,z-rot-point=#<_hal[xyzac-trt-kins.z-rot-point]>)
|
||||
o1 endif
|
||||
o2 if [exists [#<_hal[xyzbc-trt-kins.x-rot-point]>]]
|
||||
(debug,x-rot-point=#<_hal[xyzbc-trt-kins.x-rot-point]>)
|
||||
(debug,y-rot-point=#<_hal[xyzbc-trt-kins.y-rot-point]>)
|
||||
(debug,z-rot-point=#<_hal[xyzac-trt-kins.z-rot-point]>)
|
||||
o2 endif
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x#<xstart> y#<ystart> z0 c0
|
||||
M428 ;tcp
|
||||
|
||||
g61
|
||||
o10 while [#<angle> le 360]
|
||||
g1 f#<f>
|
||||
#<angle> = [#<angle> + #<delta_angle>]
|
||||
g0 c#<angle>
|
||||
g1 x[#<xstart> + #<xlen>]
|
||||
g1 y[#<ystart> + #<ylen>]
|
||||
g1 x[#<xstart> + 0 ]
|
||||
g1 y[#<ystart> + 0 ]
|
||||
o10 endwhile
|
||||
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x0 y0 z#<zfinal> c0
|
||||
o<centering>endsub
|
||||
@@ -0,0 +1,22 @@
|
||||
; helix using switchkins (xyzac) a,c angles
|
||||
o<helix_ac>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10)
|
||||
#<frate> = #4 (=1000)
|
||||
#<n> = #5 (=3)
|
||||
#<a> = #6 (=45)
|
||||
#<b> = #7 (=0 NA)
|
||||
#<c> = #8 (=20)
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x[#<_x> - #<r>] ;adjust for radius
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0 ;new g54
|
||||
M428 ;XYZAC
|
||||
g0a#<a>c#<c> ;exercise a,c
|
||||
f#<frate> g2i#<r>z#<zmin> p#<n> ;helix
|
||||
M429 ;Identity kinematics
|
||||
g0 x0 y0 z#<zmax> a0 c0 ;return to start
|
||||
g0 x[#<_x> + #<r>] ;adjust restore
|
||||
M428 ;XYZAC
|
||||
o<helix_ac>endsub
|
||||
@@ -0,0 +1,22 @@
|
||||
; helix using switchkins (xyzbc) b,c angles
|
||||
o<helix_bc>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10)
|
||||
#<frate> = #4 (=1000)
|
||||
#<n> = #5 (=3)
|
||||
#<a> = #6 (=0 NA)
|
||||
#<b> = #7 (=45)
|
||||
#<c> = #8 (=20)
|
||||
|
||||
M429 ;Identity kinematics
|
||||
g0 x[#<_x> - #<r>] ;adjust for radius
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0 ;new g54
|
||||
M428 ;XYZBC
|
||||
g0b#<b>c#<c> ;exercise b,c
|
||||
f#<frate> g2i#<r>z#<zmin> p#<n> ;helix
|
||||
M429 ;Identity kinematics
|
||||
g0 x0 y0 z#<zmax> b0 c0 ;return to start
|
||||
g0 x[#<_x> + #<r>] ;adjust restore
|
||||
M428 ;XYZBC
|
||||
o<helix_bc>endsub
|
||||
@@ -0,0 +1,47 @@
|
||||
; ngcgui-compatible subroutine
|
||||
(info: helix in each quadrant at angles A,C)
|
||||
o<xyzac_switchkins_sub>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10 radius)
|
||||
#<frate> = #4 (=1000 feedrate)
|
||||
#<n> = #5 (=3 n circles)
|
||||
#<a> = #6 (=30 A angle)
|
||||
#<b> = #7 (=0 B angle NA)
|
||||
#<c> = #8 (=45 C angle)
|
||||
#<dist> = #9 (=20 distance)
|
||||
|
||||
; quadrant I
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0 ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0 ;new g54
|
||||
g0 x+#<dist> y+#<dist> z#<zmax> ;move to pattern center position
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant II
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0
|
||||
g0 x-#<dist> y+#<dist> z#<zmax>
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant III
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0
|
||||
g0 x-#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant IV
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> a0 c0
|
||||
g10l20p0 x0y0 z#<zmax> a0 c0
|
||||
g0 x+#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_ac> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
;final position
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> ;new g54
|
||||
|
||||
o<xyzac_switchkins_sub>endsub
|
||||
@@ -0,0 +1,47 @@
|
||||
; ngcgui-compatible subroutine
|
||||
(info: helix in each quadrant at angles B,C)
|
||||
o<xyzbc_switchkins_sub>sub
|
||||
#<zmax> = #1 (=10)
|
||||
#<zmin> = #2 (= 5)
|
||||
#<r> = #3 (=10 radius)
|
||||
#<frate> = #4 (=1000 feedrate)
|
||||
#<n> = #5 (=3 n circles)
|
||||
#<a> = #6 (=0 A angle NA)
|
||||
#<b> = #7 (=30 B angle)
|
||||
#<c> = #8 (=45 C angle)
|
||||
#<dist> = #9 (=20 distance)
|
||||
|
||||
; quadrant I
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0 ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0 ;new g54
|
||||
g0 x+#<dist> y+#<dist> z#<zmax> ;move to pattern center position
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant II
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0
|
||||
g0 x-#<dist> y+#<dist> z#<zmax>
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant III
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0
|
||||
g0 x-#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
; quadrant IV
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> b0 c0
|
||||
g10l20p0 x0y0 z#<zmax> b0 c0
|
||||
g0 x+#<dist> y-#<dist> z#<zmax>
|
||||
o<helix_bc> call [#<zmax>][#<zmin>][#<r>][#<frate>][#<n>][#<a>][#<b>][#<c>]
|
||||
|
||||
;final position
|
||||
M429 ;Identity kinematics
|
||||
g53 g0 x0y0 z#<zmax> ;MACHINE coordinates
|
||||
g10l20p0 x0y0 z#<zmax> ;new g54
|
||||
|
||||
o<xyzbc_switchkins_sub>endsub
|
||||
@@ -0,0 +1,29 @@
|
||||
pin+motion.analog-out-03
|
||||
pin+motion.switchkins-type
|
||||
|
||||
pin+joint.0.pos-cmd
|
||||
pin+joint.1.pos-cmd
|
||||
pin+joint.2.pos-cmd
|
||||
pin+joint.3.pos-cmd
|
||||
pin+joint.4.pos-cmd
|
||||
|
||||
pin+axis.x.pos-cmd
|
||||
pin+axis.y.pos-cmd
|
||||
pin+axis.z.pos-cmd
|
||||
pin+axis.a.pos-cmd
|
||||
pin+axis.b.pos-cmd
|
||||
pin+axis.c.pos-cmd
|
||||
|
||||
pin+pyvcp.tcpkins-button
|
||||
pin+pyvcp.identitykins-button
|
||||
pin+pyvcp.vismach-clear
|
||||
|
||||
pin+kinstype-0
|
||||
pin+kinstype-1
|
||||
|
||||
pin+halui.mdi-command-00
|
||||
pin+halui.mdi-command-01
|
||||
|
||||
pin+kinstype.is-0
|
||||
pin+kinstype.is-1
|
||||
pin+kinstype.is-2
|
||||
@@ -0,0 +1,12 @@
|
||||
# switchkins pyvcp connections for:
|
||||
# xyzac-trt-kins.ini,xyzbc-trt-kins.ini
|
||||
|
||||
net :kinstype.is-0 <= kinstype.is-0 => pyvcp.multilabel.0.legend0
|
||||
net :kinstype.is-1 <= kinstype.is-1 => pyvcp.multilabel.0.legend1
|
||||
net :kinstype.is-2 <= kinstype.is-2 => pyvcp.multilabel.0.legend2
|
||||
|
||||
net :vismach-clear <= pyvcp.vismach-clear => vismach.plotclear
|
||||
|
||||
net :type0-button <= pyvcp.type0-button => halui.mdi-command-00
|
||||
net :type1-button <= pyvcp.type1-button => halui.mdi-command-01
|
||||
net :type2-button <= pyvcp.type2-button => halui.mdi-command-02
|
||||
@@ -0,0 +1,182 @@
|
||||
[APPLICATIONS]
|
||||
# uncomment to enable:
|
||||
#APP = halshow --fformat %.5f switchkins.halshow
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = sim-xyzac-trt-kins (switchkins)
|
||||
|
||||
[DISPLAY]
|
||||
GEOMETRY = XYZ-A
|
||||
OPEN_FILE = ./demos/xyzac_switchkins.ngc
|
||||
PYVCP = ./xyzac-trt.xml
|
||||
JOG_AXES = XYZC
|
||||
DISPLAY = axis
|
||||
MAX_ANGULAR_VELOCITY = 360
|
||||
MAX_LINEAR_VELOCITY = 1000
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 2
|
||||
PROGRAM_PREFIX = ../../nc_files
|
||||
INTRO_GRAPHIC = emc2.gif
|
||||
INTRO_TIME = 1
|
||||
#EDITOR = geany
|
||||
TOOL_EDITOR = tooledit z diam
|
||||
|
||||
TKPKG = Ngcgui 1.0
|
||||
NGCGUI_FONT = Helvetica -12 normal
|
||||
NGCGUI_SUBFILE = xyzac_switchkins_sub.ngc
|
||||
NGCGUI_SUBFILE = centering.ngc
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./remap_subs
|
||||
HAL_PIN_VARS = 1
|
||||
REMAP = M428 modalgroup=10 ngc=428remap
|
||||
REMAP = M429 modalgroup=10 ngc=429remap
|
||||
REMAP = M430 modalgroup=10 ngc=430remap
|
||||
PARAMETER_FILE = xyzac.var
|
||||
|
||||
[KINS]
|
||||
#NOTE: for backwrds compatibility !!!!!!!!!!!!!!!!!!!
|
||||
# default switchkins-type == 0 is xyzac-trt-kins
|
||||
# here switchkins-type == 0 is identity kins
|
||||
KINEMATICS = xyzac-trt-kins sparm=identityfirst
|
||||
JOINTS = 5
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE = switchkins_postgui.hal
|
||||
|
||||
# net for control of motion.switchkins-type
|
||||
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type
|
||||
|
||||
# vismach xyzac-trt-gui items
|
||||
HALCMD = loadusr -W xyzac-trt-gui
|
||||
HALCMD = net :table-x joint.0.pos-fb xyzac-trt-gui.table-x
|
||||
HALCMD = net :saddle-y joint.1.pos-fb xyzac-trt-gui.saddle-y
|
||||
HALCMD = net :spindle-z joint.2.pos-fb xyzac-trt-gui.spindle-z
|
||||
HALCMD = net :tilt-a joint.3.pos-fb xyzac-trt-gui.tilt-a
|
||||
HALCMD = net :rotate-c joint.4.pos-fb xyzac-trt-gui.rotate-c
|
||||
HALCMD = net :tool-offset motion.tooloffset.z
|
||||
HALCMD = net :tool-offset xyzac-trt-kins.tool-offset xyzac-trt-gui.tool-offset
|
||||
HALCMD = net :y-offset xyzac-trt-kins.y-offset xyzac-trt-gui.y-offset
|
||||
HALCMD = net :z-offset xyzac-trt-kins.z-offset xyzac-trt-gui.z-offset
|
||||
HALCMD = sets :y-offset 20
|
||||
HALCMD = sets :z-offset 10
|
||||
|
||||
# not currently supported by xyzac-trt-gui:
|
||||
HALCMD = setp xyzac-trt-kins.x-rot-point 0
|
||||
HALCMD = setp xyzac-trt-kins.y-rot-point 0
|
||||
HALCMD = setp xyzac-trt-kins.z-rot-point 0
|
||||
HALCMD = setp xyzac-trt-kins.conventional-directions 0
|
||||
|
||||
[HALUI]
|
||||
# NOTE: kinstype==0 is identity kins because sparm=identityfirst
|
||||
# M429:identity kins (motion.switchkins-type==0 startupDEFAULT)
|
||||
# M428:xyzac kins (motion.switchkins-type==1)
|
||||
# M430:userk kins (motion.switchkins-type==2)
|
||||
MDI_COMMAND = M429
|
||||
MDI_COMMAND = M428
|
||||
MDI_COMMAND = M430
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZAC
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = deg
|
||||
DEFAULT_LINEAR_VELOCITY = 20
|
||||
MAX_LINEAR_VELOCITY = 35
|
||||
MAX_LINEAR_ACCELERATION = 400
|
||||
DEFAULT_LINEAR_ACCELERATION = 300
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
COMM_TIMEOUT = 1
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.010
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = xyzac-trt.tbl
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_A]
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 50
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_C]
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 50
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_4]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
@@ -0,0 +1,10 @@
|
||||
T1 P1 Z0 D1 ;end mill
|
||||
T2 P2 Z15 D8 ;end mill
|
||||
T3 P3 Z0 D4.2 ;#7 tap drill
|
||||
T4 P4 Z0 D10
|
||||
T5 P5 Z30 D10
|
||||
T6 P6 Z30 D10
|
||||
T7 P7 Z30 D10
|
||||
T8 P8 Z30 D10
|
||||
T9 P9 Z30 D10
|
||||
T10 P10 D0.5
|
||||
@@ -0,0 +1,37 @@
|
||||
xyzac-trt-kins (switchkins)
|
||||
|
||||
Uses remapped user m codes for kins switch:
|
||||
|
||||
M429: Identity Kinematics
|
||||
M428: XYZAC (TCP)
|
||||
M430: userk Kinematics
|
||||
|
||||
A hal net is required to connect the
|
||||
analog out pin N, Example (for N=3):
|
||||
|
||||
net :kinstype-select <= motion.analog-out-03
|
||||
net :kinstype-select => motion.switchkins-type
|
||||
|
||||
Hal Input pins:
|
||||
xyzac-trt-kins.y-offset
|
||||
xyzac-trt-kins.z-offset
|
||||
|
||||
Y and Z offsets are the offsets from the center
|
||||
of rotation of the A axis relative to the center
|
||||
of rotation of the C axis.
|
||||
|
||||
Hal Input pins:
|
||||
xyzac-trt-kins.x-rot-point
|
||||
xyzac-trt-kins.y-rot-point
|
||||
xyzac-trt-kins.z-rot-point
|
||||
|
||||
X, Y and Z rot-point pins represent the
|
||||
offsets of the center of rotation of the C axis
|
||||
relative to the machine absolute zero
|
||||
|
||||
Hal Input pins:
|
||||
xyzac-trt-kins.conventional-directions
|
||||
|
||||
Pin conventional-directions is false by default. If true,
|
||||
axis directions follow the conventions as defined
|
||||
at https://linuxcnc.org/docs/html/gcode/machining-center.html#_rotational_axes
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<label>
|
||||
<text>"SWITCHKINS"</text>
|
||||
<relief>RIDGE</relief>
|
||||
<bd>3</bd>
|
||||
</label>
|
||||
<multilabel>
|
||||
<legends>["0:IDENTITY", "1: XYZAC ", "2: USERK "]</legends>
|
||||
<font>("Helvetica",16)</font>
|
||||
<bg>"black"</bg>
|
||||
<fg>"yellow"</fg>
|
||||
</multilabel>
|
||||
<button>
|
||||
<halpin>"type0-button"</halpin>
|
||||
<text>"IDENTITY"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type1-button"</halpin>
|
||||
<text>"TCP:XYZAC"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type2-button"</halpin>
|
||||
<text>"userk "</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<button>
|
||||
<halpin>"vismach-clear"</halpin>
|
||||
<text>"vismach-clear"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
</pyvcp>
|
||||
@@ -0,0 +1,182 @@
|
||||
[APPLICATIONS]
|
||||
# uncomment to enable:
|
||||
#APP = halshow --fformat %.5f switchkins.halshow
|
||||
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = sim-xyzbc-trt-kins (switchkins)
|
||||
|
||||
[DISPLAY]
|
||||
GEOMETRY = XYZB
|
||||
OPEN_FILE = ./demos/xyzbc_switchkins.ngc
|
||||
PYVCP = ./xyzbc-trt.xml
|
||||
JOG_AXES = XYZC
|
||||
DISPLAY = axis
|
||||
MAX_ANGULAR_VELOCITY = 360
|
||||
MAX_LINEAR_VELOCITY = 1000
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 2
|
||||
PROGRAM_PREFIX = ../../nc_files
|
||||
INTRO_GRAPHIC = emc2.gif
|
||||
INTRO_TIME = 1
|
||||
#EDITOR = geany
|
||||
TOOL_EDITOR = tooledit z diam
|
||||
|
||||
TKPKG = Ngcgui 1.0
|
||||
NGCGUI_FONT = Helvetica -12 normal
|
||||
NGCGUI_SUBFILE = xyzbc_switchkins_sub.ngc
|
||||
NGCGUI_SUBFILE = centering.ngc
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./remap_subs
|
||||
HAL_PIN_VARS = 1
|
||||
REMAP = M428 modalgroup=10 ngc=428remap
|
||||
REMAP = M429 modalgroup=10 ngc=429remap
|
||||
REMAP = M430 modalgroup=10 ngc=430remap
|
||||
PARAMETER_FILE = xyzbc.var
|
||||
|
||||
[KINS]
|
||||
#NOTE: for backwrds compatibility !!!!!!!!!!!!!!!!!!!
|
||||
# default switchkins-type == 0 is xyzbc-trt-kins
|
||||
# here switchkins-type == 0 is identity kins
|
||||
KINEMATICS = xyzbc-trt-kins sparm=identityfirst
|
||||
JOINTS = 5
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE = switchkins_postgui.hal
|
||||
|
||||
# net for control of motion.switchkins-type
|
||||
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type
|
||||
|
||||
# vismach xyzbc-trt-gui items
|
||||
HALCMD = loadusr -W xyzbc-trt-gui
|
||||
HALCMD = net :table-x joint.0.pos-fb xyzbc-trt-gui.table-x
|
||||
HALCMD = net :saddle-y joint.1.pos-fb xyzbc-trt-gui.saddle-y
|
||||
HALCMD = net :spindle-z joint.2.pos-fb xyzbc-trt-gui.spindle-z
|
||||
HALCMD = net :tilt-b joint.3.pos-fb xyzbc-trt-gui.tilt-b
|
||||
HALCMD = net :rotate-c joint.4.pos-fb xyzbc-trt-gui.rotate-c
|
||||
HALCMD = net :tool-offset motion.tooloffset.z
|
||||
HALCMD = net :tool-offset xyzbc-trt-kins.tool-offset xyzbc-trt-gui.tool-offset
|
||||
HALCMD = net :x-offset xyzbc-trt-kins.x-offset xyzbc-trt-gui.x-offset
|
||||
HALCMD = net :z-offset xyzbc-trt-kins.z-offset xyzbc-trt-gui.z-offset
|
||||
HALCMD = sets :x-offset -20
|
||||
HALCMD = sets :z-offset -15
|
||||
|
||||
# not currently supported by xyzbc-trt-gui:
|
||||
HALCMD = setp xyzbc-trt-kins.x-rot-point 0
|
||||
HALCMD = setp xyzbc-trt-kins.y-rot-point 0
|
||||
HALCMD = setp xyzbc-trt-kins.z-rot-point 0
|
||||
HALCMD = setp xyzbc-trt-kins.conventional-directions 0
|
||||
|
||||
[HALUI]
|
||||
# NOTE: kinstype==0 is identity kins because sparm=identityfirst
|
||||
# M429:identity kins (motion.switchkins-type==0 startupDEFAULT)
|
||||
# M428:xyzbc kins (motion.switchkins-type==1)
|
||||
# M430:userk kins (motion.switchkins-type==2)
|
||||
MDI_COMMAND = M429
|
||||
MDI_COMMAND = M428
|
||||
MDI_COMMAND = M430
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = XYZBC
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = deg
|
||||
DEFAULT_LINEAR_VELOCITY = 20
|
||||
MAX_LINEAR_VELOCITY = 35
|
||||
MAX_LINEAR_ACCELERATION = 400
|
||||
DEFAULT_LINEAR_ACCELERATION = 300
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
SERVO_PERIOD = 1000000
|
||||
COMM_TIMEOUT = 1
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.010
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = xyzbc-trt.tbl
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_B]
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[AXIS_C]
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -200
|
||||
MAX_LIMIT = 200
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 100
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 20
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -120
|
||||
MAX_LIMIT = 120
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_3]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -100
|
||||
MAX_LIMIT = 50
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_4]
|
||||
TYPE = ANGULAR
|
||||
HOME = 0
|
||||
MAX_VELOCITY = 30
|
||||
MAX_ACCELERATION = 300
|
||||
MIN_LIMIT = -36000
|
||||
MAX_LIMIT = 36000
|
||||
HOME_SEARCH_VEL = 0
|
||||
HOME_SEQUENCE = 0
|
||||
@@ -0,0 +1,2 @@
|
||||
T1 P1 D1
|
||||
T2 P2 Z10 D8
|
||||
@@ -0,0 +1,37 @@
|
||||
xyzbc-trt-kins (switchkins)
|
||||
|
||||
Uses remapped user m codes for kins switch:
|
||||
|
||||
M429: Identity Kinematics
|
||||
M428: XYZBC (TCP)
|
||||
M430: userk Kinematics
|
||||
|
||||
A hal net is required to connect the
|
||||
analog out pin N, Example (for N=3):
|
||||
|
||||
net :kinstype-select <= motion.analog-out-03
|
||||
net :kinstype-select => motion.switchkins-type
|
||||
|
||||
Hal Input pins:
|
||||
xyzbc-trt-kins.x-offset
|
||||
xyzbc-trt-kins.z-offset
|
||||
|
||||
X and Z offsets are the offsets from the center
|
||||
of rotation of the B axis relative to the center
|
||||
of rotation of the C axis.
|
||||
|
||||
Hal Input pins:
|
||||
xyzbc-trt-kins.x-rot-point
|
||||
xyzbc-trt-kins.y-rot-point
|
||||
xyzbc-trt-kins.z-rot-point
|
||||
|
||||
X, Y and Z rot-point pins represent the
|
||||
offsets of the center of rotation of the C axis
|
||||
relative to the machine absolute zero
|
||||
|
||||
Hal Input pins:
|
||||
xyzbc-trt-kins.conventional-directions
|
||||
|
||||
Pin conventional-directions is false by default. If true,
|
||||
axis directions follow the conventions as defined
|
||||
at https://linuxcnc.org/docs/html/gcode/machining-center.html#_rotational_axes
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<label>
|
||||
<text>"SWITCHKINS"</text>
|
||||
<relief>RIDGE</relief>
|
||||
<bd>3</bd>
|
||||
</label>
|
||||
<multilabel>
|
||||
<legends>["0:IDENTITY", "1: XYZBC ", "2: USERK "]</legends>
|
||||
<font>("Helvetica",16)</font>
|
||||
<bg>"black"</bg>
|
||||
<fg>"yellow"</fg>
|
||||
</multilabel>
|
||||
<button>
|
||||
<halpin>"type0-button"</halpin>
|
||||
<text>"IDENTITY"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type1-button"</halpin>
|
||||
<text>"TCP:XYZBC"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
<button>
|
||||
<halpin>"type2-button"</halpin>
|
||||
<text>"userk"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<relief>"ridge"</relief>
|
||||
<bd>5</bd>
|
||||
<button>
|
||||
<halpin>"vismach-clear"</halpin>
|
||||
<text>"vismach-clear"</text>
|
||||
<bd>3</bd>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
</pyvcp>
|
||||
Reference in New Issue
Block a user