Hello Guest it is April 19, 2024, 01:40:37 PM

Author Topic: MacroPump Doesnt Run  (Read 15490 times)

0 Members and 1 Guest are viewing this topic.

MacroPump Doesnt Run
« on: January 14, 2010, 11:33:40 AM »
I have it named MacroPump.1ms

I have the use macro pump box ticked on the Config General Config page

It runs correctly if i open it with the Mach VB script editor

Anyone have any ideas what's wrong ?

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: MacroPump Doesnt Run
« Reply #1 on: January 14, 2010, 08:37:22 PM »
Make sure it is the same folder as your profile name:

If you load "myprofile" it will be in:
C:\Mach3\macros\myprofile\macropump.m1s

Also you have to restart Mach after checking the macropump box.
« Last Edit: January 14, 2010, 08:43:27 PM by zealous »
Re: MacroPump Doesnt Run
« Reply #2 on: January 15, 2010, 05:38:38 AM »
Thanks Jason

It is in the profile folder, & Mach has been restarted.

Is there any other way of checking that its working other than what it is supposed to do ?

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: MacroPump Doesnt Run
« Reply #3 on: January 15, 2010, 10:57:40 AM »
Put this in the Macropump to check:


Code: [Select]
i=i+1
message "Macro Running #"&i

 it will show you in Mach’s statues line how many times the macro has ran.

« Last Edit: January 15, 2010, 10:59:40 AM by zealous »
Re: MacroPump Doesnt Run
« Reply #4 on: January 15, 2010, 12:01:08 PM »
Thanks Jason,

It does run. ;D

It just doesn't like my macro, there are only 4 lines.  ::)

If(GetLED(801)=1)Then
DOOEMBUTTON (1021)
MESSAGE " Went Into Inch Mode"
end if

No laughing. :-[

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: MacroPump Doesnt Run
« Reply #5 on: January 15, 2010, 12:21:01 PM »
You'll need to use "GetOEMLED"... but more important use "True/False":

Code: [Select]
Dim Inch_LED_boolean As Boolean
Dim Inch_LED_interger As Integer

Inch_LED_boolean = GetOEMLED(801)
Inch_LED_interger = GetOEMLED(801)

MsgBox "boolan "&Inch_LED_boolean
MsgBox "Number "&Inch_LED_interger

'Number way
If(Inch_LED_interger = -1)Then
MsgBox "Number lookup"
End If

'Boolean way
If(Inch_LED_boolean = True)Then
MsgBox "boolean lookup"
End If

'Boolean way with out  ==
If(Inch_LED_boolean)Then
End If

'Boolean way with out  ==
If Not(Inch_LED_boolean)Then
End If
« Last Edit: January 15, 2010, 12:23:08 PM by zealous »
Re: MacroPump Doesnt Run
« Reply #6 on: January 16, 2010, 05:29:25 PM »
Jason,

Thanks i got the macropump to work, but now it resets itself and just leaves my message i want it to stay in reset mode.

Obviously VB scripting is not an area where i excel, do i need an else somehow  :-[

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: MacroPump Doesnt Run
« Reply #7 on: January 16, 2010, 05:47:17 PM »
Great,

You can put a sleep in there to clear the message.

Code: [Select]
Dim Inch_LED_boolean As Boolean
Inch_LED_boolean = GetOEMLED(801)
If(Inch_LED_boolean = True)Then
MESSAGE " Went Into Inch Mode"
Sleep(2000)'2 seconds
MESSAGE ""
End If


...you might want to use a userlabel or ticker as well as well.

In Screen4 you'll want to drop a Userlabel or ticker:

Code: [Select]
SetUserLabel 12, "You must enter a whole number of holes"
SetTicker 205, "This is a very long error message because you seem to have done something very silly"

« Last Edit: January 16, 2010, 05:52:41 PM by zealous »
Re: MacroPump Doesnt Run
« Reply #8 on: January 17, 2010, 11:57:26 AM »
Hi Jason,

Thanks for your patience in helping this dummy. :-[

I want the message to stay i just want the event once its happened to leave the machine disabled until i reset the machine.

Is that possible.?

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: MacroPump Doesnt Run
« Reply #9 on: January 17, 2010, 01:50:06 PM »
Hi Phil,

Let me get a better idea of sequence of events.

If the machine goes into Inch mode, no matter what it is doing Estop(reset) the system, send a message about being in Inch mode and wait for a "reset" before removing the message?
Are you using the VB popup message display or the Mach label message display?
Jason