Compare commits

..

6 Commits

Author SHA1 Message Date
a3870cb152 dzialajaca konfiguracja 2026-06-07 17:16:29 +02:00
8a166698ce example z remora 2026-06-07 08:08:12 +02:00
b3d7d3a5ed skopiowana konfiguracja z expertia 2026-06-07 07:30:07 +02:00
836f1c6261 wygenerowana kofiguracja 2026-06-06 18:16:06 +02:00
3b8e11d127 dodalem kopie stepconf 2026-01-09 10:24:19 +01:00
715f8d082b update gitignore 2026-01-09 10:22:36 +01:00
9 changed files with 938 additions and 3 deletions

4
.gitignore vendored
View File

@@ -1,3 +1,5 @@
__pycache__
*.pickle
*.pyc
*.pyc
*.log
*.preferences

128
mayo-mill-remora.hal Normal file
View File

@@ -0,0 +1,128 @@
# Basic HAL config file for NVEM controller board running Remora firmware
# Configured for 3 joints (A, Y, Z axes) with home and limit switches
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# load the Remora real-time component
loadrt remora-eth-3.0 PRU_base_freq=75000
loadrt estop_latch names=estop_latch
loadrt and2 names=run_and,step_and
loadrt toggle names=hold_button_toggle
loadrt toggle2nist names=hold_toggle,paused_toggle
# add the remora and motion functions to threads
addf remora.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf remora.update-freq servo-thread
addf remora.write servo-thread
addf estop_latch servo-thread
addf run_and servo-thread
addf step_and servo-thread
addf hold_toggle servo-thread
addf hold_button_toggle servo-thread
#toggle2nist states & mux selectors
# net program-is-paused hold_toggle.is-on <= halui.program.is-paused
# vfdmod - uncomment the below if using vfdmod (default). There are also a couple items to edit in spindle_load.hal
# loadusr -W vfdmod vfdmod.ini
# net spindle-speed-cmd vfdmod.spindle.rpm-in <= spindle.0.speed-out
# net spindle-speed-fb vfdmod.spindle.rpm-out <= spindle.0.speed-in
# net spindle-at-speed vfdmod.spindle.at-speed <= spindle.0.at-speed
# net spindle-forward vfdmod.control.run-forward <= spindle.0.forward
# net spindle-reverse vfdmod.control.run-reverse <= spindle.0.reverse
# estop and SPI comms enable and feedback
net user-enable-out <= iocontrol.0.user-enable-out => remora.enable
net user-request-enable <= iocontrol.0.user-request-enable => remora.reset estop_latch.reset
#Halt is shared with motor alarms and is in the estop loop.
#estop_latch returns 'ok' when fault-in is false, ok-in is true, and reset changes from false to true.
net estop-fault_in remora.input.03 => estop_latch.fault-in
net remora-status remora.status => estop_latch.ok-in
net estop-status estop_latch.ok-out => iocontrol.0.emc-enable-in
# joint 0 setup (X axis)
setp remora.joint.0.scale [JOINT_0]SCALE
setp remora.joint.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp remora.joint.0.pgain [JOINT_0]P_GAIN
setp remora.joint.0.ff1gain [JOINT_0]FF1_GAIN
setp remora.joint.0.deadband [JOINT_0]DEADBAND
net j0pos-cmd joint.0.motor-pos-cmd => remora.joint.0.pos-cmd
net j0pos-fb remora.joint.0.pos-fb => joint.0.motor-pos-fb
net j0enable joint.0.amp-enable-out => remora.joint.0.enable
net x-home joint.0.home-sw-in => remora.input.00
# joint 1 setup (Y axis)
setp remora.joint.1.scale [JOINT_1]SCALE
setp remora.joint.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp remora.joint.1.pgain [JOINT_1]P_GAIN
setp remora.joint.1.ff1gain [JOINT_1]FF1_GAIN
setp remora.joint.1.deadband [JOINT_1]DEADBAND
net j1pos-cmd joint.1.motor-pos-cmd => remora.joint.1.pos-cmd
net j1pos-fb remora.joint.1.pos-fb => joint.1.motor-pos-fb
net j1enable joint.1.amp-enable-out => remora.joint.1.enable
net y-home joint.1.home-sw-in => remora.input.01
# joint 2 setup (Z axis)
setp remora.joint.2.scale [JOINT_2]SCALE
setp remora.joint.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp remora.joint.2.pgain [JOINT_2]P_GAIN
setp remora.joint.2.ff1gain [JOINT_2]FF1_GAIN
setp remora.joint.2.deadband [JOINT_2]DEADBAND
net j2pos-cmd joint.2.motor-pos-cmd => remora.joint.2.pos-cmd
net j2pos-fb remora.joint.2.pos-fb => joint.2.motor-pos-fb
net j2enable joint.2.amp-enable-out => remora.joint.2.enable
net z-home joint.2.home-sw-in => remora.input.02
# Motor enables
net j0enable => remora.output.00
net j1enable => remora.output.01
net j2enable => remora.output.02
# Flood and mist outputs
# net flood remora.output.02 <= iocontrol.0.coolant-flood
# net mist remora.output.03 <= iocontrol.0.coolant-mist
# User buttons
#Halt is shared with motor alarms and is up in the estop loop.
#Hold logic
# net hold_button remora.input.05 => hold_button_toggle.in
# net hold_toggle_latch hold_button_toggle.out => hold_toggle.in
# net hold_on halui.program.pause <= hold_toggle.on
# net hold_off halui.program.resume <= hold_toggle.off
#Cycle start logic. When not running, start the program. When in feed hold, single step through the program.
# net run-step_button remora.input.06 => run_and.in0 step_and.in0
# net program-is-idle halui.program.is-idle => run_and.in1 #if not running AND button pressed
# net program-run run_and.out => halui.program.run #run program
# net program-is-paused => step_and.in1 #if paused AND button pressed
# net single-step step_and.out => halui.program.step #single step
# Probe
net probe-in motion.probe-input <= remora.input.04
# Manual toolchange
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-number <= iocontrol.0.tool-prep-number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

190
mayo-mill-remora.ini Normal file
View File

@@ -0,0 +1,190 @@
# Generated by stepconf 1.1 at Thu May 29 11:48:34 2025
# Modified for Remora Ethernet configuration
[EMC]
MACHINE = mayo-mill-remora
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = probe_basic
OPEN_FILE = ~/linuxcnc/nc_files/pb_examples/blank.ngc
CONFIG_FILE = custom_config.yml
LOG_FILE = mayo-mill-remora.log
LOG_LEVEL = DEBUG
#PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INTRO_GRAPHIC = pbsplash.png
INTRO_TIME = 5
#ARCDIVISION = 64
#GRIDS = 10mm 20mm 50mm 100mm
GEOMETRY = xyz
INCREMENTS = JOG 10mm 1mm .1mm .01mm
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
MAX_SPINDLE_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 50.00
DEFAULT_LINEAR_VELOCITY = 5.00
USER_TABS_PATH = user_tabs/
USER_BUTTONS_PATH = user_buttons/
USER_DROS_PATH = user_dro_display/
DRO_DISPLAY = xyz
# ATC tab display options, 0 = no atc tab displayed, 1 = Carousel atc display, 2 = rack atc display
ATC_TAB_DISPLAY = 0
#USER_ATC_BUTTONS_PATH = user_atc_buttons/
CYCLE_TIME = 0.100
KEYBOARD_JOG = true
KEYBOARD_JOG_SAFETY_OFF = true
TOOL_TABLE_COLUMNS = TZDR
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
PROGRAM_EXTENSION = .nc,.tap G-Code File
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[PYTHON]
TOPLEVEL = ./python/toplevel.py
PATH_APPEND = ./python/
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.0127 G80 G90 G94 G97 M5 M9
#RS274NGC_STARTUP_CODE = F10 S300 G20 G17 G40 G49 G54 G64 P.001 G80 G90 G91.1 G92.1 G94 G97 G98
PARAMETER_FILE = linuxcnc.var
OWORD_NARGS = 1
NO_DOWNCASE_OWORD = 1
SUBROUTINE_PATH = subroutines
# The remap code for QtVCP's versaprobe's automatic tool probe of Z
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=aaa epilog=change_epilog
[HAL]
HALUI = halui
HALFILE = mayo-mill-remora.hal
HALFILE = custom.hal
POSTGUI_HALFILE = probe_basic_postgui.hal
TWOPASS = one
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 0
SERVO_PERIOD = 1000000
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[CHANGE_POSITION]
X = 10
Y = 10
Z = -2
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ
[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 5.00
MAX_LINEAR_VELOCITY = 50.00
#*** AXIS_X *******************************
[AXIS_X]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 500.0
MIN_LIMIT = -0.001
MAX_LIMIT = 780.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.001
MAX_LIMIT = 780.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 500.0
STEPGEN_MAXACCEL = 625.0
SCALE = 80.0
FERROR = 2.0
MIN_FERROR = 2
FF1_GAIN = 1
P_GAIN = 1.0
DEADBAND = 0.005
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = -6.250000
HOME_SEQUENCE = 2
#******************************************
#*** AXIS_Y *******************************
[AXIS_Y]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 500.0
MIN_LIMIT = -0.001
MAX_LIMIT = 485.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.001
MAX_LIMIT = 485.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 500.0
STEPGEN_MAXACCEL = 625.0
SCALE = 80.0
FERROR = 2.0
MIN_FERROR = 2
FF1_GAIN = 1
P_GAIN = 1.0
DEADBAND = 0.005
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = -6.250000
HOME_SEQUENCE = 1
#******************************************
#*** AXIS_Z *******************************
[AXIS_Z]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 500.0
MIN_LIMIT = -100.0
MAX_LIMIT = 0.001
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -100.0
MAX_LIMIT = 0.001
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 500.0
STEPGEN_MAXACCEL = 625.0
SCALE = 80.0
FERROR = 2
MIN_FERROR = 2
FF1_GAIN = 1
P_GAIN = 1.0
DEADBAND = 0.005
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 10.000000
HOME_LATCH_VEL = 6.250000
HOME_SEQUENCE = 0
#******************************************

245
mayo-mill.stepconf Normal file
View File

@@ -0,0 +1,245 @@
<?xml version="1.0" ?>
<stepconf>
<property type="int" name="ahomepos" value="0"/>
<property type="int" name="ahomesw" value="0"/>
<property type="float" name="ahomevel" value="0.05"/>
<property type="int" name="alatchdir" value="0"/>
<property type="int" name="aleadscrew" value="360"/>
<property type="int" name="amaxacc" value="1200"/>
<property type="int" name="amaxlim" value="9999"/>
<property type="int" name="amaxvel" value="360"/>
<property type="int" name="amicrostep" value="2"/>
<property type="int" name="aminlim" value="-9999"/>
<property type="int" name="apulleyden" value="1"/>
<property type="int" name="apulleynum" value="1"/>
<property type="int" name="ascale" value="0"/>
<property type="int" name="asteprev" value="200"/>
<property type="int" name="axes" value="0"/>
<property type="eval" name="axislist" value="[]"/>
<property type="bool" name="classicladder" value="False"/>
<property type="bool" name="createshortcut" value="True"/>
<property type="bool" name="createsymlink" value="True"/>
<property type="int" name="customhal" value="1"/>
<property type="float" name="digitsin" value="15.0"/>
<property type="float" name="digitsout" value="15.0"/>
<property type="float" name="dirhold" value="20000.0"/>
<property type="float" name="dirsetup" value="20000.0"/>
<property type="string" name="drivertype" value="other"/>
<property type="float" name="floatsin" value="10.0"/>
<property type="float" name="floatsout" value="10.0"/>
<property type="bool" name="halui" value="False"/>
<property type="eval" name="halui_list" value="[]"/>
<property type="string" name="ioaddr" value="0"/>
<property type="string" name="ioaddr2" value="0"/>
<property type="string" name="ioaddr3" value="2"/>
<property type="bool" name="ladderconnect" value="True"/>
<property type="int" name="ladderhaltype" value="0"/>
<property type="string" name="laddername" value="custom.clp"/>
<property type="float" name="latency" value="50000.0"/>
<property type="eval" name="lparport" value="['0']"/>
<property type="string" name="machinename" value="mayo-mill"/>
<property type="bool" name="manualtoolchange" value="True"/>
<property type="eval" name="md5sums" value="[]"/>
<property type="bool" name="modbus" value="False"/>
<property type="int" name="number_pports" value="1"/>
<property type="int" name="ohmiccontact" value="0"/>
<property type="int" name="period" value="25000"/>
<property type="string" name="pin1" value="spindle-on"/>
<property type="string" name="pin10" value="home-x"/>
<property type="bool" name="pin10inv" value="False"/>
<property type="string" name="pin11" value="home-y"/>
<property type="bool" name="pin11inv" value="False"/>
<property type="string" name="pin12" value="home-z"/>
<property type="bool" name="pin12inv" value="False"/>
<property type="string" name="pin13" value="estop-ext"/>
<property type="bool" name="pin13inv" value="True"/>
<property type="string" name="pin14" value="unused-output"/>
<property type="bool" name="pin14inv" value="False"/>
<property type="string" name="pin15" value="probe-in"/>
<property type="bool" name="pin15inv" value="False"/>
<property type="string" name="pin16" value="unused-output"/>
<property type="bool" name="pin16inv" value="False"/>
<property type="string" name="pin17" value="unused-output"/>
<property type="bool" name="pin17inv" value="False"/>
<property type="bool" name="pin1inv" value="True"/>
<property type="string" name="pin2" value="xdir"/>
<property type="bool" name="pin2inv" value="False"/>
<property type="string" name="pin3" value="xstep"/>
<property type="bool" name="pin3inv" value="False"/>
<property type="string" name="pin4" value="ydir"/>
<property type="bool" name="pin4inv" value="False"/>
<property type="string" name="pin5" value="ystep"/>
<property type="bool" name="pin5inv" value="False"/>
<property type="string" name="pin6" value="zdir"/>
<property type="bool" name="pin6inv" value="False"/>
<property type="string" name="pin7" value="zstep"/>
<property type="bool" name="pin7inv" value="False"/>
<property type="string" name="pin8" value="unused-output"/>
<property type="bool" name="pin8inv" value="False"/>
<property type="string" name="pin9" value="unused-output"/>
<property type="bool" name="pin9inv" value="False"/>
<property type="int" name="pp2_direction" value="0"/>
<property type="string" name="pp2_pin1" value="unused-output"/>
<property type="string" name="pp2_pin10_in" value="unused-input"/>
<property type="int" name="pp2_pin10_in_inv" value="0"/>
<property type="string" name="pp2_pin11_in" value="unused-input"/>
<property type="int" name="pp2_pin11_in_inv" value="0"/>
<property type="string" name="pp2_pin12_in" value="unused-input"/>
<property type="int" name="pp2_pin12_in_inv" value="0"/>
<property type="string" name="pp2_pin13_in" value="unused-input"/>
<property type="int" name="pp2_pin13_in_inv" value="0"/>
<property type="string" name="pp2_pin14" value="unused-output"/>
<property type="int" name="pp2_pin14inv" value="0"/>
<property type="string" name="pp2_pin15_in" value="unused-input"/>
<property type="int" name="pp2_pin15_in_inv" value="0"/>
<property type="string" name="pp2_pin16" value="unused-output"/>
<property type="int" name="pp2_pin16inv" value="0"/>
<property type="string" name="pp2_pin17" value="unused-output"/>
<property type="int" name="pp2_pin17inv" value="0"/>
<property type="int" name="pp2_pin1inv" value="0"/>
<property type="string" name="pp2_pin2" value="unused-output"/>
<property type="string" name="pp2_pin2_in" value="unused-input"/>
<property type="int" name="pp2_pin2_in_inv" value="0"/>
<property type="int" name="pp2_pin2inv" value="0"/>
<property type="string" name="pp2_pin3" value="unused-output"/>
<property type="string" name="pp2_pin3_in" value="unused-input"/>
<property type="int" name="pp2_pin3_in_inv" value="0"/>
<property type="int" name="pp2_pin3inv" value="0"/>
<property type="string" name="pp2_pin4" value="unused-output"/>
<property type="string" name="pp2_pin4_in" value="unused-input"/>
<property type="int" name="pp2_pin4_in_inv" value="0"/>
<property type="int" name="pp2_pin4inv" value="0"/>
<property type="string" name="pp2_pin5" value="unused-output"/>
<property type="string" name="pp2_pin5_in" value="unused-input"/>
<property type="int" name="pp2_pin5_in_inv" value="0"/>
<property type="int" name="pp2_pin5inv" value="0"/>
<property type="string" name="pp2_pin6" value="unused-output"/>
<property type="string" name="pp2_pin6_in" value="unused-input"/>
<property type="int" name="pp2_pin6_in_inv" value="0"/>
<property type="int" name="pp2_pin6inv" value="0"/>
<property type="string" name="pp2_pin7" value="unused-output"/>
<property type="string" name="pp2_pin7_in" value="unused-input"/>
<property type="int" name="pp2_pin7_in_inv" value="0"/>
<property type="int" name="pp2_pin7inv" value="0"/>
<property type="string" name="pp2_pin8" value="unused-output"/>
<property type="string" name="pp2_pin8_in" value="unused-input"/>
<property type="int" name="pp2_pin8_in_inv" value="0"/>
<property type="int" name="pp2_pin8inv" value="0"/>
<property type="string" name="pp2_pin9" value="unused-output"/>
<property type="string" name="pp2_pin9_in" value="unused-input"/>
<property type="int" name="pp2_pin9_in_inv" value="0"/>
<property type="int" name="pp2_pin9inv" value="0"/>
<property type="int" name="pp3_direction" value="0"/>
<property type="bool" name="pyvcp" value="False"/>
<property type="bool" name="pyvcpconnect" value="True"/>
<property type="int" name="pyvcphaltype" value="0"/>
<property type="string" name="pyvcpname" value="custom.xml"/>
<property type="eval" name="qtplasmac_bcodes" value="['ohmic-test', 'probe-test 10', 'single-cut', 'cut-type', 'torch-pulse 0.5', 'framing', 'user-manual', '', '', '', '', '', '', '', '', '', '', '', '', '']"/>
<property type="eval" name="qtplasmac_bnames" value="['OHMIC\\TEST', 'PROBE\\TEST', 'SINGLE\\CUT', 'NORMAL\\CUT', 'TORCH\\PULSE', 'FRAMING', 'USER\\MANUAL', '', '', '', '', '', '', '', '', '', '', '', '', '']"/>
<property type="int" name="qtplasmacdro" value="0"/>
<property type="int" name="qtplasmacerror" value="0"/>
<property type="int" name="qtplasmacestop" value="0"/>
<property type="int" name="qtplasmacmode" value="0"/>
<property type="int" name="qtplasmacpause" value="0"/>
<property type="string" name="qtplasmacpmx" value=""/>
<property type="int" name="qtplasmacscreen" value="0"/>
<property type="int" name="qtplasmacstart" value="0"/>
<property type="int" name="qtplasmacstop" value="0"/>
<property type="float" name="s32in" value="10.0"/>
<property type="float" name="s32out" value="10.0"/>
<property type="bool" name="select_axis" value="False"/>
<property type="bool" name="select_gmoccapy" value="False"/>
<property type="bool" name="select_qtdragon" value="True"/>
<property type="bool" name="select_qtplasmac" value="False"/>
<property type="bool" name="sim_hardware" value="False"/>
<property type="int" name="spindlecarrier" value="100"/>
<property type="int" name="spindlecpr" value="100"/>
<property type="float" name="spindlefiltergain" value="0.01"/>
<property type="float" name="spindlenearscale" value="1.5"/>
<property type="float" name="spindlepwm1" value="0.2"/>
<property type="float" name="spindlepwm2" value="0.8"/>
<property type="int" name="spindlespeed1" value="100"/>
<property type="int" name="spindlespeed2" value="800"/>
<property type="float" name="stepspace" value="5000.0"/>
<property type="float" name="steptime" value="5000.0"/>
<property type="eval" name="tandemjoints" value="[]"/>
<property type="int" name="tempexists" value="0"/>
<property type="int" name="thcadenc" value="0"/>
<property type="int" name="uhomepos" value="0"/>
<property type="int" name="uhomesw" value="0"/>
<property type="float" name="uhomevel" value="1.5"/>
<property type="int" name="ulatchdir" value="0"/>
<property type="int" name="uleadscrew" value="5"/>
<property type="int" name="umaxacc" value="750"/>
<property type="int" name="umaxlim" value="200"/>
<property type="int" name="umaxvel" value="25"/>
<property type="int" name="umicrostep" value="2"/>
<property type="int" name="uminlim" value="0"/>
<property type="int" name="units" value="1"/>
<property type="int" name="upulleyden" value="1"/>
<property type="int" name="upulleynum" value="1"/>
<property type="int" name="uscale" value="0"/>
<property type="bool" name="usespindleatspeed" value="False"/>
<property type="int" name="usteprev" value="200"/>
<property type="int" name="vhomepos" value="0"/>
<property type="int" name="vhomesw" value="0"/>
<property type="float" name="vhomevel" value="1.5"/>
<property type="int" name="vlatchdir" value="0"/>
<property type="int" name="vleadscrew" value="5"/>
<property type="int" name="vmaxacc" value="750"/>
<property type="int" name="vmaxlim" value="200"/>
<property type="int" name="vmaxvel" value="25"/>
<property type="int" name="vmicrostep" value="2"/>
<property type="int" name="vminlim" value="0"/>
<property type="string" name="voltsfjumper" value="64"/>
<property type="float" name="voltsfullf" value="999.0"/>
<property type="string" name="voltsmodel" value="10"/>
<property type="int" name="voltsrdiv" value="20"/>
<property type="float" name="voltszerof" value="100.0"/>
<property type="int" name="vpulleyden" value="1"/>
<property type="int" name="vpulleynum" value="1"/>
<property type="int" name="vscale" value="0"/>
<property type="int" name="vsteprev" value="200"/>
<property type="float" name="xhomepos" value="0.0"/>
<property type="float" name="xhomesw" value="0.0"/>
<property type="float" name="xhomevel" value="-20.0"/>
<property type="int" name="xlatchdir" value="0"/>
<property type="float" name="xleadscrew" value="5.0"/>
<property type="float" name="xmaxacc" value="500.0"/>
<property type="float" name="xmaxlim" value="780.0"/>
<property type="float" name="xmaxvel" value="50.0"/>
<property type="float" name="xmicrostep" value="2.0"/>
<property type="float" name="xminlim" value="0.0"/>
<property type="float" name="xpulleyden" value="1.0"/>
<property type="float" name="xpulleynum" value="1.0"/>
<property type="float" name="xscale" value="80.0"/>
<property type="float" name="xsteprev" value="200.0"/>
<property type="float" name="yhomepos" value="0.0"/>
<property type="float" name="yhomesw" value="0.0"/>
<property type="float" name="yhomevel" value="-20.0"/>
<property type="int" name="ylatchdir" value="0"/>
<property type="float" name="yleadscrew" value="5.0"/>
<property type="float" name="ymaxacc" value="500.0"/>
<property type="float" name="ymaxlim" value="485.0"/>
<property type="float" name="ymaxvel" value="50.0"/>
<property type="float" name="ymicrostep" value="2.0"/>
<property type="float" name="yminlim" value="0.0"/>
<property type="float" name="ypulleyden" value="1.0"/>
<property type="float" name="ypulleynum" value="1.0"/>
<property type="float" name="yscale" value="80.0"/>
<property type="float" name="ysteprev" value="200.0"/>
<property type="float" name="zhomepos" value="0.0"/>
<property type="float" name="zhomesw" value="0.0"/>
<property type="float" name="zhomevel" value="10.0"/>
<property type="int" name="zlatchdir" value="0"/>
<property type="float" name="zleadscrew" value="5.0"/>
<property type="float" name="zmaxacc" value="500.0"/>
<property type="float" name="zmaxlim" value="0.0"/>
<property type="float" name="zmaxvel" value="25.0"/>
<property type="float" name="zmicrostep" value="2.0"/>
<property type="float" name="zminlim" value="-100.0"/>
<property type="float" name="zpulleyden" value="1.0"/>
<property type="float" name="zpulleynum" value="1.0"/>
<property type="float" name="zscale" value="80.0"/>
<property type="float" name="zsteprev" value="200.0"/>
</stepconf>

44
remora_example.txt Normal file
View File

@@ -0,0 +1,44 @@
{
"Board": "W5500-EVB-Pico",
"Modules":[
{
"Thread": "Servo",
"Type": "Blink",
"Comment": "Blinky",
"Pin": "GP25",
"Frequency": 2
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "X - Joint 0 step generator",
"Joint Number": 0,
"Step Pin": "GP22",
"Direction Pin": "GP09"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Y - Joint 1 step generator",
"Joint Number": 1,
"Step Pin": "GP23",
"Direction Pin": "GP10"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Z - Joint 2 step generator",
"Joint Number": 2,
"Step Pin": "GP24",
"Direction Pin": "GP11"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "light",
"Pin": "GP12",
"Mode": "Output",
"Data Bit": 0
}
]
}

127
remora_pico_config.json Normal file
View File

@@ -0,0 +1,127 @@
{
"Board": "W5500-EVB-Pico",
"Threads": [
{
"Thread": "Base",
"Frequency": 40000
},
{
"Thread": "Servo",
"Frequency": 1000
}
],
"Modules": [
{
"Thread": "Servo",
"Type": "Blink",
"Comment": "Blinky status LED",
"Pin": "GP25",
"Frequency": 2
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "X - Joint0",
"Joint Number": 0,
"Step Pin": "GP02",
"Direction Pin": "GP03"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Y - Joint1",
"Joint Number": 1,
"Step Pin": "GP04",
"Direction Pin": "GP05"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Z - Joint2",
"Joint Number": 2,
"Step Pin": "GP06",
"Direction Pin": "GP07"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "X limit",
"Pin": "GP13",
"Mode": "Input",
"Data Bit": 0,
"Invert": "True"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Y limit",
"Pin": "GP14",
"Mode": "Input",
"Data Bit": 1,
"Invert": "True"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Z limit",
"Pin": "GP15",
"Mode": "Input",
"Data Bit": 2,
"Invert": "True"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "E-Stop",
"Pin": "GP28",
"Mode": "Input",
"Data Bit": 3,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Probe",
"Pin": "GP27",
"Mode": "Input",
"Data Bit": 4,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "X enable",
"Pin": "GP09",
"Mode": "Output",
"Data Bit": 0,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Y enable",
"Pin": "GP10",
"Mode": "Output",
"Data Bit": 1,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Z enable",
"Pin": "GP11",
"Mode": "Output",
"Data Bit": 2,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Spindle",
"Pin": "GP08",
"Mode": "Output",
"Data Bit": 3,
"Invert": "True"
}
]
}

127
remora_pico_config.txt Normal file
View File

@@ -0,0 +1,127 @@
{
"Board": "W5500-EVB-Pico",
"Threads": [
{
"Thread": "Base",
"Frequency": 40000
},
{
"Thread": "Servo",
"Frequency": 1000
}
],
"Modules": [
{
"Thread": "Servo",
"Type": "Blink",
"Comment": "Blinky status LED",
"Pin": "GP25",
"Frequency": 2
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "X - Joint 0 step generator",
"Joint Number": 0,
"Step Pin": "GP2",
"Direction Pin": "GP3"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Y - Joint 1 step generator",
"Joint Number": 1,
"Step Pin": "GP4",
"Direction Pin": "GP5"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Z - Joint 2 step generator",
"Joint Number": 2,
"Step Pin": "GP6",
"Direction Pin": "GP7"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "X axis limit/home switch",
"Pin": "GP13",
"Mode": "Input",
"Data Bit": 0,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Y axis limit/home switch",
"Pin": "GP14",
"Mode": "Input",
"Data Bit": 1,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Z axis limit/home switch",
"Pin": "GP15",
"Mode": "Input",
"Data Bit": 2,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Emergency Stop switch",
"Pin": "GP28",
"Mode": "Input",
"Data Bit": 3,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Versaprobe tool probe input",
"Pin": "GP27",
"Mode": "Input",
"Data Bit": 4,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "X axis driver enable pin",
"Pin": "GP9",
"Mode": "Output",
"Data Bit": 0,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Y axis driver enable pin",
"Pin": "GP10",
"Mode": "Output",
"Data Bit": 1,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Z axis driver enable pin",
"Pin": "GP11",
"Mode": "Output",
"Data Bit": 2,
"Invert": "False"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Spindle On command relay",
"Pin": "GP8",
"Mode": "Output",
"Data Bit": 3,
"Invert": "True"
}
]
}

View File

@@ -1,7 +1,7 @@
T0 P0 ;Probe
T1 P0 D+0.850000 ;0.85 Flat end mill
T1 P0 D+0.850000 Z+20.461301 ;0.85 Flat end mill
T2 P0 D+3.175000 Z-0.012833 ;3.175 Flat end mill
T3 P0 D+3.175000 ;3.175 Engrave mill 30* 0.2
T4 P0 D+6.000000 Z+15.800167 ;6mm Flat end mill
T5 P0 D+1.000000 Z+20.456300 ;1mm Flat end mill
T5 P0 D+1.000000 Z+20.472301 ;1mm Flat end mill
T6 P0 D+0.800000 ;drill 0.7

72
upload_config.py Normal file
View File

@@ -0,0 +1,72 @@
#!/usr/bin/env python3
import binascii
import sys
import math
import json
import tftpy
import time
if len(sys.argv) < 2:
print("usage: upload.py <config.txt>")
exit(-1)
# Check for a valid JSON formatted file, if ok upload to NVEM board via TFTP
with open(sys.argv[1], 'r') as jsonFile:
try:
testForValidJson = json.load(jsonFile)
print('Valid JSON config file, uploading to NVEM board')
except ValueError:
print('Incorrectly formatted JSON configuration file')
exit(-1)
# Load File
config = open(sys.argv[1], "rb").read()
# Compute length (in bytes and words)
jsonLength = len(config)
length = math.ceil(jsonLength / 4)
mod = jsonLength % 4
print('Config file length (words) =', length)
print('Config file length (bytes) =', jsonLength)
print('Remainder =', mod)
# add padding at end of file to ensure length is multiple of 4 bytes (word)
# to ensure correct CRC32 calculation
if mod > 0:
padding = [0 for i in range(4 - mod)]
print('Padding added = ', padding)
config = config + bytes(padding)
newLength = len(config)
print('Config file length with padding (bytes) =', newLength)
# Compute crc32
crc32 = binascii.crc32(config)
print('CRC-32 =',hex(crc32))
# Insert metadata
metadata = [0 for i in range(512)]
metadata[0] = crc32 & 0xff
metadata[1] = (crc32 >> 8) & 0xff
metadata[2] = (crc32 >> 16) & 0xff
metadata[3] = (crc32 >> 24) & 0xff
metadata[4] = length & 0xff
metadata[5] = (length >> 8) & 0xff
metadata[6] = (length >> 16) & 0xff
metadata[7] = (length >> 24) & 0xff
metadata[8] = jsonLength & 0xff
metadata[9] = (jsonLength >> 8) & 0xff
metadata[10] = (jsonLength >> 16) & 0xff
metadata[11] = (jsonLength >> 24) & 0xff
config = bytes(metadata) + config
open("/tmp/config.txt", "wb").write(config)
# Upload using TFTP, set large timeout
client = tftpy.TftpClient("10.10.10.10", 69)
client.upload("config", "/tmp/config.txt", timeout=30)