Hello Guest it is September 22, 2019, 05:16:14 PM

Author Topic: HotKeys for Outputs  (Read 6748 times)

0 Members and 1 Guest are viewing this topic.

HotKeys for Outputs
« 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.

Offline Tweakie.CNC

*
  • *
  •  7,912 7,912
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: HotKeys for Outputs
« Reply #1 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.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: HotKeys for Outputs
« Reply #2 on: March 28, 2009, 03:24:42 PM »
That does work. Is there any way to make the button toggle OUTPUT1 on and off?

Offline Hood

*
  •  25,853 25,853
  • Carnoustie, Scotland
    • View Profile
Re: HotKeys for Outputs
« Reply #3 on: March 28, 2009, 03:36:59 PM »
If GetOemLED(852) Then
DeActivateSignal(OutPut1)
Else
ActivateSignal(OutPut1)
End If
Re: HotKeys for Outputs
« Reply #4 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.

Offline Hood

*
  •  25,853 25,853
  • Carnoustie, Scotland
    • View Profile
Re: HotKeys for Outputs
« Reply #5 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

Offline Greolt

*
  •  956 956
    • View Profile
Re: HotKeys for Outputs
« Reply #6 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
« Last Edit: March 28, 2009, 06:17:04 PM by Greolt »
Re: HotKeys for Outputs
« Reply #7 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.

Offline Greolt

*
  •  956 956
    • View Profile
Re: HotKeys for Outputs
« Reply #8 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.  :)
« Last Edit: March 28, 2009, 07:37:41 PM by Greolt »
Re: HotKeys for Outputs
« Reply #9 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.
« Last Edit: March 29, 2009, 07:30:07 PM by MachineMaster »