Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 03:28:01 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  MacroPump Doesnt Run
Pages: 1 2 »   Go Down
Print
Author Topic: MacroPump Doesnt Run  (Read 1464 times)
0 Members and 1 Guest are viewing this topic.
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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
Logged

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

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

Offline Offline

Posts: 486



View Profile WWW
« 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 » Logged

Regards, Jason Blake

www.Fusioncnc.com
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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
Logged

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

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

Offline Offline

Posts: 486



View Profile WWW
« Reply #3 on: January 15, 2010, 10:57:40 AM »

Put this in the Macropump to check:


Code:
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 » Logged

Regards, Jason Blake

www.Fusioncnc.com
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« Reply #4 on: January 15, 2010, 12:01:08 PM »

Thanks Jason,

It does run. Grin

It just doesn't like my macro, there are only 4 lines.  Roll Eyes

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

No laughing. Embarrassed

Phil
Logged

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

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

Offline Offline

Posts: 486



View Profile WWW
« Reply #5 on: January 15, 2010, 12:21:01 PM »

You'll need to use "GetOEMLED"... but more important use "True/False":

Code:
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 » Logged

Regards, Jason Blake

www.Fusioncnc.com
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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  Embarrassed

Phil
Logged

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

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

Offline Offline

Posts: 486



View Profile WWW
« Reply #7 on: January 16, 2010, 05:47:17 PM »

Great,

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

Code:
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:
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 » Logged

Regards, Jason Blake

www.Fusioncnc.com
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« Reply #8 on: January 17, 2010, 11:57:26 AM »

Hi Jason,

Thanks for your patience in helping this dummy. Embarrassed

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
Logged

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

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

Offline Offline

Posts: 486



View Profile WWW
« 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
Logged

Regards, Jason Blake

www.Fusioncnc.com
Pages: 1 2 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!