Simple spindle configuration (mill)

More
11 Oct 2021 10:34 - 11 Oct 2021 10:38 #222836 by step4linux
hello,
I built a pretty straight forward router with xyz steppers and a spindle driven by a VFD based on LinucCNC 2.8, gmoccapy and a MESA 7i76. I made the configuration by pncconf and It works well so far, but there is one remaining thing a could not completely finish:
I can switch on and off the spindle in both directions in manual mode and by gcode. But I do not understand how to scale the analog output of the MESA 7i76. Did I something miss in pncconf? Is there any useful documentation on that topic?

pncconf created the following lines in hal and ini:
net spindle-on hm2_7i76e.0.7i76.0.0.spinena
net spindle-ccw hm2_7i76e.0.7i76.0.0.spindir
net spindle-vel-cmd-rpm-abs hm2_7i76e.0.7i76.0.0.spinout

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-on <= 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

[SPINDLE_9]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 2000.0

thank you for any help, kind regards, Gerd
Last edit: 11 Oct 2021 10:38 by step4linux.

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

More
12 Oct 2021 19:58 #222965 by tommylight
This is just one of the examples from a machine i retrofited a while ago, first part .ini second part is from .hal.
DEADBAND = 0.0
MAX_OUTPUT = 6000.0
ENCODER_SCALE = -1024.0
OUTPUT_SCALE = 6000
OUTPUT_MIN_LIMIT = -6000
OUTPUT_MAX_LIMIT = 6000
setp   hm2_7i92.0.7i77.0.1.analogout5-scalemax  [SPINDLE_9]OUTPUT_SCALE
setp   hm2_7i92.0.7i77.0.1.analogout5-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_7i92.0.7i77.0.1.analogout5-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT
The following user(s) said Thank You: step4linux

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

More
12 Oct 2021 21:06 - 12 Oct 2021 21:10 #222971 by 0x2102
Just to add on to what "tommylight" wrote....

The 7i76e doesn't provide 0-10v output like a 7i77 for example. Not sure if that is clear. You will need to connect an isolated power supply (e.g. 12V to Spindle+ and GND to Spindle-).

The result is a potential "SPINDLE OUT" output of 0-12V. Most drives require 0-10V and you need to scale the output.

TB4 PIN:
1 SPINDLE-
2 SPINDLE OUT
3 SPINDLE+

Example:
Spindle has 24000rpm @10V, Output Scale will tell LCNC that 100% or 12V output equals 28800. We just need 10V for 24000 rpm.

MAX_OUTPUT = 24000
OUTPUT_SCALE = 28800
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 24000

PS: Forgot to mention, some VFD's provide 10V / GND for 7i76e - in this case OUTPUT_SCALE = MAX_OUTPUT
Last edit: 12 Oct 2021 21:10 by 0x2102.
The following user(s) said Thank You: step4linux, tommylight

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

More
14 Oct 2021 07:47 #223062 by step4linux
thank you guys, it appears now to work!
yes I understand the concept of the 7i76e hardware, this was the simple point :-). The VFD has a 5Vout and a 5Vin terminal to connect the "potentiometer" of the 7i76e.

I add the following to hal:
setp hm2_7i76e.0.7i76.0.0.spinout-scalemax 24000
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim 24000
setp hm2_7i76e.0.7i76.0.0.spinout-minlim 0

Of course it would be possible to do it via INI, but still you need some lines like above in hal to get the values from INI. I am wondering why there is nothing like this from pncconf.

regards Gerd

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

Time to create page: 0.062 seconds
Powered by Kunena Forum