Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: MachineMaster on March 28, 2009, 02:24:09 AM

Title: HotKeys for Outputs
Post by: MachineMaster on March 28, 2009, 02:24:09 AM
I need to set OutPut #1 with a hotkey sequence. I can find where to set hotkeys for the inputs but I am not finding any way to set hotkeys for the output lines.
Just point me in the right direction please.
Title: Re: HotKeys for Outputs
Post by: Tweakie.CNC on March 28, 2009, 02:53:40 AM
I think you need to use a script such as  ActivateSignal(OUTPUT1)  assign this to a button and then hotkey to the button but I am quite new to this so there may be a better way of doing it that I don't know of yet.

Tweakie.
Title: Re: HotKeys for Outputs
Post by: MachineMaster on March 28, 2009, 03:24:42 PM
That does work. Is there any way to make the button toggle OUTPUT1 on and off?
Title: Re: HotKeys for Outputs
Post by: Hood on March 28, 2009, 03:36:59 PM
If GetOemLED(852) Then
DeActivateSignal(OutPut1)
Else
ActivateSignal(OutPut1)
End If
Title: Re: HotKeys for Outputs
Post by: MachineMaster on March 28, 2009, 03:51:03 PM
Thanks, that works but how? Where do you find the information to write these functions.
Most of the help that I have got contains key words that I can't find in any of the tutorials.
Title: Re: HotKeys for Outputs
Post by: Hood on March 28, 2009, 03:54:13 PM
There is some VB in the Wiki  and some in the  Mach2 Customisation Manual, another good source is to look at the VB in the wizards.
Hood
Title: Re: HotKeys for Outputs
Post by: Greolt on March 28, 2009, 06:11:43 PM
Hood's is good for outputs 1 to 3 but if you want outputs above that number, there is (as far as I know) no OEMled to check.

So here is a minor variation on the theme,

If IsOutputActive(OUTPUT4) Then
DeActivateSignal(OUTPUT4)
else
ActivateSignal(OUTPUT4)
end if

Greg

EDIT: On further inspection looks like there are LEDs for higher number outputs.  Up to 6 at least. However the variation still works too.  ;D
Title: Re: HotKeys for Outputs
Post by: MachineMaster on March 28, 2009, 06:40:59 PM
Thanks Greg. I like that code better as it would be good for all outputs.
My big question is, where do you find all the BIG words like "IsOutputActive".
Do you just make them up and see what happens?
Every time I get help programming a script it seems to come with a new, as far as I can find, undocumented word.
Where can I find the "Word List"? Once I see the "Word" it is not hard understanding what it does.
Title: Re: HotKeys for Outputs
Post by: Greolt on March 28, 2009, 07:12:54 PM
That is a really good question and if there is as good an answer I would love to hear it.  ;D

My impression is that Art makes them up and somehow includes them in Mach's code.  That might be wrong though.

The best I have found so far is this link,  http://www.cypressinc.com/enduser.pdf

However as you will see that does not mention a lot of these Mach specific calls.  That's why I have the above impression.

What would be very helpful is a complete list of the Mach specific VB commands.  Maybe it exists somewhere but I have never found it.

Greg


EDIT:  IsOutputActive is actually listed on the wiki.  I did not look hard enough.  :)
Title: Re: HotKeys for Outputs
Post by: MachineMaster on March 28, 2009, 10:42:52 PM
Greg,
You gave me the clue that I needed. All of the funny words are in Mach3.
Attached is an Excel file of all of the words that I could find in Mach3 Version R3.042.020.
Let the fun begin.

Edit
I corrected a couple of typos in the file.
Title: Re: HotKeys for Outputs
Post by: AJ240 on October 28, 2009, 11:52:55 PM

What would be very helpful is a complete list of the Mach specific VB commands.  Maybe it exists somewhere but I have never found it.

Greg


Try this.

http://www.machsupport.com/forum/index.php/topic,12730.msg84737.html#msg84737

Anthony