Import LinuxCNC source tree
This commit is contained in:
16
configs/sim/axis/twopass/README
Normal file
16
configs/sim/axis/twopass/README
Normal file
@@ -0,0 +1,16 @@
|
||||
TWOPASS demo
|
||||
|
||||
Twopass processing of hal files allows multiple specifications for component loadrt lines.
|
||||
|
||||
To enable twopass processing:
|
||||
|
||||
[HAL]
|
||||
TWOPASS = on,verbose
|
||||
|
||||
|
||||
For debugging, use:
|
||||
TWOPASS = on,verbose,nodelete
|
||||
|
||||
|
||||
The verbose option increases output to stdout.
|
||||
The nodelete option prevents removal of temporary files.
|
||||
4
configs/sim/axis/twopass/load_for_postgui.hal
Normal file
4
configs/sim/axis/twopass/load_for_postgui.hal
Normal file
@@ -0,0 +1,4 @@
|
||||
# Example for twopass processing when using a postgui halfile
|
||||
# loadrt components needed in postgui halfile here
|
||||
|
||||
loadrt hypot names=vel_xz,vel_yz
|
||||
16
configs/sim/axis/twopass/postgui.hal
Normal file
16
configs/sim/axis/twopass/postgui.hal
Normal file
@@ -0,0 +1,16 @@
|
||||
# Example of postgui commands with twopass processing
|
||||
|
||||
# Note: the loadrt for the components are done
|
||||
# in the load_for_postgui.hal before the gui is loaded.
|
||||
|
||||
addf vel_xz servo-thread
|
||||
addf vel_yz servo-thread
|
||||
|
||||
net Xvel => vel_xz.in0
|
||||
net Yvel => vel_yz.in0
|
||||
net Zvel => vel_xz.in1 vel_yz.in1
|
||||
|
||||
net XZvel <= vel_xz.out
|
||||
net YZvel <= vel_yz.out
|
||||
|
||||
show signal Zvel
|
||||
1
configs/sim/axis/twopass/sim.tbl
Symbolic link
1
configs/sim/axis/twopass/sim.tbl
Symbolic link
@@ -0,0 +1 @@
|
||||
../../sim.tbl
|
||||
126
configs/sim/axis/twopass/twopass.ini
Normal file
126
configs/sim/axis/twopass/twopass.ini
Normal file
@@ -0,0 +1,126 @@
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = SIM-AXIS-TWOPASS
|
||||
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
|
||||
DEBUG = 0
|
||||
|
||||
[DISPLAY]
|
||||
DISPLAY = axis
|
||||
CYCLE_TIME = 0.100
|
||||
HELP_FILE = doc/help.txt
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
MAX_SPINDLE_OVERRIDE = 1.0
|
||||
MAX_LINEAR_VELOCITY = 1.2
|
||||
DEFAULT_LINEAR_VELOCITY = .25
|
||||
PROGRAM_PREFIX = ../../nc_files/
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
#EDITOR = geany
|
||||
TOOL_EDITOR = tooledit
|
||||
INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil, 1mm, .1mm, 1/8000 in
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python3
|
||||
|
||||
[RS274NGC]
|
||||
PARAMETER_FILE = sim.var
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 0
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
# options available are: on,verbose,nodelete
|
||||
TWOPASS = on
|
||||
HALFILE = core_sim.hal
|
||||
HALFILE = sim_spindle_encoder.hal
|
||||
HALFILE = axis_manualtoolchange.hal
|
||||
HALFILE = simulated_home.hal
|
||||
HALFILE = load_for_postgui.hal
|
||||
# demonstrate excluding a file from twopass processing:
|
||||
HALFILE = twopass_excluded.hal
|
||||
POSTGUI_HALFILE = postgui.hal
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Y Z
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 10
|
||||
POSITION_FILE = position.txt
|
||||
MAX_LINEAR_VELOCITY = 10
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = sim.tbl
|
||||
TOOL_CHANGE_POSITION = 0 0 0
|
||||
TOOL_CHANGE_QUILL_UP = 1
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins
|
||||
JOINTS = 3
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -40.0
|
||||
MAX_LIMIT = 40.0
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50.0
|
||||
MIN_LIMIT = -40.0
|
||||
MAX_LIMIT = 40.0
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEARCH_VEL = 20.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -40.0
|
||||
MAX_LIMIT = 40.0
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50.0
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME = 0.000
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50.0
|
||||
MIN_LIMIT = -40.0
|
||||
MAX_LIMIT = 40.0
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEARCH_VEL = 20.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -8.0
|
||||
MAX_LIMIT = 0.0001
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50.0
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
MAX_VELOCITY = 5
|
||||
MAX_ACCELERATION = 50.0
|
||||
MIN_LIMIT = -8.0
|
||||
MAX_LIMIT = 0.0001
|
||||
HOME_OFFSET = 1.0
|
||||
HOME_SEARCH_VEL = 20.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_SEQUENCE = 0
|
||||
25
configs/sim/axis/twopass/twopass.txt
Normal file
25
configs/sim/axis/twopass/twopass.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
twopass.ini
|
||||
|
||||
This sim configuration demonstrates the use of TWOPASS processing for halfiles.
|
||||
|
||||
Twopass processing supports multiple loadrt specifications for any component.
|
||||
So, for example:
|
||||
|
||||
file1.hal: loadrt or2 names=or2_a,or2_b
|
||||
file2.hal: loadrt or2 names=or2_c,or2_d
|
||||
|
||||
Halfiles are read in two passes. In the first pass, loadrt lines are accumulated but not executed. In the second pass, all loadrt lines are executed in order.
|
||||
|
||||
Twopass processing occurs before gui loading. When using a [HAL]POSTGUI_HALFILE, it is convenient to loadrt all components prior to loading the gui. In this example, this is done with the file:
|
||||
|
||||
load_for_postgui.hal
|
||||
|
||||
--------------------------------------
|
||||
Notes:
|
||||
|
||||
Twopass processing for a component can use either names= or count= specifications.
|
||||
|
||||
Combinations of names= and count= are not supported.
|
||||
|
||||
Using names= is recommended for both readability and portability.
|
||||
|
||||
6
configs/sim/axis/twopass/twopass_excluded.hal
Normal file
6
configs/sim/axis/twopass/twopass_excluded.hal
Normal file
@@ -0,0 +1,6 @@
|
||||
# The following magic comment causes this file to
|
||||
# be excluded from twopass processing:
|
||||
# NOTWOPASS
|
||||
|
||||
loadrt flipflop names=notwopass_ff
|
||||
show pin notwopass_ff
|
||||
Reference in New Issue
Block a user