Configuring Acorn for 0-5V spindle control

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
GranDan
Posts: 6
Joined: Mon Oct 22, 2018 6:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: 40BD322E7843-0906181181

Configuring Acorn for 0-5V spindle control

Post by GranDan »

I have drilled down in multiple posts to get clarity on configuring Acorn for 0-5V spindle control. It appears there are four possible solutions:
1) Throw away your 0-5V spindle drive and get a drive and motor that works on 0-10V (allow me a little humor here) = unacceptable
2) Install a KBSI-240D. Cost: $60 - $100 depending on source, shipping etc. = marginally acceptable if you don't mind spending the $$
3) Make a simple voltage divider circuit with a couple of resistors. = cheap, simple, easy, acceptable, but not an elegant solution IMHO.
4) Someone has alluded to the possibility of editing the PLC code by changing the DAC values. = elegant, no cost (except time and possible fear of mistakes).
So, is it possible to edit the PLC code to cause Acorn to output 0-5V, or not? If so, what values? Even better, a screen shot of the edited code - unless it is classified beyond my security clearance. ;)
Thanks guys,
Love y'all
Nigelo
Posts: 87
Joined: Tue Dec 11, 2018 4:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: F045DA80C8B8-0905181172
Location: UK

Re: Configuring Acorn for 0-5V spindle control

Post by Nigelo »

Suggest you wait for CNC12 v4.60 which supports both 0-5v and PWM that is about to be released once the public beta has finished

Enhancement list on the following link
viewtopic.php?f=60&t=5094
cncsnw
Posts: 1740
Joined: Wed Mar 24, 2010 5:48 pm

Re: Configuring Acorn for 0-5V spindle control

Post by cncsnw »

There are several ways it could be done. Among the simplest would be to let all of the existing code that calculates the output do its job, then divide by two at the point of converting it to the integer "12BitSpeed_W", limiting it to a valid range, and writing to the analog output.

Locate in your PLC program the code which reads:

Code: Select all

;Convert to integer word for DAC & I/O display
IF True THEN TwelveBitSpeed_W = TwelveBitSpeed_FW

; Bound min to 0, max to 4095
IF TwelveBitSpeed_W < 0 THEN TwelveBitSpeed_W = 0
IF TwelveBitSpeed_W > 4095 THEN TwelveBitSpeed_W = 4095

If !SpinAutoModeLED && G540SpindleStage && SpindleDisable_M THEN TwelveBitSpeed_W = 0
If !SpinAutoModeLED && !G540SpindleStage && !SpindleEnableOut_M THEN TwelveBitSpeed_W = 0

; Output to DAC
IF True THEN WTB TwelveBitSpeed_W SpinAnalogOutBit0 12
Change two lines (four counting comments) so it reads:

Code: Select all

;Convert to integer word for DAC & I/O display
; Also divide by two, to get 0-5V output instead of 0-10V output
IF True THEN TwelveBitSpeed_W = TwelveBitSpeed_FW / 2.0

; Bound min to 0, max to 2047.  2047 is maximum for 5VDC.
IF TwelveBitSpeed_W < 0 THEN TwelveBitSpeed_W = 0
IF TwelveBitSpeed_W > 2047 THEN TwelveBitSpeed_W = 2047

If !SpinAutoModeLED && G540SpindleStage && SpindleDisable_M THEN TwelveBitSpeed_W = 0
If !SpinAutoModeLED && !G540SpindleStage && !SpindleEnableOut_M THEN TwelveBitSpeed_W = 0

; Output to DAC
IF True THEN WTB TwelveBitSpeed_W SpinAnalogOutBit0 12
GranDan
Posts: 6
Joined: Mon Oct 22, 2018 6:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: 40BD322E7843-0906181181

Re: Configuring Acorn for 0-5V spindle control

Post by GranDan »

Thanks guys. PLC mod works perfectly
jmezomatrix
Posts: 2
Joined: Sat Oct 12, 2019 3:17 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: Configuring Acorn for 0-5V spindle control

Post by jmezomatrix »

I need to do this very procedure for 5v control. What is the file name that the changes need to be made in?
Thanks,
John
cnckeith
Posts: 2993
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
CNC Control System Serial Number: none
Contact:

Re: Configuring Acorn for 0-5V spindle control

Post by cnckeith »

try out the public beta, 0-5 analog out is a selection in the Acorn Wizard.
0-5.PNG
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.)
Post Reply