Displaying M codes

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
Toaster
Posts: 199
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Displaying M codes

Post by Toaster »

He all, I'm doing some script writing and I'm using some M variables, 150, 151, 152 etc. I know how to write them, but how do I display their values?

I'd like to be able to check them to see if my scripts are writing them properly.

I'd also like to pop them up on the screen during some of my scripts.

I tried writing a line of code that used M225 to display a variable on screen, but I couldn't decipher the programming manual enough to get it to work.

Does anyone have any suggestions or perhaps a code example I could check out?
cnckeith
Posts: 7334
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: Displaying M codes

Post by cnckeith »

maybe pages 259-262 of the mill operators manual will help?
M200, M223, M224, M225 & M290 - Formatted String section..
http://www.centroidcnc.com/centroid_diy ... -v4.12.pdf
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
Toaster
Posts: 199
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Displaying M codes

Post by Toaster »

That's what I was following, but I just couldn't get it to work. Even something as simple as putting the current X position on the screen was failing on me... Are there any good code examples out there?
cnckeith
Posts: 7334
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: Displaying M codes

Post by cnckeith »

i'll ask mario to chime in
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
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

Re: Displaying M codes

Post by Centroid_Tech »

Sorry for the delayed response. You would set a variable, let's say #100 to 0 if you wish to have the message displayed until the Cycle Start button is pressed or an actual value if you wish to have it displayed for certain amount of time. Then your command would look like the following.

M225 #100 "Variable 150 is %f." #150

The %f tells the control that variable is a floating point value. You can add multiple variables to that line which would look like the following.

M225 #100 "Variable 150 is %f, Variable 151 is %f, Variable 152 is %f." #150 #151 #152

or

M225 #100 "Variable 150 is %f \n Variable 151 is %f \n Variable 152 is %f." #150 #151 #152 where the \n is a carriage return to make the display a little cleaner.

Hope that helps.
When requesting support, please ALWAYS post a current report. Find out how to take a report from your Acorn, CNC11 or CNC10 system here: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

If your question is PLC, Macro or program related, please also post a copy of the program or macro as well.

Without the above information we may not be able to help and/or reply until the required information is posted..
Post Reply