Hi, Richard. I have read your threads multiple times to get ideas for my mill. Either I forgot about your response or did not see a notice, but I think I read some of your comments about using a servo spindle before. The topic came up yesterday, when my brother and I were talking about machine speeds, and I mentioned how this motor is geared down and the fan screams. Have you purchased one of these servo spindle kits, or do you know of another person on the forum who has? So far, I don’t see that you have, based on reading your links. Ultimately, this will probably be the option I eventually end up with. Edit: I just found the part where you cover the details on your servo spindle motor. It sounds like we are the same…I want the machine to be quiet while I am setting up or going back and forth between working on a project sitting on my fab table and doing machining, and while I do wear ear pro for noisy work, it is still nice to minimise the noise. After decades of being around a lot of noise in the trades, I like quiet, when possible. I would love to be able to rigid tap with larger fractional sizes, maybe to 1/2 x13 if possible, and I will work with both steel and aluminum, so low end power is needed.
So far, I have not used my 833, and instead immediately tore it down to convert it. The fan on the back of the control box is annoyingly loud as well, and runs all of the time, as does the stock vfd. Earlier this year, I finally had enough of listening to the very annoying fan on the power supply for the plasma table I built. After replacing it with a popular tan and brown (don’t remember the name) fan and speed control board from amazon, it isn’t audible when the weather is nice, and when it is 100+ degrees out, the fan can be heard but is not annoying. Why did I wait so long to change out the fan on that machine? The speed control came in a 2 pack, so I used the second one for the 833 mill.
The stock fan is around 93mm, so I switched it to 120mm, to move more air at a lower speed. I removed the box and cnc plasma cut larger holes in the bottom and back, making the bottom hole 4 inches and the back hole 4-3/8 inches. Some perforated sheet scrap replaced the screen in the bottom and this stuff has larger holes as it is leftover from making a really cool custom belt guard (it has the logos for Westinghouse, General Electric, and Manchester tanks cut into the ends) for a 1947 WABCO air compressor that I restored.
The cord into the mill is only 15 gauge and I wanted a master power switch. While I have a few small contactors left over from other projects, an SSR sounded like a better idea. My dad had a couple triacs on hand, so I made a little heat sink from 1" aluminum square tube scraps and attached the triacs. That is screwed over the air inlet screen on the inside of the control box. Some old 12/3 SO or SJ cord, that I had hanging around, is the new power cable to feed the triacs (one for each phase) and the original 15 gauge cable now will be the power supply for the computer and electronics board to run the machine.
Dr. D-Flo upgraded his motor, but the weight and cost of that option is not great. He also suggested I ditch the stock vfd and buy a cheap replacement. Well, I would rather use a better one from automation direct, as I did for my 3hp 8500 surface feet per minute belt grinder. Since I had already read about the option of using a servo spindle, I didn’t want to put money into a new vfd. For now, the plan was to try the stock motor and control, especially since I’m already around $10k into this project. The 7i96S does work to control the spindle and I went ahead and made a new switch panel for the mill. While working on that, I debated whether to keep the stock vfd and put the tach display in my panel or if I should just jump right to a servo spindle. Just to get the machine going, I plasma cut what was supposed to be a quick switch panel. Later I could even make one on the cnc mill with engraved labels. It took a while to properly mount the tach. To do so, I tack welded nuts on the inside of the panel and used spacers to make the display flush, without screws in the front of the panel. Hammered spray paint was a quick finish, as I don’t have a spray booth setup for my pro quality powder coating gun.
The main power is at the top, with a blue led, the middle switch is for spindle disable/enable and red and green leds indicate the status of the switch. Red for spindle disabled. This is how my brother’s tormach mill is setup, to prevent an accident while probing. The bottom left has a switch for a power drawbar and the estop is tied in with the pendant estop. They control a relay which enables the spindle, the SSR that powers the clearpath servos, and the estop input to the mesa board. One relay, controls the red and green leds and the other relay in the photo controls the spindle run/stop wires which were originally connected to the estop on the 833 mill. There is a 24v to 12v converter mounted to the back side of the relays. It runs the fan and air valve for the power drawbar.
This wiring is just the first version. It needs cleaned up and I may replace the stranded cat 5 with shielded cable, once I know what length and number of conductors needed. Some of the cable on amazon seems questionable and the cable from automation direct is quite expensive.
I found pdf files for labels to go on various mesa boards, I think from the linuxcnc forum. These are great to have. The plywood is temporary, unless it works Actually, I don’t yet know whether the electronics panel will sit on a shelf above my machine or if I will mount it to the wall behind. Once I know, then I can build a sheet metal box.
Therman asked about the 7i84. It is a great add on for the 7i96S. The engineer at Mesa said I may not need it for a basic mill, but I decided to order at the same time to save on shipping. With the pendant and a thought that I might even want dedicated mpg wheels for each axis, 11 inputs on the main board did not seem to be enough. Therman, are you using linuxcnc? I’m not sure if the mesa boards are used for other software.
I spent a solid week or more trying to figure out the wiring for the 7i96S and the hal entries to make it work. While Dr. D-flo has great videos and a ton of info, there are some errors. Something as simple as a space missing in one or two lines, where he lists hal code, will make it not work. Another part is missing “servo-thread” and without those two words, the function will not work. It wasn’t until I figured out most of the hal, that I saw the links for his hal and ini files. It might have saved me some work if I hadn’t missed those. Instead, I kept reading the forums and trying different things to see what would work. It takes some time to learn what is a new language. The debug portion at the end of the linuxcnc error screen will tell you what file and line has the error, so you can start there.
The visual configuration does not list mode 2 for the 7i84 card and mode 3 will not allow linux cnc to run, yet it is an option. Changing the mode, allowed the use of an mpg with this card. It was easy to just use the inputs on the 7i84 and it just kind of became my default vs. the main card. It does not have leds that light up from inputs, where the 7i96S does. The hal display in linux cnc shows the status so it isn’t necessary to have leds. It was a struggle to figure out hardware vs. hal (software) issues. In mode 1, there was input from the mpg, but it was sporadic. Changing the mode fixed that, but then the hal needed the proper code to allow the software to see it.
Dr. D-flo was right about the programing being the hardest part, and I accepted that going in. It was harder than I expected. Often times, I wanted to post on the forums and ask for help, but I didn’t even know what to ask or know the proper terms. Often times, there is information left out in forum responses. They list the ingredients to make it happen, but don’t include the directions to follow to properly put it all together. Now, I understand it better, but it still stands that many posts do not really explain how the code works and instead people just list what worked for them.
Choosing inputs in the graphical setup will write code to the hal file, but often times it isn’t exactly what is needed. I copied and pasted code that worked for others, such as using two probes, and then I changed the pin address to match my board. If the graphical setup already put those pins in, it might be necessary to remove or “comment out” the code with a pound sign. As I figured it out, I removed those pins from the GUI and instead put the new code in my custom hal, to reduce the number of changes I would have to make to the main hal after using the GUI for setup.
Once, I tried to convert to probe basic, but it did not work. That was in the middle of getting the hal file set how it needed to be. Since I was stuck with getting two probes to work or the mpg to work, I figured I would try the conversion so I could learn more. I also wanted to know how hard it was to change something or to start over and convert again.
I’m still waiting on the screws and brackets from AZCNC. He said it would take 2-3 weeks to ship out, then he extended it another 2 weeks, then another 2 weeks, and now at least another week. He sounds like a nice guy and people love the kits, but I told him he should have give a longer lead time if he is that busy. Others have posted the same with delays, over the last couple years. Unfortunately, I didn’t find any other options out there, for this kit. I wish I had ordered the kit before ordering the mill.
The engineers at teknic state that clearpath servos do not work well at 5 volts due to control boards potentially running lower than advertised. They state that it may work at first but intermittent problems can show up. I talked to an engineer at Mesa and asked if they had tested clearpath with their boards. He said that their cards do put out the full 5 volts due to using good electronics, while some control boards from other companies use different electronics which may cost less and certainly can create a weaker signal.
I’m not sure how to upload text files on this forum. I want to share my hal, ini, and pin list. With the 7i84, pin 16 and 17 will run one mpg and a second can go on 18 and 19. The other inputs from the multi mpg go into any other input on the card. Dr. D-Flo talked about using only 2 input signals to control 3 variables, to set the step value on the pendant, to not use as many pins on the card. With the expansion card, there are more than enough inputs. He said that linux likes to see less inputs and he shared the hal code to combine them. I wanted to avoid the complication and just use all the pins, but I was not able to figure out if this is possible, or if linux will not accept individual inputs for all three. What is strange is that his wiring diagram seems to show that he did wire all 3 inputs for x1, x10, and x100, which doesn’t save a pin. Mine is wired the same, so it seems that one input is just ignored/not used. It would be nice to find out what the options are.
The mpg has to be wired to certain inputs for the count, but the other wires for axis and step can go anywhere. It is best to make a pin chart and pick a pin for each input or output and to note the address for your cards. This can then be setup in the GUI setup or hal file as needed.
That is all I can think of to share for others who will find this while trying to do the same project.
My questions:
Has anyone use a feedback from a servo to the mesa for errors? I would like to have each servo tied to a different input, but I’m not sure what to enter in the hal and I don’t know how linuxcnc will respond to an error. There are a few options for output from the clearpath servos. Also, how should I tie in the over travel output for the toolsetter? It is normally closed, like an estop. The hallmark probe and toolsetter are both wired to 24v+ and then to an input on the mesa. They work fine in the hal display but I don’t know how to test the probe in the axis GUI of linuxcnc. The tool setter also has an air blast, so I have assigned an output for it, but do not know what is needed in hal. I’m assuming some kind of macro might be used to trigger it right before the machine measures a tool, but I know nothing about macros or running a program. Does anyone have a recommendation for shielded signal cable? This is good stranded cat 5 cable. Are the higher cat cables shielded and what gauge wires are they? This stuff is already tiny.
PINS
7i96S
IN
00
01
02
03
04
05
hm2_7i96s.0.gpio.006.in_not estop
07
08
09
10
OUT
hm2_7i96s.0.outm.00.out-00
hm2_7i96s.0.outm.00.out-01 mist coolant
hm2_7i96s.0.outm.00.out-02 flood coolant
hm2_7i96s.0.outm.00.out-03 toolsetter air blast
hm2_7i96s.0.outm.00.out-04 spindle clockwise
hm2_7i96s.0.outm.00.out-05 spindle counter clockwise
7i84 set to mode 2 in hal
hm2_7i96s.0.7i84.0.0.input-00 Hallmark probe
hm2_7i96s.0.7i84.0.0.input-01
hm2_7i96s.0.7i84.0.0.input-02
hm2_7i96s.0.7i84.0.0.input-03
hm2_7i96s.0.7i84.0.0.input-04
hm2_7i96s.0.7i84.0.0.input-05
hm2_7i96s.0.7i84.0.0.input-06
hm2_7i96s.0.7i84.0.0.input-07
hm2_7i96s.0.7i84.0.0.input-08
hm2_7i96s.0.7i84.0.0.input-09
hm2_7i96s.0.7i84.0.0.input-10
hm2_7i96s.0.7i84.0.0.input-11
hm2_7i96s.0.7i84.0.0.input-12
hm2_7i96s.0.7i84.0.0.input-13
hm2_7i96s.0.7i84.0.0.input-14
hm2_7i96s.0.7i84.0.0.input-15
hm2_7i96s.0.7i84.0.0.input-16 multi mpg A hm2_7i96s.0.7i84.0.0.enc0.count
hm2_7i96s.0.7i84.0.0.input-17 multi mpg B hm2_7i96s.0.7i84.0.0.enc0.count
hm2_7i96s.0.7i84.0.0.input-18
hm2_7i96s.0.7i84.0.0.input-19
hm2_7i96s.0.7i84.0.0.input-20 mpg X
hm2_7i96s.0.7i84.0.0.input-21 mpg Y
hm2_7i96s.0.7i84.0.0.input-22 mpg Z
hm2_7i96s.0.7i84.0.0.input-23 mpg A (future rotary table)
hm2_7i96s.0.7i84.0.0.input-24 mpg x1
hm2_7i96s.0.7i84.0.0.input-25 mpg x10
hm2_7i96s.0.7i84.0.0.input-26 mpg x100
hm2_7i96s.0.7i84.0.0.input-27 tool setter probe
hm2_7i96s.0.7i84.0.0.input-28 tool setter overtravel
hm2_7i96s.0.7i84.0.0.input-29 x home
hm2_7i96s.0.7i84.0.0.input-30 y home
hm2_7i96s.0.7i84.0.0.input-31 z home
hm2_7i96s.0.7i84.0.0.output-00 machine is enabled - green LED on pendant
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
# Generated by PNCconf at Sat Sep 28 22:43:10 2024
# Using LinuxCNC version: Master (2.9)
# 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_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=1 num_stepgens=5 sserial_port_0=2xxxxxxx"
setp hm2_7i96s.0.pwmgen.pwm_frequency 20000
setp hm2_7i96s.0.pwmgen.pdm_frequency 6000000
setp hm2_7i96s.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
addf hm2_7i96s.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 abs.spindle servo-thread
addf lowpass.spindle servo-thread
addf hm2_7i96s.0.write servo-thread
setp hm2_7i96s.0.dpll.01.timer-us -50
setp hm2_7i96s.0.stepgen.timer-number 1
# external output signals
# --- COOLANT-MIST ---
net coolant-mist => hm2_7i96s.0.ssr.00.out-01
# --- COOLANT-FLOOD ---
net coolant-flood => hm2_7i96s.0.ssr.00.out-02
# --- SPINDLE-CW ---
net spindle-cw => hm2_7i96s.0.outm.00.out-04
# --- SPINDLE-CCW ---
net spindle-ccw => hm2_7i96s.0.outm.00.out-05
# --- MACHINE-IS-ENABLED ---
net machine-is-enabled => hm2_7i96s.0.7i84.0.0.output-00
# external input signals
# --- ESTOP-EXT ---
#net estop-ext <= hm2_7i96s.0.inm.00.input-06
# --- HOME-X ---
net home-x <= hm2_7i96s.0.7i84.0.0.input-29-not
# --- HOME-Y ---
net home-y <= hm2_7i96s.0.7i84.0.0.input-30-not
# --- HOME-Z ---
net home-z <= hm2_7i96s.0.7i84.0.0.input-31-not
#*******************
# AXIS X JOINT 0
#*******************
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
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.000500
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_7i96s.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_7i96s.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_7i96s.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_7i96s.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_7i96s.0.stepgen.00.step_type 0
setp hm2_7i96s.0.stepgen.00.control-type 1
setp hm2_7i96s.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_7i96s.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_7i96s.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_7i96s.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_7i96s.0.stepgen.00.enable
# ---setup home / limit switch signals---
net home-x => 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 JOINT 1
#*******************
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
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y.maxerror 0.000500
net y-index-enable => pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback
net y-output <= pid.y.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_7i96s.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_7i96s.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_7i96s.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_7i96s.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_7i96s.0.stepgen.01.step_type 0
setp hm2_7i96s.0.stepgen.01.control-type 1
setp hm2_7i96s.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_7i96s.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_7i96s.0.stepgen.01.velocity-cmd
net y-pos-fb <= hm2_7i96s.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_7i96s.0.stepgen.01.enable
# ---setup home / limit switch signals---
net home-y => 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 JOINT 2
#*******************
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
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.z.maxerror 0.000500
net z-index-enable => pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_7i96s.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_7i96s.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_7i96s.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_7i96s.0.stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp hm2_7i96s.0.stepgen.02.step_type 0
setp hm2_7i96s.0.stepgen.02.control-type 1
setp hm2_7i96s.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_7i96s.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_7i96s.0.stepgen.02.velocity-cmd
net z-pos-fb <= hm2_7i96s.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_7i96s.0.stepgen.02.enable
# ---setup home / limit switch signals---
net home-z => 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
#*******************
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]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable => pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---PWM Generator signals/setup---
setp hm2_7i96s.0.pwmgen.00.output-type 1
setp hm2_7i96s.0.pwmgen.00.scale [SPINDLE_0]OUTPUT_SCALE
net spindle-vel-cmd-rpm => hm2_7i96s.0.pwmgen.00.value
net spindle-enable => hm2_7i96s.0.pwmgen.00.enable
# ---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
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => 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
# ---Setup spindle at speed signals---
sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
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.0.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---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 in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---estop signals---
#net estop-out <= iocontrol.0.user-enable-out
#net estop-ext => iocontrol.0.emc-enable-in
# ---manual tool change signals---
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-number <= iocontrol.0.tool-prep-number
# ---Use external manual tool change dialog---
loadusr -W hal_manualtoolchange
net tool-change-request => hal_manualtoolchange.change
net tool-change-confirmed <= hal_manualtoolchange.changed
net tool-number => hal_manualtoolchange.number
# ---ignore tool prepare requests---
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
# --- Toolsetter ---
# hm2_7i96s.0.7i84.0.0.input-27-not
# --- Toolsetter over travel ---
# hm2_7i96s.0.7i84.0.0.input-28-not
# --- PROBE-IN ---
# hm2_7i96s.0.7i84.0.0.input-00-not
# This works to trigger signal "probe-input"
loadrt or2
addf or2.0 servo-thread
net probe-input-A or2.0.in0 <= hm2_7i96s.0.7i84.0.0.input-00-not
net probe-input-B or2.0.in1 <= hm2_7i96s.0.7i84.0.0.input-27-not
#Removed because pncconf automatically adds this line
#net probe-input motion.probe-input <= or2.0.out
net probe-input <= or2.0.out
#--- Multi axis MPG --- hm2_7i96s.0.7i84.0.0.enc0.count
# The mux4 component will be used to switch jog increment
loadrt mux4 count=1
addf mux4.0 servo-thread
# --- MPG ---
# In linux 2.8 "joints" (i.e. your motors) and axes (your directions x, y, z) are seperated.
# However, for my simple three axis mill with one motor per axis this is not particularly
# useful. We need to tie the joints to the axes (joint.0 = axis.x, joint.1 = axis.y,
# and joint.2 = axis.z)
# When jog-vel-mode is set to 0 the axis will move jog-scale
# When jog-vel-mode is set to 1 the axis will stop when the
# handwheel stops turning
setp joint.0.jog-vel-mode 0
setp joint.1.jog-vel-mode 0
setp joint.2.jog-vel-mode 0
setp axis.x.jog-vel-mode 0
setp axis.y.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.001
setp mux4.0.in1 0.01
setp mux4.0.in2 0.1
#The inputs to the mux4 component
net scale1 mux4.0.sel0 <= hm2_7i96s.0.7i84.0.0.input-25
net scale2 mux4.0.sel1 <= hm2_7i96s.0.7i84.0.0.input-26
#The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => joint.0.jog-scale => axis.x.jog-scale
net mpg-scale => joint.1.jog-scale => axis.y.jog-scale
net mpg-scale => joint.2.jog-scale => axis.z.jog-scale
#The Axis select inputs
net mpg-x joint.0.jog-enable <= axis.x.jog-enable <= hm2_7i96s.0.7i84.0.0.input-20
net mpg-y joint.1.jog-enable <= axis.y.jog-enable <= hm2_7i96s.0.7i84.0.0.input-21
net mpg-z joint.2.jog-enable <= axis.z.jog-enable <= hm2_7i96s.0.7i84.0.0.input-22
#net mpg-z joint.2.jog-enable <= axis.z.jog-enable <= hm2_7i96s.0.7i84.0.0.input-23
#The encoded output counts to the axis. Only selected axis will move.
net encoder-counts <= hm2_7i96s.0.7i84.0.0.enc0.count
net encoder-counts => joint.0.jog-counts => axis.x.jog-counts
net encoder-counts => joint.1.jog-counts => axis.y.jog-counts
net encoder-counts => joint.2.jog-counts => axis.z.jog-counts
#setp hm2_7i96s.0.0.spinout-minlim 0
#setp hm2_7i96s.0.0.spinout-maxlim 9.2
#setp hm2_7i96s.0.0.spinout-scalemax 13.2
# ---estop signals---
loadrt estop_latch
addf estop-latch.0 servo-thread
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_7i96s.0.inm.00.input-06-not
#net estop-out <= iocontrol.0.user-enable-out
#net estop-out => iocontrol.0.emc-enable-in
#net estop-ext <= hm2_7i96s.0.inm.00.input-06