CNC12 cannot search gcode <custom macro issue, cncsnw resolved> >

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

CNC12 cannot search gcode <custom macro issue, cncsnw resolved> >

Post by TCandee »

I have run into a strange problem with the cnc12 software. This issue started off as just a once in awhile problem but has developed into an almost all-the-time issue. When I go to run a program and search for a tool or line # it just sits there doing nothing. See the screenshot. I tried leaving this overnight to see if it would just take a really long time but it was still stuck the next morning. I have also reinstalled CNC12. Actually, I upgraded from 4.62 to 4.64. Still having the same problem.

I am starting to think this is a computer hardware problem. Sometimes if I leave the computer off overnight the next day the problem goes away for a while.

This is a 4 axis bench mill and i bought the all-in-one computer from centroid several years ago. Using leadshine ez servos and a lenze SMV VFD.
Attachments
report_0479B7E799EF-0131202930_2022-08-01_11-33-57.zip
(1 MiB) Downloaded 20 times
Capture.JPG
cnckeith
Posts: 7306
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: CNC12 cannot search gcode

Post by cnckeith »

post the offending g code program
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
TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

Re: CNC12 cannot search gcode

Post by TCandee »

Here is the code. It happens on other Gide files as well.

I just popped into the shop and gave it a shot and it worked, but then later it did not.
Attachments
X Limit Base .NC
(174.75 KiB) Downloaded 22 times
cnckeith
Posts: 7306
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: CNC12 cannot search gcode

Post by cnckeith »

out of curiosity what cad/cam system generated "X Limit Base.NC"?
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: 7306
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: CNC12 cannot search gcode

Post by cnckeith »

also looking at the report.zip the steps per rev setting you are using is below the recommended minimum of 1600 steps per rev.
what make model axis motor drive is being used?
you should review this post.
https://centroidcncforum.com/viewtopic.php?f=63&t=1801
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: 3836
Joined: Wed Mar 24, 2010 5:48 pm

Re: CNC12 cannot search gcode

Post by cncsnw »

What device do you have wired to INP6?

Your M3 macro suggests it might be a spindle lockpin-retracted sensor (closed = spindle unlocked, open = spindle locked).

Your PLC program (presumably based on Wizard selections) suggests it is a drawbar-unclamped sensor (closed = tool unclamped, open = tool clamped).

Your M3 macro reads as follows:

Code: Select all

;-------
;M3 macro
; Displays message to select auto spindle mode if it is not set
;-------

IF #50006 THEN GOTO 200
M225 #100 "SPINDLE IS LOCKED.  UNLOCK AND PRESS CYCLE START TO CONTINUE"
#100 = 0
N100
IF !#50006 THEN M225 #100 "SPINDLE IS LOCKED.  UNLOCK AND PRESS CYCLE START TO CONTINUE"
IF !#50006 THEN GOTO 100
N200
IF #4202 || #4201 THEN GOTO 400
M95 /2
M94 /1
IF #61058 THEN GOTO 400 ;skip the check if AutoSpindle is on
M225 #100 "Please Select Auto Spindle To Continue!"
G4 P.1
N300
IF !#61058 THEN M225 #100 "Please Select Auto Spindle To Continue!" ;61058 = JPO2/SpindleAutoManualLED
G4 P.5
IF !#61058 THEN GOTO 300
N400
Note the first block: if INP6 is open (0), then the code will loop indefinitely back to N100. When you are actually running the program, M225 will put a prompt on the screen. However, in search mode, M225 prompts are skipped.

With the code above, if you try to search beyond an M3 code while INP6 is open, CNC12 will get stuck in an infinite loop and never get to the search target.

The error is that the code that was added to check a spindle lock should have been inserted *after* the line that skips to N400 when using Search or Graph.
TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

Re: CNC12 cannot search gcode

Post by TCandee »

Ok. Not surprising that my programming skills would be the problem. I will see if I can edit it to make it not loop. I started a thread when I was writing that code but didn’t get much help. The programming manual is a like Greek to me.

I am away from the shop at the moment but I will get the model etc of the ez servos in a bit.

Camworks/Solidworks wrote the code posted. I’ve been told it implements some code strange. I know there is issues with cutter comp on round holes contour ops. It will gouge a tool radius at the beginning of the cut if you aren’t careful about the leadin. I don’t use any canned cycles because they aren’t implemented well. Im sure the PP could be fixed to eliminate these problems but I don’t know how. I bought the PP from camworks and they should fix it but I am not knowledgeable enough to tell them what needs to be fixed.
cncsnw
Posts: 3836
Joined: Wed Mar 24, 2010 5:48 pm

Re: CNC12 cannot search gcode

Post by cncsnw »

A better version of the macro would be:

Code: Select all

;-------
;M3 macro
; Displays message to select auto spindle mode if it is not set
;-------

IF #4202 || #4201 THEN GOTO 400  ; skip all in search or graph
  #100 = 0
  N100
    IF !#50006 THEN M225 #100 "SPINDLE IS LOCKED.  UNLOCK AND PRESS CYCLE START TO CONTINUE"
    IF !#50006 THEN GOTO 100
  M95 /2
  M94 /1
  IF #61058 THEN GOTO 400 ;skip the check if AutoSpindle is on
  M225 #100 "Please Select Auto Spindle To Continue!"
  G4 P.1
  N300
    IF !#61058 THEN M225 #100 "Please Select Auto Spindle To Continue!" ;61058 = JPO2/SpindleAutoManualLED
    G4 P.5
  IF !#61058 THEN GOTO 300
N400
cnckeith
Posts: 7306
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: CNC12 cannot search gcode

Post by cnckeith »

nice detective work marc!

Tcandee, after you get your macro fixed...review your steps per rev and overall turns ratio settings as per my post above looks to me this machines motion could be improved/optimized with some simple changes.
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
TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

Re: CNC12 cannot search gcode <custom macro issue, cncsnw resolved> >

Post by TCandee »

The leadshine easy servos I have are as follows:

X and Y: ES-MH334480 servo and ES-DH2306 Drive

Z: ES-MH342200 and ES-DH2306

I will look into changing the settings.

CNCSNW, thank you very much!!!

This is a spindle lock for a PDB. It has caught me several times when I forgot to unlock it after a tool change. Wish I could figure out how to make it check this when the spindle is turned on from the VCP or MPG.
Post Reply