Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 06:14:57 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  How do I detect a jog system hotkey was pressed?
Pages: 1   Go Down
Print
Author Topic: How do I detect a jog system hotkey was pressed?  (Read 535 times)
0 Members and 1 Guest are viewing this topic.
lfleiva
Active Member

Offline Offline

Posts: 33


View Profile
« on: August 26, 2010, 08:20:43 PM »

Hi!
I want to detect when a jog system keystroke was pressed in order to run a macro before the actual jog is performed for security reasons.
In other words: run a script when a certain keyboard keystroke used as hotkey was made.
Is this possible?

Thanks!
Luis
Logged
sunmix
Active Member

Offline Offline

Posts: 35


View Profile
« Reply #1 on: August 31, 2010, 02:40:32 PM »

setup a brain that maps all the jog buttons to a user led, say 1010. on your vb you can do something about it, i'm sure.

a = getuserLED(1010)

if (a = 0) then..
else..
end if
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,476



View Profile WWW
« Reply #2 on: August 31, 2010, 03:12:28 PM »

Not sure if you can actually do anything before it jogs, though??
Logged

poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,690


Briceville, TN, USA


View Profile WWW
« Reply #3 on: September 03, 2010, 08:24:31 AM »

Yes you can do it how your talking about, in a round about way........

Put the VB code in the Jog Buttons you want to watch in screen designer, including the DoOEMButton code for the jog button so it all runs in VB.
you can still set a "HOT KEY" that will activate the button itself.

OR, if you want to execute the SAME security check on multiple jog buttons, I would then make your self a "Security Check" macro.

i.e.

'   M1001.m1s
'   Security Check Macro

'   ///  your security check macro code here  ///
'  end of macro

Then again in your Jog buttons that your watching, there is a Radio button that you tick in screen designer 3 and 4, or (my preference Mach Screen by Klaus), you add all the VB code in the button.  NOTE: you can find the Mach Specific VB codes for Buttons, LEDs, and DROS on the Wiki, Ray's stuff, in the Memeber docs is some of mine, and I believe several other people have posted various compliations.........    I think the Wiki has the VB organized in USE types, i.e. all buttons together, all LEDs together etc.

scott



Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
lfleiva
Active Member

Offline Offline

Posts: 33


View Profile
« Reply #4 on: September 04, 2010, 11:16:55 AM »

>Put the VB code in the Jog Buttons you want to watch in screen designer, including the DoOEMButton code for the jog button so it all runs in VB.
>you can still set a "HOT KEY" that will activate the button itself.

I'll try that.

Thanks for all the replies!
Luis
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!