Spindle Motor Advice
- BeagleBrainz
- Topic Author
- Offline
- User is blocked
Less
More
- Posts: 1437
- Thank you received: 570
15 Aug 2020 23:25 #178333
by BeagleBrainz
Spindle Motor Advice was created by BeagleBrainz
I've just ordered a belt drive kit for my BF20L (G0704 to those across the pond) and am looking to replace the stock motor.
Please don't suggest a treadmill motor, coming from the repair\service industry for exercise equipment I don't want to deal with one nor the controller.
I have been looking at a brushless DC motor here:
www.emppl.com.au/collections/brushless-d...1000w-3500rpm-m090-l
or the 750w option
www.emppl.com.au/collections/brushless-d...-750w-3500rpm-m090-m
Along with their recommended controller, on the surface it looks expensive but the supplier is in Australia, so should have a saving on delivery costs.
Or would an AC servo motor be an option such as:
dmm-store-shopify.myshopify.com/products...-75kw-ac-servo-motor
What other options are there ?
Keep in mind that almost all my milling projects have been in steel so far. If possible I would like something with a 14mm shaft
Please don't suggest a treadmill motor, coming from the repair\service industry for exercise equipment I don't want to deal with one nor the controller.
I have been looking at a brushless DC motor here:
www.emppl.com.au/collections/brushless-d...1000w-3500rpm-m090-l
or the 750w option
www.emppl.com.au/collections/brushless-d...-750w-3500rpm-m090-m
Along with their recommended controller, on the surface it looks expensive but the supplier is in Australia, so should have a saving on delivery costs.
Or would an AC servo motor be an option such as:
dmm-store-shopify.myshopify.com/products...-75kw-ac-servo-motor
What other options are there ?
Keep in mind that almost all my milling projects have been in steel so far. If possible I would like something with a 14mm shaft
Please Log in or Create an account to join the conversation.
16 Aug 2020 08:28 #178367
by rodw
Replied by rodw on topic Spindle Motor Advice
a 3 phase motor with a VFD would be the cheapest option if you can get one the right form factor.
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Topic Author
- Offline
- User is blocked
Less
More
- Posts: 1437
- Thank you received: 570
16 Aug 2020 08:34 #178369
by BeagleBrainz
Replied by BeagleBrainz on topic Spindle Motor Advice
I though of that Rod,I have one for the Myford ML7\Super 7 I'm putting together, but it weighs a ton and I'd have to upgrade the Z axis motor & drive to cope.
I'll give emppl a shout Monday and see what they reckon.
I'll give emppl a shout Monday and see what they reckon.
Please Log in or Create an account to join the conversation.
17 Aug 2020 22:53 #178544
by JohnnyCNC
Replied by JohnnyCNC on topic Spindle Motor Advice
I used this one on a Sieg X3 which is very similar to a G0704. It drives the spindle via a toothed belt geared 1:1.8 so I get 5400 rpm at the spindle. My goal was higher spindle speed and being able to do rigid tapping. Both were achieved.
DMM-DYN4 1.8kw
DMM-DYN4 1.8kw
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Topic Author
- Offline
- User is blocked
Less
More
- Posts: 1437
- Thank you received: 570
18 Aug 2020 06:14 #178569
by BeagleBrainz
Replied by BeagleBrainz on topic Spindle Motor Advice
I opted for the 750 watt from DMM, the local supplier never got back to me, could be something to do with the hipsters in Melbourne and the beverage plague.
Was going to go thru one major US supplier but they were $110 USD more for delivery than DMM.
Was going to go thru one major US supplier but they were $110 USD more for delivery than DMM.
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Topic Author
- Offline
- User is blocked
Less
More
- Posts: 1437
- Thank you received: 570
18 Aug 2020 11:25 #178595
by BeagleBrainz
Replied by BeagleBrainz on topic Spindle Motor Advice
Johnny have you any tips for setting up the DYN4 as a spindle.
I'd guess I'll also need a 7i83 for the analogue voltage to control the DNY4.
I'd guess I'll also need a 7i83 for the analogue voltage to control the DNY4.
Please Log in or Create an account to join the conversation.
20 Aug 2020 03:14 - 20 Aug 2020 03:15 #178790
by JohnnyCNC
Replied by JohnnyCNC on topic Spindle Motor Advice
I'm using a 6l25+7i76 and I did add a 7i83 for the 0-10v interface. I used the AB encoder signals sent out by the DMM drive and I added a slot type optical sensor on the spindle for the Z signal. I had to do that because of the 1:1.8 toothed belt gearing. You can probably use 1:1 gearing since the max speed on the 750 watt is 5000 rpm. On the 1.8kw it is only 3000 rpm and I could afford to trade some torque for speed.
The other thing that the docs or the tech warned about (can't remember which) was not to do quick power cycles like off then right back on again. I think I put something in the HAL to prevent that from happening but I would have to look.
This was some advice I got from DMM Tech support:
For use as spindle motor, set Integration Gain to "1" and keep it at "1". Then increase Main Gain and Speed Gain until the motion is rigid and suitable. Keep Main Gain and Speed Gain at the same value.
Make sure to install a regenerative resistor on the drive to help absorb deceleration energy from the motor. Also install a transformer or AC line reactor on the AC power input to smooth and filter the power coming into the drive.
We have a large regenerative resistor for $62 with attached specifications. The line reactor you can use something like this unit: www.automationdirect.com/adc/Shopping/Ca...ine_Reactors/LR-23P0
These are the settings I ended up with:
The other thing that the docs or the tech warned about (can't remember which) was not to do quick power cycles like off then right back on again. I think I put something in the HAL to prevent that from happening but I would have to look.
This was some advice I got from DMM Tech support:
For use as spindle motor, set Integration Gain to "1" and keep it at "1". Then increase Main Gain and Speed Gain until the motion is rigid and suitable. Keep Main Gain and Speed Gain at the same value.
Make sure to install a regenerative resistor on the drive to help absorb deceleration energy from the motor. Also install a transformer or AC line reactor on the AC power input to smooth and filter the power coming into the drive.
We have a large regenerative resistor for $62 with attached specifications. The line reactor you can use something like this unit: www.automationdirect.com/adc/Shopping/Ca...ine_Reactors/LR-23P0
These are the settings I ended up with:
Attachments:
Last edit: 20 Aug 2020 03:15 by JohnnyCNC.
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Topic Author
- Offline
- User is blocked
Less
More
- Posts: 1437
- Thank you received: 570
28 Aug 2020 07:42 #179792
by BeagleBrainz
Replied by BeagleBrainz on topic Spindle Motor Advice
Cheers mate, sorry I missed your reply. Just received my servo & driver package this week, had a bit of a play around on the bench using the DMM software.
Have a 7i74 & 7i83 on order as well as some noise filters. Just need to get a contactor with a 24v DC coil and a line reactor. The joys of living Down & Under, throw the covid thing in and it's almost impossible to buy stuff. "Stock is due in but........."
Good info on the on\off power cycles.
High speed gearing with the kit I got is 1:1 so max speed should be about 5k less whatever losses in the system. The lower gear is 1:0.647. Most of the stuff I work with is mild steel so the lower speeds should be good.
This weekend's plan is to make a replacement motor plate as the one I was supplied with the belt drive kit is for the std g0704 motor.
If it's ok I may ask about your HAL setup for the spindle just to have a base to start with.
Have a 7i74 & 7i83 on order as well as some noise filters. Just need to get a contactor with a 24v DC coil and a line reactor. The joys of living Down & Under, throw the covid thing in and it's almost impossible to buy stuff. "Stock is due in but........."
Good info on the on\off power cycles.
High speed gearing with the kit I got is 1:1 so max speed should be about 5k less whatever losses in the system. The lower gear is 1:0.647. Most of the stuff I work with is mild steel so the lower speeds should be good.
This weekend's plan is to make a replacement motor plate as the one I was supplied with the belt drive kit is for the std g0704 motor.
If it's ok I may ask about your HAL setup for the spindle just to have a base to start with.
Please Log in or Create an account to join the conversation.
30 Aug 2020 00:14 #179985
by JohnnyCNC
Replied by JohnnyCNC on topic Spindle Motor Advice
Attached are all of my .ini & .hal files that involve the spindle operation.
vc-p4s.hal
vc-posthui.hal
Warning: Spoiler!
# Generated by PNCconf at Sun Jan 12 16:23:57 2020
# Using LinuxCNC version: UNAVAILABLE
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = SiegX3
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = axis
#EMBED_TAB_NAME = GladeVCP
#EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -H gvcp_call_list.hal -x {XID} gvcp-panel.ui
PYVCP = pyvcp-panel.xml
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/john/linuxcnc/nc_files
PYVCP = pyvcp-panel.xml
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 4.000000
MIN_LINEAR_VELOCITY = 0.016670
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[HMOT]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=5i25
CARD0=hm2_5i25.0
[HAL]
HALUI = halui
HALFILE = SiegX3.hal
HALFILE = custom.hal
HALFILE = vc-p4s.hal
POSTGUI_HALFILE = postgui_call_list.hal
POSTGUI_HALGUI = vc-postgui.hal
SHUTDOWN = shutdown.hal
[HALUI]
MDI_COMMAND=G28
MDI_COMMAND=M7
MDI_COMMAND=M9
MDI_COMMAND=o100 call
MDI_COMMAND=o100 call
MDI_COMMAND=.
MDI_COMMAND=.
MDI_COMMAND=.
MDI_COMMAND=G10 L20 P1 X0
MDI_COMMAND=G10 L20 P1 Y0
MDI_COMMAND=G10 L20 P1 Z0
MDI_COMMAND=G0 X0
MDI_COMMAND=G0 Y0
MDI_COMMAND=G0 Z0
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ
[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.5
MAX_LINEAR_VELOCITY = 4.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1
#******************************************
[AXIS_X]
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
MIN_LIMIT = -0.001
MAX_LIMIT = 19.7
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
HOME_SEQUENCE=1
HOME_SEARCH_VEL = -2.0000
HOME_LATCH_VEL = .10000
BACKLASH = 0.000
# 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 = 4.20
STEPGEN_MAXACCEL = 27.20
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
STEP_SCALE = 10160.000
MIN_LIMIT = -0.001
MAX_LIMIT = 19.7
HOME_OFFSET = 0.6
#******************************************
#******************************************
[AXIS_Y]
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
MIN_LIMIT = -0.001
MAX_LIMIT = 6.92
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
HOME_SEQUENCE=1
HOME_SEARCH_VEL = -1.00000
HOME_LATCH_VEL = .10000
BACKLASH = 0.0016
# 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 = 4.2
STEPGEN_MAXACCEL = 27.2
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
STEP_SCALE = 10160.000
MIN_LIMIT = -0.001
MAX_LIMIT = 6.92
HOME_OFFSET = 1.02
#******************************************
#******************************************
[AXIS_Z]
MAX_VELOCITY = 2.6
MAX_ACCELERATION = 10.0
MIN_LIMIT = -12.5
MAX_LIMIT = 0.001
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 2.6
MAX_ACCELERATION = 10.0
HOME_SEQUENCE=0
HOME_SEARCH_VEL = 1.00000
HOME_LATCH_VEL = .10000
BACKLASH=0.0084
# 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 = 3.25
STEPGEN_MAXACCEL = 20
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
STEP_SCALE = 13062.0
MIN_LIMIT = -12.5
MAX_LIMIT = 0.001
HOME_OFFSET = 0.1
#******************************************
[SPINDLE_0]
P = 2.0
I = 4.0
D = 0.0
FF0 = 1.08
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
OUTPUT_MIN_LIMIT = -5400.0
OUTPUT_MAX_LIMIT = 5400.0
OUTPUT_SCALE = -10800
ENCODER_SCALE = 4551.111111
#((2048 * 4) / 1.8) = 4551.111111
# Using LinuxCNC version: UNAVAILABLE
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = SiegX3
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = axis
#EMBED_TAB_NAME = GladeVCP
#EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -H gvcp_call_list.hal -x {XID} gvcp-panel.ui
PYVCP = pyvcp-panel.xml
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/john/linuxcnc/nc_files
PYVCP = pyvcp-panel.xml
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 4.000000
MIN_LINEAR_VELOCITY = 0.016670
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[HMOT]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=5i25
CARD0=hm2_5i25.0
[HAL]
HALUI = halui
HALFILE = SiegX3.hal
HALFILE = custom.hal
HALFILE = vc-p4s.hal
POSTGUI_HALFILE = postgui_call_list.hal
POSTGUI_HALGUI = vc-postgui.hal
SHUTDOWN = shutdown.hal
[HALUI]
MDI_COMMAND=G28
MDI_COMMAND=M7
MDI_COMMAND=M9
MDI_COMMAND=o100 call
MDI_COMMAND=o100 call
MDI_COMMAND=.
MDI_COMMAND=.
MDI_COMMAND=.
MDI_COMMAND=G10 L20 P1 X0
MDI_COMMAND=G10 L20 P1 Y0
MDI_COMMAND=G10 L20 P1 Z0
MDI_COMMAND=G0 X0
MDI_COMMAND=G0 Y0
MDI_COMMAND=G0 Z0
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ
[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.5
MAX_LINEAR_VELOCITY = 4.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1
#******************************************
[AXIS_X]
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
MIN_LIMIT = -0.001
MAX_LIMIT = 19.7
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
HOME_SEQUENCE=1
HOME_SEARCH_VEL = -2.0000
HOME_LATCH_VEL = .10000
BACKLASH = 0.000
# 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 = 4.20
STEPGEN_MAXACCEL = 27.20
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
STEP_SCALE = 10160.000
MIN_LIMIT = -0.001
MAX_LIMIT = 19.7
HOME_OFFSET = 0.6
#******************************************
#******************************************
[AXIS_Y]
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
MIN_LIMIT = -0.001
MAX_LIMIT = 6.92
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 16.0
HOME_SEQUENCE=1
HOME_SEARCH_VEL = -1.00000
HOME_LATCH_VEL = .10000
BACKLASH = 0.0016
# 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 = 4.2
STEPGEN_MAXACCEL = 27.2
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
STEP_SCALE = 10160.000
MIN_LIMIT = -0.001
MAX_LIMIT = 6.92
HOME_OFFSET = 1.02
#******************************************
#******************************************
[AXIS_Z]
MAX_VELOCITY = 2.6
MAX_ACCELERATION = 10.0
MIN_LIMIT = -12.5
MAX_LIMIT = 0.001
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 2.6
MAX_ACCELERATION = 10.0
HOME_SEQUENCE=0
HOME_SEARCH_VEL = 1.00000
HOME_LATCH_VEL = .10000
BACKLASH=0.0084
# 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 = 3.25
STEPGEN_MAXACCEL = 20
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
STEP_SCALE = 13062.0
MIN_LIMIT = -12.5
MAX_LIMIT = 0.001
HOME_OFFSET = 0.1
#******************************************
[SPINDLE_0]
P = 2.0
I = 4.0
D = 0.0
FF0 = 1.08
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
OUTPUT_MIN_LIMIT = -5400.0
OUTPUT_MAX_LIMIT = 5400.0
OUTPUT_SCALE = -10800
ENCODER_SCALE = 4551.111111
#((2048 * 4) / 1.8) = 4551.111111
Warning: Spoiler!
#DYN4 1.8K Servo Spindle with encoder.
# Generated by PNCconf at Sun Jan 12 16:23:57 2020
# Using LinuxCNC version: 2.8Pre
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_stepgens=4 sserial_port_0=00xxxx"
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt estop_latch count=2
addf estop-latch.0 servo-thread
addf estop-latch.1 servo-thread
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt encoder
#add scale and lowpass, these will be used in custom_postgui.hal
loadrt scale count=1
loadrt lowpass count=1
loadrt abs count=1
loadrt near count=1
#loadrt not names=not.halui.spindle-stop
addf scale.0 servo-thread
addf lowpass.0 servo-thread
addf abs.0 servo-thread
addf near.0 servo-thread
#addf not.halui.spindle-stop servo-thread
#loadrt and2 names=and2.vc,and2.ena,and2.spindle-moving
loadrt and2 names=and2.vc,and2.ena
addf and2.vc servo-thread #Used by pendant
addf and2.ena servo-thread
#addf and2.spindle-moving servo-thread
loadrt or2 names=or2.spindleStart,or2.spindleStop
addf or2.spindleStart servo-thread
addf or2.spindleStop servo-thread
#limits debounce to stop false triggers
loadrt debounce cfg=2,1 #change to the number you want
setp debounce.0.delay 100 #this sets the delay 100 iterations of the servo-thread
addf debounce.0 servo-thread
#48Volt power on.
setp debounce.1.delay 125 #this sets the delay 100 iterations of the servo-thread
addf debounce.1 servo-thread
net deb-probe-in debounce.0.0.in <= hm2_5i25.0.7i76.0.0.input-05-not
net probe-in debounce.0.0.out
net probe-in => motion.probe-input
net run-touch-btn <= hm2_5i25.0.7i76.0.0.input-06 => halui.mdi-command-04
#Time delay to prevent quick enable/disable of DYN4 drive.
loadrt timedelay count=1
setp timedelay.0.on-delay .5 #float in (default: 0.5) #The time, in seconds, for which in must be true before out becomes true
setp timedelay.0.off-delay .5 #float in (default: 0.5) #The time, in seconds, for which in must be false before out becomes false
addf timedelay.0 servo-thread #Delay between command and DYN4 enable.
#// hm2_5i25.0.encoder.00
#// Parameters
setp hm2_5i25.0.encoder.00.counter-mode false
setp hm2_5i25.0.encoder.00.filter false
setp hm2_5i25.0.encoder.00.index-invert false
setp hm2_5i25.0.encoder.00.index-mask false
setp hm2_5i25.0.encoder.00.index-mask-invert false
setp hm2_5i25.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf hm2_5i25.0.write servo-thread
# external output signals
net x-home-sw <= hm2_5i25.0.7i76.0.0.input-23-not
net x-neg-limit <= hm2_5i25.0.7i76.0.0.input-24-not
net x-pos-limit <= hm2_5i25.0.7i76.0.0.input-25-not
net y-home-sw <= hm2_5i25.0.7i76.0.0.input-26-not
net y-pos-limit <= hm2_5i25.0.7i76.0.0.input-27-not
net y-neg-limit <= hm2_5i25.0.7i76.0.0.input-28-not
net z-home-sw <= hm2_5i25.0.7i76.0.0.input-29-not
net z-pos-limit <= hm2_5i25.0.7i76.0.0.input-30-not
net z-neg-limit <= hm2_5i25.0.7i76.0.0.input-31-not
net coolant-mist => hm2_5i25.0.7i76.0.0.output-00
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror .0005
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-output => pid.x.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
# ---setup home / limit switch signals---
net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
#*******************
# AXIS Y
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
setp pid.y.maxerror .0005
net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-vel-cmd => pid.y.command-deriv
net y-pos-fb => pid.y.feedback
net y-output => pid.y.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y-pos-cmd <= joint.1.motor-pos-cmd
net y-vel-cmd <= joint.1.vel-cmd
net y-output <= hm2_5i25.0.stepgen.01.velocity-cmd
net y-pos-fb <= hm2_5i25.0.stepgen.01.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---
net y-home-sw => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
#*******************
# AXIS Z
#*******************
setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
#setp pid.z.maxerror .0005
setp pid.z.maxerror .0
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-vel-cmd => pid.z.command-deriv
net z-pos-fb => pid.z.feedback
net z-output => pid.z.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_5i25.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp hm2_5i25.0.stepgen.02.step_type 0
setp hm2_5i25.0.stepgen.02.control-type 1
setp hm2_5i25.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.2.motor-pos-cmd
net z-vel-cmd <= joint.2.vel-cmd
net z-output <= hm2_5i25.0.stepgen.02.velocity-cmd
net z-pos-fb <= hm2_5i25.0.stepgen.02.position-fb
net z-pos-fb => joint.2.motor-pos-fb
net z-enable <= joint.2.amp-enable-out
net z-enable => hm2_5i25.0.stepgen.02.enable
# ---setup home / limit switch signals---
net z-home-sw => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in
#*******************
# SPINDLE S
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]OUTPUT_MAX_LIMIT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable hm2_5i25.0.encoder.00.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# ---Analog output signals/setup---
setp hm2_5i25.0.7i83.0.1.analogout5-scalemax [SPINDLE_0]OUTPUT_SCALE
setp hm2_5i25.0.7i83.0.1.analogout5-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i83.0.1.analogout5-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
net spindle-output => hm2_5i25.0.7i83.0.1.analogout5
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on and2.ena.in0 estop-latch.1.reset
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => hm2_5i25.0.encoder.00.position spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
net spindle-lockout-db estop-latch.1.ok-out => and2.ena.in1
net spindle-OK and2.ena.out => timedelay.0.in
net DYN-enable timedelay.0.out => hm2_5i25.0.7i76.0.0.output-03 hm2_5i25.0.7i83.0.1.analogena5
net spindle-Lockout hm2_5i25.0.7i76.0.0.input-07-not => estop-latch.1.fault-in
# ---Setup spindle at speed signals---
net spindle-vel-cmd-rpm-abs => near.0.in1
net spindle-fb-rpm-abs => near.0.in2
net spindle-at-speed spindle.0.at-speed <= near.0.out
setp near.0.scale 1.04
# Use ACTUAL spindle velocity from spindle encoder
# spindle-velocity bounces around so we filter it with lowpass
# spindle-velocity is signed so we use absolute component to remove sign
# ACTUAL velocity is in RPS not RPM so we scale it.
setp scale.0.gain 60
setp lowpass.0.gain .007
setp lowpass.0.load false
net spindle-vel-fb-rps hm2_5i25.0.encoder.00.velocity => scale.0.in
net spindle-fb-rpm scale.0.out => abs.0.in
net spindle-fb-rpm-abs abs.0.out => lowpass.0.in
net spindle-fb-rpm-abs-filtered lowpass.0.out
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net joint-select-a halui.joint.0.select
net x-is-homed halui.joint.0.is-homed
#net jog-x-pos halui.jog.0.plus
#net jog-x-neg halui.jog.0.minus
net jog-x-analog halui.axis.x.analog
net joint-select-b halui.joint.1.select
net y-is-homed halui.joint.1.is-homed
#net jog-y-pos halui.jog.1.plus
#net jog-y-neg halui.jog.1.minus
net jog-y-analog halui.axis.y.analog
net joint-select-c halui.joint.2.select
net z-is-homed halui.joint.2.is-homed
#net jog-z-pos halui.jog.2.plus
#net jog-z-neg halui.jog.2.minus
net jog-z-analog halui.axis.z.analog
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
#net spindle-manual-stop halui.spindle.stop
#net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
net extermal-spindle-Start hm2_5i25.0.7i76.0.0.input-08 or2.spindleStart.in1
net startSpindle or2.spindleStart.out halui.spindle.0.start
net extermal-spindle-Stop hm2_5i25.0.7i76.0.0.input-09 or2.spindleStop.in1
net stopSpindle or2.spindleStop.out halui.spindle.0.stop
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net machine-is-enabled <= motion.motion-enabled
# ---estop signals---
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_5i25.0.7i76.0.0.input-04-not
#net estop-is-activated => hm2_5i25.0.7i76.0.0.output-02
# ---manual tool change signals---
loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# Generated by PNCconf at Sun Jan 12 16:23:57 2020
# Using LinuxCNC version: 2.8Pre
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_stepgens=4 sserial_port_0=00xxxx"
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt estop_latch count=2
addf estop-latch.0 servo-thread
addf estop-latch.1 servo-thread
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt encoder
#add scale and lowpass, these will be used in custom_postgui.hal
loadrt scale count=1
loadrt lowpass count=1
loadrt abs count=1
loadrt near count=1
#loadrt not names=not.halui.spindle-stop
addf scale.0 servo-thread
addf lowpass.0 servo-thread
addf abs.0 servo-thread
addf near.0 servo-thread
#addf not.halui.spindle-stop servo-thread
#loadrt and2 names=and2.vc,and2.ena,and2.spindle-moving
loadrt and2 names=and2.vc,and2.ena
addf and2.vc servo-thread #Used by pendant
addf and2.ena servo-thread
#addf and2.spindle-moving servo-thread
loadrt or2 names=or2.spindleStart,or2.spindleStop
addf or2.spindleStart servo-thread
addf or2.spindleStop servo-thread
#limits debounce to stop false triggers
loadrt debounce cfg=2,1 #change to the number you want
setp debounce.0.delay 100 #this sets the delay 100 iterations of the servo-thread
addf debounce.0 servo-thread
#48Volt power on.
setp debounce.1.delay 125 #this sets the delay 100 iterations of the servo-thread
addf debounce.1 servo-thread
net deb-probe-in debounce.0.0.in <= hm2_5i25.0.7i76.0.0.input-05-not
net probe-in debounce.0.0.out
net probe-in => motion.probe-input
net run-touch-btn <= hm2_5i25.0.7i76.0.0.input-06 => halui.mdi-command-04
#Time delay to prevent quick enable/disable of DYN4 drive.
loadrt timedelay count=1
setp timedelay.0.on-delay .5 #float in (default: 0.5) #The time, in seconds, for which in must be true before out becomes true
setp timedelay.0.off-delay .5 #float in (default: 0.5) #The time, in seconds, for which in must be false before out becomes false
addf timedelay.0 servo-thread #Delay between command and DYN4 enable.
#// hm2_5i25.0.encoder.00
#// Parameters
setp hm2_5i25.0.encoder.00.counter-mode false
setp hm2_5i25.0.encoder.00.filter false
setp hm2_5i25.0.encoder.00.index-invert false
setp hm2_5i25.0.encoder.00.index-mask false
setp hm2_5i25.0.encoder.00.index-mask-invert false
setp hm2_5i25.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf hm2_5i25.0.write servo-thread
# external output signals
net x-home-sw <= hm2_5i25.0.7i76.0.0.input-23-not
net x-neg-limit <= hm2_5i25.0.7i76.0.0.input-24-not
net x-pos-limit <= hm2_5i25.0.7i76.0.0.input-25-not
net y-home-sw <= hm2_5i25.0.7i76.0.0.input-26-not
net y-pos-limit <= hm2_5i25.0.7i76.0.0.input-27-not
net y-neg-limit <= hm2_5i25.0.7i76.0.0.input-28-not
net z-home-sw <= hm2_5i25.0.7i76.0.0.input-29-not
net z-pos-limit <= hm2_5i25.0.7i76.0.0.input-30-not
net z-neg-limit <= hm2_5i25.0.7i76.0.0.input-31-not
net coolant-mist => hm2_5i25.0.7i76.0.0.output-00
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror .0005
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-output => pid.x.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
# ---setup home / limit switch signals---
net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
#*******************
# AXIS Y
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
setp pid.y.maxerror .0005
net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-vel-cmd => pid.y.command-deriv
net y-pos-fb => pid.y.feedback
net y-output => pid.y.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y-pos-cmd <= joint.1.motor-pos-cmd
net y-vel-cmd <= joint.1.vel-cmd
net y-output <= hm2_5i25.0.stepgen.01.velocity-cmd
net y-pos-fb <= hm2_5i25.0.stepgen.01.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---
net y-home-sw => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
#*******************
# AXIS Z
#*******************
setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
#setp pid.z.maxerror .0005
setp pid.z.maxerror .0
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-vel-cmd => pid.z.command-deriv
net z-pos-fb => pid.z.feedback
net z-output => pid.z.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_5i25.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp hm2_5i25.0.stepgen.02.step_type 0
setp hm2_5i25.0.stepgen.02.control-type 1
setp hm2_5i25.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.2.motor-pos-cmd
net z-vel-cmd <= joint.2.vel-cmd
net z-output <= hm2_5i25.0.stepgen.02.velocity-cmd
net z-pos-fb <= hm2_5i25.0.stepgen.02.position-fb
net z-pos-fb => joint.2.motor-pos-fb
net z-enable <= joint.2.amp-enable-out
net z-enable => hm2_5i25.0.stepgen.02.enable
# ---setup home / limit switch signals---
net z-home-sw => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in
#*******************
# SPINDLE S
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]OUTPUT_MAX_LIMIT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable hm2_5i25.0.encoder.00.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# ---Analog output signals/setup---
setp hm2_5i25.0.7i83.0.1.analogout5-scalemax [SPINDLE_0]OUTPUT_SCALE
setp hm2_5i25.0.7i83.0.1.analogout5-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i83.0.1.analogout5-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
net spindle-output => hm2_5i25.0.7i83.0.1.analogout5
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on and2.ena.in0 estop-latch.1.reset
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => hm2_5i25.0.encoder.00.position spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
net spindle-lockout-db estop-latch.1.ok-out => and2.ena.in1
net spindle-OK and2.ena.out => timedelay.0.in
net DYN-enable timedelay.0.out => hm2_5i25.0.7i76.0.0.output-03 hm2_5i25.0.7i83.0.1.analogena5
net spindle-Lockout hm2_5i25.0.7i76.0.0.input-07-not => estop-latch.1.fault-in
# ---Setup spindle at speed signals---
net spindle-vel-cmd-rpm-abs => near.0.in1
net spindle-fb-rpm-abs => near.0.in2
net spindle-at-speed spindle.0.at-speed <= near.0.out
setp near.0.scale 1.04
# Use ACTUAL spindle velocity from spindle encoder
# spindle-velocity bounces around so we filter it with lowpass
# spindle-velocity is signed so we use absolute component to remove sign
# ACTUAL velocity is in RPS not RPM so we scale it.
setp scale.0.gain 60
setp lowpass.0.gain .007
setp lowpass.0.load false
net spindle-vel-fb-rps hm2_5i25.0.encoder.00.velocity => scale.0.in
net spindle-fb-rpm scale.0.out => abs.0.in
net spindle-fb-rpm-abs abs.0.out => lowpass.0.in
net spindle-fb-rpm-abs-filtered lowpass.0.out
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net joint-select-a halui.joint.0.select
net x-is-homed halui.joint.0.is-homed
#net jog-x-pos halui.jog.0.plus
#net jog-x-neg halui.jog.0.minus
net jog-x-analog halui.axis.x.analog
net joint-select-b halui.joint.1.select
net y-is-homed halui.joint.1.is-homed
#net jog-y-pos halui.jog.1.plus
#net jog-y-neg halui.jog.1.minus
net jog-y-analog halui.axis.y.analog
net joint-select-c halui.joint.2.select
net z-is-homed halui.joint.2.is-homed
#net jog-z-pos halui.jog.2.plus
#net jog-z-neg halui.jog.2.minus
net jog-z-analog halui.axis.z.analog
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
#net spindle-manual-stop halui.spindle.stop
#net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
net extermal-spindle-Start hm2_5i25.0.7i76.0.0.input-08 or2.spindleStart.in1
net startSpindle or2.spindleStart.out halui.spindle.0.start
net extermal-spindle-Stop hm2_5i25.0.7i76.0.0.input-09 or2.spindleStop.in1
net stopSpindle or2.spindleStop.out halui.spindle.0.stop
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net machine-is-enabled <= motion.motion-enabled
# ---estop signals---
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_5i25.0.7i76.0.0.input-04-not
#net estop-is-activated => hm2_5i25.0.7i76.0.0.output-02
# ---manual tool change signals---
loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
vc-p4s.hal
Warning: Spoiler!
# 0---vc-p4s Control Pendant
loadusr -W vc-p4s
#loadrt and2 names=and2.vc
#addf and2.vc servo-thread
# 1---LCD reletive Coordinates
net axis.0.pos-relative halui.axis.x.pos-relative => vc-p4s.axis.0.pos-relative
net axis.1.pos-relative halui.axis.y.pos-relative => vc-p4s.axis.1.pos-relative
net axis.2.pos-relative halui.axis.z.pos-relative => vc-p4s.axis.2.pos-relative
#net axis.3.pos-relative halui.axis.a.pos-relative => vc-p4s.axis.3.pos-relative
#net axis.4.pos-relative halui.axis.b.pos-relative => vc-p4s.axis.4.pos-relative
#net axis.5.pos-relative halui.axis.c.pos-relative => vc-p4s.axis.5.pos-relative
# 2---JOG
net axis.0.jog-en vc-p4s.axis.0.jog-enable => axis.x.jog-enable joint.0.jog-enable
net axis.1.jog-en vc-p4s.axis.1.jog-enable => axis.y.jog-enable joint.1.jog-enable
net axis.2.jog-en vc-p4s.axis.2.jog-enable => axis.z.jog-enable joint.2.jog-enable
net jog-scale vc-p4s.jog-scale => joint.0.jog-scale axis.x.jog-scale
net jog-scale vc-p4s.jog-scale => joint.1.jog-scale axis.y.jog-scale
net jog-scale vc-p4s.jog-scale => joint.2.jog-scale axis.z.jog-scale
net jog-counts vc-p4s.jog-counts => joint.0.jog-counts axis.x.jog-counts
net jog-counts vc-p4s.jog-counts => joint.1.jog-counts axis.y.jog-counts
net jog-counts vc-p4s.jog-counts => joint.2.jog-counts axis.z.jog-counts
net jog.0.cont-plus vc-p4s.jog.0.plus => halui.axis.x.plus halui.joint.0.plus
net jog.0.cont-minus vc-p4s.jog.0.minus => halui.axis.x.minus halui.joint.0.minus
net jog.1.cont-plus vc-p4s.jog.1.plus => halui.axis.y.plus halui.joint.1.plus
net jog.1.cont-minus vc-p4s.jog.1.minus => halui.axis.y.minus halui.joint.1.minus
net jog.2.cont-plus vc-p4s.jog.2.plus => halui.axis.z.plus halui.joint.2.plus
net jog.2.cont-mimus vc-p4s.jog.2.minus => halui.axis.z.minus halui.joint.2.minus
net jog-speed vc-p4s.jog.velocity => halui.axis.jog-speed halui.joint.jog-speed
net motion-in-position motion.in-position => vc-p4s.is-moving
setp axis_0_max_velocity [JOINT_0]MAX_VELOCITY
setp axis_1_max_velocity [JOINT_1]MAX_VELOCITY
setp axis_2_max_velocity [JOINT_2]MAX_VELOCITY
# 3---FOR 4TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.3.jog-en vc-p4s.axis.3.jog-enable => axis.a.jog-enable joint.3.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.3.jog-scale axis.a.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.3.jog-counts axis.a.jog-counts
#net jog.3.cont-plus vc-p4s.jog.3.plus => halui.axis.a.plus halui.joint.3.plus
#net jog.3.cont-mimus vc-p4s.jog.3.minus => halui.axis.a.minus halui.joint.3.minus
#setp axis_3_max_velocity [JOINT_3]MAX_VELOCITY
# 4---FOR 5TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.4.jog-en vc-p4s.axis.4.jog-enable => axis.a.jog-enable joint.4.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.4.jog-scale axis.b.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.4.jog-counts axis.b.jog-counts
#net jog.4.cont-plus vc-p4s.jog.4.plus => halui.axis.b.plus halui.joint.4.plus
#net jog.4.cont-mimus vc-p4s.jog.4.minus => halui.axis.b.minus halui.joint.4.minus
#setp axis_4_max_velocity [JOINT_4]MAX_VELOCITY
# 5--FOR 6TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.5.jog-en vc-p4s.axis.5.jog-enable => axis.c.jog-enable joint.5.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.5.jog-scale axis.c.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.5.jog-counts axis.c.jog-counts
#net jog.5.cont-plus vc-p4s.jog.5.plus => halui.axis.c.plus halui.joint.5.plus
#net jog.5.cont-mimus vc-p4s.jog.5.minus => halui.axis.c.minus halui.joint.5.minus
#setp axis_5_max_velocity [JOINT_5]MAX_VELOCITY
# 6---FEED OVERRIDE
setp halui.feed-override.scale 0.001
net feed-enable vc-p4s.feed-override.count.enable => halui.feed-override.count-enable
net feedrate-counts vc-p4s.feedrate-counts => halui.feed-override.counts
net feed.value halui.feed-override.value => vc-p4s.feed-override.value
# 7---RAPID OVERRIDE
setp halui.rapid-override.scale 0.001
net rapid-enable vc-p4s.rapid-override.count.enable => halui.rapid-override.count-enable
net rapid-counts vc-p4s.rapid-counts => halui.rapid-override.counts
net rapid.value halui.rapid-override.value => vc-p4s.rapid-override.value
# 8---MAX VELOCITY
setp halui.max-velocity.scale 0.001
net max-enable vc-p4s.max-velocity.count.enable => halui.max-velocity.count-enable
net max-counts vc-p4s.max-counts => halui.max-velocity.counts
net max.value halui.max-velocity.value => vc-p4s.max-velocity.value
# 9---SPINDLE OVERRIDE
setp halui.spindle.0.override.scale 0.001
net spindle-enable-vc vc-p4s.spindle-override.count.enable => halui.spindle.0.override.count-enable
net spindle-counts vc-p4s.spindle-counts => halui.spindle.0.override.counts
net spindle.value halui.spindle.0.override.value => vc-p4s.spindle-override.value
# 10---PROGRAM
net program.is-idle halui.program.is-idle => vc-p4s.program.is-idle
net program.is-paused halui.program.is-paused => vc-p4s.program.is-paused
net program.is-running halui.program.is-running => vc-p4s.program.is-running
net program-start-btn halui.mode.auto and2.vc.in0 <= vc-p4s.program.run
net program-run-ok and2.vc.in1 <= halui.mode.is-auto
net remote-program-run halui.program.run <= and2.vc.out
net program.pause vc-p4s.program.pause => halui.program.pause
net program.resume vc-p4s.program.resume => halui.program.resume
net program.stop vc-p4s.program.stop => halui.program.stop
# 11---ZERO
net zero-x vc-p4s.zero-x => halui.mdi-command-05
net zero-y vc-p4s.zero-y => halui.mdi-command-06
net zero-z vc-p4s.zero-z => halui.mdi-command-07
net x-go-to-zero vc-p4s.x-go-to-zero => halui.mdi-command-08
net y-go-to-zero vc-p4s.y-go-to-zero => halui.mdi-command-09
net z-go-to-zero vc-p4s.z-go-to-zero => halui.mdi-command-10
# 12---SPINDLE
#net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
#net spindle.start-p vc-p4s.spindle.start => halui.spindle.0.start
#net spindle.stop-p vc-p4s.spindle.stop => halui.spindle.0.stop
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
##net spindle.start vc-p4s.spindle.start => halui.spindle.start
net spindle.start-p vc-p4s.spindle.start or2.spindleStart.in0
##net spindle.stop vc-p4s.spindle.stop => halui.spindle.stop
net spindle.stop-p vc-p4s.spindle.stop or2.spindleStop.in0
# 13---E-STOP
net estop vc-p4s.estop.activate => halui.estop.activate
net reset vc-p4s.estop.reset => halui.estop.reset
net estop-is-activated halui.estop.is-activated => vc-p4s.estop.is-activated
# 14---MACHINE
net machine-on vc-p4s.machine.on => halui.machine.on
net machine-off vc-p4s.machine.off => halui.machine.off
#This stops the relay that controls the 48volts from briefly clicking on while LCNC is starting.
net machine-ison halui.machine.is-on => vc-p4s.machine.ison debounce.1.0.in
net mach-on debounce.1.0.out => hm2_5i25.0.7i76.0.0.output-02 #SSR 48Volt
net DYN4-Power hm2_5i25.0.7i76.0.0.output-04 hm2_5i25.0.7i76.0.0.input-16-not #DYN4 Power
##### P4-S PENDANT SETTINGS #####
# 15---STEP SIZE, SET 0 TO SKIP
setp stepsize-1 0.0001
# DEFAULT
setp stepsize-2 0.001
setp stepsize-3 0.01
setp stepsize-4 0.1
setp stepsize-5 1
setp stepsize-6 0
setp stepsize-7 0
setp stepsize-8 0
setp stepsize-9 0
loadusr -W vc-p4s
#loadrt and2 names=and2.vc
#addf and2.vc servo-thread
# 1---LCD reletive Coordinates
net axis.0.pos-relative halui.axis.x.pos-relative => vc-p4s.axis.0.pos-relative
net axis.1.pos-relative halui.axis.y.pos-relative => vc-p4s.axis.1.pos-relative
net axis.2.pos-relative halui.axis.z.pos-relative => vc-p4s.axis.2.pos-relative
#net axis.3.pos-relative halui.axis.a.pos-relative => vc-p4s.axis.3.pos-relative
#net axis.4.pos-relative halui.axis.b.pos-relative => vc-p4s.axis.4.pos-relative
#net axis.5.pos-relative halui.axis.c.pos-relative => vc-p4s.axis.5.pos-relative
# 2---JOG
net axis.0.jog-en vc-p4s.axis.0.jog-enable => axis.x.jog-enable joint.0.jog-enable
net axis.1.jog-en vc-p4s.axis.1.jog-enable => axis.y.jog-enable joint.1.jog-enable
net axis.2.jog-en vc-p4s.axis.2.jog-enable => axis.z.jog-enable joint.2.jog-enable
net jog-scale vc-p4s.jog-scale => joint.0.jog-scale axis.x.jog-scale
net jog-scale vc-p4s.jog-scale => joint.1.jog-scale axis.y.jog-scale
net jog-scale vc-p4s.jog-scale => joint.2.jog-scale axis.z.jog-scale
net jog-counts vc-p4s.jog-counts => joint.0.jog-counts axis.x.jog-counts
net jog-counts vc-p4s.jog-counts => joint.1.jog-counts axis.y.jog-counts
net jog-counts vc-p4s.jog-counts => joint.2.jog-counts axis.z.jog-counts
net jog.0.cont-plus vc-p4s.jog.0.plus => halui.axis.x.plus halui.joint.0.plus
net jog.0.cont-minus vc-p4s.jog.0.minus => halui.axis.x.minus halui.joint.0.minus
net jog.1.cont-plus vc-p4s.jog.1.plus => halui.axis.y.plus halui.joint.1.plus
net jog.1.cont-minus vc-p4s.jog.1.minus => halui.axis.y.minus halui.joint.1.minus
net jog.2.cont-plus vc-p4s.jog.2.plus => halui.axis.z.plus halui.joint.2.plus
net jog.2.cont-mimus vc-p4s.jog.2.minus => halui.axis.z.minus halui.joint.2.minus
net jog-speed vc-p4s.jog.velocity => halui.axis.jog-speed halui.joint.jog-speed
net motion-in-position motion.in-position => vc-p4s.is-moving
setp axis_0_max_velocity [JOINT_0]MAX_VELOCITY
setp axis_1_max_velocity [JOINT_1]MAX_VELOCITY
setp axis_2_max_velocity [JOINT_2]MAX_VELOCITY
# 3---FOR 4TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.3.jog-en vc-p4s.axis.3.jog-enable => axis.a.jog-enable joint.3.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.3.jog-scale axis.a.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.3.jog-counts axis.a.jog-counts
#net jog.3.cont-plus vc-p4s.jog.3.plus => halui.axis.a.plus halui.joint.3.plus
#net jog.3.cont-mimus vc-p4s.jog.3.minus => halui.axis.a.minus halui.joint.3.minus
#setp axis_3_max_velocity [JOINT_3]MAX_VELOCITY
# 4---FOR 5TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.4.jog-en vc-p4s.axis.4.jog-enable => axis.a.jog-enable joint.4.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.4.jog-scale axis.b.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.4.jog-counts axis.b.jog-counts
#net jog.4.cont-plus vc-p4s.jog.4.plus => halui.axis.b.plus halui.joint.4.plus
#net jog.4.cont-mimus vc-p4s.jog.4.minus => halui.axis.b.minus halui.joint.4.minus
#setp axis_4_max_velocity [JOINT_4]MAX_VELOCITY
# 5--FOR 6TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.5.jog-en vc-p4s.axis.5.jog-enable => axis.c.jog-enable joint.5.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.5.jog-scale axis.c.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.5.jog-counts axis.c.jog-counts
#net jog.5.cont-plus vc-p4s.jog.5.plus => halui.axis.c.plus halui.joint.5.plus
#net jog.5.cont-mimus vc-p4s.jog.5.minus => halui.axis.c.minus halui.joint.5.minus
#setp axis_5_max_velocity [JOINT_5]MAX_VELOCITY
# 6---FEED OVERRIDE
setp halui.feed-override.scale 0.001
net feed-enable vc-p4s.feed-override.count.enable => halui.feed-override.count-enable
net feedrate-counts vc-p4s.feedrate-counts => halui.feed-override.counts
net feed.value halui.feed-override.value => vc-p4s.feed-override.value
# 7---RAPID OVERRIDE
setp halui.rapid-override.scale 0.001
net rapid-enable vc-p4s.rapid-override.count.enable => halui.rapid-override.count-enable
net rapid-counts vc-p4s.rapid-counts => halui.rapid-override.counts
net rapid.value halui.rapid-override.value => vc-p4s.rapid-override.value
# 8---MAX VELOCITY
setp halui.max-velocity.scale 0.001
net max-enable vc-p4s.max-velocity.count.enable => halui.max-velocity.count-enable
net max-counts vc-p4s.max-counts => halui.max-velocity.counts
net max.value halui.max-velocity.value => vc-p4s.max-velocity.value
# 9---SPINDLE OVERRIDE
setp halui.spindle.0.override.scale 0.001
net spindle-enable-vc vc-p4s.spindle-override.count.enable => halui.spindle.0.override.count-enable
net spindle-counts vc-p4s.spindle-counts => halui.spindle.0.override.counts
net spindle.value halui.spindle.0.override.value => vc-p4s.spindle-override.value
# 10---PROGRAM
net program.is-idle halui.program.is-idle => vc-p4s.program.is-idle
net program.is-paused halui.program.is-paused => vc-p4s.program.is-paused
net program.is-running halui.program.is-running => vc-p4s.program.is-running
net program-start-btn halui.mode.auto and2.vc.in0 <= vc-p4s.program.run
net program-run-ok and2.vc.in1 <= halui.mode.is-auto
net remote-program-run halui.program.run <= and2.vc.out
net program.pause vc-p4s.program.pause => halui.program.pause
net program.resume vc-p4s.program.resume => halui.program.resume
net program.stop vc-p4s.program.stop => halui.program.stop
# 11---ZERO
net zero-x vc-p4s.zero-x => halui.mdi-command-05
net zero-y vc-p4s.zero-y => halui.mdi-command-06
net zero-z vc-p4s.zero-z => halui.mdi-command-07
net x-go-to-zero vc-p4s.x-go-to-zero => halui.mdi-command-08
net y-go-to-zero vc-p4s.y-go-to-zero => halui.mdi-command-09
net z-go-to-zero vc-p4s.z-go-to-zero => halui.mdi-command-10
# 12---SPINDLE
#net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
#net spindle.start-p vc-p4s.spindle.start => halui.spindle.0.start
#net spindle.stop-p vc-p4s.spindle.stop => halui.spindle.0.stop
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
##net spindle.start vc-p4s.spindle.start => halui.spindle.start
net spindle.start-p vc-p4s.spindle.start or2.spindleStart.in0
##net spindle.stop vc-p4s.spindle.stop => halui.spindle.stop
net spindle.stop-p vc-p4s.spindle.stop or2.spindleStop.in0
# 13---E-STOP
net estop vc-p4s.estop.activate => halui.estop.activate
net reset vc-p4s.estop.reset => halui.estop.reset
net estop-is-activated halui.estop.is-activated => vc-p4s.estop.is-activated
# 14---MACHINE
net machine-on vc-p4s.machine.on => halui.machine.on
net machine-off vc-p4s.machine.off => halui.machine.off
#This stops the relay that controls the 48volts from briefly clicking on while LCNC is starting.
net machine-ison halui.machine.is-on => vc-p4s.machine.ison debounce.1.0.in
net mach-on debounce.1.0.out => hm2_5i25.0.7i76.0.0.output-02 #SSR 48Volt
net DYN4-Power hm2_5i25.0.7i76.0.0.output-04 hm2_5i25.0.7i76.0.0.input-16-not #DYN4 Power
##### P4-S PENDANT SETTINGS #####
# 15---STEP SIZE, SET 0 TO SKIP
setp stepsize-1 0.0001
# DEFAULT
setp stepsize-2 0.001
setp stepsize-3 0.01
setp stepsize-4 0.1
setp stepsize-5 1
setp stepsize-6 0
setp stepsize-7 0
setp stepsize-8 0
setp stepsize-9 0
vc-posthui.hal
Warning: Spoiler!
net axis_0_max_vel vc-p4s.ini.0.max.vel => ini.0.max_velocity
net axis_1_max_vel vc-p4s.ini.1.max.vel => ini.1.max_velocity
net axis_2_max_vel vc-p4s.ini.2.max.vel => ini.2.max_velocity
net axis_3_max_vel vc-p4s.ini.3.max.vel => ini.3.max_velocity
net axis_4_max_vel vc-p4s.ini.4.max.vel => ini.4.max_velocity
net axis_5_max_vel vc-p4s.ini.5.max.vel => ini.5.max_velocity
net spindle-speed hm2_5i25.0.encoder.00.count
net axis_1_max_vel vc-p4s.ini.1.max.vel => ini.1.max_velocity
net axis_2_max_vel vc-p4s.ini.2.max.vel => ini.2.max_velocity
net axis_3_max_vel vc-p4s.ini.3.max.vel => ini.3.max_velocity
net axis_4_max_vel vc-p4s.ini.4.max.vel => ini.4.max_velocity
net axis_5_max_vel vc-p4s.ini.5.max.vel => ini.5.max_velocity
net spindle-speed hm2_5i25.0.encoder.00.count
The following user(s) said Thank You: BeagleBrainz
Please Log in or Create an account to join the conversation.
30 Aug 2020 00:19 #179986
by JohnnyCNC
Replied by JohnnyCNC on topic Spindle Motor Advice
Check out the 3hp BT30 spindle that
Clough42
on youtube just put on his G0704. If I was upgrading now I would use the one he got. It is sweet!
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.159 seconds