M CODES!

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

ART
Posts: 11
Joined: Fri Aug 20, 2021 10:47 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 402E71D16818-0414214669
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: M CODES!

Post by ART »

eng199 wrote: Fri Sep 10, 2021 4:04 pm Just toss an L1 in there like so:
M130 L1 "C:\cncm\ncfiles\print.bat"

page 13-16 in the v3.16 Mill manual I was looking at
THANKS..I'll be trying it out.
eng199
Posts: 373
Joined: Fri Jan 10, 2014 11:29 am
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
Location: Howard, PA

Re: M CODES!

Post by eng199 »

Also, I didn't see your .bat or .bmp, so I tested with a simple print.bat, just to see that prtLABEL.txt was updating.

test print.bat contents:
type ncfiles\prtLABEL.txt
pause
ART
Posts: 11
Joined: Fri Aug 20, 2021 10:47 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 402E71D16818-0414214669
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: M CODES!

Post by ART »

eng199 wrote: Fri Sep 10, 2021 4:19 pm Also, I didn't see your .bat or .bmp, so I tested with a simple print.bat, just to see that prtLABEL.txt was updating.

test print.bat contents:
type ncfiles\prtLABEL.txt
pause
Thanks for your help, the .bat script is in my first post, the forum doesn't let me upload any .bat or .bmp file for some reason.
I tried your previous suggestion and still did not worked out, there is something very weird going on with my plc at this point. I'm running out of hair!! :!:
eng199
Posts: 373
Joined: Fri Jan 10, 2014 11:29 am
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
Location: Howard, PA

Re: M CODES!

Post by eng199 »

I worked with your atest.cnc file.
As I understand it, you had 2 problems:
1. .bat running too many times
2. file contents not updating after each M123

Do you still encounter both problems 1 and 2, or just one, or something else?
ART
Posts: 11
Joined: Fri Aug 20, 2021 10:47 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 402E71D16818-0414214669
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: M CODES!

Post by ART »

this a screen printing  of how many  .bmp I get after running the gcode
this a screen printing of how many .bmp I get after running the gcode
eng199 wrote: Fri Sep 10, 2021 4:35 pm I worked with your atest.cnc file.
As I understand it, you had 2 problems:
1. .bat running too many times
2. file contents not updating after each M123

Do you still encounter both problems 1 and 2, or just one, or something else?
Ok, if in M130 L1 in bought iteration nothing happens, no .bat is called.
if I remove M130 L1 from the first iteration but not the second nothing happens, no .bat is called
If I only use M130 normally in 1st an 2nd iteration then I get 4 cmd windows and 4 .bmp but the file name belongs to the 2nd iteration and then I get a final cmd window and 1 final .bmp of the Last M123 or second iteration.
Weird isn't it?
I might need some TeamViewer time.
eng199
Posts: 373
Joined: Fri Jan 10, 2014 11:29 am
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
Location: Howard, PA

Re: M CODES!

Post by eng199 »

I am afraid I don't exactly follow what you are doing. Attached is the test I ran with parameter 150 = 2.

print.bat contents:
type ncfiles\prtLABEL.txt
pause

I suggest testing like this before using your more complicated .bat with the environment variables, etc.
Attachments
atest.cnc
(1.14 KiB) Downloaded 63 times
Post Reply