Turn on Single Block with WMPG-4 MPG

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
mujenpwr
Posts: 35
Joined: Wed Apr 21, 2021 7:12 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 4519
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Turn on Single Block with WMPG-4 MPG

Post by mujenpwr »

Can the single block function be turned on from a Macro button on the WMPG-4 ?
I did a search and could not find anything.
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Turn on Single Block with WMPG-4 MPG

Post by cncsnw »

It can if you edit that into your PLC program.

Locate the section of your PLC program source which reads:

Code: Select all

;--Single Block Mode
IF SingleBlockKey || KbTogSingleBlock_M || SkinSingleBlock_M THEN (SingleBlockPD)
IF SingleBlockPD && !SingleBlockLED && !SV_PROGRAM_RUNNING
  THEN SET SingleBlockLED
IF SingleBlockPD && SingleBlockLED THEN RST SingleBlockLED
IF SingleBlockLED THEN (SelectSingleBlock)
Modify it to read:

Code: Select all

;--Single Block Mode
IF SingleBlockKey || KbTogSingleBlock_M || SkinSingleBlock_M || MpgMacro1_M THEN (SingleBlockPD)
IF SingleBlockPD && !SingleBlockLED && !SV_PROGRAM_RUNNING
  THEN SET SingleBlockLED
IF SingleBlockPD && SingleBlockLED THEN RST SingleBlockLED
IF SingleBlockLED THEN (SelectSingleBlock)
Save and recompile (e.g. with "mpucomp acorn_mill_plc.src mpu.plc" in a command prompt window, in the c:\cncm directory, assuming it is a mill).
mujenpwr
Posts: 35
Joined: Wed Apr 21, 2021 7:12 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 4519
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Turn on Single Block with WMPG-4 MPG

Post by mujenpwr »

Thanks for the info I will give it a try. 👍🏻 “ MpgMacro1_M THEN (SingleBlockPD)”
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Turn on Single Block with WMPG-4 MPG

Post by cncsnw »

mujenpwr wrote:Any quick tips on how to open and edit a PLC file?
I see I need to use a compiler after words to generate the file.

This is for a lathe also.
That is a hard question to answer, without risk of sounding rude or condescending.

I can provide "quick tips" for how to do those things, provided:
1) You know how to open a command prompt window
2) You know how to change directories within a command prompt window
3) You know how to edit text files with the text editor of your choice
4) You know how to enter commands in a command prompt window.

Given those things, I can provide quick, concise instructions.

If those things are not familiar to you, then any attempt to provide instructions is going to have to be painstakingly detailed, not quick. I can provide painstakingly detailed instructions, but it would have to be on a for-hire support basis.

If you have an Acorn lathe control, then your PLC program source file will be named "acorn_lathe_plc.src", and it will be located in the c:\cnct directory. You still compile it to "mpu.plc".
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: Turn on Single Block with WMPG-4 MPG

Post by cnckeith »

Marc is a wizard at plc programming suggest you hire him if it all seems too much.
be sure to select custom plc program in the Acorn Wizard once you have a custom plc program so the Acorn Wizard doesn't overwrite the custom plc program if you make a change in the Acorn Wizard.
and for anyone reading this post there is a series of how to videos on the Centroid Support YouTube channel that go over PLC Programming Basics. here is the link to the playlist.
https://www.youtube.com/playlist?list=P ... i2WKIedQlQ
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
mujenpwr
Posts: 35
Joined: Wed Apr 21, 2021 7:12 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 4519
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Turn on Single Block with WMPG-4 MPG

Post by mujenpwr »

Marc I can do this easily. I also have NotePad++

1) You know how to open a command prompt window
2) You know how to change directories within a command prompt window
3) You know how to edit text files with the text editor of your choice
4) You know how to enter commands in a command prompt window.

Thanks Keith I will look at the YouTube vids also.
Post Reply