Hello Guest it is August 18, 2019, 09:52:44 AM

Author Topic: Macropump help  (Read 9410 times)

0 Members and 1 Guest are viewing this topic.

Re: Macropump help
« Reply #10 on: April 08, 2007, 06:41:56 PM »
Or you can set an OEMtriger to do that... you need to set the OEM code under the System Hotkeys and I think you are going to need number 1021 for a reset.. (Found on the Wiki)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Macropump help
« Reply #11 on: April 08, 2007, 06:57:17 PM »


Here is the pendant as I call it. 

I am not sure what you are saying about using an OEMtrigger Brian.
My inputs are into a ModIO analog, via a voltage divider.
This is the panel I showed you at the show in January in PA.  It was
just a drawing back then.

My problem here is debouncing the keys.  Single step for example, if you
do not hit it just right, it will toggle on and then just toggle off.
The feedrate up and down buttons often jump in increments of 20
instead of the 10 that they should.  The keys are being read 5 times
a second (via the macropump) and Mach is seeing multiple keystrokes
 for single pushes.  Clearly a debouncing problem.

The reset is working fine.
I coded it so that once it is pressed, it will not work again unless
Mach goes into reset again for some reason.

Also, I need to figure out how to get the Mode, Resolution and Axis selection switches
all into 1 analog input.  I might need some external logic.

Scott

« Last Edit: April 08, 2007, 07:48:29 PM by polaraligned »

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Macropump help
« Reply #12 on: April 08, 2007, 08:38:28 PM »
Ok,

   Goto "General config", then look to the right, and set your switch debounce upto 200-300 that should help.

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline chl

*
  •  13 13
    • View Profile
Re: Macropump help
« Reply #13 on: April 09, 2007, 06:26:14 AM »
Hi here is a little example maby it can help you...there will not be any multiple keystrokes.


If GetInput (64) < 50 Then           'check if up button
   SetDRO(21,GetDRO(21)+10)      'Feedrate up 10%
      While GetInput (64) < 50        'Stay here until button released
      sleep(100)
      Wend
End If



If GetInput (64) > 151 And GetInput (64) < 250 Then          'check if down button
   SetDRO(21,GetDRO(21)-10)                                            'Feedrate down 10%
      While GetInput (64) > 151 And GetInput (64) < 250       'Stay here until button released
      sleep(100)
      Wend
End If
« Last Edit: April 09, 2007, 06:29:04 AM by chl »
Re: Macropump help
« Reply #14 on: April 10, 2007, 07:28:55 PM »
Thanks chl.  That code appears to be working so far during testing.


Scott

Offline chl

*
  •  13 13
    • View Profile
Re: Macropump help
« Reply #15 on: April 11, 2007, 10:52:54 AM »
Thats good :).....you have a very nice setup.....looks great ;)

chl
Re: Macropump help
« Reply #16 on: September 08, 2007, 02:08:49 AM »
Hi here is a little example maby it can help you...there will not be any multiple keystrokes.

If GetInput (64) < 50 Then           'check if up button
   SetDRO(21,GetDRO(21)+10)      'Feedrate up 10%
      While GetInput (64) < 50    ??'Stay here until button released
      sleep(100)
      Wend
End If



If GetInput (64) > 151 And GetInput (64) < 250 Then          'check if down button
   SetDRO(21,GetDRO(21)-10)            ? ???????? ??????'Feedrate down 10%
      While GetInput (64) > 151 And GetInput (64) < 250    ??#039;Stay here until button released
      sleep(100)
      Wend
End If





Hi all,
       Im building a MPG Pendent, and Im having trouble loading codes to run my mpg, can anyone guide me on how to load a code to C:\Mach3\macros\Modio?

thanks,

Freddy

Offline Chaoticone

*
  • *
  •  5,570 5,570
  • Precision Chaos
    • View Profile
Re: Macropump help
« Reply #17 on: September 08, 2007, 05:54:51 AM »
Hey Freddy,
    Open the profile you want the macro in in Mach. Go to the top tabs, choose operator, VB script editor. From there browse to your C\Mach3\macros\?whatever profile you want the macro in? If this is a macro pump, you need to add to your macro pump, If there is no macropump allready, just put your code in the VB script editor and save as macropump.m1s in the macro folder under the profile you want.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Macropump help
« Reply #18 on: September 08, 2007, 08:55:34 AM »
Quote
Also, I need to figure out how to get the Mode, Resolution and Axis selection switches
all into 1 analog input.  I might need some external logic.

Scott

I would say to do it that way you would need a high tolorance regulated power supply, and high tolorance resistors for a larger voltage divider network.
I would look at the Register  "GetInput(65)" or what ever your using and see what the value is in the register. I noted that Under the "DROs" on the wiki, there are DROs assigned to 64,5,6 so you can drop the one that matches your register onto some "Debug" page in screen designer.
I would pull in each value as a range to account for voltage variations, i.e.  For mode(1)  0-20, for mode(2) 21-40 etc. or something like that so
so:

x=GetInput(64)
If 0<=X<20 then
dobutton(*********)
End If


NOTE: the code I wrote you was so that no matter how long the button was pushed it would only run the input 1 time. But if De-bounce still gets you and setting up the software debounce doesnt help, then put a capacitor across your switch leads. 0.01mf or something.

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/