Please Help - How to Configure a 5 Axis Head-Head
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 115
- Thank you received: 19
06 Aug 2023 23:32 #277176
by IronManDylan
Replied by IronManDylan on topic Please Help - How to Configure a 5 Axis Head-Head
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 ?
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 or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 115
- Thank you received: 19
07 Aug 2023 01:06 - 07 Aug 2023 01:15 #277183
by IronManDylan
Replied by IronManDylan on topic Please Help - How to Configure a 5 Axis Head-Head
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:
edit: I came across a post where you were talking about timedelay, tommy. Trying to figure that out now...
#*******************
# 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...
Last edit: 07 Aug 2023 01:15 by IronManDylan.
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 115
- Thank you received: 19
07 Aug 2023 02:01 - 07 Aug 2023 03:03 #277184
by IronManDylan
Replied by IronManDylan on topic Please Help - How to Configure a 5 Axis Head-Head
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: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.
Which gave me this:
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
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.
Last edit: 07 Aug 2023 03:03 by IronManDylan.
Please Log in or Create an account to join the conversation.
07 Aug 2023 03:30 #277191
by rodw
Replied by rodw on topic Please Help - How to Configure a 5 Axis Head-Head
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
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 or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 115
- Thank you received: 19
07 Aug 2023 04:26 - 07 Aug 2023 04:29 #277196
by IronManDylan
Replied by IronManDylan on topic Please Help - How to Configure a 5 Axis Head-Head
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...
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...
Last edit: 07 Aug 2023 04:29 by IronManDylan.
Please Log in or Create an account to join the conversation.
07 Aug 2023 06:49 #277199
by rodw
Replied by rodw on topic Please Help - How to Configure a 5 Axis Head-Head
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
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 or Create an account to join the conversation.
07 Aug 2023 07:40 - 07 Aug 2023 19:59 #277201
by Aciera
Replied by Aciera on topic Please Help - How to Configure a 5 Axis Head-Head
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.
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
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.
Last edit: 07 Aug 2023 19:59 by Aciera.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6433
07 Aug 2023 11:15 #277224
by tommylight
Replied by tommylight on topic Please Help - How to Configure a 5 Axis Head-Head
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.
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 or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 115
- Thank you received: 19
07 Aug 2023 14:29 - 07 Aug 2023 14:36 #277240
by IronManDylan
Replied by IronManDylan on topic Please Help - How to Configure a 5 Axis Head-Head
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?
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?
Last edit: 07 Aug 2023 14:36 by IronManDylan.
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 115
- Thank you received: 19
07 Aug 2023 14:49 #277241
by IronManDylan
Replied by IronManDylan on topic Please Help - How to Configure a 5 Axis Head-Head
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?
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 or Create an account to join the conversation.
Time to create page: 0.106 seconds