Advanced Search

Search Results (Searched for: stepper spindle)

18 Aug 2023 16:07

Stepper-Encoder an einem Stepper via Parallelport nachrüsten

Category: Deutsch

Statusupdate

ohne Spindel / Absaugung ist das gesamte Programm ohne einen einzigen Schrittverlust durchgelaufen.
Aktuell teste ich mit drehender Spindel, aber ohne Last und ohne Absaugung.
Ich bin mal gespannt...
Auf jeden Fall wird das Problem langsam eingekreist!

+++++++++++++++++++++++++++++++++

Status update

Without spindle / suction, the entire program has run through without a single step loss.
I am currently testing with the spindle rotating, but without load and without suction.
I am curious...
In any case, the problem is slowly circled!
18 Aug 2023 11:10

Stepper-Encoder an einem Stepper via Parallelport nachrüsten

Category: Deutsch

RMU is right, first check the mechanics for binding.
Should also check and calculate the weight of the Z moving parts with spindle.
Does Z use ball screws or belts or rack and pinion?
-
You can try switching the motors/drives and do some tests, see if the problem moves to other axis.
Skipping steps can be from:
-mechanical issues like binding or scraping
-slipping joints or couplers
-motor to weak for the weight being moved
-to fast acceleration/velocity
-to low motor current
-to high motor current
-thin wires to motor
-interference on drive inputs
-to short step times
-insufficient power supply for the drive/motor
-failing drive
-motor demagnetized from heat / to much current
-motor with burned windings
12 Aug 2023 19:54
Replied by smplc on topic Spindle and encoder

Spindle and encoder

Category: Basic Configuration

How is the commanded spindle G97 matched to the tachometer RPM configured? MDI, G96 constant surface feet may be functional because of the variable speed jogging the cross slide but positive and negative travel only a short distance before the motor 0 RPM. How can the configuration be corrected from here? What about the GUI RPM twitching? Is any additional code required in the .hal and .ini files? Should the 12.2.2 PWM Spindle Speed and 12.2.6.1 Spindle Synchronized Motion code be used and edited to the 7i96s?

The X and Z axes were set up in the PncConfig as stepper motors without encoders regardless of them including encoders (1000 LPR) because their drivers have Digital Process Control. The X and Z axes calibration seems okay.
09 Aug 2023 13:53

Schaublin 125-CNC retrofit.

Category: Turning

Grrrrr I lost my post..
Darn, that just happened to me too. Had a whole essay for you :)
I appreciate being able to bounce my thoughts off you and the forum. Really helps to firm up my ideas.
I found your video about the variator. I had watched it once before (on page 32) What is actually the back gear ratio? 1:7 or 1:6.5?
Thanks for picking that Up. I said 1:7 from memory (failing). It is 1:6.5

At your high speed, what is the variator RPM range? eg something like 2200-3000 RPM = 800 RPM range?
The variator has much more authority. More like 1:4 ratio change range.

What is the variator actuator travel distance? Is it linear?
The linear screw, acts through a bellcrank on the spring loaded pulley sheath. There would be some non-linearity in the rotational motion of the bellcrank, but that is irrelvant given the non-linearity of the belt riding in the pulley, slip, belt wear, thermal expansion etc. The speed verses actuator relationship is probably ideally quadratic or exponential though. It is not linear.

I am wondering if you couldn't use one of these to sense variator position?
thesensorconnection.com/product/shock-ab...potentiometer?v=3003
We just need to work out how to sense the resistance value. A mesa THCAD could sense the voltage change with resistance very accurately if you have a spare encoder input.

I also started off with ideas about servo control of the variator. This could be done, but is unnecessary. The variator ratio changing through a 3Ph motor means that the rate of ratio change is constant. I could only alter and control that rate by replacing with servo or stepper, or approximate it with bang bang control. Given the wide range of speed control by the VFD, I dont need to finely control variator ratio. It take 5 sec to drive the variator from one stop to the other. Using 5 one second pulses, counting how many have been given gives me a 5 speed gearbox. Or with  half second pulses, it is a 10 speed, closer range gearbox.
The encoder closed loop VFD control  can deal with all the speed change between ratios.

Since it is a lathe, on CSS cuts, the spindle rpm needs to be constantly changing.

Plan A
Home the variator to an end stop on start up. Afterwards keep track of variator gear ratio by counting gear changes.
At a spindle on command, decide on high or low gear. Set it. It is fixed till next spindle stop.
Start spindle, set the variator to the lowest ratio closest to the commanded speed. Once the spindle is on speed, continue with the program.

As the facing cut progresses, linuxCNC will be increasing commanded speed, and the VFD will be increasing frequency until it approaches its limit.
At that point command the variator to speed up for 1 sec. As the VFD has much more precise and responsive control, during that sec, as the variator changes ratio at it's fixed rate (most likely too quickly), the VFD will probably reduce frequency to hold spindle RPM.
After  the variator stops adjusting,  the VFD frequency will again increase, towards its limit.
Rinse and repeat up to 5 times.

I am thinking if you can sense the actuator position, you select the back gear, then assuming say a 50 Hz VFD frequency, get as close as you can get with the varistor, then trim it with the VFD. Let the encoder feedback act on the vfd.
Adding a varistor or LVDT is still not a measure of gear ratio. You could define a function to map that value to ratio, but it would be subject to the inaccuracies of bellcrank motion, belt wear, thermal expansion, slippage due belt contamination etc. Plus, there is really no need to such accuracy in variator control, as the VFD will  compensate automatically.

The back gear is easy. Before the spindle starts, either high or low. Since that can only be based on the first speed commanded, I need to consider in any CAM PP, to stop the spindle between different types of cuts, otherwise the gearbox can be stuck in the worng range. For a really large facing path, I need to either accept 800 rpm top speed in the middle, or break the cut into two parts and stop and change gear between cuts.

Makes my head hurt again!
You and me both, but a problem shared is a problem doubled :)

Speaking of head hurting, thinking about it, the  current variator ratio could be constantly calculated. Motor RPM / VFD frequency is proportional to input voltage, so the variator input rpm is knowable in real time.
The back gear condition is known and one of two fixed ratios, and the spindle RPM is measured by the encoder, so variator output RPM is also known, and thus current ratio can be calculated.

This could be helpful. The arrays as look up tables are used in your Comp to inform Linux CNC what overall ratio to is in use, so it can scale the mapping of VFD input voltage to RPM. If I can constantly calculate that value, no look up table would be necessary.

I suspect someone is going to pop in now to inform me that I will also need to vary the PID values, as those which work with an overal drive ratio of 1:1 are completely different to those that work with 1:90, roughly the Schaublins overall rpm control range.
07 Aug 2023 16:42

Mesa 5I25 conversion

Category: CNC Machines

Hello everybody,I am currently converting the control system of a CNC machine to use Mesa components (5I25 with 7I76). At this point, I have some questions regarding the serial connections for Mesa components.The machine currently employs Leadshine DM556 stepper drivers with RS232 interface. Is it possible to control them using RS-232 from Mesa components, or would it be advisable to switch to a direct control method using STEP and DIR inputs?Furthermore, the spindle is currently controlled via SPI. Is there a compatible connection card available that would allow me to maintain the SPI connection with the Mesa 5i25?The machine features a custom-built coolant control system using I2C. Is there a feasible way to interface I2C with Mesa components?I would greatly appreciate hearing your opinions and insights on this matter, as well as any relevant experiences you might have.

 
07 Aug 2023 11:10

Remora - Rpi Software Stepping Using External Microcontroller via SPI

Category: Computers and OS's

I apologize for not clarifying my points.
My current setup on the lathe has raspberry pi 4B+ 2 GB.
Elovalvo 64 bit image.
All I/O on direct GPIO's.
i.e: Input/outputs, Steppers X&Z. Spindle PWM with Encoders PHASE-A & Index.
I am curious and eager to use Remora. especially with PC over ethernet. Once it is finalized by Dev!
07 Aug 2023 00:09
Replied by spacestate1 on topic 6040 7i76 Conversion

6040 7i76 Conversion

Category: CNC Machines

made the change and went back to the config wizard and tried a couple other settings, but it still gets the same behavior:

# Generated by PNCconf at Sun Aug  6 20:07:31 2023
# Using LinuxCNC version:  2.8
# 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="192.168.1.121" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxxxx"
setp    hm2_7i92.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt near

addf hm2_7i92.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 near.0                   servo-thread
addf hm2_7i92.0.write         servo-thread
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1

# external output signals


# external input signals


#*******************
#  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.012700

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_7i92.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i92.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i92.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i92.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i92.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.00.step_type        0
setp   hm2_7i92.0.stepgen.00.control-type     1
setp   hm2_7i92.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i92.0.stepgen.01.step_type        0
setp   hm2_7i92.0.stepgen.01.control-type     1
setp   hm2_7i92.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i92.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i92.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i92.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i92.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i92.0.stepgen.02.step_type        0
setp   hm2_7i92.0.stepgen.02.control-type     1
setp   hm2_7i92.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i92.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_7i92.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
#*******************

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

# ---digital potentiometer output signals/setup---

setp   hm2_7i92.0.7i76.0.0.spinout-minlim    [SPINDLE_0]OUTPUT_MIN_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-maxlim    [SPINDLE_0]OUTPUT_MAX_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-scalemax  [SPINDLE_0]OUTPUT_SCALE

net spindle-output      => hm2_7i92.0.7i76.0.0.spinout
net spindle-enable      => hm2_7i92.0.7i76.0.0.spinena
net spindle-ccw         => hm2_7i92.0.7i76.0.0.spindir

# ---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-out     =>  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
06 Aug 2023 20:10
Replied by spacestate1 on topic 6040 7i76 Conversion

6040 7i76 Conversion

Category: CNC Machines

here's the hal file

# Generated by PNCconf at Sun Aug  6 16:07:41 2023
# Using LinuxCNC version:  2.8
# 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="192.168.1.121" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxxxx"
setp    hm2_7i92.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt near

addf hm2_7i92.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 near.0                   servo-thread
addf hm2_7i92.0.write         servo-thread
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1

# external output signals


# external input signals


#*******************
#  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.012700

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_7i92.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i92.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i92.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i92.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i92.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.00.step_type        0
setp   hm2_7i92.0.stepgen.00.control-type     1
setp   hm2_7i92.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i92.0.stepgen.01.step_type        0
setp   hm2_7i92.0.stepgen.01.control-type     1
setp   hm2_7i92.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i92.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i92.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i92.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i92.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i92.0.stepgen.02.step_type        0
setp   hm2_7i92.0.stepgen.02.control-type     1
setp   hm2_7i92.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i92.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_7i92.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
#*******************

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
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.s.maxerror 0.012700

net spindle-index-enable  =>  pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---digital potentiometer output signals/setup---

setp   hm2_7i92.0.7i76.0.0.spinout-minlim    [SPINDLE_0]OUTPUT_MIN_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-maxlim    [SPINDLE_0]OUTPUT_MAX_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-scalemax  [SPINDLE_0]OUTPUT_SCALE

net spindle-output      => hm2_7i92.0.7i76.0.0.spinout
net spindle-enable      => hm2_7i92.0.7i76.0.0.spinena
net spindle-ccw         => hm2_7i92.0.7i76.0.0.spindir

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.03.dirsetup        [SPINDLE_0]DIRSETUP
setp   hm2_7i92.0.stepgen.03.dirhold         [SPINDLE_0]DIRHOLD
setp   hm2_7i92.0.stepgen.03.steplen         [SPINDLE_0]STEPLEN
setp   hm2_7i92.0.stepgen.03.stepspace       [SPINDLE_0]STEPSPACE
setp   hm2_7i92.0.stepgen.03.position-scale  [SPINDLE_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.03.step_type        0
setp   hm2_7i92.0.stepgen.03.control-type     1
setp   hm2_7i92.0.stepgen.03.maxaccel         [SPINDLE_0]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.03.maxvel           [SPINDLE_0]STEPGEN_MAXVEL

net spindle-enable          =>  hm2_7i92.0.stepgen.03.enable
net spindle-vel-cmd-rps     =>  hm2_7i92.0.stepgen.03.velocity-cmd
# ---Encoder feedback signals/setup---

setp    hm2_7i92.0.encoder.00.counter-mode 1
setp    hm2_7i92.0.encoder.00.filter 1
setp    hm2_7i92.0.encoder.00.index-invert 0
setp    hm2_7i92.0.encoder.00.index-mask 0
setp    hm2_7i92.0.encoder.00.index-mask-invert 0
setp    hm2_7i92.0.encoder.00.scale  [SPINDLE_0]ENCODER_SCALE

net spindle-revs             <=   hm2_7i92.0.encoder.00.position
net spindle-vel-fb-rps       <=   hm2_7i92.0.encoder.00.velocity
net spindle-vel-fb-rpm       <=   hm2_7i92.0.encoder.00.velocity-rpm
net spindle-index-enable     <=>  hm2_7i92.0.encoder.00.index-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---

net spindle-vel-cmd-rps    =>  near.0.in1
net spindle-vel-fb-rps         =>  near.0.in2
net spindle-at-speed       <=  near.0.out
setp near.0.scale 1.000000
setp near.0.difference 5.000000


#******************************
# connect miscellaneous signals
#************# Generated by PNCconf at Sun Aug  6 16:07:41 2023
# Using LinuxCNC version:  2.8
# 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="192.168.1.121" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxxxx" 
setp    hm2_7i92.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt near

addf hm2_7i92.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 near.0                   servo-thread
addf hm2_7i92.0.write         servo-thread
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1

# external output signals


# external input signals


#*******************
#  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.012700

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_7i92.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i92.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i92.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i92.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i92.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.00.step_type        0
setp   hm2_7i92.0.stepgen.00.control-type     1
setp   hm2_7i92.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i92.0.stepgen.01.step_type        0
setp   hm2_7i92.0.stepgen.01.control-type     1
setp   hm2_7i92.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i92.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i92.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i92.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i92.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i92.0.stepgen.02.step_type        0
setp   hm2_7i92.0.stepgen.02.control-type     1
setp   hm2_7i92.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i92.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_7i92.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
#*******************

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
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.s.maxerror 0.012700

net spindle-index-enable  =>  pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---digital potentiometer output signals/setup---

setp   hm2_7i92.0.7i76.0.0.spinout-minlim    [SPINDLE_0]OUTPUT_MIN_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-maxlim    [SPINDLE_0]OUTPUT_MAX_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-scalemax  [SPINDLE_0]OUTPUT_SCALE
# Generated by PNCconf at Sun Aug  6 16:07:41 2023
# Using LinuxCNC version:  2.8
# 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="192.168.1.121" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=00xxxxxx" 
setp    hm2_7i92.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt near

addf hm2_7i92.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 near.0                   servo-thread
addf hm2_7i92.0.write         servo-thread
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1

# external output signals


# external input signals


#*******************
#  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.012700

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_7i92.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i92.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i92.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i92.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i92.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.00.step_type        0
setp   hm2_7i92.0.stepgen.00.control-type     1
setp   hm2_7i92.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i92.0.stepgen.01.step_type        0
setp   hm2_7i92.0.stepgen.01.control-type     1
setp   hm2_7i92.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i92.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_7i92.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 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.012700

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_7i92.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i92.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i92.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i92.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i92.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i92.0.stepgen.02.step_type        0
setp   hm2_7i92.0.stepgen.02.control-type     1
setp   hm2_7i92.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i92.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_7i92.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i92.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_7i92.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
#*******************

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
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.s.maxerror 0.012700

net spindle-index-enable  =>  pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---digital potentiometer output signals/setup---

setp   hm2_7i92.0.7i76.0.0.spinout-minlim    [SPINDLE_0]OUTPUT_MIN_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-maxlim    [SPINDLE_0]OUTPUT_MAX_LIMIT
setp   hm2_7i92.0.7i76.0.0.spinout-scalemax  [SPINDLE_0]OUTPUT_SCALE

net spindle-output      => hm2_7i92.0.7i76.0.0.spinout
net spindle-enable      => hm2_7i92.0.7i76.0.0.spinena
net spindle-ccw         => hm2_7i92.0.7i76.0.0.spindir

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.03.dirsetup        [SPINDLE_0]DIRSETUP
setp   hm2_7i92.0.stepgen.03.dirhold         [SPINDLE_0]DIRHOLD
setp   hm2_7i92.0.stepgen.03.steplen         [SPINDLE_0]STEPLEN
setp   hm2_7i92.0.stepgen.03.stepspace       [SPINDLE_0]STEPSPACE
setp   hm2_7i92.0.stepgen.03.position-scale  [SPINDLE_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.03.step_type        0
setp   hm2_7i92.0.stepgen.03.control-type     1
setp   hm2_7i92.0.stepgen.03.maxaccel         [SPINDLE_0]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.03.maxvel           [SPINDLE_0]STEPGEN_MAXVEL

net spindle-enable          =>  hm2_7i92.0.stepgen.03.enable
net spindle-vel-cmd-rps     =>  hm2_7i92.0.stepgen.03.velocity-cmd
# ---Encoder feedback signals/setup---

setp    hm2_7i92.0.encoder.00.counter-mode 1
setp    hm2_7i92.0.encoder.00.filter 1
setp    hm2_7i92.0.encoder.00.index-invert 0
setp    hm2_7i92.0.encoder.00.index-mask 0
setp    hm2_7i92.0.encoder.00.index-mask-invert 0
setp    hm2_7i92.0.encoder.00.scale  [SPINDLE_0]ENCODER_SCALE

net spindle-revs             <=   hm2_7i92.0.encoder.00.position
net spindle-vel-fb-rps       <=   hm2_7i92.0.encoder.00.velocity
net spindle-vel-fb-rpm       <=   hm2_7i92.0.encoder.00.velocity-rpm
net spindle-index-enable     <=>  hm2_7i92.0.encoder.00.index-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---

net spindle-vel-cmd-rps    =>  near.0.in1
net spindle-vel-fb-rps         =>  near.0.in2
net spindle-at-speed       <=  near.0.out
setp near.0.scale 1.000000
setp near.0.difference 5.000000


#******************************
# 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-out     =>  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
net spindle-output      => hm2_7i92.0.7i76.0.0.spinout
net spindle-enable      => hm2_7i92.0.7i76.0.0.spinena
net spindle-ccw         => hm2_7i92.0.7i76.0.0.spindir

# Step Gen signals/setup

setp   hm2_7i92.0.stepgen.03.dirsetup        [SPINDLE_0]DIRSETUP
setp   hm2_7i92.0.stepgen.03.dirhold         [SPINDLE_0]DIRHOLD
setp   hm2_7i92.0.stepgen.03.steplen         [SPINDLE_0]STEPLEN
setp   hm2_7i92.0.stepgen.03.stepspace       [SPINDLE_0]STEPSPACE
setp   hm2_7i92.0.stepgen.03.position-scale  [SPINDLE_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.03.step_type        0
setp   hm2_7i92.0.stepgen.03.control-type     1
setp   hm2_7i92.0.stepgen.03.maxaccel         [SPINDLE_0]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.03.maxvel           [SPINDLE_0]STEPGEN_MAXVEL

net spindle-enable          =>  hm2_7i92.0.stepgen.03.enable
net spindle-vel-cmd-rps     =>  hm2_7i92.0.stepgen.03.velocity-cmd
# ---Encoder feedback signals/setup---

setp    hm2_7i92.0.encoder.00.counter-mode 1
setp    hm2_7i92.0.encoder.00.filter 1
setp    hm2_7i92.0.encoder.00.index-invert 0
setp    hm2_7i92.0.encoder.00.index-mask 0
setp    hm2_7i92.0.encoder.00.index-mask-invert 0
setp    hm2_7i92.0.encoder.00.scale  [SPINDLE_0]ENCODER_SCALE

net spindle-revs             <=   hm2_7i92.0.encoder.00.position
net spindle-vel-fb-rps       <=   hm2_7i92.0.encoder.00.velocity
net spindle-vel-fb-rpm       <=   hm2_7i92.0.encoder.00.velocity-rpm
net spindle-index-enable     <=>  hm2_7i92.0.encoder.00.index-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---

net spindle-vel-cmd-rps    =>  near.0.in1
net spindle-vel-fb-rps         =>  near.0.in2
net spindle-at-speed       <=  near.0.out
setp near.0.scale 1.000000
setp near.0.difference 5.000000


#******************************
# 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-out     =>  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******************

#  ---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-out     =>  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


in term sof the config I used step conf

screenshot of it

 
05 Aug 2023 23:09

What Do I Need for ESTOP and Safety Circuitry?

Category: Basic Configuration

Novice here with zero knowledge and experience of industrial control, please forgive the lengthy post.  I have read and searched numerous threads here as well as YouTube videos to ad nauseam and been at it since 0430 this morning with only frustration to show for it.  Here is my setup of a DIY PrintNC machine:
  • "Axis" 3-axis configuration, X, Y1, Y2, Z.
  • Mesa 7i76E.
  • 120VAC 2.2kW water-cooled spindle (Z-mounted, but not connected to VFD).
  • Huanyang VFD (powers up).
  • PNP proximity sensors at both ends of X, Y1, and Y2.  Z only has software limits defined.
    • Prox sensors wired to 3-wire PLC input module, 6-way sensor terminal block with the signals wired to Mesa digital-in.  HAL "sees" the states of the prox sensors which appropriately change when triggered.  Home and min/max limits have not been defined - yet.  That is for another day.  At the moment only software limits defined for all axis.
  • Main multi-branch power circuit enters emergency "oh sh*t" paddle switch mounted to the enclosure, much like a table saw or router table.  Pushing the paddle terminates power to the entire enclosure, everything turns off - motion and control.
  • From paddle switch, multi-branch main power circuit enters enclosure to door mounted two-position lock-out type main power rotary switch. One branch is power for typical 2-button 120VAC 24VDC coil contactor holding circuit, attached to it is all motion (VFD and D542 drivers).  Power to motion side can be killed entirely as expected with the holding circuit being turned "off".  The other phase provides power to the control side (Mesa, exhaust fan, and other peripheries).  The control side power is turned off when the main power rotary switch is turned off.
What additional hardware is needed to implement a hardware e-stop and a reset function?  I do not wish to route main 120V through e-stop buttons, rather like to keep it inside the enclosure. I only have e-stop NO/NC mushroom buttons of various styles and hole diameters.  Nothing else.  I've read the "External Power On/Off + EStop" and "Emergency STOP on mesa card 7i76e" threads several times.  Please interject and correct my understanding of how to proceed:
  • Connect a Mesa TB1 field power output (pin 0-3) to the NO in terminal of the e-stop button.  Using more than one e-stop button requires wiring the NO circuitry in parallel so that a possible malfunctioning switch along the chain does not cause an unwanted e-stop signal - the switch must be intentionally depressed by human action.
  • Connect the e-stop NO out terminal to Mesa digital-in pin (TB5 or TB6, pin number to determined for coding in HAL).  This is the e-stop pressed "event notification" signal.  In my case it is 24VDC.
  • Connect Mesa digital-out (TB5 or TB6, pin number to be determined for coding in HAL) to +VDC terminal of solid-state relay.
    Q: This and the GND connection will cause the relay to energize its coil and open (if NC relay) thereby removing the +5V signal from Mesa to the stepper drivers ENA+, thereby "disabling" them so they no longer output Step/Dir pulses to the stepper motors?  Is that its intent? 
    Q: Does not removing power to ENA+ cause the stepper motors to stop moving?  Power to them can be left on?

    Q: Do I need a SPDT or DPDT and what kind NO only, NO/NC, NC only?  I ordered two of these based on Rod's recommendation in one of the aforementioned threads, is this correct?  Ultrathin DIN Rail Relay Module, MRD-060D2, Input 4-32VDC NO
  • Connect Mesa GND to -VDC terminal of solid-state relay.I think I am a-OK to this point.  My conundrum is the "load" side of the relay.  Stepper drivers ENA+ can accept +5V~24V and they and accompanying ENA- are NOT connected on my machine.
    Q: Does that signal pulse have to come from the +5V terminal of one of the unused Mesa Step/Dir output connectors on TB2 or TB3?  Does this Step/Dir output need to be added to the system configuration if I did not select 5 steppers in configuration wizard?  It isn't being used as step/dir controller, how does the +5V terminal actually go high?
    Q: Could the signal instead come from one of the Mesa digital-out terminals of TB5 or TB6 with a buck/step-down converter reducing the 24VDC to 10VDC max and programmed in HAL appropriately?  Only need an "on" signal, right?  I suppose the buck converter is another point of possible hardware failure to contend with.
  • Connect Mesa GND to D542 ENA- terminal.
    Q: Does it actually matter the source of the Mesa ground?  Could it be a "field ground" (terminal block connected to Mesa TB1 or to TB3 supply power ground) or does it have to also come from the same unused/spare Step/Dir output connector supplying the +5V?
  • Daisy-chain connect each of the D542 stepper driver's +ENA and -ENA.
Now the part I need the most help with.  What to do with the NC branch of the E-Stop button in order to to stop I guess the power to the VFD?  Should power to it be removed entirely or should the output speed, direction, etc. to the spindle be turned "off" - and how?  Another relay and routing through Mesa?

Thank you.
Darryl
04 Aug 2023 16:03 - 04 Aug 2023 19:59

Remora - ethernet NVEM cnc board

Category: Computers and OS's

Can someone share working config.ini and friends for Linuxcnc (on PC)3axis+ 10V spindle + 3 *2 limits?
I am getting stuck somewhere between working 3axis steppers Nema23, Estop and missing spindle control in GUI but it seem to be enabling signal spindle, latency value update
This way I could work out my values and update them.
31 Jul 2023 04:38

Beginner question- spindle will sometimes move straight through stock material

Category: General LinuxCNC Questions

Could be Z axis stalling - stepper stalling, or coupler slipping.
 

x 2
Either your velocities and acceleration are too high and it misses steps when retracting against gravity or the Z axis coupler is slipping.
Either way your z axis is not fully retracting  due to lost steps or mechanical slippage.
30 Jul 2023 20:56

Beginner question- spindle will sometimes move straight through stock material

Category: General LinuxCNC Questions

You need to post the gcode files (to make sure it's not in the gcode)

Could be Z axis stalling - stepper stalling, or coupler slipping.
28 Jul 2023 20:45

Creating ATC carrousel from scratch (documented with CAD models)

Category: QtPyVCP

Hello Everyone,

It has been a year or 3 since I needed to change my machine, I've reading on the forum and so it seems linuxCNC has again evolved a lot since then. Congrats and thanks to all developers!!!

I was finally able to buy an ATC spindle and thus I have to rewire and extend my machine. First steps are of course the CAD designs of spindle and carousel, and open source wouldn't be open source if people didn't share their work, so please follow along this thread to find all parametrical cad designs I will draw to build your own carousel. I will upload them as I go along in the design. (Solidworks and .step format)

Of course I will be having some questions of my own, I have looked into the probe basic GUI and that looks awesome. For the moment I thus only have 1 question, how much pockets can the GUI of probe basic handle. I saw in most screenshots a 12 tool carrousel but I would like to build a little bigger. Up to 36 tools. Can probe basic screen show this graphically or is there a certain max of toolholders for the graphics screen? I looked to the documentation and forum but couldn't find an answer to this. Hopefully someone knows this?.

While reading through the forum past days, I think I could conclude that a stepper/Geneva drive would be best suited to keep the implementation as simple as possible. Am I correct in my assumption? As this will determine the type of design I will.make and share for others

After the designs i will step by step update how I build the entire ATC, so anybody else in need can follow this as a tutorial as I didn't find any complete tutorial to build and ATC with cad designs on the forum. I will try to do my best and try to keep a standard as high as the pro's around here.

Happy milling everyone!!!!!!

 
26 Jul 2023 00:13 - 26 Jul 2023 00:26

Boxford 190VMC conversion with Mesa 7i96S

Category: Milling Machines

A bit of an update...

The XYZ steppers are working well (using the original drivers).

There are homing switches for each axis - also now working.

The spindle is working (including stop, variable speed and direction changes).

I've connected up the lamp relay and made a custom pyvcp control for it.

This has been enough to do a couple of little milling/engraving tests under linuxcnc control. (The original manual buttons are currently disabled).

The next thing to tackle is probably the spindle encoder. The machine currently has a single slotted switch (TT OPB866T55) but has a wheel with both holes and an index slot. I guess it was intended to function only as a tachometer in this version but the manufacturer offered upgrade options.

The existing slotted switch plugs into the original main control board (which is going to be removed). So this means that the encoder will lose whatever circuit it currently has to work. I'm not sure if this switch can function directly with the Mesa card or what circuit it would need.

I'm considering replacing that single slotted switch with 3 of the TT OPB900 series as I think these can give TTL level outputs that might have a better chance of working with the Mesa card. Two would be for the quadrature signals, the third for index. I might need to make a little bracket to mount them (although it looks like the existing bracket could already mount 2 slotted switches).

Obviously it would be nice if the mill could tap holes but the spindle control seems fairly basic. It has a relay to switch the direction polarity, an enable/brake relay and a 0-10v analogue signal for speed. It probably won't ever be able to change direction quickly - it has to be stopped before it can engage the other direction.

What do you guys recommend?

I'm leaning towards slotted switches over a stand alone encoder as that will allow me to use the existing drilled wheel. Are there particular models recommended here? Also, are there any ready made pcb's that I can use to wire the slotted switches to and get a more standard encoder output?
25 Jul 2023 08:04

QTDragon operation notes

Category: Installing LinuxCNC

Hi all,

This is some feedback on my first cutting job using LinuxCNC – QTDragon GUI.

Firstly, I would like to thank those who made this GUI – it’s great, and I’m really warming to this interface.

I don’t fully know if the issues referred to in these notes are because I haven’t set it up correctly or, they are short comings or, bugs…

My machine was a CNCEST 6040, with a USB interface and Mach3. My initial step was to design and build a parallel port interface, which I did, and engraved it with Mach3. I installed it into my CNCEST Controller, replacing the USB interface.

I then installed LinuxCNC via the linuxcnc-2.8.4-buster.iso (as a dual boot). I then ran stepconf:-

Setting up the stepper motors was pretty easy, mainly because of the Test button. Also, having the computation results from the max speed, acceleration, pulse frequency etc was very helpful.

When it came to do the spindle – without a Test button, I went through that loop about 10+ times…

Looking at several GUIs, I thought that QTDragon would suit me best. I couldn’t find a configuration template for it, so I just manually added it into my INI file. Without adequate documentation, it was a trial-and-error process.

One thing that I really found annoying was, stepconf overwriting my changes. There should be more options about that in stepconf or, a custom INI file with additional settings…

My first cutting job – engrave a spare parallel interface board.

The NC uses probing to generate Z offsets, with 90 (10 x 9 grid) probe points. When running, I’d randomly get this Error - “Probe tripped during non-probe move.”, and the machine couldn’t complete the 90 probes. QTDragon didn’t help – the highlighted Gcode line is wrong, it would rewind back to the start on this error.

Sample GCode
...
G1 X41.16252 Y2.095 F1000
G38.2 Z-1 F5
G0 Z2


I changed the GUI to AXIS which showed the error was occurring with G0 Z2

I’m using the engraving tool as the probe (not spinning), and PCB is sitting on 1.0mm double-sided foam tape.

In this case, it should NOT produce this error. Also, it should NOT rewind the program – it should go to the Pause state allowing the Resume command…

Drilling the PCB – The software that generates the drill code embeds manual tool change coding.

I don’t have an automated tool changer, I need to do this manually. The code raises the spindle to a height for me to change the tool, but now I need to zero Z. QTDragon won’t allow me to move the Z axis while in Auto mode. When I change it to Manual mode, it rewinds the program!!!

The finished board is really good, and I’m very happy with it. Much better than the Mach3 board.

I hope the above info can be used to improve this product. And perhaps improve me too!

Kind regards
Pedro
 
Displaying 136 - 150 out of 176 results.
Time to create page: 1.534 seconds
Powered by Kunena Forum