Hello Guest it is March 29, 2024, 05:29:18 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Newlands

Pages: 1
1
Mach4 General Discussion / Spindle speed not correct
« on: January 22, 2021, 03:23:23 PM »
I’ve failed to get to the bottom of this so far. The setup is a 2.2kW water cooled spindle with a HuanYang vfd, and Mach4 with an Ethernet Smoothstepper and an MB3 breakout board.

Using MBI, if I run M3 S*********x I don’t get the commanded spindle speed. At lower speeds, the spindle runs slightly faster than it should, and at the higher speeds it is slower, eg

6000rpm, 121Hz, gives me 7400

9000rpm, 152Hz, 9000

12,000rpm, 181Hz, 10800

15,000, 214, 12750

18,000, 250, 14,900

21,000, 283Hz, 16,800

24,000, 318 Hz, 19,200

The actual frequency delivered clearly corresponds to the resulting rpm of the spindle, and this is borne out with checks I’ve done so far. I disconnected the analogue output (two wires) from the breakout board and meter to check the analogue output, which shows a perfect proportional output from 0 to 10volts at all speeds ie m3 s6000 gives 2.5v, s12000 gives 5v, etc.

I also connected a benchtop power supply to the vfd analogue input, and again checking with various voltages from 0 to 10v gives the correct frequency and spindle speed, right up to the 400Hz maximum which should be 24,000rpm.

So, the ESS/MB3 is working correctly when tested, and so is the VFD. Mach4 also seems to be delivering the correct information to the ESS. But when it is connected up it doesn’t.

i have the vfd set to 400Hz Max, and 120Hz minimum. I have trawled the Internet for the correct parameters and I’m pretty confident that I have them correct. There are some settings in Mach4 which I’m not altogether sure about - the spindle is set up in the ESS confit as PWM, frequency 50Hz. There is no sensor fitted to it so PID is not relevant. The min and max speeds in the Mach4 config dialog is set to zero and 24,000.

Two possibles that occur to me - first there is a setting somewhere in Mach4 or in the vfd parameters that I’ve missed, or secondly there is some sort of electrical noise that is disrupting the analogue output of the ESS.

2
Mach4 General Discussion / Can someone check my code please?
« on: January 12, 2021, 01:14:08 PM »
Apologies for this rather basic question, but I've just spent 3 days trying to get the Cycle START, Feed HOLD and Cycle STOP buttons working on my control panel, and only today realised that it needs some code written in the screen editor!
Thanks to a search on here I managed to get the buttons working (at least they seem to be) by adding the following:
Code: [Select]
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
    machEnabled = state;
    ButtonEnable()
end,

[mc.ISIG_INPUT0] = function (state)
   
end,

-- The following three blocks enable the buttons on the control panel to work
[mc.ISIG_INPUT0] = function (state)
    if (state == 1) then   
        CycleStart() --0 G Code executed when Cycle START button is pressed
    end

end,

[mc.ISIG_INPUT1] = function (state)
    if (state == 1) then   
        mc.mcCntlFeedHold(0) --Stepper motors stop when Feed HOLD button is pressed,
-- spindle remains running, code can be resumed from the same point
    end

end,

[mc.ISIG_INPUT2] = function (state)
    if (state == 1) then   
        CycleStop(0) -- Stepper motors and spindle are stopped, cycle is aborted
    end
end,
I'd be very grateful if someone could check that it is going to perform as it should, and in particular whether "then.. mc.mcCntlFeedHold(0)" and  "then.. CycleStop(0)" are the correct form to use for this. Many thanks. Steve.

Pages: 1