Search Results (Searched for: stepper spindle)
- PostavCNC
03 Mar 2025 08:05
Replied by PostavCNC on topic Stepper as a spindle
Stepper as a spindle
Category: HAL
Hi, there, I am trying to follow step in this thread to set up stepper as a spindle. But the spindle stepper is not turning. I have tried to add this line as you mentioned. The LinuxCNC has a problem with s-output => spindle.0.on. Do you have any idea what I should have fix or add to hal in order to work properly. Thank you very much in advance.
- dfarnainekl
- dfarnainekl
23 Feb 2025 13:33
EtherCAT Closed-Loop Drive Options for Lathe was created by dfarnainekl
EtherCAT Closed-Loop Drive Options for Lathe
Category: EtherCAT
Hello,
I am new to the CNC world, and would like to convert my small-ish lathe to CNC.
I think motors with around 2Nm for Z and around 0.6Nm for X will be sufficient, based on some preliminary measurements. For X I am constrained to Nema 17 size to be able to integrate them well.
For I/O and the spindle encoder, I would like to use a Raspberrry Pi and Beckhoff EtherCAT terminals, which I have already gotten to work (thanks for all the great ressources on here!). I would also like to use EtherCAT-connected drives for the axis (and maybe later the spindle), though I am unsure, which path to take there.
Initially, I was looking at closed-loop stepper drivers such as the Rtelligent ECT60 or the Lichuan CL3-E57H , which close the loop on the driver. But then I also found the Beckhoff stepper terminals EL7041 and EL7047 , which would make integration quite elegant as I am already using other Beckhoff terminals. With these however, I am not quite sure if they support closing the loop on the driver. The EL7041 manual mentions some closed-loop control aspects (differing between the standard and the -1000 model), but I don't fully understand what it actually can and can't do. The EL7047 supports closed loop in conjunction with FOC, but it is officially only supported with Beckhoff motors and requires them to be unloaded on startup for referencing. I could not find out if non-FOC closed-loop operation similar to the ECT60 or CL3-E57H is possible as well.
What approach would you recommend here?
In general (e.g. if the Beckhoff drivers can only act as open loop drivers with encoder interfaces), is it advisable close the loop in LinuxCNC when using such an EtherCAT based setup without any FPGA for low level control?
Another option would be AC servo drives (probably the Lichuan ones due to their comparable cost), at least for the Z axis as I haven't found a Nema 17 sized option that would fit X. These would probably provide better performance, but seem more complex to set up and tune.
What do you think about this alternative?
I am looking forward to your comments, and hope the questions are specific enough. Please let me know if any details are missing.
Best Regards
Daniel
I am new to the CNC world, and would like to convert my small-ish lathe to CNC.
I think motors with around 2Nm for Z and around 0.6Nm for X will be sufficient, based on some preliminary measurements. For X I am constrained to Nema 17 size to be able to integrate them well.
For I/O and the spindle encoder, I would like to use a Raspberrry Pi and Beckhoff EtherCAT terminals, which I have already gotten to work (thanks for all the great ressources on here!). I would also like to use EtherCAT-connected drives for the axis (and maybe later the spindle), though I am unsure, which path to take there.
Initially, I was looking at closed-loop stepper drivers such as the Rtelligent ECT60 or the Lichuan CL3-E57H , which close the loop on the driver. But then I also found the Beckhoff stepper terminals EL7041 and EL7047 , which would make integration quite elegant as I am already using other Beckhoff terminals. With these however, I am not quite sure if they support closing the loop on the driver. The EL7041 manual mentions some closed-loop control aspects (differing between the standard and the -1000 model), but I don't fully understand what it actually can and can't do. The EL7047 supports closed loop in conjunction with FOC, but it is officially only supported with Beckhoff motors and requires them to be unloaded on startup for referencing. I could not find out if non-FOC closed-loop operation similar to the ECT60 or CL3-E57H is possible as well.
What approach would you recommend here?
In general (e.g. if the Beckhoff drivers can only act as open loop drivers with encoder interfaces), is it advisable close the loop in LinuxCNC when using such an EtherCAT based setup without any FPGA for low level control?
Another option would be AC servo drives (probably the Lichuan ones due to their comparable cost), at least for the Z axis as I haven't found a Nema 17 sized option that would fit X. These would probably provide better performance, but seem more complex to set up and tune.
What do you think about this alternative?
I am looking forward to your comments, and hope the questions are specific enough. Please let me know if any details are missing.
Best Regards
Daniel
- 109jb
- 109jb
21 Feb 2025 04:52 - 21 Feb 2025 04:54
Replied by 109jb on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
Category: Installing LinuxCNC
I have been reading a lot about options with the RPi and LinuxCNC, and am just getting more confused so I thought I would just ask a couple of hopefully simple questions.
I have a 3-axis (sometimes 4 axis) mill currently running LinuxCNC on an OrangePi. It has been run with GRBL on an arduino, and an old PC with LinuxCNC. The current setup works okay with the OrangePi but the interface lags and I have some mods I want to eventually do to my mill. I have the newest official RPi image running on a RPi 4b. I need to eventually marry this to an external motion board but I decided to start off with software stepping using a Pi hat, but I know that won't last long. Basically I'm done screwing around and want to setup a system that is capable and expandable EASILY.
I've been looking at the Mesa 7C81 but that is probably overkill for my purposes, but if it is truly as easy as it seems it may be my final choice. So first question is if setup of the 7C81 is as easy as it seems with the PNC config wizard?
Second question I have is whether I have missed another option that is less overkill. Here is what I eventually "complete" my mill
I have a 3-axis (sometimes 4 axis) mill currently running LinuxCNC on an OrangePi. It has been run with GRBL on an arduino, and an old PC with LinuxCNC. The current setup works okay with the OrangePi but the interface lags and I have some mods I want to eventually do to my mill. I have the newest official RPi image running on a RPi 4b. I need to eventually marry this to an external motion board but I decided to start off with software stepping using a Pi hat, but I know that won't last long. Basically I'm done screwing around and want to setup a system that is capable and expandable EASILY.
I've been looking at the Mesa 7C81 but that is probably overkill for my purposes, but if it is truly as easy as it seems it may be my final choice. So first question is if setup of the 7C81 is as easy as it seems with the PNC config wizard?
Second question I have is whether I have missed another option that is less overkill. Here is what I eventually "complete" my mill
- LinuxCNC running with touchscreen interface without lag or problems. Would eventually like on-screen keyboard with a wireless keyboard/mouse usable if needed.
- 4 closed loop steppers (XYZ and a rotary table)
- 7 home/limit switches (2 each on XYZ, 1 on rotary table)
- Spindle control (VFD)
- Spindle encoder for tapping.
- 3 encoder wheels (for using the machine as a pseudo manual machine)
- Maybe a dozen or so switches/buttons for input to LinuxCNC
- Only need about 40 kHz stepping rate max.
Should I just stop thinking about it and buy the 7C81 when it comes back into stock? Or is there an almost as easy solution that will fit the above needs.
BTW, I am also planning to CNC my lathe and would want to duplicate the setup the mill has on the lathe so I don't have to relearn anything.
Thanks in advance.
- MTTI
17 Feb 2025 08:16
But i'm not an expert in this type of configuration...
Replied by MTTI on topic New and Working RTAI debs for 2.9
New and Working RTAI debs for 2.9
Category: Installing LinuxCNC
You're right, into the HAL file, there is only mention of servo-thread:
Thanks for this answer.
I would like to install RTAI due to the jitter in my setup, which is around 70k.
I'm using 4 stepper motors with encoders (closed loop) and a USC board from PICO.
Sometimes, though not very often, I get an "Unexpected realtime delay" message.
Do you think this could be related to the jitter amount?
I've tried every optimization I could find in the BIOS...
Just having a look at the PICO config, is the base thread used ? From a quick look nothing appears to attach to the base thread. Which would lead me to think that a simple RT_PREEMPT kernel would be suffice. The PICO board would seem to operate in a simialr way to a mesa 7i90 using the EPP protocol. IE using the parallel port to send timing info to a FPGA.
# Generated by stepconf 1.1 at Tue Jan 28 10:21:07 2025
# Si vous modifiez ce fichier, il sera
# écrasé quand vous relancerez Stepconf
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_spindles=[TRAJ]SPINDLES
# next load the PID module, for four PID loops
loadrt pid num_chan=4
loadrt plasmac
loadrt hal_ppmc epp_dir=1
# make some signals for the scope for tuning.
loadrt ddt count=4
# add components for E-stop logic
loadrt estop_latch count=1
loadrt and2 count=1
# set up the realtime thread
# read inputs first
addf ppmc.0.read servo-thread
# then run the motion controller
addf motion-command-handler servo-thread
addf and2.0 servo-thread
addf estop-latch.0 servo-thread
addf motion-controller servo-thread
# then the PID loops
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
# write outputs last
addf ppmc.0.write servo-thread
# ---PLASMA INPUT DEBOUNCE---
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread
# ---JOINT ASSOCIATED WITH THE Z AXIS---
net plasmac:axis-position joint.2.pos-fb => plasmac.axis-z-position
# ---PLASMA INPUTS---
# ---all modes---
net plasmac:float-switch => db_float.in
net plasmac:breakaway => db_breakaway.in
net plasmac:ohmic-probe => db_ohmic.in
net plasmac:ohmic-sense-in => plasmac.ohmic-sense-in
# ---modes 0 & 1
net plasmac:arc-voltage-in => plasmac.arc-voltage-in
# ---modes 1 & 2
net plasmac:arc-ok-in => db_arc-ok.in
# ---mode 2
net plasmac:move-up => plasmac.move-up
net plasmac:move-down => plasmac.move-down
# ---PLASMA OUTPUTS---
# ---all modes---
net plasmac:ohmic-enable <= plasmac.ohmic-enable
net plasmac:scribe-arm <= plasmac.scribe-arm
net plasmac:scribe-on <= plasmac.scribe-on
# connect limit/home switch outputs to motion controller
net Xminlim <= ppmc.0.din.01.in
net Xminlim => joint.0.neg-lim-sw-in
net Xmaxlim <= ppmc.0.din.02.in
net Xmaxlim => joint.0.pos-lim-sw-in
net Xhome <= ppmc.0.din.00.in
net Xhome => joint.0.home-sw-in
net Yminlim <= ppmc.0.din.05.in
net Yminlim => joint.1.neg-lim-sw-in
net Ymaxlim <= ppmc.0.din.06.in
net Ymaxlim => joint.1.pos-lim-sw-in
net Yhome <= ppmc.0.din.04.in
net Yhome => joint.1.home-sw-in
net Zminlim <= ppmc.0.din.09.in
net Zminlim => joint.2.neg-lim-sw-in
net Zmaxlim <= ppmc.0.din.10.in
net Zmaxlim => joint.2.pos-lim-sw-in
net Zhome <= ppmc.0.din.08.in
net Zhome => joint.2.home-sw-in
net Aminlim <= ppmc.0.din.12.in
net Aminlim => joint.3.neg-lim-sw-in
net Amaxlim <= ppmc.0.din.13.in
net Amaxlim => joint.3.pos-lim-sw-in
net Ahome <= ppmc.0.din.11.in
net Ahome => joint.3.home-sw-in
# connect index pulses to motion controller
# uncomment these lines only if you have a Rev 2 USC board
# newsig Xindex bit
# newsig Yindex bit
# newsig Zindex bit
# newsig Aindex bit
# linksp Xindex <= ppmc.0.encoder.00.index-enable
# linksp Xindex => joint.0.index-enable
# linksp Yindex <= ppmc.0.encoder.01.index-enable
# linksp Yindex => joint.1.index-enable
# linksp Zindex <= ppmc.0.encoder.02.index-enable
# linksp Zindex => joint.2.index-enable
# linksp Aindex <= ppmc.0.encoder.03.index-enable
# linksp Aindex => joint.3.index-enable
#
# Connect I/O controller I/Os
#
# connect e-stop write/sense to I/O controller
# and univstep's fault with estop's output, so estop FF is reset, but
# prevent continued estop signal from univstep from holding FF cleared
net ppmcEstop ppmc.0.din.15.in-not
net ppmcEstop and2.0.in0
net EstopOkIn estop-latch.0.fault-in
net EstopOkIn and2.0.out
net EstopOkOut <= ppmc.0.dout.07.out
net EstopOkOut iocontrol.0.emc-enable-in
net EstopOkOut estop-latch.0.ok-out
net EstopOkOut and2.0.in1
net emc-estop-out iocontrol.0.user-enable-out
net emc-estop-out estop-latch.0.ok-in
net emc-estop-reset iocontrol.0.user-request-enable
net emc-estop-reset estop-latch.0.reset
net emc-estop-out estop-latch.0.ok-in
# connect spindle fwd/rev to I/O controller
net SpindleFwd <= ppmc.0.dout.00.out
net SpindleFwd => spindle.0.forward
net SpindleRev <= ppmc.0.dout.01.out
net SpindleRev => spindle.0.reverse
# connect spindle brake to I/O controller
net SpindleBrakeOn <= ppmc.0.dout.02.out
net SpindleBrakeOn => spindle.0.brake
# connect mist/flood coolant to I/O controller
net MistOn <= ppmc.0.dout.03.out
net MistOn => iocontrol.0.coolant-mist
net FloodOn <= ppmc.0.dout.04.out
net FloodOn => iocontrol.0.coolant-flood
# connect position feedback signals to encoders
net Xpos-fb <= ppmc.0.encoder.00.position
net Ypos-fb <= ppmc.0.encoder.01.position
net Zpos-fb <= ppmc.0.encoder.02.position
net Apos-fb <= ppmc.0.encoder.03.position
# get feedback scaling from ini file
setp ppmc.0.encoder.00.scale [JOINT_0]INPUT_SCALE
setp ppmc.0.encoder.01.scale [JOINT_1]INPUT_SCALE
setp ppmc.0.encoder.02.scale [JOINT_2]INPUT_SCALE
setp ppmc.0.encoder.03.scale [JOINT_3]INPUT_SCALE
# connect PID output signals to step generators
net Xoutput => ppmc.0.stepgen.00.velocity
net Youtput => ppmc.0.stepgen.01.velocity
net Zoutput => ppmc.0.stepgen.02.velocity
net Aoutput => ppmc.0.stepgen.03.velocity
# connect axis enables to step generators
net Xenable => ppmc.0.stepgen.00.enable
net Yenable => ppmc.0.stepgen.01.enable
net Zenable => ppmc.0.stepgen.02.enable
net Aenable => ppmc.0.stepgen.03.enable
# set output scaling from ini file
# input and output scales should (normally) be the same for a USC
setp ppmc.0.stepgen.00.scale [JOINT_0]OUTPUT_SCALE
setp ppmc.0.stepgen.01.scale [JOINT_1]OUTPUT_SCALE
setp ppmc.0.stepgen.02.scale [JOINT_2]OUTPUT_SCALE
setp ppmc.0.stepgen.03.scale [JOINT_3]OUTPUT_SCALE
# add a couple of tuning test links
# if these are useful will want to add them to the other axes as well
# or make these setup with the tuning script
# net Xoutput ddt.0.in
# net Xpos-fb ddt.1.in
# HAL config file for servos -- expanded from core_servo.hal
# for a full four axis setup
# create four position feedback signals
# connect position feedback to PID loop
net Xpos-fb => pid.0.feedback
net Ypos-fb => pid.1.feedback
net Zpos-fb => pid.2.feedback
net Apos-fb => pid.3.feedback
# connect position feedback to motion module
net Xpos-fb => joint.0.motor-pos-fb
net Ypos-fb => joint.1.motor-pos-fb
net Zpos-fb => joint.2.motor-pos-fb
net Apos-fb => joint.3.motor-pos-fb
# create PID to DAC output signals
# connect output signals to output of PID loops
net Xoutput <= pid.0.output
net Youtput <= pid.1.output
net Zoutput <= pid.2.output
net Aoutput <= pid.3.output
# set PID loop output limits to +/-1.00
setp pid.0.maxoutput [JOINT_0]PID_MAX_VEL
setp pid.1.maxoutput [JOINT_1]PID_MAX_VEL
setp pid.2.maxoutput [JOINT_2]PID_MAX_VEL
setp pid.3.maxoutput [JOINT_3]PID_MAX_VEL
# set PID loop gains
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.2.Pgain [JOINT_2]P
setp pid.2.Igain [JOINT_2]I
setp pid.2.Dgain [JOINT_2]D
setp pid.2.bias [JOINT_2]BIAS
setp pid.2.FF0 [JOINT_2]FF0
setp pid.2.FF1 [JOINT_2]FF1
setp pid.2.FF2 [JOINT_2]FF2
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.3.Pgain [JOINT_3]P
setp pid.3.Igain [JOINT_3]I
setp pid.3.Dgain [JOINT_3]D
setp pid.3.bias [JOINT_3]BIAS
setp pid.3.FF0 [JOINT_3]FF0
setp pid.3.FF1 [JOINT_3]FF1
setp pid.3.FF2 [JOINT_3]FF2
setp pid.3.deadband [JOINT_3]DEADBAND
# create four position command signals
# connect position commands to motion controller
net Xpos-cmd <= joint.0.motor-pos-cmd
net Ypos-cmd <= joint.1.motor-pos-cmd
net Zpos-cmd <= joint.2.motor-pos-cmd
net Apos-cmd <= joint.3.motor-pos-cmd
# connect position commands to PID input
net Xpos-cmd => pid.0.command
net Ypos-cmd => pid.1.command
net Zpos-cmd => pid.2.command
net Apos-cmd => pid.3.command
# create bit signals to enable/disable the PID loops
# connect the signals to the motion controller
net Xenable <= joint.0.amp-enable-out
net Yenable <= joint.1.amp-enable-out
net Zenable <= joint.2.amp-enable-out
net Aenable <= joint.3.amp-enable-out
# connect the signals to the PID blocks
net Xenable => pid.0.enable
net Yenable => pid.1.enable
net Zenable => pid.2.enable
net Aenable => pid.3.enable
But i'm not an expert in this type of configuration...
- Aciera
16 Feb 2025 10:00
Replied by Aciera on topic Using A axis as second spindle with stepper motor
Using A axis as second spindle with stepper motor
Category: Advanced Configuration
There have been a few threads about switching a rotary axis to spindle mode and back. Currently there is no standard solution that fits all scenarios.
This might give you an entry point:
forum.linuxcnc.org/26-turning/55148-lath...g-and-milling#319940
This might give you an entry point:
forum.linuxcnc.org/26-turning/55148-lath...g-and-milling#319940
- ashford
- ashford
16 Feb 2025 00:12 - 16 Feb 2025 00:19
home switch setup on gantry mill was created by ashford
home switch setup on gantry mill
Category: Basic Configuration
preamble:
i am converting an mr1 to linux cnc via 7i96s. the y axis is parallel stepper motors. y2 and z home switches are nc type and in series. the box i am making is all new drivers/power supplies only thing i will be reusing out of the factory box is the vfd for the spindle. i want this to be a plug and play so i can swap back to stock box if needed. dealing with code is not completely forign to me but the last time i did anything serious was in msbasic, and a little dabbing into megasquirt engine control.
im not sure the best way to set up the homeing switches. i tried
1. assigning net home-y2 <= hm2_7i96s.0.inm.00.input-03-not and
net home-z <= hm2_7i96s.0.inm.00.input-03-not
did not work gave errors
2.checking home is shared on y2 and z and only asigning an input to z. did not work either
3. tied 2 inputs together and asigned them each as y2 and z
worked but don't seem right to me
4. in z axis joint3 i put
net home-y2 => joint.3.home-sw-in and home is shared
that works but does not seem right.
what is the best way to do this, or is there another way
i am converting an mr1 to linux cnc via 7i96s. the y axis is parallel stepper motors. y2 and z home switches are nc type and in series. the box i am making is all new drivers/power supplies only thing i will be reusing out of the factory box is the vfd for the spindle. i want this to be a plug and play so i can swap back to stock box if needed. dealing with code is not completely forign to me but the last time i did anything serious was in msbasic, and a little dabbing into megasquirt engine control.
im not sure the best way to set up the homeing switches. i tried
1. assigning net home-y2 <= hm2_7i96s.0.inm.00.input-03-not and
net home-z <= hm2_7i96s.0.inm.00.input-03-not
did not work gave errors
2.checking home is shared on y2 and z and only asigning an input to z. did not work either
3. tied 2 inputs together and asigned them each as y2 and z
worked but don't seem right to me
4. in z axis joint3 i put
net home-y2 => joint.3.home-sw-in and home is shared
that works but does not seem right.
what is the best way to do this, or is there another way
- tommy
- tommy
14 Feb 2025 13:57 - 15 Feb 2025 10:44
Pico UPC + USC + PWM servo Amp For sale was created by tommy
Pico UPC + USC + PWM servo Amp For sale
Category: User Exchange
1x Universal Stepper Controller
1x Universal PWM Controller
4x PWM Servo Amplifier
1x Spindle DAC
1x PCI-e card + cable
For specs visit: picosystems.store/shop/
Price: 350eur + shipping in EU (from Slovenia).
tomaz_ti1(at)hotmail.com
1x Universal PWM Controller
4x PWM Servo Amplifier
1x Spindle DAC
1x PCI-e card + cable
For specs visit: picosystems.store/shop/
Price: 350eur + shipping in EU (from Slovenia).
tomaz_ti1(at)hotmail.com
- kor
- kor
14 Feb 2025 11:45
Replied by kor on topic Mesa with Ethercad connection
Mesa with Ethercad connection
Category: Driver Boards
In my opinion it does not make the mesa cards obsolete. yes digital servos don't need the step/dir or analog interfaces of standard mesa cards. But that is not the point. In my opinion mesa cards are not used in professional of the shelf solutions anyway. So it is the hobby and semi professional market mesa is addressing.
When your controller of an old machine breaks do you replace everything? or do you replace the broken parts with new stuff. Here having the option to go with ethercad would be great.
When you build your own machine you most likely will only use a digital spindle servo and not one on all axes to keep the cost down.
When you want to add stuff for automation the ability to add steppers is huge due to the low cost. And everyone has them laying around who works with automation. I once hacked together a system which pneumatically unlocked a clamp and advanced a square profile for the next part with two rubber wheels and two steppers. Cheap and fast.
Right now my main motivation is linear encoders.
When your controller of an old machine breaks do you replace everything? or do you replace the broken parts with new stuff. Here having the option to go with ethercad would be great.
When you build your own machine you most likely will only use a digital spindle servo and not one on all axes to keep the cost down.
When you want to add stuff for automation the ability to add steppers is huge due to the low cost. And everyone has them laying around who works with automation. I once hacked together a system which pneumatically unlocked a clamp and advanced a square profile for the next part with two rubber wheels and two steppers. Cheap and fast.
Right now my main motivation is linear encoders.
- schorsch
- schorsch
12 Feb 2025 19:51
Using A axis as second spindle with stepper motor was created by schorsch
Using A axis as second spindle with stepper motor
Category: Advanced Configuration
Hi,
I'm using linuxcnc since a while. I upgraded a few weeks ago: Now I'm using a Rpi and a MESA 7C81. I'm having 3 axis and a fixed vertical spindle motor and a separated a-axis. All 4 axes are running with stepper motors.
I'm using inventor-hsm for creating G-code which works pretty good. Unfortunately, it is very limited, when using it in connection with the A-axis. Although the software is able to unwrap a geometry I can only run it to mill out closed pocked (also when it is wrapped). Very frequently I need to reduce a diameter and there is no operation available for this. I can only do this in indexed mode (several phi-angles and slicing in z).
Luckily the software can also produce code for turning machines, so I could create code for such a machine. The only thing I need to do is to turn on a horizontal spindle, you see my idea?
So my question:
Is there a possibility to configure linuxcnc in such a way that I can use my A-stepper axis for running as horizontal spindle?
What I need is a G-command turning the horizontal spindle on in a certain speed and a G-command for turning it of, during the turn-on the stepper needs to run continuously. I know its a bit absurd
Georg
I'm using linuxcnc since a while. I upgraded a few weeks ago: Now I'm using a Rpi and a MESA 7C81. I'm having 3 axis and a fixed vertical spindle motor and a separated a-axis. All 4 axes are running with stepper motors.
I'm using inventor-hsm for creating G-code which works pretty good. Unfortunately, it is very limited, when using it in connection with the A-axis. Although the software is able to unwrap a geometry I can only run it to mill out closed pocked (also when it is wrapped). Very frequently I need to reduce a diameter and there is no operation available for this. I can only do this in indexed mode (several phi-angles and slicing in z).
Luckily the software can also produce code for turning machines, so I could create code for such a machine. The only thing I need to do is to turn on a horizontal spindle, you see my idea?
So my question:
Is there a possibility to configure linuxcnc in such a way that I can use my A-stepper axis for running as horizontal spindle?
What I need is a G-command turning the horizontal spindle on in a certain speed and a G-command for turning it of, during the turn-on the stepper needs to run continuously. I know its a bit absurd
Georg
- rodw
11 Feb 2025 20:32
Replied by rodw on topic Mesa with Ethercad connection
Mesa with Ethercad connection
Category: Driver Boards
As the OP said, the missing piece in an Ethercat build is affordable encoder inputs for spindles. There are very few options outside of Beckhoff. I have some Beckhoff I/O but have not bought an encoder module.
There are a few I/O modules generally with 16 inputs and 16 outputs. There must be a cheap Ethercat chip they use. Examples from Deiwu and Rtelligent (I have both). Rtelligent includes some PWM outputs.
But lets face it, the main reason one goes with Ethercat is to use Ethercat servo and stepper drives so the Mesa cards with analog and step/dir interfaces are not particularly useful any more.
Using Ethercat drives reduces the need for I/O because most drives have some included I/O for home and limit switches and brakes etc. These can also be used for general I/O.
Whilst using hm2 over Ethercat should improve network latency issues with Mesa cards due to the more efficient transport layer, adding the additional complexity of Ethercat just for this does not make sense to me.
Perhaps Mesa could look at an Ethercat 7i92 equivalent that supported some existing daughter cards to give I/O, encoder, counters for MPG and analog voltage by adding a THCAD2 with its Calibration data stored in Ethercat registers? Perhaps this card would include some smart serial interfaces too?
Anyway, I'm gonna go back to fiddling with Ethercat internal homing now... After a long hiatus, I got my homing lab working last night and homing commenced as it should. I just have to work out why it didn't respond to the homing switch when it came on...
There are a few I/O modules generally with 16 inputs and 16 outputs. There must be a cheap Ethercat chip they use. Examples from Deiwu and Rtelligent (I have both). Rtelligent includes some PWM outputs.
But lets face it, the main reason one goes with Ethercat is to use Ethercat servo and stepper drives so the Mesa cards with analog and step/dir interfaces are not particularly useful any more.
Using Ethercat drives reduces the need for I/O because most drives have some included I/O for home and limit switches and brakes etc. These can also be used for general I/O.
Whilst using hm2 over Ethercat should improve network latency issues with Mesa cards due to the more efficient transport layer, adding the additional complexity of Ethercat just for this does not make sense to me.
Perhaps Mesa could look at an Ethercat 7i92 equivalent that supported some existing daughter cards to give I/O, encoder, counters for MPG and analog voltage by adding a THCAD2 with its Calibration data stored in Ethercat registers? Perhaps this card would include some smart serial interfaces too?
Anyway, I'm gonna go back to fiddling with Ethercat internal homing now... After a long hiatus, I got my homing lab working last night and homing commenced as it should. I just have to work out why it didn't respond to the homing switch when it came on...
- Esz2
- Esz2
09 Feb 2025 19:11
From Grbl to linuxcnc was created by Esz2
From Grbl to linuxcnc
Category: General LinuxCNC Questions
Im an electronics technician located in Denmark with an hobby interest in mechanical design, cnc milling and additive manufacturing.
A couple of years ago I bought an cnc router with zero experience in the field. The building and electrical parts where a breeze and the grbl controller that I bought back then was an easy thing to flash with fluidNC and get going.
Now I'm going into more advanced features and adding an self designed atc system hereby arose the need for a more capable controller. The choice settled on the Mesanet 7c80 due to form factor with the rpi and the number of i/o without the need for an daughterboard.
I have experience with rpi/arduino/esp32 projects and have worked a limited bit with commercial fpga cards before.
I have never worked with Linuxcnc before but settled on this environment and the mesa board due to:
1. active community
2. Full customization
So the big question is, where do I begin? What would be a good course of action to get going in an orderly manner?
The hardware:
clossed loop steppers and drivers
XYYZ + AB (possible used to manipulated the ATC later)
inductive sensors on all axis
several solunoidvalves (mist and air)
several relays (pumps and spindle light)
surface probe
tool lenght sensor
several failsafe and e-stops
ballscrews on all axis
The atc system will be an add on later and will not be a part of the initial setup.
The electrical part is going to be an non issue for me I have already planned this from the drawings in the 7c80 manual.
Thanks in advance
A couple of years ago I bought an cnc router with zero experience in the field. The building and electrical parts where a breeze and the grbl controller that I bought back then was an easy thing to flash with fluidNC and get going.
Now I'm going into more advanced features and adding an self designed atc system hereby arose the need for a more capable controller. The choice settled on the Mesanet 7c80 due to form factor with the rpi and the number of i/o without the need for an daughterboard.
I have experience with rpi/arduino/esp32 projects and have worked a limited bit with commercial fpga cards before.
I have never worked with Linuxcnc before but settled on this environment and the mesa board due to:
1. active community
2. Full customization
So the big question is, where do I begin? What would be a good course of action to get going in an orderly manner?
The hardware:
clossed loop steppers and drivers
XYYZ + AB (possible used to manipulated the ATC later)
inductive sensors on all axis
several solunoidvalves (mist and air)
several relays (pumps and spindle light)
surface probe
tool lenght sensor
several failsafe and e-stops
ballscrews on all axis
The atc system will be an add on later and will not be a part of the initial setup.
The electrical part is going to be an non issue for me I have already planned this from the drawings in the 7c80 manual.
Thanks in advance
- Lisov_R
- Lisov_R
07 Feb 2025 01:44
Replied by Lisov_R on topic ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board
Category: Driver Boards
I am attaching all the files of my 5-axis machine with the ability to work only with stepper motors, motors and an ecoder and in ClosedLoop mode. Spindle control via RS485 with a frequency converter. Additionally, the xhc-hb04 remote control is connected.
- Meichinger
- Meichinger
04 Feb 2025 20:23
systematic drift on arcs was created by Meichinger
systematic drift on arcs
Category: General LinuxCNC Questions
Hi Linux CNC forum,
I'm building on a small CNC for over two years now. Unfortunately, I've been running in some issues while milling circular pockets.
machine specs:
Traj XYZA
y-axis 1190 mm max travel, 20 mm ballscrew with 10 mm pitch, two 750W AC servo (HLTNC)
x-axis 900 mm max travel, 20 mm ballscrew with 10 mm pitch, one 750W AC servo (HLTNC)
z-axis 185 mm max travel, 16 mm ballscrew with 5 mm pitch, high torque nema 34 stepper
spindle - 2,2 kw rattmotor air cooled
Brain of the operation: raspberry pi 4b+ using a parallel port hat and a 5 axis breakout board
I'm running the premanufactured PI4 optimized Debian Bookworm image.
Y-axis settings as follows:
max_velocity = 5000 mm/min
max_acc = 20000 mm/min2
min limit = 0 mm
max limit = 1190 mm
stepgen_maxaccel = 40000
scale = 10 steps/mm -> (not sure why i set this to 10 -> 200 steps/rev and 10 mm pitch shall result in 20 steps/mm)
FERROR = 1
Min_Ferror = 0.25
The issue:
See attachment for further details
arcs/circular shapes are for any reason shifted in XY - direction, the error occurs above 250 mm/min and is almost unchanged between 1000-5000 mm/min.
What did i test up to now:
Any hint or recommendation on how to improve this would be appreciated!
Thank you!
Michael
I'm building on a small CNC for over two years now. Unfortunately, I've been running in some issues while milling circular pockets.
machine specs:
Traj XYZA
y-axis 1190 mm max travel, 20 mm ballscrew with 10 mm pitch, two 750W AC servo (HLTNC)
x-axis 900 mm max travel, 20 mm ballscrew with 10 mm pitch, one 750W AC servo (HLTNC)
z-axis 185 mm max travel, 16 mm ballscrew with 5 mm pitch, high torque nema 34 stepper
spindle - 2,2 kw rattmotor air cooled
Brain of the operation: raspberry pi 4b+ using a parallel port hat and a 5 axis breakout board
I'm running the premanufactured PI4 optimized Debian Bookworm image.
Y-axis settings as follows:
max_velocity = 5000 mm/min
max_acc = 20000 mm/min2
min limit = 0 mm
max limit = 1190 mm
stepgen_maxaccel = 40000
scale = 10 steps/mm -> (not sure why i set this to 10 -> 200 steps/rev and 10 mm pitch shall result in 20 steps/mm)
FERROR = 1
Min_Ferror = 0.25
The issue:
See attachment for further details
arcs/circular shapes are for any reason shifted in XY - direction, the error occurs above 250 mm/min and is almost unchanged between 1000-5000 mm/min.
What did i test up to now:
- Change base_period up and down -> the servos are set to 200 "steps"/rev, 10 mm pitch -> thus 20 steps/mm resulting in below 2000 pulses per second on one axis. Base_period is set to 100k, shall be fine? Changing the base_period to 40k didn't change anything as well as increasing the base period to 150k.
- Change max_acc to 4x max_velocity and stepgen to 2x max_acc -> didn't change anything
- check mechanical stiffness and backlash -> everything feels tight and rock solid, the linear guide rails are 20x30mm using very massiv long carriers.
- kill all unnecessary PIDs on the debain system in order to reduce latency -> didn't change anything
Any hint or recommendation on how to improve this would be appreciated!
Thank you!
Michael
- jtrantow
- jtrantow
03 Feb 2025 23:01 - 03 Feb 2025 23:03
PWM with a 7i96 and 7i85 was created by jtrantow
PWM with a 7i96 and 7i85
Category: General LinuxCNC Questions
I'm running a 7i96 with a 7i85 for my lathe(steppers and linear encoders) using 7i96_7i85ssdid.bit I have been using LCNC pwmgen and I'd like to switch to the Mesa pwmgen before I spend time tuning the spindle VFD pid further. (I use the stepgen.00.index-enable pin for homing)
I loadrt [HM2](DRIVER) board_ip=[HM2](ADDRESS) config="num_encoders=3 num_pwmgens=1 num_stepgens=4 sserial_port_0=00xxxx" I'm using TB3 ENC 0, ENC 1, ENC2 on the 7i85 and TB1 STEP 0, STEP 1, STEP 2, STEP 3 on the 7i96.This all works with the LCNC pwmgen driving ssr.00.out-02.
I added the mesa pwmgen and I can run the mesa pwmgen in parallel but I can't find the pwmgen signal coming out the Mesa board.
I was expecting to see the PWM output on the TB2 STEP4 (TB2-02, TP2-03) connector but I do not see a PWM gen signal?
7i96_7i85ssdid.pin from readhmid reports there is a PWM module in the firmware (and I can see the pwmgen pins in HALMeter and HALShow) but I can't figure out the pwm signal connector?
LCNCpins.txt doesn't show the PWM assignment either?
LatheSpindle.hal has my relevant HAL connections.
Any help would be appreciated.
I loadrt [HM2](DRIVER) board_ip=[HM2](ADDRESS) config="num_encoders=3 num_pwmgens=1 num_stepgens=4 sserial_port_0=00xxxx" I'm using TB3 ENC 0, ENC 1, ENC2 on the 7i85 and TB1 STEP 0, STEP 1, STEP 2, STEP 3 on the 7i96.This all works with the LCNC pwmgen driving ssr.00.out-02.
I added the mesa pwmgen and I can run the mesa pwmgen in parallel but I can't find the pwmgen signal coming out the Mesa board.
I was expecting to see the PWM output on the TB2 STEP4 (TB2-02, TP2-03) connector but I do not see a PWM gen signal?
7i96_7i85ssdid.pin from readhmid reports there is a PWM module in the firmware (and I can see the pwmgen pins in HALMeter and HALShow) but I can't figure out the pwm signal connector?
LCNCpins.txt doesn't show the PWM assignment either?
LatheSpindle.hal has my relevant HAL connections.
Any help would be appreciated.
- RNJFAB
- RNJFAB
02 Feb 2025 04:57 - 02 Feb 2025 07:01
Replied by RNJFAB on topic Homemade CNC Plasma - hypertherm, Mesa, gear drives, nema 34.
Homemade CNC Plasma - hypertherm, Mesa, gear drives, nema 34.
Category: Show Your Stuff
not sure about debouncing on the limit switches.
Mesa 7i96,THCAD10, closed loop nema34. hypertherm xp45 with cpc port.
all fixed with the 24v field power. thanks Rod.
next problem is the thc is not reading. I have checked the THC with 9V battery and it works there, so guessing the problem lies in my INI or HAL files.
# Generated by PNCconf at Sun Feb 2 06:15:46 2025
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = T17
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = qtvcp qtplasmac
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 10mm 1mm 100mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 83.333333
MAX_LINEAR_VELOCITY = 183.333333
MIN_LINEAR_VELOCITY = 1.666667
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
GEOMETRY = xyz
CYCLE_TIME = 100
[FILTER]
PROGRAM_EXTENSION = .ngc,.nc,.tap GCode File (*.ngc, *.nc, *.tap)
ngc = qtplasmac_gcode
nc = qtplasmac_gcode
tap = qtplasmac_gcode
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G49 G80 G90 G92.1 G94 G97 M52P1
SUBROUTINE_PATH = ./:../../nc_files
USER_M_PATH = ./:../../nc_files
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[HMOT]
CARD0=hm2_7i96.0
[HAL]
HALUI = halui
HALFILE = T17.hal
HALFILE = qtplasmac_comp.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal
[HALUI]
[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ
[TRAJ]
SPINDLES = 3
COORDINATES = XYYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 18.33
MAX_LINEAR_VELOCITY = 183.33
NO_FORCE_HOMING = 1
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
#******************************************
[AXIS_X]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 366.6666666666667
MAX_ACCELERATION = 4000.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -5.0
MAX_LIMIT = 1300.0
[JOINT_0]
TYPE = LINEAR
HOME = 10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 183.33333333333334
MAX_ACCELERATION = 2000.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 229.17
STEPGEN_MAXACCEL = 2500.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 52.0833
MIN_LIMIT = -5.0
MAX_LIMIT = 1300.0
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -25.000000
HOME_FINAL_VEL = 16.666667
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
#******************************************
#******************************************
[AXIS_Y]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 366.6666666666667
MAX_ACCELERATION = 5000.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -5.0
MAX_LIMIT = 2520.0
[JOINT_1]
TYPE = LINEAR
HOME = 10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 183.33333333333334
MAX_ACCELERATION = 2500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 229.17
STEPGEN_MAXACCEL = 3125.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 52.0833
MIN_LIMIT = -5.0
MAX_LIMIT = 2520.0
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -25.000000
HOME_FINAL_VEL = 16.666667
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -2
[JOINT_2]
TYPE = LINEAR
HOME = 10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 183.33333333333334
MAX_ACCELERATION = 2500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 229.17
STEPGEN_MAXACCEL = 3125.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 52.0833
MIN_LIMIT = -5.0
MAX_LIMIT = 2520.0
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -25.000000
HOME_FINAL_VEL = 16.666667
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -2
#******************************************
#******************************************
[AXIS_Z]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 66.66666666666667
MAX_ACCELERATION = 400.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -150.0
MAX_LIMIT = 5.0
[JOINT_3]
TYPE = LINEAR
HOME = -10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 33.333333333333336
MAX_ACCELERATION = 200.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 41.67
STEPGEN_MAXACCEL = 250.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 392.1569
MIN_LIMIT = -150.0
MAX_LIMIT = 5.0
HOME_OFFSET = 5.000000
HOME_SEARCH_VEL = 8.333333
HOME_LATCH_VEL = 8.333333
HOME_FINAL_VEL = -8.333333
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
#******************************************
# Generated by PNCconf at Sun Jan 26 20:35:25 2025
# 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 num_spindles=[TRAJ]SPINDLES
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=0xxxxxxx"
setp [HMOT](CARD0).watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.y2,pid.z,pid.s
loadrt plasmac
addf [HMOT](CARD0).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.y2.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf plasmac servo-thread
addf [HMOT](CARD0).write servo-thread
setp [HMOT](CARD0).dpll.01.timer-us -50
setp [HMOT](CARD0).stepgen.timer-number 1
# ---PLASMA INPUT DEBOUNCE---
#values for these are in custom.hal
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread
# ---JOINT ASSOCIATED WITH THE Z AXIS---
net plasmac:axis-position joint.3.pos-fb => plasmac.axis-z-position
# ---PLASMA INPUTS---
# ---all modes---
net plasmac:float-switch => db_float.in
net plasmac:breakaway => db_breakaway.in
net plasmac:ohmic-probe => db_ohmic.in
net plasmac:ohmic-sense-in => plasmac.ohmic-sense-in
# ---modes 0 & 1
net plasmac:arc-voltage-in => plasmac.arc-voltage-in
# ---modes 1 & 2
net plasmac:arc-ok-in => db_arc-ok.in
# ---mode 2
net plasmac:move-up <= plasmac.move-up
net plasmac:move-down <= plasmac.move-down
# ---PLASMA OUTPUTS---
# ---all modes---
net plasmac:ohmic-enable <= plasmac.ohmic-enable
net plasmac:scribe-arm <= plasmac.scribe-arm
net plasmac:scribe-on <= plasmac.scribe-on
# external output signals
# --- PLASMAC:TORCH-ON ---
net plasmac:torch-on => [HMOT](CARD0).ssr.00.out-00
# external input signals
# --- ESTOP-EXT ---
net estop-ext <= [HMOT](CARD0).gpio.000.in_not
# --- BOTH-HOME-X ---
net both-home-x <= [HMOT](CARD0).gpio.001.in_not
# --- BOTH-HOME-Y ---
net both-home-y <= [HMOT](CARD0).gpio.002.in_not
# --- BOTH-HOME-Y2 ---
net both-home-y2 <= [HMOT](CARD0).gpio.003.in_not
# --- BOTH-HOME-Z ---
net both-home-z <= [HMOT](CARD0).gpio.004.in_not
# --- PLASMAC:FLOAT-SWITCH ---
net plasmac:float-switch <= [HMOT](CARD0).gpio.005.in_not
# --- PLASMAC:BREAKAWAY ---
net plasmac:breakaway <= [HMOT](CARD0).gpio.006.in_not
# --- Encoder ---
#*******************
# 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 [HMOT](CARD0).stepgen.01.dirsetup [JOINT_0]DIRSETUP
setp [HMOT](CARD0).stepgen.01.dirhold [JOINT_0]DIRHOLD
setp [HMOT](CARD0).stepgen.01.steplen [JOINT_0]STEPLEN
setp [HMOT](CARD0).stepgen.01.stepspace [JOINT_0]STEPSPACE
setp [HMOT](CARD0).stepgen.01.position-scale [JOINT_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.01.step_type 0
setp [HMOT](CARD0).stepgen.01.control-type 1
setp [HMOT](CARD0).stepgen.01.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.01.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 => [HMOT](CARD0).stepgen.01.velocity-cmd
net x-pos-fb <= [HMOT](CARD0).stepgen.01.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => [HMOT](CARD0).stepgen.01.enable
# ---setup home / limit switch signals---
net both-home-x => joint.0.home-sw-in
net both-home-x => joint.0.neg-lim-sw-in
net both-home-x => 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 [HMOT](CARD0).stepgen.03.dirsetup [JOINT_1]DIRSETUP
setp [HMOT](CARD0).stepgen.03.dirhold [JOINT_1]DIRHOLD
setp [HMOT](CARD0).stepgen.03.steplen [JOINT_1]STEPLEN
setp [HMOT](CARD0).stepgen.03.stepspace [JOINT_1]STEPSPACE
setp [HMOT](CARD0).stepgen.03.position-scale [JOINT_1]STEP_SCALE
setp [HMOT](CARD0).stepgen.03.step_type 0
setp [HMOT](CARD0).stepgen.03.control-type 1
setp [HMOT](CARD0).stepgen.03.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.03.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 => [HMOT](CARD0).stepgen.03.velocity-cmd
net y-pos-fb <= [HMOT](CARD0).stepgen.03.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => [HMOT](CARD0).stepgen.03.enable
# ---setup home / limit switch signals---
net both-home-y => joint.1.home-sw-in
net both-home-y => joint.1.neg-lim-sw-in
net both-home-y => joint.1.pos-lim-sw-in
#*******************
# Tandem AXIS Y2 JOINT 2
#*******************
setp pid.y2.Pgain [JOINT_2]P
setp pid.y2.Igain [JOINT_2]I
setp pid.y2.Dgain [JOINT_2]D
setp pid.y2.bias [JOINT_2]BIAS
setp pid.y2.FF0 [JOINT_2]FF0
setp pid.y2.FF1 [JOINT_2]FF1
setp pid.y2.FF2 [JOINT_2]FF2
setp pid.y2.deadband [JOINT_2]DEADBAND
setp pid.y2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.y2.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y2.maxerror 0.012700
net y2-index-enable => pid.y2.index-enable
net y2-enable => pid.y2.enable
net y2-pos-cmd => pid.y2.command
net y2-pos-fb => pid.y2.feedback
net y2-output <= pid.y2.output
# Step Gen signals/setup for tandem axis
setp [HMOT](CARD0).stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp [HMOT](CARD0).stepgen.02.dirhold [JOINT_2]DIRHOLD
setp [HMOT](CARD0).stepgen.02.steplen [JOINT_2]STEPLEN
setp [HMOT](CARD0).stepgen.02.stepspace [JOINT_2]STEPSPACE
setp [HMOT](CARD0).stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp [HMOT](CARD0).stepgen.02.step_type 0
setp [HMOT](CARD0).stepgen.02.control-type 1
setp [HMOT](CARD0).stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y2-pos-cmd <= joint.2.motor-pos-cmd
net y2-vel-cmd <= joint.2.vel-cmd
net y2-output => [HMOT](CARD0).stepgen.02.velocity-cmd
net y2-pos-fb <= [HMOT](CARD0).stepgen.02.position-fb
net y2-pos-fb => joint.2.motor-pos-fb
net y2-enable <= joint.2.amp-enable-out
net y2-enable => [HMOT](CARD0).stepgen.02.enable
# ---setup home / limit switch signals---
net both-home-y2 => joint.2.home-sw-in
net both-home-y2 => joint.2.neg-lim-sw-in
net both-home-y2 => joint.2.pos-lim-sw-in
#*******************
# AXIS Z JOINT 3
#*******************
setp pid.z.Pgain [JOINT_3]P
setp pid.z.Igain [JOINT_3]I
setp pid.z.Dgain [JOINT_3]D
setp pid.z.bias [JOINT_3]BIAS
setp pid.z.FF0 [JOINT_3]FF0
setp pid.z.FF1 [JOINT_3]FF1
setp pid.z.FF2 [JOINT_3]FF2
setp pid.z.deadband [JOINT_3]DEADBAND
setp pid.z.maxoutput [JOINT_3]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 [HMOT](CARD0).stepgen.00.dirsetup [JOINT_3]DIRSETUP
setp [HMOT](CARD0).stepgen.00.dirhold [JOINT_3]DIRHOLD
setp [HMOT](CARD0).stepgen.00.steplen [JOINT_3]STEPLEN
setp [HMOT](CARD0).stepgen.00.stepspace [JOINT_3]STEPSPACE
setp [HMOT](CARD0).stepgen.00.position-scale [JOINT_3]STEP_SCALE
setp [HMOT](CARD0).stepgen.00.step_type 0
setp [HMOT](CARD0).stepgen.00.control-type 1
setp [HMOT](CARD0).stepgen.00.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.00.maxvel [JOINT_3]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.3.motor-pos-cmd
net z-vel-cmd <= joint.3.vel-cmd
net z-output => [HMOT](CARD0).stepgen.00.velocity-cmd
net z-pos-fb <= [HMOT](CARD0).stepgen.00.position-fb
net z-pos-fb => joint.3.motor-pos-fb
net z-enable <= joint.3.amp-enable-out
net z-enable => [HMOT](CARD0).stepgen.00.enable
# ---setup home / limit switch signals---
net both-home-z => joint.3.home-sw-in
net both-home-z => joint.3.neg-lim-sw-in
net both-home-z => joint.3.pos-lim-sw-in
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
setp hm2_7i96.0.encoder.00.counter-mode 1
setp hm2_7i96.0.encoder.00.filter 1
setp hm2_7i96.0.encoder.00.scale -1
net plasmac:arc-voltage-in hm2_7i96.0.encoder.00.velocity => plasmac.arc-voltage-in
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
# ---QTPLASMAC TOOLCHANGE PASSTHROUGH---
net tool:change iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool:prep 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
# ---COMMON PLASMAC DEBOUNCE---
# for the float and ohmic inputs each increment in delay is
# is a 0.001mm (0.00004") increase in any probed height result
setp db_float.delay 5
# set to zero if using internal ohmic sensing
setp db_ohmic.delay 0
setp db_breakaway.delay 5
setp db_arc-ok.delay 5
########################################
# The following variables are available for fine tuning some parameters.
# To use any of these, uncomment the required setp line and set an appropriate value.
# Dampen excessive noise on the arc voltage input
# default = 0 (volts)
#setp plasmac.lowpass-frequency 0
# The time delay from losing the arc ok signal until QtPlasmaC reacts to the arc loss.
# default = 0.0 (seconds)
#setp plasmac.arc-lost-delay 0.0
# For mode 0 Arc-OK only, the number of consecutive readings within the threshold that are required to set the Arc-OK signal.
# default = 6
#setp plasmac.arc-ok-counts 6
# For mode 0 Arc-OK only, the maximum voltage deviation that is allowed for a valid voltage to set the Arc OK signal.
#default = 10 (volts)
#setp plasmac.arc-ok-threshold 10
# The voltage above and below 0V that will display as 0V. Prevents small fluctuations from flickering the voltage display.
# default = 0 (volts)
#setp plasmac.zero-window 0
# The distance (in millimeters) away from the Z MAX_LIMIT that QtPlasmaC will allow the Z axis to travel while under machine control.
# default = 5 (mm)
#setp plasmac.max-offset 5
# The required number of consecutive times that the threshold has been exceeded before applying the void lock to the THC.
# default = 2
#setp plasmac.kerf-error-max 2
# ---OHMIC SENSE CONTACT DEBOUNCE---
setp plasmac.ohmic-sense-off-delay 3
setp plasmac.ohmic-sense-on-delay 3
Mesa 7i96,THCAD10, closed loop nema34. hypertherm xp45 with cpc port.
all fixed with the 24v field power. thanks Rod.
next problem is the thc is not reading. I have checked the THC with 9V battery and it works there, so guessing the problem lies in my INI or HAL files.
# Generated by PNCconf at Sun Feb 2 06:15:46 2025
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = T17
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = qtvcp qtplasmac
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 10mm 1mm 100mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 83.333333
MAX_LINEAR_VELOCITY = 183.333333
MIN_LINEAR_VELOCITY = 1.666667
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
GEOMETRY = xyz
CYCLE_TIME = 100
[FILTER]
PROGRAM_EXTENSION = .ngc,.nc,.tap GCode File (*.ngc, *.nc, *.tap)
ngc = qtplasmac_gcode
nc = qtplasmac_gcode
tap = qtplasmac_gcode
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G49 G80 G90 G92.1 G94 G97 M52P1
SUBROUTINE_PATH = ./:../../nc_files
USER_M_PATH = ./:../../nc_files
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[HMOT]
CARD0=hm2_7i96.0
[HAL]
HALUI = halui
HALFILE = T17.hal
HALFILE = qtplasmac_comp.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal
[HALUI]
[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ
[TRAJ]
SPINDLES = 3
COORDINATES = XYYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 18.33
MAX_LINEAR_VELOCITY = 183.33
NO_FORCE_HOMING = 1
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
#******************************************
[AXIS_X]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 366.6666666666667
MAX_ACCELERATION = 4000.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -5.0
MAX_LIMIT = 1300.0
[JOINT_0]
TYPE = LINEAR
HOME = 10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 183.33333333333334
MAX_ACCELERATION = 2000.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 229.17
STEPGEN_MAXACCEL = 2500.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 52.0833
MIN_LIMIT = -5.0
MAX_LIMIT = 1300.0
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -25.000000
HOME_FINAL_VEL = 16.666667
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
#******************************************
#******************************************
[AXIS_Y]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 366.6666666666667
MAX_ACCELERATION = 5000.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -5.0
MAX_LIMIT = 2520.0
[JOINT_1]
TYPE = LINEAR
HOME = 10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 183.33333333333334
MAX_ACCELERATION = 2500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 229.17
STEPGEN_MAXACCEL = 3125.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 52.0833
MIN_LIMIT = -5.0
MAX_LIMIT = 2520.0
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -25.000000
HOME_FINAL_VEL = 16.666667
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -2
[JOINT_2]
TYPE = LINEAR
HOME = 10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 183.33333333333334
MAX_ACCELERATION = 2500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 229.17
STEPGEN_MAXACCEL = 3125.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 52.0833
MIN_LIMIT = -5.0
MAX_LIMIT = 2520.0
HOME_OFFSET = -10.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -25.000000
HOME_FINAL_VEL = 16.666667
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -2
#******************************************
#******************************************
[AXIS_Z]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 66.66666666666667
MAX_ACCELERATION = 400.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -150.0
MAX_LIMIT = 5.0
[JOINT_3]
TYPE = LINEAR
HOME = -10.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 33.333333333333336
MAX_ACCELERATION = 200.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 41.67
STEPGEN_MAXACCEL = 250.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 392.1569
MIN_LIMIT = -150.0
MAX_LIMIT = 5.0
HOME_OFFSET = 5.000000
HOME_SEARCH_VEL = 8.333333
HOME_LATCH_VEL = 8.333333
HOME_FINAL_VEL = -8.333333
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
#******************************************
# Generated by PNCconf at Sun Jan 26 20:35:25 2025
# 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 num_spindles=[TRAJ]SPINDLES
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=0xxxxxxx"
setp [HMOT](CARD0).watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.y2,pid.z,pid.s
loadrt plasmac
addf [HMOT](CARD0).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.y2.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf plasmac servo-thread
addf [HMOT](CARD0).write servo-thread
setp [HMOT](CARD0).dpll.01.timer-us -50
setp [HMOT](CARD0).stepgen.timer-number 1
# ---PLASMA INPUT DEBOUNCE---
#values for these are in custom.hal
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread
# ---JOINT ASSOCIATED WITH THE Z AXIS---
net plasmac:axis-position joint.3.pos-fb => plasmac.axis-z-position
# ---PLASMA INPUTS---
# ---all modes---
net plasmac:float-switch => db_float.in
net plasmac:breakaway => db_breakaway.in
net plasmac:ohmic-probe => db_ohmic.in
net plasmac:ohmic-sense-in => plasmac.ohmic-sense-in
# ---modes 0 & 1
net plasmac:arc-voltage-in => plasmac.arc-voltage-in
# ---modes 1 & 2
net plasmac:arc-ok-in => db_arc-ok.in
# ---mode 2
net plasmac:move-up <= plasmac.move-up
net plasmac:move-down <= plasmac.move-down
# ---PLASMA OUTPUTS---
# ---all modes---
net plasmac:ohmic-enable <= plasmac.ohmic-enable
net plasmac:scribe-arm <= plasmac.scribe-arm
net plasmac:scribe-on <= plasmac.scribe-on
# external output signals
# --- PLASMAC:TORCH-ON ---
net plasmac:torch-on => [HMOT](CARD0).ssr.00.out-00
# external input signals
# --- ESTOP-EXT ---
net estop-ext <= [HMOT](CARD0).gpio.000.in_not
# --- BOTH-HOME-X ---
net both-home-x <= [HMOT](CARD0).gpio.001.in_not
# --- BOTH-HOME-Y ---
net both-home-y <= [HMOT](CARD0).gpio.002.in_not
# --- BOTH-HOME-Y2 ---
net both-home-y2 <= [HMOT](CARD0).gpio.003.in_not
# --- BOTH-HOME-Z ---
net both-home-z <= [HMOT](CARD0).gpio.004.in_not
# --- PLASMAC:FLOAT-SWITCH ---
net plasmac:float-switch <= [HMOT](CARD0).gpio.005.in_not
# --- PLASMAC:BREAKAWAY ---
net plasmac:breakaway <= [HMOT](CARD0).gpio.006.in_not
# --- Encoder ---
#*******************
# 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 [HMOT](CARD0).stepgen.01.dirsetup [JOINT_0]DIRSETUP
setp [HMOT](CARD0).stepgen.01.dirhold [JOINT_0]DIRHOLD
setp [HMOT](CARD0).stepgen.01.steplen [JOINT_0]STEPLEN
setp [HMOT](CARD0).stepgen.01.stepspace [JOINT_0]STEPSPACE
setp [HMOT](CARD0).stepgen.01.position-scale [JOINT_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.01.step_type 0
setp [HMOT](CARD0).stepgen.01.control-type 1
setp [HMOT](CARD0).stepgen.01.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.01.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 => [HMOT](CARD0).stepgen.01.velocity-cmd
net x-pos-fb <= [HMOT](CARD0).stepgen.01.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => [HMOT](CARD0).stepgen.01.enable
# ---setup home / limit switch signals---
net both-home-x => joint.0.home-sw-in
net both-home-x => joint.0.neg-lim-sw-in
net both-home-x => 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 [HMOT](CARD0).stepgen.03.dirsetup [JOINT_1]DIRSETUP
setp [HMOT](CARD0).stepgen.03.dirhold [JOINT_1]DIRHOLD
setp [HMOT](CARD0).stepgen.03.steplen [JOINT_1]STEPLEN
setp [HMOT](CARD0).stepgen.03.stepspace [JOINT_1]STEPSPACE
setp [HMOT](CARD0).stepgen.03.position-scale [JOINT_1]STEP_SCALE
setp [HMOT](CARD0).stepgen.03.step_type 0
setp [HMOT](CARD0).stepgen.03.control-type 1
setp [HMOT](CARD0).stepgen.03.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.03.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 => [HMOT](CARD0).stepgen.03.velocity-cmd
net y-pos-fb <= [HMOT](CARD0).stepgen.03.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => [HMOT](CARD0).stepgen.03.enable
# ---setup home / limit switch signals---
net both-home-y => joint.1.home-sw-in
net both-home-y => joint.1.neg-lim-sw-in
net both-home-y => joint.1.pos-lim-sw-in
#*******************
# Tandem AXIS Y2 JOINT 2
#*******************
setp pid.y2.Pgain [JOINT_2]P
setp pid.y2.Igain [JOINT_2]I
setp pid.y2.Dgain [JOINT_2]D
setp pid.y2.bias [JOINT_2]BIAS
setp pid.y2.FF0 [JOINT_2]FF0
setp pid.y2.FF1 [JOINT_2]FF1
setp pid.y2.FF2 [JOINT_2]FF2
setp pid.y2.deadband [JOINT_2]DEADBAND
setp pid.y2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.y2.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y2.maxerror 0.012700
net y2-index-enable => pid.y2.index-enable
net y2-enable => pid.y2.enable
net y2-pos-cmd => pid.y2.command
net y2-pos-fb => pid.y2.feedback
net y2-output <= pid.y2.output
# Step Gen signals/setup for tandem axis
setp [HMOT](CARD0).stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp [HMOT](CARD0).stepgen.02.dirhold [JOINT_2]DIRHOLD
setp [HMOT](CARD0).stepgen.02.steplen [JOINT_2]STEPLEN
setp [HMOT](CARD0).stepgen.02.stepspace [JOINT_2]STEPSPACE
setp [HMOT](CARD0).stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp [HMOT](CARD0).stepgen.02.step_type 0
setp [HMOT](CARD0).stepgen.02.control-type 1
setp [HMOT](CARD0).stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y2-pos-cmd <= joint.2.motor-pos-cmd
net y2-vel-cmd <= joint.2.vel-cmd
net y2-output => [HMOT](CARD0).stepgen.02.velocity-cmd
net y2-pos-fb <= [HMOT](CARD0).stepgen.02.position-fb
net y2-pos-fb => joint.2.motor-pos-fb
net y2-enable <= joint.2.amp-enable-out
net y2-enable => [HMOT](CARD0).stepgen.02.enable
# ---setup home / limit switch signals---
net both-home-y2 => joint.2.home-sw-in
net both-home-y2 => joint.2.neg-lim-sw-in
net both-home-y2 => joint.2.pos-lim-sw-in
#*******************
# AXIS Z JOINT 3
#*******************
setp pid.z.Pgain [JOINT_3]P
setp pid.z.Igain [JOINT_3]I
setp pid.z.Dgain [JOINT_3]D
setp pid.z.bias [JOINT_3]BIAS
setp pid.z.FF0 [JOINT_3]FF0
setp pid.z.FF1 [JOINT_3]FF1
setp pid.z.FF2 [JOINT_3]FF2
setp pid.z.deadband [JOINT_3]DEADBAND
setp pid.z.maxoutput [JOINT_3]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 [HMOT](CARD0).stepgen.00.dirsetup [JOINT_3]DIRSETUP
setp [HMOT](CARD0).stepgen.00.dirhold [JOINT_3]DIRHOLD
setp [HMOT](CARD0).stepgen.00.steplen [JOINT_3]STEPLEN
setp [HMOT](CARD0).stepgen.00.stepspace [JOINT_3]STEPSPACE
setp [HMOT](CARD0).stepgen.00.position-scale [JOINT_3]STEP_SCALE
setp [HMOT](CARD0).stepgen.00.step_type 0
setp [HMOT](CARD0).stepgen.00.control-type 1
setp [HMOT](CARD0).stepgen.00.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.00.maxvel [JOINT_3]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.3.motor-pos-cmd
net z-vel-cmd <= joint.3.vel-cmd
net z-output => [HMOT](CARD0).stepgen.00.velocity-cmd
net z-pos-fb <= [HMOT](CARD0).stepgen.00.position-fb
net z-pos-fb => joint.3.motor-pos-fb
net z-enable <= joint.3.amp-enable-out
net z-enable => [HMOT](CARD0).stepgen.00.enable
# ---setup home / limit switch signals---
net both-home-z => joint.3.home-sw-in
net both-home-z => joint.3.neg-lim-sw-in
net both-home-z => joint.3.pos-lim-sw-in
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
setp hm2_7i96.0.encoder.00.counter-mode 1
setp hm2_7i96.0.encoder.00.filter 1
setp hm2_7i96.0.encoder.00.scale -1
net plasmac:arc-voltage-in hm2_7i96.0.encoder.00.velocity => plasmac.arc-voltage-in
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
# ---QTPLASMAC TOOLCHANGE PASSTHROUGH---
net tool:change iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool:prep 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
# ---COMMON PLASMAC DEBOUNCE---
# for the float and ohmic inputs each increment in delay is
# is a 0.001mm (0.00004") increase in any probed height result
setp db_float.delay 5
# set to zero if using internal ohmic sensing
setp db_ohmic.delay 0
setp db_breakaway.delay 5
setp db_arc-ok.delay 5
########################################
# The following variables are available for fine tuning some parameters.
# To use any of these, uncomment the required setp line and set an appropriate value.
# Dampen excessive noise on the arc voltage input
# default = 0 (volts)
#setp plasmac.lowpass-frequency 0
# The time delay from losing the arc ok signal until QtPlasmaC reacts to the arc loss.
# default = 0.0 (seconds)
#setp plasmac.arc-lost-delay 0.0
# For mode 0 Arc-OK only, the number of consecutive readings within the threshold that are required to set the Arc-OK signal.
# default = 6
#setp plasmac.arc-ok-counts 6
# For mode 0 Arc-OK only, the maximum voltage deviation that is allowed for a valid voltage to set the Arc OK signal.
#default = 10 (volts)
#setp plasmac.arc-ok-threshold 10
# The voltage above and below 0V that will display as 0V. Prevents small fluctuations from flickering the voltage display.
# default = 0 (volts)
#setp plasmac.zero-window 0
# The distance (in millimeters) away from the Z MAX_LIMIT that QtPlasmaC will allow the Z axis to travel while under machine control.
# default = 5 (mm)
#setp plasmac.max-offset 5
# The required number of consecutive times that the threshold has been exceeded before applying the void lock to the THC.
# default = 2
#setp plasmac.kerf-error-max 2
# ---OHMIC SENSE CONTACT DEBOUNCE---
setp plasmac.ohmic-sense-off-delay 3
setp plasmac.ohmic-sense-on-delay 3
Time to create page: 2.901 seconds