Skip to content

Commit

Permalink
autotest
Browse files Browse the repository at this point in the history
  • Loading branch information
Makeradmin-vm committed Jul 12, 2019
1 parent bb86485 commit 50c8cdc
Show file tree
Hide file tree
Showing 12 changed files with 223 additions and 44 deletions.
9 changes: 9 additions & 0 deletions ROUTINES/go_home.ngc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(go_home.ngc)

O <go_home> sub
G0 Z0.500
G0 X0 Y0
O <go_home> endsub

M2

28 changes: 28 additions & 0 deletions ROUTINES/touch_plate.ngc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
O <touch_plate> sub
g91 (switch to relative coordinates)
G38.2 Z-10 F6 (down fast to get approximate)
F10 G1 Z.6 (up .08)
G38.2 Z-1 F1 (down slow to get exact)
F10 G1 Z1 (up .1)

(vesion 1 set but at 0 and manually hit zero button)
T0 M6 (pause)
F10 G1 Z-.18 (down to true zero - .1 up + .08 thickness of plate)
g90 (switch to absolute coordinates)


(Version 2)
(g90)
(G38.2 Z-1 F1)
(G10 L20 P0 Z0.1230)
(G0 Z.5)


(Version 3)
(g90)
(G38.2 Z-1 F1)
(G92 Z0.1230)
(G0 Z.5)

O <touch_plate> endsub
M2
7 changes: 7 additions & 0 deletions autosave.halscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
THREAD servo-thread
MAXCHAN 4
HMULT 1
HZOOM 1
HPOS 5.000000e-01
TMODE 0
RMODE 0
11 changes: 9 additions & 2 deletions cnc-router.hal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by PNCconf at Sat Dec 29 01:00:17 2018
# Generated by PNCconf at Thu Jul 11 17:23:41 2019
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

Expand All @@ -8,6 +8,8 @@ loadrt hostmot2
loadrt hm2_eth board_ip="192.168.1.121" config=" num_encoders=0 num_pwmgens=0 num_stepgens=4 sserial_port_0=00xxxx"
setp hm2_7i76e.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.y2,pid.z,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle

addf hm2_7i76e.0.read servo-thread
addf motion-command-handler servo-thread
Expand All @@ -17,6 +19,8 @@ addf pid.y.do-pid-calcs servo-thread
addf pid.y2.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf abs.spindle servo-thread
addf lowpass.spindle servo-thread
addf hm2_7i76e.0.write servo-thread
setp hm2_7i76e.0.dpll.01.timer-us -50
setp hm2_7i76e.0.stepgen.timer-number 1
Expand All @@ -25,7 +29,7 @@ setp hm2_7i76e.0.stepgen.timer-number 1


# --- ESTOP-OUT ---
net estop-out hm2_7i76e.0.7i76.0.0.output-08
net estop-out hm2_7i76e.0.7i76.0.0.output-07

# external input signals

Expand All @@ -42,6 +46,9 @@ net min-home-y2 <= hm2_7i76e.0.7i76.0.0.input-02
# --- MAX-HOME-Z ---
net max-home-z <= hm2_7i76e.0.7i76.0.0.input-03

# --- PROBE-IN ---
net probe-in <= hm2_7i76e.0.7i76.0.0.input-15

# --- ESTOP-EXT ---
net estop-ext <= hm2_7i76e.0.7i76.0.0.input-24

Expand Down
84 changes: 45 additions & 39 deletions cnc-router.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by PNCconf at Sat Dec 29 01:00:16 2018
# Generated by PNCconf at Thu Jul 11 17:23:41 2019
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

Expand All @@ -9,6 +9,7 @@ VERSION = 1.1

[DISPLAY]
DISPLAY = axis
GLADEVCP = -H gvcp_call_list.hal gvcp-panel.ui
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
Expand All @@ -17,10 +18,11 @@ MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
PYVCP = pyvcp-panel.xml
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 6.000000
MAX_LINEAR_VELOCITY = 25.000000
MAX_LINEAR_VELOCITY = 33.333333
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
Expand All @@ -41,7 +43,9 @@ TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]

PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = /home/cnc/linuxcnc/configs/cnc-router/ROUTINES/

[EMCMOT]
EMCMOT = motmod
Expand All @@ -61,6 +65,8 @@ POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]
MDI_COMMAND = O <go_home> CALL
MDI_COMMAND = O <touch_plate> CALL

[KINS]
JOINTS = 4
Expand All @@ -70,8 +76,8 @@ KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
COORDINATES = XYYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2.50
MAX_LINEAR_VELOCITY = 25.00
DEFAULT_LINEAR_VELOCITY = 6.67
MAX_LINEAR_VELOCITY = 66.67

[EMCIO]
EMCIO = io
Expand All @@ -81,22 +87,22 @@ TOOL_CHANGE_QUILL_UP = 1

#******************************************
[AXIS_X]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 350.0
MAX_VELOCITY = 58.3333333333
MAX_ACCELERATION = 400.0
MIN_LIMIT = -0.01
MAX_LIMIT = 500.0
MAX_LIMIT = 818.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 350.0
MAX_VELOCITY = 58.3333333333
MAX_ACCELERATION = 400.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXACCEL = 437.50
STEPGEN_MAXVEL = 72.92
STEPGEN_MAXACCEL = 500.00
P = 1000.0
I = 0.0
D = 0.0
Expand All @@ -108,38 +114,38 @@ DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 5000
DIRHOLD = 6000
STEPLEN = 3000
STEPSPACE = 3000
DIRHOLD = 5000
STEPLEN = 2500
STEPSPACE = 2500
STEP_SCALE = 673.6842
MIN_LIMIT = -0.01
MAX_LIMIT = 500.0
MAX_LIMIT = 818.0
HOME_OFFSET = -2.000000
HOME_SEARCH_VEL = -4.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -1
HOME_SEQUENCE = 1
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 200.0
MAX_VELOCITY = 66.6666666667
MAX_ACCELERATION = 750.0
MIN_LIMIT = -0.01
MAX_LIMIT = 500.0
MAX_LIMIT = 885.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 200.0
MAX_VELOCITY = 66.6666666667
MAX_ACCELERATION = 750.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXVEL = 83.33
STEPGEN_MAXACCEL = 937.50
P = 1000.0
I = 0.0
Expand All @@ -153,13 +159,13 @@ MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 5000
DIRHOLD = 6000
STEPLEN = 3000
STEPSPACE = 3000
STEPLEN = 2500
STEPSPACE = 2500
STEP_SCALE = 640.0
MIN_LIMIT = -0.01
MAX_LIMIT = 500.0
HOME_OFFSET = -4.000000
HOME_SEARCH_VEL = -4.000000
MAX_LIMIT = 885.0
HOME_OFFSET = -2.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
Expand All @@ -171,11 +177,11 @@ TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 200.0
MAX_VELOCITY = 66.6666666667
MAX_ACCELERATION = 750.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 31.25
STEPGEN_MAXVEL = 83.33
STEPGEN_MAXACCEL = 937.50
P = 1000.0
I = 0.0
Expand All @@ -189,13 +195,13 @@ MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 5000
DIRHOLD = 6000
STEPLEN = 3000
STEPSPACE = 3000
STEPLEN = 2500
STEPSPACE = 2500
STEP_SCALE = 640.0
MIN_LIMIT = -0.01
MAX_LIMIT = 500.0
MAX_LIMIT = 885.0
HOME_OFFSET = -2.000000
HOME_SEARCH_VEL = -4.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
Expand Down Expand Up @@ -233,18 +239,18 @@ MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 5000
DIRHOLD = 6000
STEPLEN = 3000
STEPSPACE = 3000
STEPLEN = 2500
STEPSPACE = 2500
STEP_SCALE = 800.0
MIN_LIMIT = -0.0
MAX_LIMIT = 170.01
HOME_OFFSET = 172.000000
HOME_SEARCH_VEL = 4.000000
HOME_SEARCH_VEL = 20.000000
HOME_LATCH_VEL = 0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -0
HOME_SEQUENCE = 0
#******************************************

[SPINDLE_9]
Expand Down
3 changes: 3 additions & 0 deletions custom_postgui.hal
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Include your custom_postgui HAL commands here
# This file will not be overwritten when you run PNCconf again

# set up the touch plate button
net remote-laserzero halui.mdi-command-01 <= pyvcp.laserzero
85 changes: 85 additions & 0 deletions gvcp-panel.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gladevcp 0.0 -->
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window1">
<property name="width_request">100</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>

<child>
<object class="HAL_HBar" id="spindle-speed">
<property name="visible">True</property>
<property name="force_height">36</property>
<property name="max">1000</property>

<property name="z0_color">#0000ffff0000</property>
<property name="value">44.25</property>
<property name="z1_color">#ffffffff0000</property>
<property name="bg_color">#bebebebebebe</property>
<property name="text_template">Spindle: % 4d RPM</property>
<property name="z0_border">0.94999998807907104</property>
<property name="z2_color">#ffff00000000</property>
<property name="show_limits">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>

<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="ypad">5</property>
<property name="label" translatable="yes"> Spindle Up To Speed </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="HAL_LED" id="spindle-at-speed-led">
<property name="visible">True</property>
<property name="led_shape">2</property>
<property name="on_color">green</property>
<property name="led_size">5</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>

<child>
<object class="HAL_Table" id="button-box-active">
<property name="visible">True</property>
<property name="n_rows">5</property>
<property name="homogeneous">False</property>

</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
4 changes: 4 additions & 0 deletions gvcp_call_list.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These files are loaded post gladeVCP, in the order they appear

source gvcp_options.hal
source custom_gvcp.hal
Loading

0 comments on commit 50c8cdc

Please sign in to comment.