Please Help - How to Configure a 5 Axis Head-Head

More
3 years 2 months ago #277176 by IronManDylan
Ah, yeah that makes sense.  I got the spindle speed scaled.  Thank you for your help. The scaling wasn't perfect so I put the scaling number at 24500 and seems to give pretty accurate numbers now.

I ran a gcode file to try to see if it would wait for the spindle to come up to speed and it didn't.  Can I use this to make LinuxCNC wait for the spindle to come up to speed:  linuxcnc.org/docs/devel/html/examples/sp...#_spindle_soft_start ? 

Please Log in to join the conversation.

More
3 years 2 months ago #277183 by IronManDylan
So I tried that, and after messing with thing I was able to get it to launch, but now I can't control spindle speed at all...  I don't really know what I am doing here hah.  This kinda feels like a workaround that isn't designed for the 7i96s. There should be like a simple delay func... But maybe it would just be easier to wire the spindle velocity from the HY to the Mesa.  Idk how to do this though.  Here is the code that did not work, maybe someone spots something obvious that I cannot see: 
Code:
#******************* # SPINDLE #******************* setp pid.s.Pgain [SPINDLE_0]P setp pid.s.Igain [SPINDLE_0]I setp pid.s.Dgain [SPINDLE_0]D setp pid.s.bias [SPINDLE_0]BIAS setp pid.s.FF0 [SPINDLE_0]FF0 setp pid.s.FF1 [SPINDLE_0]FF1 setp pid.s.FF2 [SPINDLE_0]FF2 setp pid.s.deadband [SPINDLE_0]DEADBAND setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT setp pid.s.error-previous-target true net spindle-index-enable => pid.s.index-enable net spindle-enable => pid.s.enable net spindle-vel-cmd-rpm-abs => pid.s.command net spindle-vel-fb-rpm-abs => pid.s.feedback net spindle-output <= pid.s.output #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 # ---PWM Generator signals/setup--- setp [HMOT](CARD0).pwmgen.00.output-type 1 setp [HMOT](CARD0).pwmgen.00.scale [SPINDLE_0]OUTPUT_SCALE net spindle-vel-cmd-rpm => [HMOT](CARD0).pwmgen.00.value net spindle-enable => [HMOT](CARD0).pwmgen.00.enable # ---setup spindle control signals--- net spindle-vel-cmd-rps <= spindle.0.speed-out-rps net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs #net spindle-vel-cmd-rpm <= spindle.0.speed-out net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs net spindle-enable <= spindle.0.on net spindle-cw <= spindle.0.forward net spindle-ccw <= spindle.0.reverse net spindle-brake <= spindle.0.brake net spindle-revs => spindle.0.revs #net spindle-at-speed => spindle.0.at-speed net spindle-vel-fb-rps => spindle.0.speed-in net spindle-index-enable <=> spindle.0.index-enable # ---Setup spindle at speed signals--- #sets spindle-at-speed true # load the real time modules limit2 and near with names so it is easier to follow their connections loadrt limit2 names=spindle-ramp loadrt near names=spindle-at-speed # add the functions to a thread addf spindle-ramp servo-thread addf spindle-at-speed servo-thread # set the parameter for max rate-of-change # (max spindle accel/decel in units per second) setp spindle-ramp.maxv 60 # hijack the spindle speed out and send it to spindle ramp in net spindle-cmd <= spindle.0.speed-out => spindle-ramp.in # the output of spindle ramp is sent to the scale in net scale.0.in 60 net spindle-ramped <= spindle-ramp.out => scale.0.in # to know when to start the motion we send the near component # (named spindle-at-speed) to the spindle commanded speed from # the signal spindle-cmd and the actual spindle speed # provided your spindle can accelerate at the maxv setting. net spindle-cmd => spindle-at-speed.in1 net spindle-ramped => spindle-at-speed.in2 # the output from spindle-at-speed is sent to spindle.0.at-speed # and when this is true motion will start net spindle-ready <= spindle-at-speed.out => spindle.0.at-speed

edit: I came across a post where you were talking about timedelay, tommy.  Trying to figure that out now... 

Please Log in to join the conversation.

More
3 years 2 months ago #277184 by IronManDylan
Okay, I thought I had this solution with what I found here:  www.forum.linuxcnc.org/10-advanced-confi...-at-speed-time-delay

Which gave me this:
Code:
loadrt timedelay count=1 addf timedelay.0 servo-thread setp timedelay.0.on-delay 5 net spindle-on => timedelay.0.in net spindle-timer <= timedelay.0.out net spindle-timer => motion.spindle-at-speed
However I am getting the attached error.  I thought this was due to motmod not being loaded.  But motmod was loaded through EMCMOT it appears.  I got the error "motmod: already exists" when I tried to add it. 

Edit: I have been working for a few hours on this as it seems like it should just be solvable.  But no matter what I try I cannot get rid of the error "motion.spindle-at-speed" not found or does not exist.  Also Aciera, if you see this in the morning, I explained the issues with verser_probe 6 posts ago. Thanks. 

Please Log in to join the conversation.

More
3 years 2 months ago #277191 by rodw
try editing your file to use : spindle.0.at-speed 

Looks like your config predates v2.8 which went to multi spindle
Ref:  linuxcnc.org/docs/2.9/html/man/man9/moti....html#SPINDLE%20PINS

Please Log in to join the conversation.

More
3 years 2 months ago #277196 by IronManDylan
rodw
I was just getting on here to state that I think it has something to do with v2.9.  I read something somewhere that made me think that.  So I tried what you suggested earlier too and just tried it again to confirm.  What happens is first I am told "'spindle.0.at-speed was already linked to signal 'spindle-at-speed'", so after that I comment out the line "net spindle-at-speed => spindle.0.at-speed", then I am able to get the config to launch.  But, I can't turn the spindle on in MDI once it is launched. I start a gcode test and the machine just starts jogging to where it wants to cut in disregard for the fact that the spindle isn't running. 

I am convinced it has something to do with MOTION...

Please Log in to join the conversation.

More
3 years 2 months ago #277199 by rodw
spindle.0.at speed must be true before motion will begin. This can come from a RS485 spindle but some people use a near component comparing actual speed with commanded speed.

You need to connect the spindle-at-speed to the actual pin giving the signal. something like

net spindle-at-speed <= my-actual-at-speed-pin
 

Please Log in to join the conversation.

More
3 years 2 months ago #277201 by Aciera
Regarding ProbeScreen:
Note that the Github repo you linked seems to be outdated. The original author has not reacted to several pull requests that address issues when running more recent versions of linuxcnc.
There is more recently updated code here:
forum.linuxcnc.org/49-basic-configuratio...obe?start=640#276444

I have not tried it but I may find some time to do so later.

[edit]
So I just added ProbeScreen to my xyzab-srt simulation config and it seems that you should be able to get your cofig going by replacing the two folders 'psng' and 'python' in your current config with the updated versions from the attached folder in this post (starts up fine on my installation running Linuxcnc 2.9 on Debian Bookworm):
forum.linuxcnc.org/49-basic-configuratio...obe?start=640#276003

Note there have been other more recent modifications in these posts which may also be relevant:
This one fixes the broken DRO in the ProbeScreen tab:
forum.linuxcnc.org/49-basic-configuratio...obe?start=640#276234

Not exactly sure what this one does:
forum.linuxcnc.org/49-basic-configuratio...obe?start=640#276444

So the above seems to give me a working ProbeScreen TAB in axis (I have not tested gmoccapy).
Note that I cannot test the probing itself since I don't have a probe.

Please Log in to join the conversation.

More
3 years 2 months ago #277224 by tommylight
No need for timedelay.
Aciera is right, new versions of LinuxCNC have multi spindle support so spindle number must be provided for everything, so everything containing spindle becomes spindle.0.at-speed or spindle.0.on or spindle.0.cv etc, these are just examples.

Please Log in to join the conversation.

More
3 years 2 months ago #277240 by IronManDylan
Aciera
I do not have a folder titled 'psng' in my current config. Should I just add it or is there a different location I should build this from?

edit: i just tried replacing the python folder and adding the 'psng' folder and got the same error.  Image attached.  Maybe I should try to rebuild the probe from the links you provided? 

Please Log in to join the conversation.

More
3 years 2 months ago #277241 by IronManDylan
Spindle stuff:

Tommy
I am confused, Aciera did not make a comment about the spindle?  Everything that I have is connected to a spindle.0 pin as follows:

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

I am confused how it would be possible to achieve a delay without timedelay? I do not have a method to measure the RPM on the VFD.


rodw
It seems that the spindle-at-speed is connected to spindle-timer.  Its seems like this should go true after the allotted time passes, but that error is still present.  Based on you suggestion, how would I get my-actual-speed to go true after a given amount of time?

Please Log in to join the conversation.

Time to create page: 0.169 seconds
Powered by Kunena Forum