Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: spnar on September 09, 2008, 01:46:29 AM

Title: enable outputs
Post by: spnar on September 09, 2008, 01:46:29 AM
I needed to use enable outputs and assigned Enable#1 pin 1 and Enable#2 to pin 14.
Only Enable#1 worked.
I then tried all Enable outputs on different pins and only Enable#1 and Enable#3 worked

Also i need to assign some outputs for miscellaneous tasks

Can anyone help

SpnarĀ  ???
Title: Re: enable outputs
Post by: Hood on September 09, 2008, 02:21:03 AM
Should work fine the way you had it, does enable3 work with Pin 14?
For the general outputs what are you wanting to set up as that will determine how you do it, there are OEM triggers and Outputs but what you are wanting will depend on what you use.
Hood
Title: Re: enable outputs
Post by: spnar on September 09, 2008, 02:51:27 AM
Hi Hood

Yes Enable#3 works with pin 14
The problem lies with the other enable outputs. Maybe they are switched off from somewhere in the program.
As for the outputs i just neede to know how t set these up say if i wanted a light or an extract fan.
Your help is much apreciated

By the way Hood do you ever get any sleep ? :D

Spnar
Title: Re: enable outputs
Post by: Hood on September 09, 2008, 03:03:58 AM
Yes, just woken up, its morning here :)
Will have to think about  Enable 2 not working, have something in the back of my head thats telling me there has been mention of it before but cant think of it at the moment.
 How would you be wanting to switch on the light or fan and when would you want them on? might be better to have these done in your machines wiring rather than with an output, for example on my lathe I have the fans coming on when my servo drives are powered up, same with the light, if I hit the E-Stop button that switches off everything on the lathe including drives, fans lights etc.
 You can make up buttons on screen to work outputs, you can use for instance the coolant button to do this (if you dont use it for coolant ), you could use a macro and either use a button or G Code to switch it via the macro, could use a brain in a similar fashion, just so many ways to do things its not easy to tell you how unless we know what you want and when you want. We know you want fans and lights but when you are wanting them to operate determines how you will do things.
Hood
Title: Re: enable outputs
Post by: spnar on September 09, 2008, 03:24:44 AM
Say i wanted to have the fans on as soon as i start a program how would
i activate an output from Gcode ?

Spnar

Title: Re: enable outputs
Post by: Hood on September 09, 2008, 03:43:06 AM
Yes you could write a custom macro and save it in your profiles macro folder
 You would have something like
ActivateSignal (OutPut4)

And if you saved it as M234.M1S then when you called M234 in your G Code or from the MDI line it would switch it on, you would then need  to switch it off again, you could have another macro to do that
DeActivateSignal (OutPut4)
and call that for example M235.M1S so call M235 at the end of your code would switch it off again.

You could also make a VB button in screen4 for your screen and have some VB to switch it on and off from the button.
If GetOemLED (77) Then
 DeactivateSignal (OutPut4)
 Else
 ActivateSignal (Output4)
End If

That would look at the output 4 LED and if its on it would switch the Output Off or  if its off then it would switch it on.

Hood
Title: Re: enable outputs
Post by: spnar on September 09, 2008, 03:55:44 AM
Thanks Hood
A great help as always.
If you happen to be coming on holiday to Malta remember i owe you a couple of beers.

Spnar
Title: Re: enable outputs
Post by: Hood on September 09, 2008, 04:18:47 AM
:)
Title: Re: enable outputs
Post by: zarzul on September 09, 2008, 10:42:27 AM
I have also noticed the enable outputs do not all work.   I got around it by using a different output.  I do believe there is a problem somewhere in the code where only a couple of the enable outputs will work and actually turn on
the specified output pins.  I noticed this in Mach Turn,  haven't checked Mill.

Arnie
Title: Re: enable outputs
Post by: spnar on September 10, 2008, 04:23:16 AM
Hi Zarzul

Ok that makes two of us .
I only needed two enable outputs as i am working on mach turn.
I am still looking to find a way to disable drive when there is no step signal.
This feature allows the drives and motors to operate much cooler.
The reduction gearing is usually enough so that the tool remains in position.

At least that is what i have experienced on my very home made mill
Title: Re: enable outputs
Post by: Hood on September 10, 2008, 05:33:19 AM
 
Hi Zarzul

Ok that makes two of us .
I only needed two enable outputs as i am working on mach turn.
I am still looking to find a way to disable drive when there is no step signal.
This feature allows the drives and motors to operate much cooler.
The reduction gearing is usually enough so that the tool remains in position.

At least that is what i have experienced on my very home made mill

As I said previously there is something in the back of my mind about the enables and I just cant remember, it may be that I tried toi use them a while back and I found that they didnt work. I however just use one enable for all my drives on the lathe as I have no need to individually disable the drives, they are either all enabled or all disabled.
 As for switching the drives off when they are not being commanded I think that is the teritory of the drive rather than the software. Gecko drives do this and a few others do it as well, when the drive is not getting a signal from the Step/Dir the current is reduced. Have a look at your drives as they may have that feature.
Hood
Title: Re: enable outputs
Post by: mhasting2004 on March 08, 2009, 09:05:50 PM
I may be having a similar issue as described.

Mach ver R3.042.020 SS Beta2 ver. 0.015ogb

In my case I have:
Output 1 set to spindle relay Port 1 pin 8
Output 2 set as and AUX AC relay port 1 pin9
Output 3 set as another AUX AC relay port 2 pin1
Output 4 set as air tool pnematic relay port 2 pin 16
and
Output 5 set as another pneumatic relay for stop pins Port2 pin 17

Charge pump is on Port 2 pin 14

everything works (under my control) except output 4. This one seems to be tied somehow to the run button and gets fired everytime I do a regen or toogles on and off to some mind control of its own when running the roadrunner g-code.  If I map it to say mist control it will not respond to my requests. Also it does not seem to activate is in single step mode.

Definitely not noise as it is not random and all signals are opto isiolated.

got me scratching my head at the moment

Cheers

Mark