Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
German Forum
Italian Forum
Portugese Forum
Resources
Links
User Reviews
User Videos
Contact Us
CNCZone
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
December 02, 2008, 07:59:42 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Brains Development
Suffering From Brain Damage....
Pages:
1
Go Down
« previous
next »
Author
Topic: Suffering From Brain Damage.... (Read 233 times)
0 Members and 1 Guest are viewing this topic.
HimyKabibble
Active Member
Online
Posts: 258
Suffering From Brain Damage....
«
on:
August 18, 2008, 07:54:45 PM »
Today I built myself the worlds cheapest pendant, using an old video game controller. I had no trouble getting most of the buttons to do what I wanted, but a few are giving me fits.
I have been able to set two buttons to increase/decrease jog %, using the "Inc Jog %" and "Dec Jog %" "button presses", but this doesn't really do quite what I want. I'd really like to have a single button that acts as a toggle between step and continuous jog modes, and two other buttons that move up or down a lpre-defined ist of jog rates or step sizes, depending on the mode the first button has set the jog mode to. I tried doing a simple toggle of jog rate between 10% and 100%, but the problem is it continuously toggles back and forth between 10% and 100% for as long as the button is pressed. How do I get it to generate only a single "button press" event to Mach for each press of the pendant button?
Regards,
Ray L.
Logged
Chaoticone
South Carolina, US
Administrator
Online
Posts: 2,809
Precision Chaos
Re: Suffering From Brain Damage....
«
Reply #1 on:
August 18, 2008, 09:48:30 PM »
Ray, How are you setting the gamepad up? In keygrabber?
Brett
Logged
If you could see the things I have in my head, you would be laughing too.
www.precisionchaos1.com
My guard dog is not what you need to worry about!
HimyKabibble
Active Member
Online
Posts: 258
Re: Suffering From Brain Damage....
«
Reply #2 on:
August 18, 2008, 10:07:15 PM »
Brett,
No, it's plumbed to a parallel port. I had an old Microsoft PC game controller that has a "joypad" and 11 switches - all digital. I stripped the chip and discretes off the board, and just wired all the switches to my second parallel port (I have a few switches left over....), and configured them all to OEM "triggers". The functionality is all implemented in brains. The joypad obviously serves as a jog controller (jog X left/right, jog Y left/right). I setup some of the other switches as E-stop, Program Run, Zero All Axes, Inc. Jog % and Dec. Jog %.
Regards,
Ray L.
Logged
HimyKabibble
Active Member
Online
Posts: 258
Re: Suffering From Brain Damage....
«
Reply #3 on:
August 18, 2008, 11:39:19 PM »
OK, *maybe* I've answered my own question, but I'm not at the machine, so can't test it right now. Here's an approach I think should work:
;; If OEM4 button is pressed, and current Jog % is below 30%, then set V0 to 30%
V0 = (~OEMInput4 && (Jog%DRO < 30)) * 30
;; If OEM4 button is pressed, and current Jog % is between 30% and 50%, then set V0 to 50%
V0 = (~OEMInput4 && (Jog%DRO >= 30) && (Jog%DRO < 50)) * 50
;; If OEM4 button is pressed, and current Jog % is between 50% and 75%, then set V0 to 75%
V0 = (~OEMInput4 && (Jog%DRO >= 50) && (Jog%DRO < 75)) * 75
;; If OEM4 button is pressed, and current Jog % is between 75% and 100%, then set V0 to 100%
V0 = (~OEMInput4 && (Jog%DRO >= 50) && (Jog%DRO < 75)) * 100
;; If OEM4 button is pressed, and current Jog % is 100, then set V0 to 10%
V0 = (~OEMInput4 && (Jog%DRO = 100)) * 10
;; If OEM4 button is *not* being pressed, copy V0 to Jog % DRO
Jog%DRO = OEMInput4 * V0
I hope this makes sense. Is there a better way to do this?
I don't suppose the format of the brain files is documented? I'd love to write a Perl parser that would take a text-based brain description (similar to the above) and output a binary brain file.
Regards,
Ray L.
Logged
HimyKabibble
Active Member
Online
Posts: 258
Re: Suffering From Brain Damage....
«
Reply #4 on:
August 19, 2008, 01:53:41 PM »
OK, so that was a total disaster. Locked the machine up solid, again. I think I'm starting to understand how these things work, and it seems rather limiting, if I'm right. Each "lobe" get evaluated any time *any* input changes. If the result of the evaluation is true, then that is passed on to the next lobe. What's got me stumped is how to effect changes that cause, directly or indirectly, an input to the brain that initiated the change. This causes a loop, which locks up Mach3. Also, I'd like to know how, if possible, to pass through a value, from a DRO etc., which is enabled by a logic condition. For example, what I'm really trying to do here is look at the current value of Jog%DRO, decide what I want the new value to be, and set that. But, doing that creates a loop, as Jog%DRO is both an input and an output to/from the same brain. I've yet to find a way to make this work. I suspect the "latch" lobe may help here, but I can't figure out what it does, or how to use it. Seems like it could be used to "hold" an input value, to prevent it from changing while the brain is active, so the brain won't see the updated value it just wrote to the output/DRO/whatever.
Brains would be a helluva lot more useful if there were some documention that explains how they really work. Having to figure it out by experimentation is very frustrating, and time-consuming.
Regards,
Ray L.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 770
Briceville, TN, USA
Re: Suffering From Brain Damage....
«
Reply #5 on:
August 30, 2008, 04:28:12 PM »
Ray,
Use TWO brains, one that is your input condition brain, in your case you %jogDRO, and write that to a user dro, or set a logic condition LED.
BTW: It would help GREATLY if you would explain exactly what and how you want to do the brain and why.............
In the second Brain, pull in the user dro value, and work your formula or formula(s), in single or multiple rungs depending on what you want to do.
scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
HimyKabibble
Active Member
Online
Posts: 258
Re: Suffering From Brain Damage....
«
Reply #6 on:
September 01, 2008, 09:52:29 AM »
Quote from: poppabear on August 30, 2008, 04:28:12 PM
Ray,
Use TWO brains, one that is your input condition brain, in your case you %jogDRO, and write that to a user dro, or set a logic condition LED.
BTW: It would help GREATLY if you would explain exactly what and how you want to do the brain and why.............
In the second Brain, pull in the user dro value, and work your formula or formula(s), in single or multiple rungs depending on what you want to do.
scott
Scott,
I tried doing basically what you suggested, but using a variable rather than a user DRO. Does that matter? I basically set it up so a falling edge on a pendant button (button pressed) would trigger a brain that looked at the current setting of a parameter, such as jog %, and set a variable to the desired new value. Another brain watched for a rising edge on the same pendant button (button released), and set jog % to the value in the variable. This still resulted in a loop that locked the machine up solid.
"BTW: It would help GREATLY if you would explain exactly what and how you want to do the brain and why............." - I believe I did that in great detail in my first post in this thread....
Regards,
Ray L.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 770
Briceville, TN, USA
Re: Suffering From Brain Damage....
«
Reply #7 on:
September 01, 2008, 10:36:40 AM »
post up your brains here and I will look at them........
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
HimyKabibble
Active Member
Online
Posts: 258
Re: Suffering From Brain Damage....
«
Reply #8 on:
September 01, 2008, 05:26:04 PM »
Quote from: poppabear on September 01, 2008, 10:36:40 AM
post up your brains here and I will look at them........
Well, I'd have to recreate them. I didn't save the ones that didn't work.
Regards,
Ray L.
Logged
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*e*i*n*g
=> Mach Screens
=> Feature Requests
=> Non English Forums
=> FAQs
===> Finished Plugins for Download
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> Lazy Cam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Promote and discuss your product .
=> Sieg Machines
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
=> One on one phone support.
=> Forum suggestions and report forum problems.
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
Loading...