Advanced Search

Search Results (Searched for: stepper spindle)

08 Feb 2024 22:58

Which Mesa Card Should I Buy?

Category: Driver Boards

After reading spumco's great summary and looking at the Mesa site, I guess I settled on the 7i96S. If I understand correctly, this is a stand-alone I/O board that only requires an Ethernet connection back to the host PC. Is this correct? I need to drive three stepper drivers (and maybe a 4th down the road), the analog VFD spindle control and an additional 6 I/O. Pretty simple set up.

Yes it is correct, glad to see this was useful as soon as it got posted! :)
7i96S is good for 5 drives + spindle with encoder feedback, and if you ever need more IO, a 7i84 will do just fine and very easy to wire in.
08 Feb 2024 22:17 - 08 Feb 2024 22:19
Replied by Dean on topic Which Mesa Card Should I Buy?

Which Mesa Card Should I Buy?

Category: Driver Boards

Okay, this thread has been posted at the perfect time. I built a smaller 3-axis CNC gantry router approximately 10 years ago. It's been a super machine and has done all I've asked of it. Over the years I've upgraded the ACME screws to ball screws and and six months ago I replaced all of the guide bearings with linear rails.

Before I go any further, I should say I'm pretty good mechanically, but know just enough electronically to be dangerous and to free the magic smoke on occasion. My machine has used the 5i25 and 7i76 to run the I/O and Parker CompuMotor OEM750's to drive the steppers since the day I built it. Never a problem in all of those years.

Fast forward to yesterday. When I tried to turn on my system, LCNC wouldn't start and threw errors on the debug screen. It didn't take long to figure out that my 24v power supply had failed. So I ordered another from Amazon and received it today. Plugged it in and got a solid 24.0v out. Then, when I connected it into the 7i76 board, it (the power supply) blew. Unfortunately, I haven't a clue how to troubleshoot the board, so I'm looking for a replacement and see that the 7i76 is no longer available.

After reading spumco's great summary and looking at the Mesa site, I guess I settled on the 7i96S. If I understand correctly, this is a stand-alone I/O board that only requires an Ethernet connection back to the host PC. Is this correct? I need to drive three stepper drivers (and maybe a 4th down the road), the analog VFD spindle control and an additional 6 I/O. Pretty simple set up.

If I posted this in the wrong spot, I'm sorry and feel free to move it. Otherwise any comments, advice and/or suggestions will be greatly appreciated.

Thanks,
Dean
06 Feb 2024 14:12 - 08 Feb 2024 01:54

Which Mesa Card Should I Buy?

Category: Driver Boards

9 - EXAMPLE WORK-LISTS

1. Manual lathe to CNC conversion
    • 2 axes, closed-loop stepper motors
    • 2 drive alarm signals
    • 2 home switches, no additional limits
    • 1 spindle motor driven by VFD
    • 1 spindle encoder for threading
    • Operator station
        ◦ 2 MPGs (one for each axis)
        ◦ 1 axis selector switch (2 positions)
        ◦ 1 jog increment switch (3 positions)
        ◦ 1 spindle override potentiometer
        ◦ 1 feed override potentiometer
        ◦ 1 external emergency stop
        ◦ 2 buttons (start & feed-hold)
    • Result:
        ◦ Drives - 2 S&D
        ◦ IO
            ▪ 10/ea digital in
            ▪ 2 MPG
            ▪ 2 analog in
            ▪ 1 analog out
            ▪ 2 digital out (spindle FWD/REV)
    • Mesa card suggestion:
        ◦ 7i96S + 7i73 for the operator station


2. Self-built CNC router
    • 4 axes, step-dir servo motors
    • 4 drive alarms
    • 4 drive enable
    • 4 home switches, no additional limits
    • 1 spindle motor driven by VFD
    • Operator station
        ◦ 1 MPGs
        ◦ 1 axis selector switch (2 positions)
        ◦ 1 jog increment switch (3 positions)
        ◦ 1 feed override encoder w/reset switch
        ◦ 1 external emergency stop
        ◦ 8 buttons
            ▪ jog-continous POS/NEG XYZ
            ▪ start & feed hold
    • Result:
        ◦ Drives - 4 S&D
        ◦ IO
            ▪ 8 digital in to main enclosure
            ▪ 13 digital in to operator station
            ▪ 4 MPG
            ▪ 1 analog out
            ▪ 6 digital out
    • Mesa card suggestion:
        ◦ 7i96S + 7i73 using 4x8 matrix for the operator station


Good luck, and please let me know if there are any errors.
-Spumco
06 Feb 2024 13:50 - 08 Feb 2024 01:50

Which Mesa Card Should I Buy?

Category: Driver Boards

6 - DRIVE COMMAND SIGNAL TYPE

Typical CNC machines require some type of motor control is required to move joints/axes.  Whether they are servos or steppers (closed-loop or open), the motors need a drive to actually cause movement.

The drive will be commanded by LCNC using some type of signal.  The command signal types most frequently used for steppers & servos are:
      
    • Step & direction
    • PWM
    • Analog (+/-10v)

Retrofitting a CNC machine will, hopefully, include re-using the existing drives.  This saves money and the original motors & drives were presumably engineered properly for the machine.  These existing, perhaps older, OEM drives tend to use analog command signals, although PWM is sometimes used.

Some newer servo drives, and most stepper motor drives, use step & direction command signals.

Building a new CNC machine means the integrator (you) can select which type of drive is to be used, including the command signal type.

Infrequently, a combination of drive signal types is required for a CNC machine build.  Perhaps the user has some surplus analog drives, but also has a step & direction drive for a 4th axis.  For these cases multiple Mesa cards will likely be required.

Mesa documentation refers to ‘stepgens’, which can be translated to mean ‘step and direction signal generator.’  Each stepgen on a card can control one axis/joint motor drive.  So ‘5 stepgens’ means 5 independent drives can be controlled.

For PWM signals, the Mesa stepgens can be converted to PWM signal generators using modified firmware.  How this is done is not important for this guide, but if you need 3 stepgens and 2 PWM outputs, this can be accomplished with a 5 (or more) stepgen FPGA card.

Analog command signals cannot be created/converted from stepgens; the card hardware is different.  If your drive requires an analog signal you must use an analog-out card.

Once the required drive command signal is identified, count up the number of drives - current and future - required for all joints/axes.  Example:
    • Stepper-driven gantry router
        ◦ 4 motors/drives (X, Y1, Y2, Z) - at least 4 stepgens are required
    • 2-axis lathe with analog servos plus a spindle servo
        ◦ 3 motors/drives - at least 3 analog drive outputs are required
05 Feb 2024 21:19 - 08 Feb 2024 01:45

Which Mesa Card Should I Buy?

Category: Driver Boards

2 - SHORT VERSION (TLDR)

Too impatient to read?  The bare minimum hardware you need to easily connect LCNC to the outside world using Mesa cards is:
    • An FPGA ‘main’ card
    • Screw terminal connections for drives and IO (depending on selection, these may be on the FPGA card or a daughter card)
    • Power supply for the FPGA card

That’s it; no network switch or other ‘stuff’ required.  Below are just a couple of examples out of the numerous Mesa options:

For simple stepper machine
    • You will need one step & direction ethernet FPGA main card with onboard IO
        ◦ Example - 7i96S
            ▪ 5 step/dir axes
            ▪ 11 inputs
            ▪ 6 outputs
            ▪ 1 analog spindle output
            ▪ 1 encoder input
            ▪ 1 Smart Serial port
            ▪ 1 25-pin expansion port

For analog servo machine
    • You will need one analog ethernet FPGA card with onboard screw terminal IO
        ◦ Example - 7i97T
            ▪ 6 +/-10v analog axes
            ▪ 6 encoder inputs
            ▪ 16 inputs
            ▪ 6 outputs
            ▪ 1 Smart Serial port
            ▪ 1 25-pin expansion port
OR
    • You will need one ethernet FPGA card with no screw terminal drive outputs or IO
        ◦ Example - 7i92TH
            ▪ 2x26-pin header
      AND
    • You will also need one daughter card with analog outputs & IO with a connector that matches the FPGA card
        ◦ Example - 7i77
            ▪ DB25 input (connects to 7i92TH 26-pin header with adapter cable)
            ▪ 6 +/-10v analog axes
            ▪ 6 encoder inputs
            ▪ 32 inputs
            ▪ 16 outputs
            ▪ 1 Smart Serial port
            ▪ 1 DB25 to 26-pin adapter cable

Do yourself a favor and go read the rest of this guide.
04 Feb 2024 03:49

Closed loop stepper driver configuration help

Category: Basic Configuration

I'll try that when I can get a hold of a DTI. For now I went redid the gcode with a re-done tool table, and it seems to make the biggest difference so far. I'm now getting about +- .05 mm

I still think it can do better, but for now I don't want to take it apart it.

I probably need to test the spindle run-out as well at some point.

thanks for the advice it's been helpful.
03 Feb 2024 03:36

Closed loop stepper driver configuration help

Category: Basic Configuration

I can't imagine the whole thing is flexing that much under cutting pressure, but I'd say next step is to mount a DTI on the table and touch the stylus to the spindle nose.

Then shove on the head and see if there's deflection.  Repeat for Y in both directions.

How much of a cut are you taking to get that much error?  Are you measuring the error by comparing the part vs. programmed size?
01 Feb 2024 15:25

Setup for encoder feedback

Category: General LinuxCNC Questions

How difficult is it to implement feedback via the 5i25?

Which cosed/open loop drivers would you recommend?

I figured the spindle feedback would help getting the spindle speed more consistent (had oscillations in speed, but there are several possible reasons for that)

I used to have my steppers running un only 12v which made them quite poor performing. What voltage would you recommend for my steppers?
31 Jan 2024 01:38

Modbus-RTU control of a MOLLUM VFD

Category: HAL

I got a Mollum VFD .  This is one of the smallest VFDs on the market.  Nice when trying to pack everything in a box.  I think it is the same as the BD600 series  that StepperOnline sells.  Box is the same size, and the manuals look identical.  

I'm attaching the HAL file I created to allow LinuxCNC to talk to it.  
 

File Attachment:

File Name: mb2vfd_2024-01-30.ini
File Size:2 KB
 

File Attachment:

File Name: pyvcp-panel.xml
File Size:2 KB


My custom_postgui.hal contains,

#set up the spindle monitor with pyvcp
loadrt scale names=scale_torque,scale_power,scale_current,scale_bus_voltage,scale_freq
addf scale_torque servo-thread
addf scale_power servo-thread
addf scale_current servo-thread
addf scale_freq servo-thread

setp scale_torque.gain .01
net torque_scale scale_torque.in mb2hal.torque.torque.float
net torque scale_torque.out => pyvcp.torque

setp scale_power.gain .1
net power_scale scale_power.in mb2hal.power.power.float
net power scale_power.out => pyvcp.motor_power

setp scale_current.gain .01
net current_scale scale_current.in mb2hal.current.current.float
net current scale_current.out => pyvcp.current

#voltage doesn't need scaling
net voltage  mb2hal.voltage.voltage.float => pyvcp.voltage

setp scale_bus_voltage.gain .1
net bus_voltage_scale scale_bus_voltage.in mb2hal.bus_voltage.bus_voltage.float
#net bus_voltage scale_bus_voltage.out => pyvcp.bus_voltage

setp scale_freq.gain .1
net freq_scale scale_freq.in mb2hal.freq.freq.float
#net freq scale_freq.out => pyvcp.freq

#fault messages don't need scaling
net vfd_fault mb2hal.fault.fault.int => pyvcp.fault

 
30 Jan 2024 14:49
Replied by spumco on topic caxis.comp - problems

caxis.comp - problems

Category: Advanced Configuration

@Tommy,
Re-reading the PID manual, deadband should be set slightly greater than 1/2 count to stop hunting.  Your example is (I suspect) referencing a linear axis where you've got a very high count-per-unit (like thousands of counts per mm or inch).  Just like my X/Z axes with 1um encoders where I've got ~25400 counts/inch.

My subspindle is a direct-drive rotary axis where units = degrees.  So I've got ~27 counts per degree; significantly coarser feedback per unit.

The encoder signal is output from the drive, and I've got it set as high a resolution as possible.

@Aciera,
I tried the PID autotune a couple times on my Z-axis a while ago and the results were just dumb.  While I may give it a try, I haven't read a single report on the forum where someone was pleased with the results.

@smc.collins,
I have the pos-cmd and pos-fb up in halshow, but haven't yet scoped them.  Nothing odd or way off during a programmed back-and-forth move.  It homes to index fine and the counts/position/velocity all look like they should even when it flips out.  Doesn't lose track of where it is.


I'm going to try connecting it like an open-loop stepper tonight - connect stepgen pos-fb to pid.b.feedback and joint motor-pos-fb.  That should help me see if my issue is with the PID or not.
26 Jan 2024 17:12

linuxcnc-esp32 Software Stepping over Ethernet Using ESP32

Category: Computers and Hardware

I'm finishing up the last few bits, some basic documentation and final testing. Should be released in the next day or so.

Additionally making it functional with the W5500 SPI module so if anyone has an existing SPI ethernet setup they can use it too.

It would be nice to have a ultra low cost multi-axis stepper solution that runs fast, in hardware, for LinuxCNC, even if purely for testing or tinkering since WT32-ETH01 modules can be purchased for $15 and connected to external stepper drivers without issue (yes 3.3v STEP,DIR and EN works, not ideal but does work)

A custom board that has a I2C GPIO mux and a single interrupt driven interrupt pin connected to the ESP32 for both inputs and outputs would be straightforward to add and greatly expands the ESP32 limited pins available.

Additional ideas - adding a 2nd ESP32 that handles Bluetooth connectivity for bespoke MPG pendants or wireless peripherals - all it would have to do is pass a basic I2C struct packet to the ethernet connected one which provides comms back to LinuxCNC HAL.
Modbus/RS485 VFD native spindle integration are possibilities too - as well as the existing PWM/Analog control.

I love Remora but I wanted a cheaper solution with hardware can be more accessible and/or available.

Caution must be taken when using Arduino libraries that they do not run on the core dedicated to ethernet & servo gen tasks.
24 Jan 2024 07:42

Having problems with stepper enable driven relay enabled on linux boot

Category: General LinuxCNC Questions

Tommy, thanks for the response.

I am using 3 PCIE to parallel port cards (SD-PEX10005). One for mill, one for lathe and one for MPG pendant. Is it possible the breakout board is causing this and not the lpt card?

I moved over to one of the 5 axis breakout boards with PWM so I can convert spindle to VFD and it behaves the same as the sainsmart bob as far as enable high. I have some spare pins on the pendant db25, but I haven't had a chance to test them isolated from board connection. I spent the day installing the refactored tower in the shop.


I have the relay on the AC input to the stepper driver PSU.
23 Jan 2024 23:13 - 23 Jan 2024 23:16

requesting help with 7i80DB-16 and C10 breakout board

Category: PnCConf Wizard

missing report file.

# Generated by PNCconf at Tue Jan 23 05:23:48 2024
# Using LinuxCNC version:  Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="192.168.1.121" config="num_encoders=0 num_pwmgens=0 num_stepgens=10"
setp    [HMOT](CARD0).watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.s

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.z.do-pid-calcs       servo-thread
addf pid.a.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf [HMOT](CARD0).write         servo-thread
setp [HMOT](CARD0).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.000500

net x-index-enable  =>  pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-pos-fb        =>  pid.x.feedback
net x-output        <=  pid.x.output

# Step Gen signals/setup

setp   [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
setp   [HMOT](CARD0).stepgen.01.direction.invert_output   true

# ---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 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.000500

net y-index-enable  =>  pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
net y-pos-fb        =>  pid.y.feedback
net y-output        <=  pid.y.output

# Step Gen signals/setup

setp   [HMOT](CARD0).stepgen.02.dirsetup        [JOINT_1]DIRSETUP
setp   [HMOT](CARD0).stepgen.02.dirhold         [JOINT_1]DIRHOLD
setp   [HMOT](CARD0).stepgen.02.steplen         [JOINT_1]STEPLEN
setp   [HMOT](CARD0).stepgen.02.stepspace       [JOINT_1]STEPSPACE
setp   [HMOT](CARD0).stepgen.02.position-scale  [JOINT_1]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_1]STEPGEN_MAXACCEL
setp   [HMOT](CARD0).stepgen.02.maxvel           [JOINT_1]STEPGEN_MAXVEL
setp   [HMOT](CARD0).stepgen.02.direction.invert_output   true

# ---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.02.velocity-cmd
net y-pos-fb     <= [HMOT](CARD0).stepgen.02.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.02.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.000500

net z-index-enable  =>  pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
net z-pos-fb        =>  pid.z.feedback
net z-output        <=  pid.z.output

# Step Gen signals/setup

setp   [HMOT](CARD0).stepgen.03.dirsetup        [JOINT_2]DIRSETUP
setp   [HMOT](CARD0).stepgen.03.dirhold         [JOINT_2]DIRHOLD
setp   [HMOT](CARD0).stepgen.03.steplen         [JOINT_2]STEPLEN
setp   [HMOT](CARD0).stepgen.03.stepspace       [JOINT_2]STEPSPACE
setp   [HMOT](CARD0).stepgen.03.position-scale  [JOINT_2]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_2]STEPGEN_MAXACCEL
setp   [HMOT](CARD0).stepgen.03.maxvel           [JOINT_2]STEPGEN_MAXVEL
setp   [HMOT](CARD0).stepgen.03.direction.invert_output   true

# ---closedloop stepper signals---

net z-pos-cmd    <= joint.2.motor-pos-cmd
net z-vel-cmd    <= joint.2.vel-cmd
net z-output     => [HMOT](CARD0).stepgen.03.velocity-cmd
net z-pos-fb     <= [HMOT](CARD0).stepgen.03.position-fb
net z-pos-fb     => joint.2.motor-pos-fb
net z-enable     <= joint.2.amp-enable-out
net z-enable     => [HMOT](CARD0).stepgen.03.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

#*******************
#  AXIS A JOINT 3
#*******************

setp   pid.a.Pgain     [JOINT_3]P
setp   pid.a.Igain     [JOINT_3]I
setp   pid.a.Dgain     [JOINT_3]D
setp   pid.a.bias      [JOINT_3]BIAS
setp   pid.a.FF0       [JOINT_3]FF0
setp   pid.a.FF1       [JOINT_3]FF1
setp   pid.a.FF2       [JOINT_3]FF2
setp   pid.a.deadband  [JOINT_3]DEADBAND
setp   pid.a.maxoutput [JOINT_3]MAX_OUTPUT
setp   pid.a.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.a.maxerror 0.000500

net a-index-enable  =>  pid.a.index-enable
net a-enable        =>  pid.a.enable
net a-pos-cmd       =>  pid.a.command
net a-pos-fb        =>  pid.a.feedback
net a-output        <=  pid.a.output

# Step Gen signals/setup

setp   [HMOT](CARD0).stepgen.04.dirsetup        [JOINT_3]DIRSETUP
setp   [HMOT](CARD0).stepgen.04.dirhold         [JOINT_3]DIRHOLD
setp   [HMOT](CARD0).stepgen.04.steplen         [JOINT_3]STEPLEN
setp   [HMOT](CARD0).stepgen.04.stepspace       [JOINT_3]STEPSPACE
setp   [HMOT](CARD0).stepgen.04.position-scale  [JOINT_3]STEP_SCALE
setp   [HMOT](CARD0).stepgen.04.step_type        0
setp   [HMOT](CARD0).stepgen.04.control-type     1
setp   [HMOT](CARD0).stepgen.04.maxaccel         [JOINT_3]STEPGEN_MAXACCEL
setp   [HMOT](CARD0).stepgen.04.maxvel           [JOINT_3]STEPGEN_MAXVEL
setp   [HMOT](CARD0).stepgen.04.direction.invert_output   true

# ---closedloop stepper signals---

net a-pos-cmd    <= joint.3.motor-pos-cmd
net a-vel-cmd    <= joint.3.vel-cmd
net a-output     => [HMOT](CARD0).stepgen.04.velocity-cmd
net a-pos-fb     <= [HMOT](CARD0).stepgen.04.position-fb
net a-pos-fb     => joint.3.motor-pos-fb
net a-enable     <= joint.3.amp-enable-out
net a-enable     => [HMOT](CARD0).stepgen.04.enable

# ---setup home / limit switch signals---

net a-home-sw     =>  joint.3.home-sw-in
net a-neg-limit     =>  joint.3.neg-lim-sw-in
net a-pos-limit     =>  joint.3.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     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---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 axis-select-a  halui.axis.a.select
net jog-a-pos      halui.axis.a.plus
net jog-a-neg      halui.axis.a.minus
net jog-a-analog   halui.axis.a.analog
net a-is-homed     halui.joint.3.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


 
22 Jan 2024 19:52

Having problems with stepper enable driven relay enabled on linux boot

Category: General LinuxCNC Questions

I am using a Sainsmart 5 axis breakout board (the one without pwm) to drive 5 axes on a knee mill. I am trying to use a relay to power up the stepper driver power supply on the enable pin. It seems to work ok when linuxCNC is running but when I start the machine the enable pin goes high. I tried using a 10k pulldown resistor on the relay but it had no effect, I think it is not simply floating.

Is there some way to set the parallel port pin value on startup or some other way to drive the relay besides the enable pin? I often leave linuxCNC running and power down the steppers so I can resume what I was working on later without having to rehome. I intend to use the onboard relay to drive the spindle.

 
 
22 Jan 2024 17:54 - 25 Jan 2024 21:53

mesaCT, 7i95t and SPINx

Category: Basic Configuration

Hello,I'm new to LinuxCNC and come from an electronics background, with good familiarity in C. I installed the MesaCT tool and managed to get the three steppers for XYZ working. However, in the spindle tab of the tool, I can't select anything; all buttons are greyed out. I would like to connect the SPINx to channel 5, where I assume the PWM signal is. What settings do I need to adjust in MesaCT to implement this? Writing the .hal file still confuses me a bit. Does anyone have a sample configuration, or can anyone advise what settings I need to adjust in MesaCT to get the spindle running?
Best regards, Jörg 
Edit:

File Attachment:

File Name: 7i95t_xyz.ini
File Size:4 KB
 

File Attachment:

File Name: main.hal
File Size:7 KB
On channel 5, the Dir signal switches with the change of direction, but I don't have a PWM output on Step. I have attached the configuration.Best regards, Jörg
Displaying 106 - 120 out of 179 results.
Time to create page: 1.568 seconds
Powered by Kunena Forum