Another 7i76 Spindle Setup Question

More
8 years 6 months ago #109840 by PCW
The 7I76's analog out circuits is unipolar so you need to drive it from the absolute spindle speed pin (always positive)

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago - 8 years 6 months ago #109851 by andypugh

Skippy1 wrote: However, I still have a weird problem when running the spindle in reverse. It's as if the 0 to 10 volts output from the Mesa card is linear, but reversed. You call for slow speed, and you get fast, you call for high, and you get slow.


There are 4 possible HAL pins to use for spindle speed command:

motion.spindle−speed−out Desired spindle speed in rotations per minute
motion.spindle−speed−out−abs Desired spindle speed in rotations per minute, always positive regardless of spindle direction.
motion.spindle−speed−out−rps Desired spindle speed in rotations per second
motion.spindle−speed−out−rps−abs Desired spindle speed in rotations per second, always positive regardless of spindle direction.

( linuxcnc.org/docs/2.7/html/man/man9/motion.9.html )

You need to ensure that your HAL file uses one of the *-abs pins if you are using a 7i76.
Last edit: 8 years 6 months ago by andypugh.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #109883 by Skippy1
Thanks guys, I now get the core concept of using an absolute value to ensure a positive signal.



I've dived into the [strike]danger zone[/strike] HAL file and had a crack at: tacking -abs onto the end of some spindle motion signals; and/or adding completely new lines in the spindle control signals section based on what I've read in similar posts. The results were as expected - spectacularly unsuccessful, varying from no effect, to crashing the program on start-up with a "motion.spindle-speed-out-rps-abs pin does not exist" error. (I did read in the basic HAL manual, that, "If the signal does not exist net creates the new signal", so this adds to the confusion.)

The below text is the spindle section from the original HAL file before I started editing it. I am going to keep fiddling with it, but if anyone could point out the bleeding obvious to me it would be greatly appreciated.

Time for a quad-shot espresso,

Steve

# SPINDLE S
#*******************

# ---digital potentionmeter output signals/setup---

setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE

net spindle-vel-cmd => hm2_5i25.0.7i76.0.0.spinout
net machine-is-enabled => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir

# ---Encoder feedback signals/setup---

setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE

net spindle-revs <= hm2_5i25.0.encoder.00.position
net spindle-vel-fb <= hm2_5i25.0.encoder.00.velocity
net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd <= motion.spindle-speed-out
net spindle-on <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #109900 by andypugh

Skippy1 wrote:

Code:
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps net spindle-vel-cmd <= motion.spindle-speed-out net spindle-on <= motion.spindle-on net spindle-cw <= motion.spindle-forward net spindle-ccw <= motion.spindle-reverse net spindle-brake <= motion.spindle-brake net spindle-revs => motion.spindle-revs net spindle-at-speed => motion.spindle-at-speed net spindle-vel-fb => motion.spindle-speed-in net spindle-index-enable <=> motion.spindle-index-enable


This block sets up all the spindle _signals_. You probably don't actually use all of them.

Somewhere else in the HAL file, in a section you haven't shown, is likely to be the part that links the spindle-vel-cmd signal to the 7i76 analogue output.

I expect that all you need to do is to change the single line:
Code:
net spindle-vel-cmd <= motion.spindle-speed-out
to
Code:
net spindle-vel-cmd <= motion.spindle-speed-out-abs
The following user(s) said Thank You: Skippy1

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #109979 by Skippy1
Andy,

Thanks very much for your time.

This and other attempts generally result in an error on startup, the summary of which is - Pin 'motion.spindle-speed-out-abs' does not exist. Using HALSHOW - Pins, motion.spindle-speed-out is listed, but motion.spindle-speed-out-abs is not.

Please note that I am using version 2.5.5 of Linuxcnc, and a trawl of the forum indicates that one or two other people have had a similar problem, which was ( as best as I can tell), resolved when they upgraded to 2.7.

I assume that there is no easy way to 'slip' another pin into the program, so I may try loading the current version of Linuxcnc on another machine and give it a whirl.

Cheers, Steve

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #109981 by PCW
Yeah the absolute spindle speed pin was added somewhere around LinuxCNC 2.6 AFAIKR

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.375 seconds
Powered by Kunena Forum