Hello Guest it is March 28, 2024, 02:21:02 PM

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 - tiny

Pages: 1
1
Brains Development / Jog ON/OFF brain quirks
« on: March 09, 2011, 02:48:12 PM »
Howdy folks,
I spent too many hours yesterday tweaking brain files ... and still don't have quite what I wanted, so I'm hoping for some enlightenment.

Here's the story:  5 axis CNC laser welding system.  Mach3 + Galil (DMC 4060) + CNC4PC pendant (MPG4, with the enable button rewired to NC).  When doing welding moves that are just a 4th or 5th axis rotation move, we want to be able to jog the X and Y axis with the MPG to follow contours (usually making up for slightly bent or eccentric parts).  But whenever an axis starts moving, the jogging gets deactivated (I think by the Galil plugin.  Makes sense for lathe or mill).

So here was my intended workaround:  write a custom M-code script that can activate the jog override ability for appropriate sections of a part program by setting a flag (I used output 5, since it wasn't used for anything else.  But I think a UserLED would have worked, too).  Then have a brain that looks for the MPG to be on either X or Y axis (OEMTRIG 2 or 3 = FALSE (inverted)), AND the override flag (OUTPUT5), AND the jog LED (57) = false (meaning that Galil has deactivated it).  If all that is true, press the jog button to turn it back on.  This does, in effect, set up a small war between whatever code is trying to turn off the jogging and my brain file turning it back on.  But it works well enough to get pretty seamless jogging action for small corrections via the MPG.

The other piece of the puzzle is the brain that enables/disables jogging under normal circumstances (not running G code).  Since the Enable button on the MPG is the common for the axis_select and speed_select switches (and logic is inverted), look for all the corresponding OEMTRIGGERS (2-9) to go TRUE at the same time, and cause a button press to the Jog On/Off button.  This creates latching on/off toggle action.  (Credit to Ken Crouch)

It all works fine when I'm not executing G-Code.  If Output5 is set, then whenever I try to disable jogging (on the screen via mouse or the MPG Enable button) and the MPG is set to X or Y axis, the brain re-enables jogging.  And if I'm not on X or Y, the MPG Enable button happily toggles the Jog On/Off state.

BUT...as soon as I am running G-Code (with OUTPUT5 set), I have to use the mouse on the actual button (Jog On/Off - 103) or the keyboard shortcut to get the Jog Enable to latch on and stick.  If I use the MPG Enable button, the Jog blinks on and then back off again.  !!!!! :-\  Having to use the keyboard or mouse and then jump back to the MPG doesn't cut it for usability.

So my questions:
1) what is really different about a brain file causing a "ButtonPress" as compared to a mouse or keyboard press?  Something, evidently...
2) It seems there is an underlying variable for Jog Enabled state, since if it is enabled before a GCode run, it gets re-enabled after the run (and between moving steps, actually).  How can this be accessed by brains or vb scripts?
3) Is there something I'm missing about the cycle timing of brain processing (10Hz, from what I've read) and debouncing the switch?  I haven't found any really good reference for explaining how the timer lobes really work.  Anyone?
4) Can anybody see a better way to get the functionality I'm after?

Big thanks....
Tad

2
Brains Development / Use button click as brain input?
« on: April 16, 2010, 12:17:45 PM »
I need to momentarily pulse an output when the reset button is clicked.  Can I use a brain for this?  I can't see any applicable option to start a rung with...Can I get to a button state?

Thanks

3
Galil / Re: Printer port drivers and Galil Ethernet
« on: April 06, 2010, 05:43:51 PM »
MPG4 from CNC4PC
http://www.cnc4pc.com/Store/osc/product_info.php?cPath=40&products_id=162
and the brain files that go with it from here:
http://www.cnc4pc.com/Files/MPG4_LPT2Brain_V4.zip
(install guide here: http://www.cnc4pc.com/Tech_Docs/guide_for_MPG4_over_LPT2.htm)

It would still be nice to use the C22 interface board (http://www.cnc4pc.com/Store/osc/product_info.php?cPath=40&products_id=159) because it gives me a relay output for the E-stop button, but that's optional...

Thanks for the help!

4
Galil / Re: Printer port drivers and Galil Ethernet
« on: April 06, 2010, 05:29:48 PM »
Thanks for the feedback Kenny!  If I wire the MPG through the DMC inputs, do the same MPG brains work once I change the ports/pins? 

5
Galil / Re: Printer port drivers and Galil Ethernet
« on: April 06, 2010, 04:20:07 PM »
I'm having a beastly time trying to get a CNC4PC MPG connected to a parallel port to show up in Mach3, which is already running a Galil DMC via ethernet and the "Galil Plugin for Mach3". 

Can anybody verify for me that these are compatible? 

I see in the plugin manual that there is the optional strategy of running the MPG inputs through available inputs on the DMC, but since that takes more individual wiring than the printer cable, I'd rather stick with the parallel port.  But I've tried lots of tweaking of port address/name/etc with no sign of the inputs getting into Mach3 (diagnostics screen).

Anyone?

Thx...

Pages: 1