Advanced Search

Search Results (Searched for: )

  • scda
  • scda's Avatar
11 Mar 2025 16:42 - 11 Mar 2025 16:54
Replied by scda on topic Mesa 7i96s PID Spindle Setup

Mesa 7i96s PID Spindle Setup

Category: Basic Configuration

Thanks. Yeah I think the main problem was that I have set the P value too high (above 2 is too much --> runaway). So the system seems to be working now.
  • I set a non-zero value to the DEADBAND setting (10)
  • I am using a low pass filter on the encoder feedback signal before feeding it to the PID loop
  • I use a low P value to stop the system "from running away"
#======================================================================================
#  Spindle0
#======================================================================================

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

setp hm2_7i96s.0.pwmgen.00.enable 1
setp hm2_7i96s.0.pwmgen.00.scale [SPINDLE_0]MAX_RPM

setp lowpass.0.gain [SPINDLE_0]LOWPASS_GAIN

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

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        => hm2_7i96s.0.pwmgen.00.value    

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             # =>    hm2_7i96s.0.pwmgen.00.enable
net spindle-cw            <=     spindle.0.forward        =>    hm2_7i96s.0.outm.00.out-04 
net spindle-ccw            <=    spindle.0.reverse         =>    hm2_7i96s.0.outm.00.out-05

net spindle-revs            =>    spindle.0.revs    
net spindle-at-speed        =>    spindle.0.at-speed
net spindle-vel-fb-rps      =>    spindle.0.speed-in            <=     hm2_7i96s.0.encoder.04.velocity
net spindle-vel-fb-rpm_raw    =>    hm2_7i96s.0.encoder.04.velocity-rpm    =>     lowpass.0.in    
net spindle-vel-fb-rpm        <=    lowpass.0.out
net spindle-index-enable    <=>    spindle.0.index-enable
  • PCW
  • PCW's Avatar
11 Mar 2025 16:18
Replied by PCW on topic Mesa 7i96s PID Spindle Setup

Mesa 7i96s PID Spindle Setup

Category: Basic Configuration

Normally this is just done with normal PID,
with FF0 set to 1 and PWM scale set to RPM at 10V

PID would mainly be for Keeping constant RPM vs load.
If you have major non-linearities, these can be corrected with
the lincurve component.
  • scda
  • scda's Avatar
11 Mar 2025 15:36 - 11 Mar 2025 15:52
Mesa 7i96s PID Spindle Setup was created by scda

Mesa 7i96s PID Spindle Setup

Category: Basic Configuration

Hi all,

I am working on a weiler cnc lathe retrofit. So far it works well, the only thing left ist the PID tuning of the spindle speed. 
The spindle also works without PID but the offset to the actual speed varies quite a bit (not linear), I was hoping to correct this with a PID loop.

VFD: Huanyang with analog voltage input (0-10V).

Currently I am trying to figure out how to implenent the PID setup for this.

How can I scale the PID output to 0-10V (or 0-4600 rpm) ? Currently my PID output can be negative and so the pwmgen.value of the Mesa7i96s spindle is negative which does not work for my setup. I feed the PID ouput to the scaled pwmgen input.

I think the system has to adjust the current value sent to the pwmgen.value just below and above the current setpoint in order to adjust for velocity offset. I was thinking of using the sum function (which kind of works but also does not really correct the non-linearity) but I think there must be an easier way...

Cheers,
David
  • Lcvette
  • Lcvette's Avatar
11 Mar 2025 15:05
Replied by Lcvette on topic Permanent probing parameters

Permanent probing parameters

Category: QtPyVCP

Great, glad you got it sorted!
  • Stran_ge
  • Stran_ge
11 Mar 2025 14:35 - 11 Mar 2025 15:35
Replied by Stran_ge on topic Permanent probing parameters

Permanent probing parameters

Category: QtPyVCP

Nvm i got it working. I forgot to actualy update the .var file itself so it startet at number 5xxx and not 3xxx.

So new parameters couldnt be stored.
  • Stran_ge
  • Stran_ge
11 Mar 2025 14:26
Replied by Stran_ge on topic Permanent probing parameters

Permanent probing parameters

Category: QtPyVCP

I did update the subroutines folder for the latest Version of probe basic.

So do i have to manually go and edit the probe_basic.var?
  • Todd Zuercher
  • Todd Zuercher's Avatar
11 Mar 2025 14:20
Replied by Todd Zuercher on topic halui toggle button

halui toggle button

Category: Basic Configuration

I'm sorry I am not as familiar with iocontrol v2, and missed that. I'm not sure what exactly the lube related pins do other than exactly what it says in the man page. As far as I know the pins will only be true if the machine is out of estop and the halui pin "halui.lube.on" is true. So it might be a rather toothless addition that doesn't really do much of anything, and you will still need to create appropriate logic to control it. I could be completely wrong, but I'm not seeing documentation to say otherwise.
  • Todd Zuercher
  • Todd Zuercher's Avatar
11 Mar 2025 13:56
Replied by Todd Zuercher on topic Probe and Touchoff

Probe and Touchoff

Category: General LinuxCNC Questions

I'm not sure I understand what your trying to do with the fipflop component. I don't think it is necessary. (A hal input pin remembers the value it is given with a setp if it isn't connected to a signal and hal commands like setp in the hal file are only executed once when the hal file is loaded at start up.)

I would probably use a couple of custom M-codes to enable/disable the 2nd probe. In your hal file add a line to setp the value of the and2.0.in0. and remove all other hal file references to that pin. Then in the two M-code files setp the value of and2.0.in0 to true or false to enable and disable the input.

# Load logic components
loadrt and2 count=1
loadrt or2 count=1

addf and2.0 servo-thread
addf or2.0 servo-thread

setp and2.0.in0 false #Set probe2's input state to disabled at startup.

# Define probe inputs (Pin 0 and Pin 2)
net probe1-in <= hm2_7i96s.0.inm.00.input-00-not # Tool Touch-off probe (Pin 0)
net probe2-in <= hm2_7i96s.0.inm.00.input-02-not  =>  and2.0.in1 # Edge Finder probe (Pin 2)

# Enable Edge Finder only when connected
net probe2-final <= and2.0.out # Final state of Edge Finder # Allow probe2 (Edge Finder) if connected

# Send final signal to motion.probe-input
net probe1-in => or2.0.in0 #Combine probe 1 and 2 inputs
net probe2-final => or2.0.in1 #Combine probe 2 input (when enabled)
net probe_comb or2.0.out => motion.probe-input

Then to create an M101 M-code create a file containing the following, called M101 save it to your config dir and save as an executable file.
#!/bin/bash
# file to enable Probe2
halcmd setp and2.0.in0 True
exit 0

Then you can make another one to disable the probe called M102
#!/bin/bash
# file to disnable Probe2
halcmd setp and2.0.in0 False
exit 0
  • stenly
  • stenly
11 Mar 2025 13:40

Implementing Spindle Homing for DELTA C2000 Plus (In)correctly?

Category: EtherCAT

Thanks for the overview.

I don't think that will work for me, as my encoder doesn't have a Z pulse. Just an A, B and R one. The motor itself has an origin switch that gives a digital output. The idea is to have that serve as the homing point, probably by using Homing Method 4 for Homing Mode (an operation mode in EtherCAT). I'm going to look into whether or not something like this has been discussed here, but for now it seems I'm the only one with this sort of setup, I think.
  • PCW
  • PCW's Avatar
11 Mar 2025 13:34 - 11 Mar 2025 16:13
Replied by PCW on topic Spindle PID RPM oscillates under load

Spindle PID RPM oscillates under load

Category: Advanced Configuration

You may be able to reduce the overshoot by using
the PID components maxerror pin. This should allow
higher P (and I) terms.

Also anything in the VFD setup that slows response
will limit the highest stable P term.
  • Wischi
  • Wischi
11 Mar 2025 13:09 - 17 Mar 2025 13:34

Spindle PID RPM oscillates under load

Category: Advanced Configuration

Hello guys,

i just started taking heavier cuts on my machine (Deckel FP2A) and i noticed that the rpm drops down, sometimes up to 150 rpm. The machine uses a 2.2 kW motor with a huanyang vfd. Between the motor and spindle is a belt drive as well as an gearbox (similar to the MAHO machines). Up until now i ran the spindle open loop. But since i added a encoder directly to the spindle i thought i could close the loop and use pid to counteract the rpm drops. I ran a couple of tests today but i was not able to keep the rpm steady under load. With all PID values at 0, except FF0 that was 1 during all the tests, i was already getting a good response (see halscope below). At around P=2 the over and undershoots started. So i tried P=0.5 and ran a test cut in mild steel (cut conditions below, machine should be more than capable for that). At the halscope you could see how to rpm drops and then oscillates. And the end of the cut the rpm came back up to the commanded speed. You can actually hear the rpm drop and accelerate.

I don't know how to continue from here, so i wish to get help from you guys! The pid with all values at 0 gives the best response but also makes it kind of useless. I attached a couple halscope diagrams of different tests below. They are always three: spindle startup, idling and under load. I also tired higher P values just to see if the pid is working. My spindle hal section is pretty much the default pncconf, only added the gearbox and vfd stuff (gear selection etc.). This might as well be a vfd issue, so i included my parameters that i have changed after a factory reset.

Thank you!

Cut conditions:
Warning: Spoiler!


Huanyang VFD HY04D043B 4kw 380V motor is wired in star config
Parameters:
Warning: Spoiler!
  • Novik
  • Novik
11 Mar 2025 13:06
Replied by Novik on topic Servo HCFA Y7

Servo HCFA Y7

Category: EtherCAT

Good afternoon! I purchased the same servos, and I can't get them to start. I took the configuration files from this theme, substituted my data, but could not launch it. Could you please share working files or tips on how to get these servos up and running?
  • Micha
  • Micha
11 Mar 2025 12:45
UHD Graphics 730 with RTAI Kernel was created by Micha

UHD Graphics 730 with RTAI Kernel

Category: Computers and Hardware

The latest RTAI Patches are for Kernel 5.4 but the Support for UHD 730 in the i915 Driver has been added in 5.11 (I think).
Any ideas how to get the Driver working in the 5.4 Kernel?

I'm using a Core i3 14100T on an ASUS Q670EI-IM-A Board.

Thanks
  • emcPT
  • emcPT's Avatar
11 Mar 2025 12:26
Replied by emcPT on topic MBT -> GPT to reuse existing installation

MBT -> GPT to reuse existing installation

Category: Installing LinuxCNC

I did some research about the uspace and the general information is: uspace is not intended to control real machines, but used for simulation.

This is still true? Because if it is, I cannot use it as the intention is to really control the machine that was previously working.
Thank you
  • smc.collins
  • smc.collins
11 Mar 2025 12:19

Implementing Spindle Homing for DELTA C2000 Plus (In)correctly?

Category: EtherCAT

index enable usually refers to the Index output of the encoder, basically it's a single pules indicating the encoder has reached the reset point of it's wheel. IE every 2048 pules in a 2048 encoder you get a index pulse. if so equipped, often referred to as the Z pulse in many encoders.
Displaying 8566 - 8580 out of 24532 results.
Time to create page: 0.945 seconds
Powered by Kunena Forum