View Full Version : MACH3 Plasma help please

02-01-2017, 06:39 PM
I am re-vamping a plasma table that I bought from a chap who scratch built it. It all works very well, and I have re-housed his existing AM882 stepper drivers and Purelogic (Russian) Ethernet to Parallel, and BOB and torch height controller in a more robust manner - it all still works (phew!)

I have added an 'under hood' and huge downdraught fan as a direct crib of DaveK0974's design (with his permission) and now I want to control the fan via MACH3 - the BOB has three uncommitted relay outputs, one of which I've connected to drive a beefier relay to control the fan (65 cu M / Min !!!)

However I'm failing to understand the (to me) obscurities of the manual for the BOB (attached) - I'm no MACH-3 expert and would ask if anyone who has more MACH-3 experience could interpret what they are saying re: the relay outputs as there seem to be too many perms and comms for my poor old brain to understand. Ideally I want to turn the relay on when the cut starts, and turn it off a predetermined time after the cut ceases, but just to turn it on and off would be nice :)

02-01-2017, 07:50 PM
It's not just you!

From what I can work out, the relays share control with the stepper controls, but SW3-5 allow you to disconnect the relays, and there is an option to use Relay3 via the coolant timer system. However I can't see anywhere that actually tells you what pins control the relays.

Clive S
02-01-2017, 08:55 PM
The pins to control the relays are on page 8 in the table I have one of these bobs it take a bit of getting used to but they are good.

02-01-2017, 09:38 PM
Clive, this is good news as I've not come across anyone confessing to have one !

My system is using 4 axis (as A is used as a slave) - so in simple idiot proof terms, (remembering that I've not been able to interpret that table), what do I need to do to drive one of these relays on and off from G code or otherwise ? Presumably there are links and DIP switches as far as hardware is concerned, then some set up in MACH-3 ?

I'd much appreciate your input.

Clive S
03-01-2017, 12:04 AM
I'd much appreciate your inputYou have said you have one relay connected is this the one you want you are having trouble with?

I have not altered my setup for some time so am a bit rusty on the BOB but I will get back to you tomorrow after I have checked it out re the pins.

03-01-2017, 07:05 AM
Yes Clive just the one relay, which I can connect to any of the three relay output contacts of the BOB.

I am unclear how Mach treats these outputs. Is it by M code, do I need to write a diddy bit of code or what?

03-01-2017, 09:52 AM
Yes Clive just the one relay, which I can connect to any of the three relay output contacts of the BOB.

I am unclear how Mach treats these outputs. Is it by M code, do I need to write a diddy bit of code or what?

You need to allocate the output pin to an output in ports and pins, then activate that output either via an M-code, or via a Macro. I think you may be able to do it via the macropump by monitoring when certain things are active i.e. when the torch is active, but hopefully DaveK will be along shortly and tell us how he activates his extractor.

03-01-2017, 12:47 PM
How does your G-code turn on/Off the Torch. Does it use M3/M5.?

If so then just edit the M3/M5 macros so they turn output on/off.

In the M3 enter this at point want to come on:

ActivateSignal(Output 2) ...................change number to suit your output.

In M5 put this when want to go off:

Sleep 3000 ...................................(Pause before Output OFF Change number to suit delay in Milli/Secs.)
DeActivateSignal(Output 2) .................(change number to suit your output.)

Or if you want can just use the coolant codes and enter enter M7 or M8 in your code at the point want on Output on and setup coolant the Outputs in spindle setup to Output# you used.
Then in code to turn off enter:

G4 P3 (change number for pause time in secs)

03-01-2017, 01:53 PM
Thanks Clive and Jazz for your replies.

A/ My plasma torch is turned ON by an M03 and OFF by an M05

B/ On the BOB if I set DIP switch 5 then my relay pulses on and off with a mark space ratio controlled by the two trim pots.

C/ If I set DIP switch 2 to ON which should change control to LPT Port 1 Pin 14 I can find no M code that controls Pin 14

D/ In the Ports and Pins page of Config there is a line labelled OUTPUT 3 which I have set to Port 1 Pin 14 - this has enabled a switch box marked "Output 3" on screen that previously was not active - I can now click it and change it from Red to Green but other than that it has seemingly no other effect

(In the Spindle page of Config there is an area referring to mist and flood coolant and relay control via M07 and M08 and mapping to output signals in the range of 1-6 and I suspect perhaps it's something to do with the set up here, but I'm not quite getting there at the moment !!!)

Your ongoing hand holding would be appreciated :)

Clive S
03-01-2017, 02:11 PM
Yes Clive just the one relay, which I can connect to any of the three relay output contacts of the BOB.

I am unclear how Mach treats these outputs. Is it by M code, do I need to write a diddy bit of code or what?

Ok My bob is the PCL6x But is similar. I may be shot for this but I think it would work, In Mach go to ports and pins page then click on tab spindle setup. Then untick the flood/mist relays and enter say 3 in the for the flood relay you could control a relay with flood M8 to turn on and M9 to turn off in your gcode file.

Then under the (output signals tab) then set output #3 to port 1 and pin 16 (you might have to change active low)

You have to set SW3 to on on the BOB.

I stress I am not an expert in Mach3 so can somebody please check this

Edit: it took me so long to answer I did not see Deans post but he for sure will check the above

03-01-2017, 04:11 PM

On the BOB DIP switch 4 set on = "Relay 2 is turned ON"

On Ports and Pins "Output 2" = Port 1 Pin 17

On Spindle Setup "Disable Mist / Flood Relays" = UNCHECKED, M08 set to "Relay 2"

In hardware - abandon Relay 3 and use Relay 2 - this I think is the crucial bit as RELAY 3 IS A SPECIAL CASE !!!!!!!!

So now I can turn on with an M08 and Off with an M09 at will and can presumably also tweak the post processor to do as has been suggested. I think ALL my issues were caused as Relay 3 is a special case on this BOB

Very many thanks to those whose help and support got me here - much appreciated.

03-01-2017, 04:15 PM
Ok what clive said is fine but let me shed some light of how it works.

On the Board your using Lpt connections which is connector XP21. Pin 14 16 & 17 can be used for the Relays. However each relay can be deactivated using SW3, 4,5 also pin 14 can be used dual purpose. When SW2 is ON pin 14 provide PWM signal. SW2 off and it works like normal Output and turning Relay 3 on/off. Also when used for coolant By the looks if it there's circuit to pulse the relay on/off if required. Suspect you'll just wind Pots full for constant ON.

So to use any relay First make sure they are turned ON using SW3,4,5. If using Rly3 which uses pin 14 then you need SW2 OFF and set the timer pots so full on all the time.
Then in Mach3 ports/pins/Outputs/ Enable and Set output numbers #1 =pin 14, #2 = 16 #3 =17
This will give you full access to all your Relays.

Now if you want to use Clives approach after setting up in spindle control when command M8 Relay will turn ON Command M9 will turn it off. Try testing this using MDI.

However if you want more control like for pausing or doing some checks before actually turning on/off. IE Checking Torch is OFF or Axis stopped moving etc then using Macro will give more control.

This can be done by inserting code into existing macro like M3/M5 or creating your own custom (M) macros and placing reference to that in your G-code. IE: Lets say made two and called M901 M902 G-code look something like this.

(Start program)
M901 (activate custom macro which turn fans on using output #2 and switches kettle on using output #3 waits for it to boil by watching input #3)
M3 (Torch On)
G1 x345 y34
etc etc
M5 (Torch off)
M902 ( Activate custom macro which Wait 10s and then checks torch is off and axis stopped moving then turn output#2 OFF and puts kettle back on using out#3 and waits untill boiled watching input#3.)

Ok little extreme with the kettle but possible and gives idea why would use Macro rather than simply using Coolant M codes.

Hope this helps and clears thing up little.

Edit: Bugger see your sorted could have saved my poor fingers. . Lol