How to use M41-M43 - SOLVED

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
Muzzer
Posts: 728
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

How to use M41-M43 - SOLVED

Post by Muzzer »

My machine has 2 spindle ratios and my modified M3 / M4 macros correctly select the correct gear range using solenoids. So if the S speed command is below a threshold (eg 1000rpm), the low ratio is engaged. That works fine.

Looking at the manual and the std plc code, issuing M41 from within my M3 macro should cause SpindleRange_W to be set to 1 (indicating low range). This in turn should set the SpinRangeAdjust_FW to equal SV_MACHINE_PARAMETER_65 ie the value of low gear ratio parameter #65 (which is set by the wizard). This should then scale the analog voltage sent to the DAC for the VFD. In this way, the motor speed should be increased by the inverse of the gear ratio.

So for example, with a low gear ratio of 0.2, if I ask for 100rpm in low gear, the VFD should be asked to spin the motor at 500rpm. This isn't happening.

Perhaps related is the fact that when I change to manual spindle control in the VCP and try to select "spin low" or "spin med", nothing happens and the LEDs stay dark. I would expect this action to have a similar effect ie to tell the plc that the user has selected low or med speed ratio.

I'm suspecting I have missed something here, hopefully fairly simple. Either way, I'd be very grateful if somebody could help me. I feel I'm very close to resolution - but no cigar yet!

Thanks for any suggestions. Latest report attached, including my M3 and M4 macros.
report_38D269594F9C-0110180512_2020-06-07_12-05-42.zip
(595.97 KiB) Downloaded 124 times
Last edited by Muzzer on Mon Jun 08, 2020 4:35 pm, edited 1 time in total.
Allin1Chris
Posts: 135
Joined: Wed Jul 31, 2019 12:53 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes

Re: How to use M41-M43

Post by Allin1Chris »

I see you have Backgear and SpindleRangeHigh as inputs. These inputs are kind of the same thing and may be the reason why you cannot switch. (The PLC always takes the gear range inputs over mcodes and other commands).

When BackGear input is on (Green in Alt-I screen) it will put the spindle in highrange, and when Backgear Input is off (red) it will put the spindle in low range.

Like wise, SpindleRangeHigh when on (Green) will put the spindle in high range and when SpindleRangeHigh is off (red) will allow other inputs and commands to change the spindle range. (This is simply due to it being last in the plc logic so will "override" any other input or command)

I assume when you activate Solenoid Outputs 1 or 2 it is activating some sort of gear. You should set this up to Input 1 so when it is High (On) the spindle is in highrange and Low (off) when spindle is in low range. (Perhaps you have a switch of some type or detector that goes high or low when the gear is engaged or not?)

Alternativly, you can try using SpindleLowRange for input 1 as well, assuming input 2 turns off will put it into low range. These inputs set the SpindleRange_W so there should be no need for M41-M43 commands.
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)

Centroid PLC Tutorial Videos
Muzzer
Posts: 728
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: How to use M41-M43

Post by Muzzer »

Hi Chris - that sounds encouraging. Thanks very much for looking into this - I appreciate your support!

Yes, I have pneumatic solenoids controlled by Acorn to shift from high gear (direct) to low gear (reduction) and vice versa. And I have microswitches at each position so I can check that the gears have actually engaged fully. It works pretty well and the macro won't move on until the correct gear has been engaged successfully. It's like a Bridgeport except fully geared, so no change of direction, just ratio.

So I will figure out how to connect the inputs as you describe. It sounds reasonably straightforward but may take me a while to digest! In fact it sounds a little simpler to implement (no M41 etc) as I have the inputs already connected up.

I'll let you know how I get on....
Muzzer
Posts: 728
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

How to use M41-M43 - SOLVED

Post by Muzzer »

I'm pleased to report that simply changing Input 1 to SpindleLowRange (from Backgear) did the trick. You hit the nail on the head there!

Now when I ask for a low speed (my threshold is <1000rpm), it selects low ratio and then displays the correct spindle speed in the CNC12 screen. The VFD is running the motor at the spindle speed divided by the low gear ratio. Setting a speed at 1000rpm or higher changes it back to high ratio - but only when an M3 or M4 is given.

The rest of my macro prevents the spindle running until the gears are properly meshed. In some situations, the gears don't mesh on the first attempt, so I give the motor a tiny nudge and try again in a loop until the switch reports full engagement.

Although my machine has no spindle encoder due to the design of the head, I can do conventional tapping with a tension compression head. The limitation is that I can't peck tap, so I have to do the hole in one go. However, I can't do that in high ratio as the motor doesn't have enough torque in 1:1 ratio. This should do the trick!
Post Reply