Another 7i76 Spindle Setup Question

More
11 Apr 2018 03:34 #108787 by Skippy1
Chaps,

I've used PnCConf to configure a 5i25/7i76 setup for a lathe on Version 2.5.5 of Linuxcnc. It's all gone well, so a big thanks to Mesa and those who develop/support Linuxcnc.

I have configured the spindle drive using the TB4 spindle output to control a ABB VFD, and the TB3 encoder input to read a spindle encoder. Reading a few other posts, I've managed to get spindle enable, direction, and speed sort of working, and would be thankful if someone could run a critical eye over the following settings, and let me know where I've messed it up. Note that the maximum rpm of the spindle motor is currently set at 1465rpm, and the encoder is quadrature 1024ppr.

Cheers, Steve.





Attachments:

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

More
11 Apr 2018 16:14 #108823 by andypugh
What is the problem that you are having?

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

More
11 Apr 2018 22:39 #108854 by Skippy1
Well, nothing desperately wrong, just little buggy things. When operating with the Manual Control (F3), I can get full spindle speed at 100%, but spindle speed drops to 0rpm when the Spindle Override slider is at 28%. (This could be a separate VFD issue.) When running the spindle in reverse in Manual Control, the + button slows the spindle down, and the - button speeds it up. And I did have the S Axis Test feature working, but now it has stopped.

So, I assume I've messed something up.

Cheers, Steve

PS. The spindle count now increments by a value of 1 every revolution of the spindle, I'm guessing that's what it is expected to do?

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

More
24 Apr 2018 11:30 #109540 by andypugh

but spindle speed drops to 0rpm when the Spindle Override slider is at 28%. (This could be a separate VFD issue.)

Can you measure the actual control voltage to work out if the problem is what LinuxCNC is doing, or with what the VFD does in response?


quote] When running the spindle in reverse in Manual Control, the + button slows the spindle down, and the - button speeds it up.[/quote]You probably need to link the motion.spindle-speed-out-abs variant of the HAL pin to the VFD. (If you haven't already)

PS. The spindle count now increments by a value of 1 every revolution of the spindle, I'm guessing that's what it is expected to do?

Yes, that is what you need for spindle-synched motion.

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

More
27 Apr 2018 08:13 #109696 by Skippy1
Had another fiddle today, and the spindle speed control problem is definitely the ABB VFD. The MESA card outputs a nice linear 0 to 10 VDC over the 0 to 100% range. The issue is a parameter in the VFD, which prevents the motor turning until the analogue control signal is 20% of the full 10 VDC range (2VDC). The manual notes that they do this as in some configurations, a loss of the analogue signal, or a 0 VDC signal, could cause the drive to go into reverse . (How this could happens when the Mesa card controls the spindle direction is beyond me - the manual must be referring to another configuration.) This parameter can be changed, so I will have another fiddle tomorrow.

I'm still not sure I've got the Output Info limit and scale values in the spindle motor configuration correct. I've tried a few combinations of: -10, 10, 1450, 0, 10, 1450, and eventually returned to -1450, 1450, 1450, as it seems to work best.

Cheers, Steve

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

More
30 Apr 2018 01:00 #109839 by Skippy1
OK, reducing the minimum analogue control signal parameter in the ABB VFD from 20% to 0% has rectified the spindle speed range problem. With manual, Midi, or a program control, the range from 0 to a maximum 1450 rpm is linear over the 0 to 10 volts output from the Mesa card.

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. Checking the voltage output from TB4 SP OUT (wiper) while using Midi control gives the following result.

M3 (forward rotation) S500 - 3.4v and 480rpm, S1000 - 6.8v and 1020rpm. Speed control. All good here.
M4 (reverse rotation) S500 - 6.5v and 1000rpm, S1000 - 3.1v and 440rpm. Speed control, but reversed.

The above results were with the spindle motor configuration Output Info limit and scale values set at -1450, 1450, 1450. Trying a number of different values has not helped.

Any observations or suggestions on my problem would be gratefully received.

Cheers, Steve

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

More
30 Apr 2018 01:50 #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
30 Apr 2018 10:12 - 30 Apr 2018 10:12 #109851 by andypugh

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: 30 Apr 2018 10:12 by andypugh.

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

More
01 May 2018 03:32 #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 danger zone 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
Attachments:

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

More
01 May 2018 12:02 #109900 by andypugh

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:
net spindle-vel-cmd        <=  motion.spindle-speed-out
to
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.

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