**RESOLVED** Wiring panel switches in Mach

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

Moderator: cnckeith

Locked
dawizard
Posts: 20
Joined: Fri Jun 18, 2010 3:05 pm

**RESOLVED** Wiring panel switches in Mach

Post by dawizard »

Does anyone have any examples for wiring panel switches such as cycle start , feedhold , feed overide, ect. And the brains to get me started.
diycncscott

Re: Wiring panel switches in Mach

Post by diycncscott »

Hello,

What kind of control do you have? DC3IOB or GPIO4D?
dawizard
Posts: 20
Joined: Fri Jun 18, 2010 3:05 pm

Re: Wiring panel switches in Mach

Post by dawizard »

I'm using a DC3IOB.
I understand the logic of the brains that's the easy part. It may sound dumb ,but How do you know what modbus address to use?
I assume I need to reconfigure some of the Aux inputs that are configured for things I'm not using to using . Do you have a Glossary for defintions such as oem trigger, led, ect.
diycncscott

Re: Wiring panel switches in Mach

Post by diycncscott »

Hello,

All Ajax I/O is "mapped" to the Mach Modbus I/O mapping using the Ajax input or output number. To reference Ajax output 14 in the Brain editor, select Modbus, Under "Enter Modbus address to use" type in the input or output number then check the input or output box. Make sure you always check "Bit only", use Bit 0[Bit0-15],select MacroModbus Emulation and CFG# 0 -as shown below
modbus.gif
Regarding the Mach variables, there is a ton of useful info at http://www.machsupport.com

Look in the Brains forums and the Mach wiki (available under "support")
dawizard
Posts: 20
Joined: Fri Jun 18, 2010 3:05 pm

Re: Wiring panel switches in Mach

Post by dawizard »

I guess I need things simplified. Can you give me an example? I think it would help a lot of people that aren't EE's.
1 Where would I connect the wire from a cycle start button to the DC3IOB.
2 What would the mod bus address be for that pin.
3 Why that Address.
diycncscott

Wiring panel switches in Mach

Post by diycncscott »

Hello,

There are two types of inputs on the DC3IOB that can be used. The "simple" contact closure type
which are found on H20 & H21 such as limits, Estop etc... and the auxiliary type found on H18 & H19.

In this example, I'll use the "simple" type which detects a switch open/close anytime the input is
connected/disconnected from one of the "Commons" located on H20 or H21.


Implementing a Remote Cycle Start In Mach

Steps required to implement remote cycle start in Mach:
1. Wire in switch
2. Write remote cycle start Brain
3. Enable Brains

1. Wiring in switch
For this example, we will use Input31 on H20 which is currently labeled Rot Ack.


2. Write the Brain
Referring to Ajax inputs and outputs in Brains
All Ajax inputs and outputs are mapped directly to the Mach Modbus inputs and outputs.
Ajax input #1 (x- limit) is mapped to Modbus input number 1. Ajax Output 14 (SpindleEnable) is mapped to Modbus Output14

NOTE: This section has changed. I originally suggested using an OEMTrigger to avoid possible conflicts
when requesting a CycleStart from in the Brain. I was mistaken. Mach Brains offer a "button" type which
fires only momentarily and interacts with keypresses and softkeys smoothly. I apologize for any confusion.
FWIW The original code works fine, it just did so at the expense of consuming an OEMTrigger.


Starting with a blank Brain:
Click the plus sign to bring up the "Add Input" window and then select "Modbus"
add_input.gif
Because we are using Ajax input 31 as cycle start, enter 31 into the box labled "Enter Modbus address to use"
Check the input box. Check "Bit only", use Bit 0[Bit0-15]
Select MacroModbus Emulation and Set CFG# to 0 -as shown below
modbus_selects.gif
modbus_selects.gif (14.79 KiB) Viewed 4408 times
You can now see that Ajax input 31 has been included in the Brain (referenced as Modbus input 31)
Click on the input to highlight it green, then click the + to bring up the "Input Lobe" window.
Select "No Operation" (for this example, we just want to pass the state input through)
Click "ok"

Click on the "No Operation Pass Signal" token to highlight it green and then press the Lobe Termination symbol (Green upside down T)
Select "Button Press" button then scroll down and highlight "Cycle Start" and then "ok" to complete the rung.
cyclestartbuttonpress.gif
The Brain is complete. Save your brain under whatever name you like.
.
cycle_start_rung.gif
cycle_start_rung.gif (2.76 KiB) Viewed 4398 times
3. Enable Brains
In Mach, select "Operator"-> "Brain Control"
Click "Reload all Brains"
Find the brain you created and then click on it to highlight it.
Click the "Enabled" checkbox and then click "Reload all Brains" again.
dawizard
Posts: 20
Joined: Fri Jun 18, 2010 3:05 pm

Re: Wiring panel switches in Mach

Post by dawizard »

Thanks, that answered a lot of questions. It also raised a few others. Would the rule of only being able to change a state once pertain to everything including a feed hold?
diycncscott

Cycle Start in a Mach Brain

Post by diycncscott »

Hello,

Please review the previous post as I have modified it to make it easier to use.
You can do the same thing with your feedhold.

Also, I think you misunderstood about only being able to set/reset a token "once".
It's not that you can only use it once, you can use it as many times as you like.
If you do use a token as the output of a rung/lobe, you have to make sure that
you define your logic very carefully to be sure that the behavior is exactly what
you want in all circumstances. I may address the reasons and methods
for doing so in a later tutorial but that subject is beyond the intended scope of my
current write ups/tutorials
Locked