Hello Guest it is April 25, 2024, 10:21:35 PM

Author Topic: Mod IO Pendant Kit Plug in is finished........  (Read 14664 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #10 on: March 10, 2009, 05:30:06 PM »
Thanks for the Chops!!!!

scott
fun times
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #11 on: June 08, 2009, 12:48:08 PM »
What is the best way to setup a macro to run via one of the userdefined functions?  where do I put the macro?  Do I have to add a button to the screen set or can I just run it via the button?

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #12 on: June 08, 2009, 02:07:24 PM »
The configuration page, has you put in the User LED number that you want that button to activate (i.e. turn it on), you can then look at that LED with Brians or Macropump to perform some function. you can also put a User LED onto your screen sets to show its state. (please see the example screen set that comes with the plugin, it has a MP-03 "Page" that has ALL the functions, and example LEDs that come with the OEM set up. You can use it as is, OR, make your own screens or mods and use the OEM screen as an example.

scott
fun times
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #13 on: June 08, 2009, 02:24:46 PM »
So if i have this macro how do I assign the user led to it in the macropump:

Rem VBScript To center probe inside a pipe

If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty

    Code "(Probe plate is grounded, check connection and try again)"

Else

    FeedCurrent = GetOemDRO(818) 'Get the current settings
    XCurrent = GetDro(0)
    YCurrent = GetDro(1)

    Code "G4 P1" 'Pause 1 second to give time to position probe plate
    Code "F4" 'slow feed rate to 4 ipm

Rem Probe Left

    XNew = Xcurrent - 3 'probe 3 inches to left
    Code "G31 X" &XNew
    While IsMoving() 'wait for the move to finish
    Wend
    XPos1 = GetVar(2000) 'get the probe touch location

    Code "G0 X" &XCurrent 'rapid move back to start point

Rem Probe Right

    XNew = XCurrent + 3 'probe 3 inches to right
    Code "G31 X" &XNew
    While IsMoving()
    Wend
    XPos2 = GetVar(2000)

    XCenter = (XPos1 + XPos2) / 2 'center is midway between XPos1 and XPos2
    Code "G0 X" &XCenter 'rapid move to the x center location
    While IsMoving ()
    Wend
    Call SetDro (0,0.000)
    Code "G4 P0.25"

Rem Probe up

    YNew = YCurrent + 3
    Code "G31 Y" &YNew
    While IsMoving()
    Wend
    YPos1 = GetVar(2001)

    Code "G0 Y" &YCurrent

Rem Probe down

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #14 on: June 08, 2009, 02:46:01 PM »
I am "ASS-U-Ming", that the macro you posted is a Probing macro, i.e. lets call it M777 for the heck of it.
Lets say that ULED 2000 is your "Trigger" led from your Pendant, since you want to only call your probing macro once from your macropump
you will need to put an interlock in it. It will trigger only ONCE per push and release of the Trigger LED button you have assigned.

ProbingCallNum = GetUserDRO(1500)  'or what ever user dro or VAR you want to use as your counter.

if GetUserLED(2000) and ProbingCallNum = 0 then
Code "M777"  'your probing macro is called here
ProbingCallNum = 1
end if

if Not(GetUserLED(2000)) and ProbingCallNum = 1 then
ProbingCallNum = 0
end if

'scott

« Last Edit: June 08, 2009, 02:48:53 PM by poppabear »
fun times
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #15 on: June 08, 2009, 03:12:00 PM »
You are correct that it is a probing macro. So after entering the above code in the macropump.m1s fileThen I would save the macro itself as M777.m1s in the macro folder?  In the first line of your code
 
ProbingCallNum = GetUserDRO(1500) <- should this be 2000

This is starting to make sense.  Thanks for your help I do appreciate it.
Mike

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #16 on: June 08, 2009, 03:45:29 PM »
no, the counter is a User DRO 1500, the 2000 belongs to the User LED.......... I gave different numbers so you could see they where different things...

Yes, save the M777 in the macros folder,    UNDER YOUR PROFILE!!!!!  that you are using!!!!!! 
fun times
Re: Mod IO Pendant Kit Plug in is finished........
« Reply #17 on: June 08, 2009, 03:54:09 PM »
Scott,
I think I get it.  I will try it out this afternoon when I am in front of the actual pc with the pendant.  I appreciate your help.