Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: fast89 on February 24, 2013, 03:54:25 PM

Title: Making an output stay active until deactivated
Post by: fast89 on February 24, 2013, 03:54:25 PM
I have an air cylinder to activate the drawbar. Made a m17 macro to activate the cylinder. It works but won't keep the cylinder active on m17. It blips the output then goes to the dwell or sleep function after the ActivateSignal(OUTPUT7) line. I'm sure i'm missing something simple here but i'm tired of fiddling with it. I just need it to hold the output on till i tell it to turn off with another macro.
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 24, 2013, 05:04:51 PM
Post the macro you have running.

(;-) TP
Title: Re: Making an output stay active until deactivated
Post by: fast89 on February 24, 2013, 05:37:26 PM
All i have for M17 is
ActivateSignal(output7)
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 24, 2013, 05:42:42 PM
OK I see 2 explanations and they are not the same.

1st

It blips the output then goes to the" dwell or sleep function after the ActivateSignal(OUTPUT7) line".

2nd
ActivateSignal(OUTPUT7). only

Which is it going to be ??

(;-) TP
Title: Re: Making an output stay active until deactivated
Post by: fast89 on February 24, 2013, 05:47:35 PM
i tried Sleep 10000, and Code "G4 P5000". Neither would hold the output on for the determined amount of time, just blip it.
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 24, 2013, 05:53:04 PM
IF you are using that

ActivateSignal(OUTPUT7)

It should stay on until deactivated.  Does the output led stay on or shut off also. Is the ouput signal present at th PC and is lost in the BOB ??.

You need to verify WHERE you are loosing the signal.  PC? BOB? Cables? Relay?

Just a thought, (;-) TP
Title: Re: Making an output stay active until deactivated
Post by: fast89 on February 25, 2013, 04:55:44 PM
Ok, got some more testing done. The problem appears to be a conflict with having output 7 in a macro and also in a brain. I have a manual push button that is input #2 which will output #7 to knock a tool out. That has worked fine for a year and a half. Now i have added a macro (m17) to activate output#7 With both enabled, it will only blip output#7 and button works fine. With button removed from brain, m17 will hold the output on. And i cannot have two outputs with the same port/pin. Stumped on how to get around this.
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 25, 2013, 05:54:39 PM
YES there are QUIRKS in mach brains. In cases like this you are much better off using the macropump to drive the functions.

In the brains where you do a compare option it only knows to turn the ouptput ON or OFF so in your case it is constantly turning OFF the ouput even thought you turn in on somewhere else.

(;-) TP
Title: Re: Making an output stay active until deactivated
Post by: fast89 on February 25, 2013, 06:15:37 PM
Never done a macropump. going to have to do some research
Title: Re: Making an output stay active until deactivated
Post by: Hood on February 25, 2013, 06:17:21 PM
What does the brain consist of?
Hood
Title: Re: Making an output stay active until deactivated
Post by: fast89 on February 25, 2013, 07:17:16 PM
My brain is the control panel input. All the switches in the control panel go into pokeys and are brain controlled. Except MPG and drawbar cylinder, they go right to the breakout board.
Title: Re: Making an output stay active until deactivated
Post by: Hood on February 26, 2013, 03:07:26 AM
Ok what I was really meaning was what exactly is in your Brain, ie is it just a single input switching a single output and if so what input?
You could do it this way, I will just use input 1 as an example but you would obviously need to change to suit, also I have used UserLED 1111, if you already use that then again you would need to change to suit.
 What you would do is in the Brain have it look at the input and also look at the user LED, you would then Or them. Your macro would then turn the UserLED on. See screenshots.
 Just a word of caution, using macros under 100 is not the best idea as they are reserved for Machs internal functions, at this time M17 is not used for anything but in the future it may well be so best to use m117 or something similar.
Hood
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 26, 2013, 10:12:38 AM
Hood from what testing I did the problem lies with the brain. It only knows 2 states of an output. It either turns it ON or turns it OFF. AND that is a continous turn on or off. So if you turn the output on with a macro the brain turns it right back off.

Just a thought, (;-) TP
Title: Re: Making an output stay active until deactivated
Post by: Hood on February 26, 2013, 10:23:06 AM
Seems to work fine for me with the or as above, LED for output stays lit until I turn it off with another macro via the user LED.
Also seems to turn on/off fine with a latching switch (assuming the User LED is off ;)  )

Hood
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 26, 2013, 11:59:09 AM
hUM I never tried it that way.

(;-) TP
Title: Re: Making an output stay active until deactivated
Post by: BR549 on February 26, 2013, 12:16:14 PM
Yep the OR is the trick. Interesting(;-) as to why the OR turns off the dual mode BUT a single entry uses the dual mode of switching.

Would be nioce IF there were a manual defining all the definitions of the controls. as it is it is a guessing game as to how to use them.

(;-) TP
Title: Re: Making an output stay active until deactivated
Post by: Hood on February 26, 2013, 01:17:05 PM

The Or will work as there are two possible options to turn the output on so you can use either of them.

Art would likely be the only one who could tell you all the definitions/options/whatever but now he is retired I dont think he will be volunteering to write a manual ;D
.
Hood