Page 1 of 1

Turn on Single Block with WMPG-4 MPG

Posted: Wed Mar 09, 2022 10:44 pm
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.

Re: Turn on Single Block with WMPG-4 MPG

Posted: Wed Mar 09, 2022 11:22 pm
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).

Re: Turn on Single Block with WMPG-4 MPG

Posted: Thu Mar 10, 2022 8:52 am
by mujenpwr
Thanks for the info I will give it a try. 👍🏻 “ MpgMacro1_M THEN (SingleBlockPD)”

Re: Turn on Single Block with WMPG-4 MPG

Posted: Thu Mar 10, 2022 9:17 pm
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".

Re: Turn on Single Block with WMPG-4 MPG

Posted: Fri Mar 11, 2022 4:43 pm
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

Re: Turn on Single Block with WMPG-4 MPG

Posted: Fri Mar 11, 2022 8:22 pm
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.