Mesa 7i76e Spindle speed (VFD) scaling issue

More
07 Nov 2018 16:23 #120180 by Saloon_Hank
I control the spindle speed though the 7i76e spindle output port (TB4 pins 1, 2 & 3), and everything works, but I cannot get the scaling right. Power to TB4.3 is from the spindle's own 12 VDC output.
There is a section in the INI-file called [SPINDLE_9], but I haven't been able to find any documentation on the parameters.
If someone could point me in the right direction, please. (LinuxCNC 2.7.14).

With the following settings I get close:

#********************
# Spindle
#********************
[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 = 24000.0
OUTPUT_SCALE = 32900
OUTPUT_MIN_LIMIT = 3000
OUTPUT_MAX_LIMIT = 24000

The spindle's operating range is 3.000 - 24.000 rpm.
If I set MAX_OUTPUT or OUTPUT_MAX_LIMIT to anything less than 24000 I won't be able to get full speed.
The value OUTPUT_SCALE = 32900 (empirically found) gives a correct output from 3.000 to 12.000 rpm, but above that it's not linear. S18000 is actually 17.280 and S24000 is actually 21.960 rpm
There shouldn't be a problem with the power, because if I set OUTPUT_SCALE = 24000 I get 24.000 rpm for S24000, but lower speeds are out of scale (4.200rpm@S3000, 15.900rpm@S12000, etc.)

Other values for OUTPUT_SCALE might give really strange results. Eg. OUTPUT_SCALE = 20000 gives 24.000rpm@S18000 and 6.700rpm@S24000 (!)
Therefore I think I've got something completely wrong with the parameters, but without docs it's hard to figure out.

Any advice?

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

More
07 Nov 2018 17:28 - 07 Nov 2018 17:31 #120187 by PCW
That's really non-linear, I would check that the 12V supply is not drooping at any commanded RPM, if not, I would first set OUTPUT_SCALE to a number that gets you 24000 RPM with a commanded 24000 RPM speed, making sure that a setting of
say 23975 RPM is also close (to make sure you are not bounded at the drive) and then if the actual speed accuracy is still
not good enough over the full range, i would use the lincurve component to fix the drives non-linearity.

I don't think LinuxCNCs driver expects you to set a input value greater than the scale value (you are asking the output to set a voltage higher than 12V in this case) so strange results are somewhat expected here. Normally the max-limit value should prevent any input from exceeded the output scale setting.
Last edit: 07 Nov 2018 17:31 by PCW. Reason: typos

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

More
07 Nov 2018 20:22 #120199 by Saloon_Hank
Replied by Saloon_Hank on topic Mesa 7i76e Spindle speed (VFD) scaling issue
Thanks! I'm now starting to understand the parameters.

I measured the [supposed to be] 12 VDC and it shows 13.17 V when spindle is not running, and around 12.85 V when spindle is running. That level was fairly steady (between 12.8 and 12.92) over the whole range, even though that is not ideal.
(a resistor and a zener @10VDC might fix that..)

So, to get 0-10V out on the pot I calculated 12.8/10 * 24000 = 30720 and put in:
MAX_OUTPUT = 30720.0
OUTPUT_SCALE = 30720
OUTPUT_MIN_LIMIT = 3000
OUTPUT_MAX_LIMIT = 24000
The result is much better than before: 3240rpm@S3000, 6528rpm@S6000, 12792rpm@S12000, 18360rpm@S18000 and 24000rpm@S24000.

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

More
08 Nov 2018 12:21 #120253 by andypugh
Replied by andypugh on topic Mesa 7i76e Spindle speed (VFD) scaling issue

There is a section in the INI-file called [SPINDLE_9], but I haven't been able to find any documentation on the parameters.


There is no "special" meaning to the [SPINDLE] section (and it annoys me that the configurator uses index 9).
Some sections of the INI are used explicitly by motion and other modules, but the SPINDLE section is only used to pass values to the HAL.
If you look in the HAL you will see things like [SPINDLE_9]MAXOUTPUT and what happens there is a simple substitution with the value from the INI.
So, to find out what an INI file entry does you need to look for the documentation of the HAL pin that uses it.
(Which, admittedly, is not always trivial to locate)

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

More
09 Nov 2018 18:17 #120342 by Saloon_Hank
Replied by Saloon_Hank on topic Mesa 7i76e Spindle speed (VFD) scaling issue
Thanks Andypugh: Yes, I figured out that INI simply sets the values and I also tried to sort out how they are handled in the HAL after the values are passed to the system. I tried to look through the other postings here [regarding controlling the spindle @7I76E], but I couldn't find anything comparable to my HAL. The parameters where all completely different, so I got lost.
However, just needed that little push from PCW and then I think I got the clue.

With the above mentioned settings it,s now fairly linear, so I'll stick with that for now.
I'm mainly milling wood, so the rpm is not that critical. Sometimes I mill plastics, and that might get sticky if the rpm is too high, but we'll see next time.
I [rarely] mill some aluminum, too, but my mill cannot take any harder materials than that. (One of these 6040's).

Today I also tried different ways to stabilize the 12 VDC from that chinese VFD, but seems that the voltage will always sway some 0.2 VDC, depending on the speed. According to the specs it can source only 30 mA and that, and the fact that there is only about 2.5 VDC to play with, it's tricky to build a high class regulator.

Finally, I have to say, that the Mesa 7I76E is a terrific card! I'll never regret that I "upgraded" with that! It takes so much load off the PC, that everything runs much smoother and milling is a lot faster now.

Thanks PCW and andypugh for your comments!

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

Moderators: PCWjmelson
Time to create page: 0.064 seconds
Powered by Kunena Forum