Can't add negative number to Low Range Spindle Speed RatioRatio <milling machine as a lathe, resolved>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

cncsnw
Posts: 3866
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cncsnw »

Perhaps this has been a bug in the lathe software for a long time, and it has gone unnoticed because lathe headstocks usually do not reverse direction in different gear ranges, the way a milling head with a back gear does.
cnckeith
Posts: 7375
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cnckeith »

not a bug that is the expected behavior with Lathe.


lathe manual needs updated to state you can't use a negative number with lathe.

and lathe wizard value check needs changed so it informs you of proper acceptable range values
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cnckeith
Posts: 7375
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cnckeith »

we can lift the requirement for low range to be lower than medium range so you can really mix things up if you want ;-)
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncsnw
Posts: 3866
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cncsnw »

cnckeith wrote:not a bug that is the expected behavior with Lathe.
lathe manual needs updated to state you can't use a negative number with lathe.
From the current AcornSix "acorn_lathe_plc.src":

Code: Select all

SpinRangeReversed_M             IS MEM162
and:

Code: Select all

; Use the gear range number to set the range flags and speed ratio.
IF SpindleRange_W == 1 THEN SET SV_SPINDLE_LOW_RANGE,
                            RST SV_SPINDLE_MID_RANGE,
                            SpinRangeAdjust_FW = SV_MACHINE_PARAMETER_65
; [ranges 2 and 3, with P66 and P67, omitted for brevity]
IF SpindleRange_W == 4 THEN RST SV_SPINDLE_LOW_RANGE,
                            RST SV_SPINDLE_MID_RANGE,
                            SpinRangeAdjust_FW = 1.0

; If the speed ratio parameter is negative, reverse the motor.
; Always use the absolute value of the parameter as the real ratio.
IF SpinRangeAdjust_FW < 0.0 THEN (SpinRangeReversed_M),
                                 SpinRangeAdjust_FW = -SpinRangeAdjust_FW
and:

Code: Select all

IF SpindleDirection_M ^ SpinRangeReversed_M THEN (SpindleDirectionOut_M)
If negative values are prohibited in P65, P66 and P67, why does the supplied PLC program still use that as the method of indicating a speed range with reverse gearing?

If negative values are prohibited in P65, P66 and P67, what is the factory-recommended method for supporting a speed range with reverse gearing?
cnckeith
Posts: 7375
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cnckeith »

- these lathe acorn and acornsix plc Template sections were just copied from the mill and it doesn't hurt. guess we could do some house keeping but we've got more important things to be working on.

- YES the Lathe plc will take a negative value BUT, it is CNC12 lathe does not.

- The factory method is to install a gear range selector/indicator switch and define an input as a BackGear.

Back gear is available in Mill and Router Wizard. so you could copy that logic over to the Lathe if you wanted.
backgear.png
- We consider Lathes with reversing gear ranges as a custom PLC item and it is not supported with with the Wizard. Its up to the Integrator/user to customize the PLC for this rare functionality.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncsnw
Posts: 3866
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cncsnw »

The Acorn Mill PLC program does not reverse the spindle in response to the "BackGear" input.

The Acorn Mill PLC program reverses the spindle in response to a negative value in P65.
msauto
Posts: 42
Joined: Wed Sep 04, 2019 3:06 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by msauto »

Wow this got way more complicated than I expected. :o Thanks for all the help and suggestions. I have been planning to add an input switch to the gear selector lever for cnc12 mill as (Keith suggested) for a while and if it will allow accurate speed output in both mill & lathe, I will call it a solution to my neg speed problem. Unfortunately for some reason this morning cnc12 lathe decided that not only would it not except a neg number but it started disregarding any ratio that I put in for low range! :roll: , so all my speed readings are in high gear ratio. :?
I figured i had fat fingered something messing around in the plc so i just did a clean install off cnc12 lathe 5.08 and reentered all my wizard info thinking maybe this would fix both neg values & high range speed reporting... :lol: :x NOPE... Anyone have any ideas as to why even though my low range field reads .117 ratio cnc12 lathe only displays high range speed values now? It was showing low range neg values yesterday i.e... -500 rpm in low vs +2500 in high (not exact but close).
Thanks again for all the help. I really thought this would have a simple solution.
cnckeith
Posts: 7375
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cnckeith »

cncsnw wrote: Mon Apr 01, 2024 5:22 pm The Acorn Mill PLC program does not reverse the spindle in response to the "BackGear" input.

The Acorn Mill PLC program reverses the spindle in response to a negative value in P65.
correct. that is why i said for a lathe you roll your own plc logic and m codes if you want this feature.

in 35 years i have never run into a lathe that has gear range that reverses direction of the spindle.

if a user is trying to use a mill as a lathe then its up to them to customize the PLC/switches/logic to get what they want.

i looked at the cnc12 code and there haven't been any changes to range parameters since 2010. CNC12 has been this way for a long time.
I remember a few other users like wells index doing a mill lathe combo machine and they used CNC12 as it is now with their own custom logic to accommodate the direction change of the milling head in lathe cnc12.

should we support it directly? sure. i'll put it on the list. for now the tools are there to do want you want.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncsnw
Posts: 3866
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by cncsnw »

Keith,

You are right that this is an extremely rare requirement for a lathe (I have never encountered it on a real lathe before either).

However, since we have allowed negative values in the ratio parameters in the mill software since at least v3.04, and nearly all PLC programs -- mill and lathe -- for the past 13 years have supported reversal via a negative ratio, is seems like a rational enough choice to extend this feature to the lathe software.

It seems mostly a matter of removing an unnecessary restriction, and removing one more difference between the mill code and the lathe code.

Making this change would, of course, require the due diligence of checking for places where CNC12 Lathe uses P65, P66 and P67 -- perhaps while trying to predict run time when graphing G99-mode programs, and perhaps in estimating accel/decel of G99-mode moves -- and making sure that all of those references use an absolute value.
msauto
Posts: 42
Joined: Wed Sep 04, 2019 3:06 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Can't add negative number to Low Range Spindle Speed RatioRatio

Post by msauto »

Well please post back here if you add it... for now though I have givin up on the neg value issue.

I can cut the threads I need if I can just get it to report accurate low spindle speed. (I will just enter a positive number on my encoder when using low gear).

But I cant get the spindle readout to display low gear ratios neg or positive .

I have entered .117 into the low ratio field in the wizard and verified that it set in parameter 65 but when i push the spin low button on the vcp the reported spindle speed doesn't change. Any Ideas?

I attached an updated report from after the fresh install just incase.
Attachments
report_0479B7ADC6A1-0131202923_2024-04-02_11-58-45.zip
(866.67 KiB) Downloaded 3 times
Post Reply