Hello Guest it is April 29, 2024, 02:48:30 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - HimyKabibble

1671
Brains Development / Re: Suffering From Brain Damage....
« on: August 19, 2008, 12:39:19 AM »
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.

1672
Brains Development / Brain Timing and "Latches"
« on: August 18, 2008, 11:32:06 PM »
I'm assuming brains are run periodically, like every pass through the main loop of Mach3?  I've become quite expert at writing brains that end up in endless loops, madly toggling things, or, in too many cases, hanging Mach completely, so I have to re-boot the machine.  Are brains evaluted/executed at a fixed time interval?  Is this why the "Timer" lobes are provided, to prevent race conditions?  If so, what is an appropriate delay to prevent races? 
Also, what does the "Latch" lobe function do?  I've found no explanation anywhere.
One last question - Are functions limited to arithmetic expressions, or can we use logical expressions as well?  For example, if I want to have a lobe output one of two numeric values, based on the value of a boolean input, how would I do that?

Regards,
Ray L.

1673
Brains Development / Re: Suffering From Brain Damage....
« on: August 18, 2008, 11: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.

1674
Brains Development / Brain Editor.... Squirrelly?
« on: August 18, 2008, 10:19:38 PM »
Is it just me, or is the brain editor really squirrelly?  It seems to behave strangely quite often - not allowing me to select or unselect things, settings in lobes not "taking".  In particular I've noticed very often when I edit an existing lobe, the dialog comes up with the default settings, NOT the ones that were in the lobe.  "less than" gets changed to "greater than", or vice-versa.  When I add more than a screen-ful of inputs, it zooms out to the point the entire thing is completely unreadable.  One time, it started up in this mode, with an empty file!  The only solution I've found to this is to make the brain in several very small files.  But, since you can only delete from the bottom up, once you exceed the limit, this mean re-entering most of the functions all over again. 

I like the idea of brains, but I'm finding this VERY frustrating!  Really makes me wish for a textual way of entiering the data - it would save a HUGE amount of time and effort.  The GUI is so limiting, it makes the job more difficult than it should be.

Regards,
Ray L.

1675
Brains Development / Suffering From Brain Damage....
« on: August 18, 2008, 08: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.

1676
General Mach Discussion / Re: When Is A Circle Not A Circle?
« on: August 15, 2008, 04:13:29 PM »
Hood,
    Seems more like a software thing to me.  I've had problems all along with the machine booting up in a funky state, and re-booting always makes it happier.  It's not like it's flaky.  Once it's up and running well, it'll run well forever.  It just sometimes boots up in a wierd state.  Mach is the only app. I've had a problem with.  The machine is a dinosaur - circa '99 or so, and will be replaced shortly.

Regards,
Ray L.

1677
General Mach Discussion / Re: When Is A Circle Not A Circle?
« on: August 15, 2008, 01:36:10 PM »
In the words of Lewis Carroll's Alice:  "Curiouser and curiouser....".  I've stripped the XP install to the bone, so there are only about 15-20 processes running, and none consume any significant amount of CPU.  When Mach is running, the idle process never seems to drop below 50% of CPU usage, and Mach never goes above 49%.

Today, it seems to be back to cutting perfect circles.  Go figure!

But, today I also found when doing rapids, I'd get periodic "clunks" from the drives, which usually indicates erratic timing in the step pulses to the servos.  This was really severe on first boot fo the PC, so I rebooted, and it was much better, but still there.  The "clunks" occurred at very regular intervals, roughly once/second.  Disabling all limit switch inputs and E-Stop input reduced the severity of the clunks considerably.  Reducing rapid speed from 75IPM to 60IPM completely eliminated them, even with the E-stop and limits all enabled.  What is that all about?

Regards,
Ray L.


1678
General Mach Discussion / Re: When Is A Circle Not A Circle?
« on: August 15, 2008, 12:55:21 AM »
Gerry.

   I don't know.  I've learned not to mess with the computer when Mach is working.  The PC is a pig - only 540MHz.  But, it's been working fine up to this point, and turned out a ton of very nice work with no evidence of this problem.  This seems to be a new behavior just today.  Will Mach3 start getting less accurate like that if the CPU gets bogged down?
   Ya know, it does occur to me, the only thing that's changed in the last few days is I turned on limit switches.  I had been running without them previously.  Could polling those possibly be affecting the quality of the trajectories it's creating?  Seems like a long-shot, but something has changed...

Regards,
Ray L.

1679
General Mach Discussion / Re: Soft Limits Confusion
« on: August 15, 2008, 12:50:39 AM »
RC,

    Seems so simple when you explain it like that!  I'll set it up tomorrow.  Thanks! 

Regards,
Ray L.

1680
General Mach Discussion / Soft Limits Confusion
« on: August 14, 2008, 11:55:10 PM »
A few days ago, I installed and hooked up my home/limit switches.  I have one set of switchs, wired in series, serving both functions.  So, it would be nice to turn on soft limits, but I am totally confused by the settings.  The top of the dialog indicates the settings are in "setup units".  WRF does that mean?  If I want to set the soft limits one inch from the hard limits set by the switches, what do I input for each setting?

Regards,
Ray L.