Welcome, Guest. Please login or register.
Did you miss your activation email?
July 31, 2014, 04:38:17 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Brains Development
| | |-+  Brains for Custom Control Panel - Continuous Jog/"States" Question
Pages: 1   Go Down
Print
Author Topic: Brains for Custom Control Panel - Continuous Jog/"States" Question  (Read 1203 times)
0 Members and 1 Guest are viewing this topic.
adage
Holding

Offline Offline

Posts: 2


View Profile
« on: March 16, 2012, 01:24:30 PM »

Hello,

I am working on a custom modbus control panel that will use Mach3.  I am trying to write some brains so that specific switches on the control panel will given specific commands in Mach3, however I am running into some issues:


1) Continuous Jog – "X+"
I tried mapping a switch to OEM Code 307 (307-Jog X - right) to simulate the Mach3 "X+" button in the Tab Screen (Jog Selection).  The function that I want to simulate is when the button is clicked and held, the machine jogs, and when you let go of button, the machine stops.

The issue I am running into is that when I press the switch on the control panel, it will still move in the direction even though I let go.  When I press the button itself again, it stops.  This issue is also occurring for the “X-“ button.  In the Incremental Jog, the switches work.



2) "States"
I am trying to figure out how to define certain "states" of a variable.  I have three (3) switches on the control panel for MPG, JOG, and INC JOG.  The functional idea is the following:
  a) If any of the buttons are pressed, turn Jog Mode On
  b) Be able to switch freely between the jog modes.
  c) When the button itself is pressed (e.g. MPG is on and MPG is pressed), it will turn Jog Mode Off.
 
How would I be able to define (and modify) a “State” (e.g., storing a value to see if Jog Mode is On or Off) in brains to be in order to be able to implement this feature?


Thank you
Logged
zafarsalam
Active Member

Offline Offline

Posts: 300



View Profile
« Reply #1 on: March 31, 2012, 07:32:29 AM »

I find it more convenient to use keyboard emulators for function switches on a control panel. Just rip open a USB keyboard, pull it's card out and map it's pins with keytest software. Get the connector combinations for the arrow keys and hook them to my axis jog buttons. I use function keys F1, F2 etc. for other keys and program them in the screen designer or use the keygrabber if I want to use the original 1024 screenset. Complex functions such as homing etc. are accessed by assigning macros to keys.

Zafar
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!