Import LinuxCNC source tree
This commit is contained in:
15
configs/sim/axis/anglejog/anglejog.halshow
Normal file
15
configs/sim/axis/anglejog/anglejog.halshow
Normal file
@@ -0,0 +1,15 @@
|
||||
pin+anglejog.enable-in
|
||||
pin+anglejog.enable-out
|
||||
pin+anglejog.active
|
||||
pin+anglejog.scale-in
|
||||
pin+anglejog.current-scale
|
||||
pin+anglejog.current-scale-out
|
||||
pin+anglejog.angle-degrees-in
|
||||
pin+anglejog.current-angle-degrees
|
||||
pin+anglejog.counts-in
|
||||
pin+anglejog.coscounts
|
||||
pin+anglejog.sincounts
|
||||
pin+anglejog.cos-accel-fraction
|
||||
pin+anglejog.sin-accel-fraction
|
||||
pin+anglejog.current-mag
|
||||
pin+anglejog.current-vel
|
||||
80
configs/sim/axis/anglejog/anglejog.ini
Normal file
80
configs/sim/axis/anglejog/anglejog.ini
Normal file
@@ -0,0 +1,80 @@
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = LATHE-Anglejog
|
||||
|
||||
[DISPLAY]
|
||||
OPEN_FILE = ''
|
||||
DISPLAY = axis
|
||||
PYVCP = anglejog.xml
|
||||
LATHE = 1
|
||||
CYCLE_TIME = 0.100
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
MAX_SPINDLE_OVERRIDE = 1.0
|
||||
PROGRAM_PREFIX = .
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = anglejog.var
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 100000
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl -no_sim_spindle -no_use_hal_manualtoolchange
|
||||
# all provisions for anglejog:
|
||||
POSTGUI_HALFILE = anglejog_postgui.hal
|
||||
|
||||
[TRAJ]
|
||||
NO_FORCE_HOMING = 1
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 1.0
|
||||
DEFAULT_LINEAR_ACCELERATION = 10.0
|
||||
MAX_LINEAR_VELOCITY = 10.0
|
||||
MAX_LINEAR_ACCELERATION = 100.0
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = anglejog.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=xz
|
||||
JOINTS = 2
|
||||
|
||||
# Note: immediate joint homing
|
||||
[JOINT_0]
|
||||
MIN_LIMIT = -10.0
|
||||
MAX_LIMIT = 10.0
|
||||
MAX_VELOCITY = 1.0
|
||||
MAX_ACCELERATION = 10.0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[JOINT_1]
|
||||
MIN_LIMIT = -2.0
|
||||
MAX_LIMIT = 4.0
|
||||
MAX_VELOCITY = 1.0
|
||||
MAX_ACCELERATION = 10.0
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -10.0
|
||||
MAX_LIMIT = 10.0
|
||||
MAX_VELOCITY = 1.0
|
||||
MAX_ACCELERATION = 10.0
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -2.0
|
||||
MAX_LIMIT = 4.0
|
||||
MAX_VELOCITY = 1.0
|
||||
MAX_ACCELERATION = 10.0
|
||||
14
configs/sim/axis/anglejog/anglejog.txt
Normal file
14
configs/sim/axis/anglejog/anglejog.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
anglejog -- demonstrate jogging at an
|
||||
angle for a lathe (xz) configuration.
|
||||
|
||||
Usage:
|
||||
|
||||
1) F1 (Estop Off)
|
||||
2) F2 (Machine On)
|
||||
3) Ctrl-HOME (Home All)
|
||||
4) pyvcp panel: Set to Enable
|
||||
5) pyvcp panel: change MPG counts
|
||||
and note jogging at current angle
|
||||
6) pyvcp panel: Set to Disable
|
||||
7) pyvcp panel: alter Angle or Scale
|
||||
8) repeat from 4)
|
||||
203
configs/sim/axis/anglejog/anglejog.xml
Normal file
203
configs/sim/axis/anglejog/anglejog.xml
Normal file
@@ -0,0 +1,203 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<pyvcp>
|
||||
|
||||
<vbox>
|
||||
<relief>"sunken"</relief>
|
||||
<bd>3</bd>
|
||||
<label>
|
||||
<text>"ANGLE JOG"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
<label>
|
||||
<bg>"black"</bg>
|
||||
<fg>"gold"</fg>
|
||||
<font>"bold"</font>
|
||||
<text>"NOTE:\nDisable required to change\nScale or Angle"</text>
|
||||
</label>
|
||||
<hbox>
|
||||
<checkbutton>
|
||||
<halpin>"enable"</halpin>
|
||||
<text>""</text>
|
||||
<initval>0</initval>
|
||||
</checkbutton>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Enable/Disable"</text>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<led>
|
||||
<halpin>"enabled"</halpin>
|
||||
<on_color>"light green"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" Enabled"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<led>
|
||||
<halpin>"active"</halpin>
|
||||
<on_color>"blue"</on_color>
|
||||
<off_color>"#d9d9d9"</off_color>
|
||||
</led>
|
||||
<label>
|
||||
<text>" active"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"max-vel"</halpin>
|
||||
<width>10</width>
|
||||
<initval>1.0</initval>
|
||||
<resolution>.1</resolution>
|
||||
<format>"10.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Max vel"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"max-accel"</halpin>
|
||||
<width>10</width>
|
||||
<initval>10.0</initval>
|
||||
<resolution>.1</resolution>
|
||||
<format>"10.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Max accel"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"accel-fraction"</halpin>
|
||||
<width>10</width>
|
||||
<initval>1.0</initval>
|
||||
<resolution>.1</resolution>
|
||||
<format>"10.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Accel fraction"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"scale-in"</halpin>
|
||||
<width>10</width>
|
||||
<initval>0.001</initval>
|
||||
<resolution>0.001</resolution>
|
||||
<format>"10.4f"</format>
|
||||
<font>"bold"</font>
|
||||
<max_>0.1</max_>
|
||||
<min_>0.0001</min_>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Scale"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<number>
|
||||
<halpin>"current-scale"</halpin>
|
||||
<format>"10.8f"</format>
|
||||
<width>"13"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"cyan"</fg>
|
||||
</number>
|
||||
<label>
|
||||
<text>"current-scale"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<number>
|
||||
<halpin>"current-scale-out"</halpin>
|
||||
<format>"10.8f"</format>
|
||||
<width>"13"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"cyan"</fg>
|
||||
</number>
|
||||
<label>
|
||||
<text>"current-scale-out"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spinbox>
|
||||
<halpin>"angle-degrees"</halpin>
|
||||
<min_>-90.0</min_>
|
||||
<max_>90.0</max_>
|
||||
<width>10</width>
|
||||
<initval>30</initval>
|
||||
<resolution>5</resolution>
|
||||
<format>"10.1f"</format>
|
||||
<font>"bold"</font>
|
||||
<param_pin>1</param_pin>
|
||||
</spinbox>
|
||||
<label>
|
||||
<anchor>"w"</anchor>
|
||||
<text>"Angle"</text>
|
||||
<font>"bold"</font>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<number>
|
||||
<halpin>"current-angle-degrees"</halpin>
|
||||
<format>"10.3f"</format>
|
||||
<width>"13"</width>
|
||||
<bg>"black"</bg>
|
||||
<fg>"cyan"</fg>
|
||||
</number>
|
||||
<label>
|
||||
<text>"Current angle"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<scale>
|
||||
<width>"25"</width>
|
||||
<halpin>"mpg"</halpin>
|
||||
<param_pin>1</param_pin>
|
||||
<resolution>1</resolution>
|
||||
<orient>HORIZONTAL</orient>
|
||||
<initval>0</initval>
|
||||
<min_>-500</min_>
|
||||
<max_> 500</max_>
|
||||
</scale>
|
||||
<label>
|
||||
<text>"MPG counts"</text>
|
||||
<anchor>"w"</anchor>
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<vbox>
|
||||
<button>
|
||||
<halpin>"mpgreset"</halpin>
|
||||
<text>"MPG Reset"</text>
|
||||
<bd>4</bd>
|
||||
<justify>"center"</justify>
|
||||
</button>
|
||||
</vbox>
|
||||
|
||||
</vbox>
|
||||
</pyvcp>
|
||||
90
configs/sim/axis/anglejog/anglejog_postgui.hal
Normal file
90
configs/sim/axis/anglejog/anglejog_postgui.hal
Normal file
@@ -0,0 +1,90 @@
|
||||
loadrt anglejog names=anglejog
|
||||
addf anglejog servo-thread
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# Connections TO anglejog component
|
||||
|
||||
net :ajog_enable <= pyvcp.enable
|
||||
net :ajog_enable => anglejog.enable-in
|
||||
net :ajog_enable => pyvcp.enabled
|
||||
|
||||
net :ajog_counts <= pyvcp.mpg-i
|
||||
net :ajog_counts => anglejog.counts-in
|
||||
|
||||
net :ajog_accel-fraction-in <= pyvcp.accel-fraction
|
||||
net :ajog_accel-fraction-in => anglejog.accel-fraction-in
|
||||
|
||||
net :ajog-angle-degrees <= pyvcp.angle-degrees
|
||||
net :ajog-angle-degrees => anglejog.angle-degrees-in
|
||||
|
||||
net :ajog-scale-in <= pyvcp.scale-in
|
||||
net :ajog-scale-in => anglejog.scale-in
|
||||
|
||||
net :ajog_max-vel <= pyvcp.max-vel
|
||||
net :ajog_max-vel => anglejog.max-vel
|
||||
|
||||
net :ajog_max-accel <= pyvcp.max-accel
|
||||
net :ajog_max-accel => anglejog.max-accel
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# Connections FROM anglejog component
|
||||
|
||||
net :ajog_enable-out <= anglejog.enable-out
|
||||
net :ajog_enable-out => axis.x.jog-enable
|
||||
net :ajog_enable-out => axis.z.jog-enable
|
||||
net :ajog_enable-out => joint.0.jog-enable
|
||||
net :ajog_enable-out => joint.1.jog-enable
|
||||
|
||||
net :ajog_scale-out <= anglejog.current-scale-out
|
||||
net :ajog_scale-out => axis.x.jog-scale
|
||||
net :ajog_scale-out => axis.z.jog-scale
|
||||
net :ajog_scale-out => joint.0.jog-scale
|
||||
net :ajog_scale-out => joint.1.jog-scale
|
||||
net :ajog_scale-out => pyvcp.current-scale-out
|
||||
|
||||
net :ajog_x <= anglejog.coscounts
|
||||
net :ajog_x => axis.x.jog-counts
|
||||
net :ajog_x => joint.0.jog-counts
|
||||
|
||||
net :ajog_z <= anglejog.sincounts
|
||||
net :ajog_z => axis.z.jog-counts
|
||||
net :ajog_z => joint.1.jog-counts
|
||||
|
||||
net :ajog_xfraction <= anglejog.cos-accel-fraction
|
||||
net :ajog_xfraction => axis.x.jog-accel-fraction
|
||||
net :ajog_xfraction => joint.0.jog-accel-fraction
|
||||
|
||||
net :ajog_zfraction <= anglejog.sin-accel-fraction
|
||||
net :ajog_zfraction => axis.z.jog-accel-fraction
|
||||
net :ajog_zfraction => joint.1.jog-accel-fraction
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# panel info-only items from anglejog component:
|
||||
|
||||
net :vcp_active <= anglejog.active
|
||||
net :vcp_active => pyvcp.active
|
||||
|
||||
net :vcp-current-scale <= anglejog.current-scale
|
||||
net :vcp-current-scale => pyvcp.current-scale
|
||||
|
||||
net :vcp_current-angle-degrees <= anglejog.current-angle-degrees
|
||||
net :vcp_current-angle-degrees => pyvcp.current-angle-degrees
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# MPG simulation items
|
||||
|
||||
loadrt mux_generic config=ff2
|
||||
addf mux-gen.00 servo-thread
|
||||
|
||||
# for reset, set >0 and < Scale widget resolution:
|
||||
setp mux-gen.00.in-float-00 .1
|
||||
net :vcp_scale-val <= mux-gen.00.out-float
|
||||
net :vcp_scale-val => pyvcp.scale.0.param_pin
|
||||
|
||||
net :vcp_scale-reset <= pyvcp.mpgreset
|
||||
net :vcp_scale-reset => mux-gen.00.sel-bit-00
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# halshow
|
||||
|
||||
loadusr halshow --noprefs --fformat %8.5f ./anglejog.halshow
|
||||
Reference in New Issue
Block a user