M Code control of Aux Contacts Output 9

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

cnckeith
Site Admin
Posts: 8942
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: M Code control of Aux Contacts Output 9

Post by cnckeith »

take a look at TB300
http://www.centroidcnc.com/cnc_techbulletin.html
that should get you going.
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
Community Expert
Posts: 4585
Joined: Wed Mar 24, 2010 5:48 pm

Re: M Code control of Aux Contacts Output 9

Post by cncsnw »

The manual talks about output 8 & 9 but how do you map to an M Code?
TB300 does not have any information about that.

You have to change the PLC program.

The request flow is generally like this:

1) Custom M function macro files "mfuncxx.mac" uses M94 and M95 to turn a request bit on and off.
2) The PLC program sees that M function request bit, combines it with any other relevant logic, and uses that to turn an output on or off.

The request bit number (the number which follows M94 or M95) does not necessarily have to be the same as the associated CNC M function, but your program will be a little easier to understand if you do it that way.

Neither the request bit number nor the associated CNC M functions need to match the number of the output to be controlled.

Suppose you want to use M71 to turn on OUT9, and M72 to turn it off, and there are no limitations or interlocks associated with it.
Then you might choose request bit #71. You do not need to use another request bit for turning off. In simple cases like this, the second M function just turns off the request that was set by the first one.

So your mfunc71.mac file might read:

Code: Select all

; M71 - Turn on OUT9
M94/71
and your mfunc72.mac file might read:

Code: Select all

; M72 - Turn off OUT9
M95/71
Your PLC program would include the following definitions in the definitions sections:

Code: Select all

M71Out   IS OUT9
;...
M71      IS SV_M94_M95_71
and it would include the following code in MainStage somewhere:

Code: Select all

IF M71 THEN (M71Out)
In the original inquiry, Moose said that there was some type of logic already in place which turns OUT9 on and off using the Aux3 key. That will have to be located and removed in order for replacement code to work correctly. As a starting point, search the PLC source file to find the definition of OUT9, then search for references to whatever name was given to it.


Moose
Posts: 59
Joined: Tue Apr 10, 2018 9:36 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes

Re: M Code control of Aux Contacts Output 9

Post by Moose »

I have been searching the system for the connection between AUX3 and Output 9 but have not found anything
Every place the manual talks about AUX3 and or 9 has nothing
This is where I have been stumped
I figured that if I could see the current configuration it would help me understand how to program


cncsnw
Community Expert
Posts: 4585
Joined: Wed Mar 24, 2010 5:48 pm

Re: M Code control of Aux Contacts Output 9

Post by cncsnw »

If you post a report, then we can look in your PLC program source file.


Post Reply