Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Fred Grover on July 21, 2016, 10:05:55 PM

Title: calibrate mach3 to the vfd or the vfd to mach
Post by: Fred Grover on July 21, 2016, 10:05:55 PM
Sorry if this has been asked before but I could not find anything doing a search so I am hoping some of the Pros or others who may know can help with this. I have a CNC Pilot Pro 5050 and it uses a Watercoled Spindle and a VFD and it is wired up to have Mach 3 and the USB Controller/Handheld Jogger turn the Spindle on and off. It is wired and when I click on the Spindle + or - Buttons either in Mach 3 or the USB Jogger it takes it a while to slow the spindle down. So here is the question I am asking if anyone has ever done this and if it is even possible to make it work this way?

""How do I correct the settings to calibrate mach 3 to the vfd or the vfd to mach?"

Is the above question even possible? Thanks for any help. I thought there would be a way to make them sync up to have the same readings in Mach 3 and the VFD RPM Screen for the Spindle.

Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Davek0974 on July 22, 2016, 02:11:19 AM
Is the speed controlled by Mach or not?

If yes then calibration is via the "Spindle Pulleys" menu option, my one needed a max speed of 24000 and a min speed of -2000 to get the ratio somewhere near correct. It's not spot on but near enough, don't forget if this is one of the usual water-cooled spindles they are only usable down to about 8000-9000 rpm.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: mc on July 22, 2016, 05:05:11 AM
There is a spindle calibration file. If the VFD is controlled via Mach, then it will most likely be via a step/dir to 0-10V converter.
VFDs themselves usually a fairly linear relationship between input voltage and commanded speed, it's the 0-10V generator that will often not be very linear. The spindle calibration file allows you to compensate for non-linearity.

I'm pretty sure the auto calibration feature in Mach 3 hasn't worked for a good few versions, but if you do a search for spindle calibration, it should throw up some posts about how to edit the file manually. You may need to also have a search over on the yahoo group.

The other option, depending on the VFD, would be to implement Modbus control of the VFD. That way you get very accurate control, however implementing Modbus can be pretty problematic, especially if you're not of a more geeky nature!
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Davek0974 on July 22, 2016, 05:17:03 AM
AFIK the spindle cal feature needs feedback from the spindle - tacho etc. for it to work, and from what i read when looking into this, it doesn't work very well ;)
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: mc on July 22, 2016, 05:27:54 AM
To use the auto cal feature, you need feedback, but it got broken at some point in time.
It's still possible to manually edit the file though, but I can't remember the correct format.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Fred Grover on July 22, 2016, 06:27:41 PM
Thanks everyone and I hope there is a way to figure this out and make it work somewhat. Maybe someone will posts some good links for information that knows more than me on this issue and can make it work this way. I appreciate the feedback and help.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: mc on July 22, 2016, 07:00:24 PM
The key word to search for is "linearity", or "linearity.dat"
The linearity.dat is the file that stores the calibration info, but it's not user readable.

http://www.machsupport.com/forum/index.php/topic,31386.0.html has a spreadsheet for calibrating
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Greolt on July 22, 2016, 10:26:39 PM
..... and when I click on the Spindle + or - Buttons either in Mach 3 or the USB Jogger it takes it a while to slow the spindle down.

Sounds to me like Mach3 is controlling your VFD.

IMO modbus is a far superior way to have Mach3 communicate and control a VFD.

Have you considered whether the VFD is ramping up and/or down slowly because that's how the VFD is setup?
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Fred Grover on July 23, 2016, 01:57:53 AM
Greolt I am not sure to be honest as I am new and just learning or trying to learn more on this to make it work with what I have. I am not sure if ModBus would work with what I have or not so if you can give me some more information or message me I can tell you what I have and we can go from there. Thanks again everyone.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Davek0974 on July 23, 2016, 03:31:01 AM

Have you considered whether the VFD is ramping up and/or down slowly because that's how the VFD is setup?

If this is a pre-configured machine, probably with a Huanyang VFD and water-cooled 2.2kw spindle which is the most common setup, it could indeed be programmed with a slow curve for speed +/-

On your screen, enter an MDI of something like M03 S24000 and try and time how long it takes to get from standstill to a constant speed, normally around 3-4 seconds. Your one could just be programmed for a little extra safety margin to protect the somewhat delicate nature of these low-end drives ;)

It can be adjusted but one mistake in the settings and you will be in for a lot of head scratching and pain possibly.

When finished, just enter M05 and press enter or press the Stop on screen, spindle should stop, again time this as they will normally slow down on a curve as well rather than just free-wheeling to a stop.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Fred Grover on July 23, 2016, 10:21:01 AM
ThanDavek0974. So when using those settings in the mach 3 MDI Screen/Tab what does this do for me? Will that then make it work for the speed/RPM and show it correctly when clicking on the + or - Buttons for speeding the spindle up or slowing it down with accurate RPM's being shown. This is my goal to have this work. For example, if when it is carving a part on different material I can then adjust the Spindle Speed on the fly for experimental purposes and the Feedrates to mark them down to get the best cut if that makes sense. So in reality I am wanting to get the RPM of the Spindle synced/calibrated to show the same RPM on the VFD and in Mach 3 to be the same or close. Thanks for the help and I do hope this makes sense. Let me know if you think this is possible with this machine and setup.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Davek0974 on July 23, 2016, 10:55:35 AM
You said earlier that pressing +/- did make the speed change just did it slowly???

Is that the case?

If yes them Mach IS controlling your speed, its just not set right, if NO then you have more work to i'm afraid.

All my code will (should) do is to start your spindle and send it to max speed, nothing else, just wanted to gain an idea of your spine speed control ramp-up setting.
The last bit of code should simply turn the spindle off.
Title: Re: calibrate mach3 to the vfd or the vfd to mach
Post by: Fred Grover on July 23, 2016, 11:07:50 AM
Yes Davek0974 I also have a USB Controller and when I click the + or - Buttons it takes about 5 to 10 times to have the spindle speed change on the VFD and in Mach 3 where is says RPM it stays at 0 but the other two show it showed down if that makes sense. Not sure why it does not work more accurately or what I am setting wrong. So when you say Mach 3 is controlling the speed it is just not set right then what do I need to do to get it right. Like I said when I click on the + or - button it is not an immediate thing and takes a few times clicking to see any result if that also helps.