Hello Guest it is November 05, 2024, 01:40:15 PM

Author Topic: mach ignoring macropump code  (Read 8165 times)

0 Members and 1 Guest are viewing this topic.

mach ignoring macropump code
« on: April 19, 2015, 03:07:27 PM »
In a previous thread I started (Problems with For Next loop in script), BR549 kindly gave me this script to run in macropump:-

IF Isactive(input1) Then
DoOemButton(1001)
While Ismoving()
Wend
DoOemButton(1003)
Else
End IF
END

According to my logbook, it worked. Next day, the PC died, and has now been replaced. But now macropump code of any sort doesn't work. I then tested the above code in the vb script window; as predicted, it locked up the processor. I tested this code instead (by pressing input 1 switch to make it active; checked in diagnostics screen):-

IF Isactive(input1) Then
Code "G00 X200"
End IF
END

No joy in macropump, but works from VB code window. All this despite 'run macropump' being enabled in general config.

macropump file is called 'macropump.m1s', my xml is attached in case that helps anyone.

Anyone know why macropump code is not being run?

Thanks, R
« Last Edit: April 19, 2015, 03:09:31 PM by moorea21 »

Offline BR549

*
  •  6,965 6,965
Re: mach ignoring macropump code
« Reply #1 on: April 19, 2015, 03:56:19 PM »
Did you turn ON the macropump??

(;-) TP
Re: mach ignoring macropump code
« Reply #2 on: April 19, 2015, 04:12:47 PM »
Erm...

I enabled it in general config, I don't remember there being any more to it than that. Nothing in the manual.

?

Offline BR549

*
  •  6,965 6,965
Re: mach ignoring macropump code
« Reply #3 on: April 19, 2015, 04:25:10 PM »
yep that turns it on, I would double chcek the setting.

DID you place the macropump in the proper directory ?

(;-) TP
Re: mach ignoring macropump code
« Reply #4 on: April 19, 2015, 04:33:17 PM »
I triple triple checked... and it's in the right directory. Mystified

Offline BR549

*
  •  6,965 6,965
Re: mach ignoring macropump code
« Reply #5 on: April 19, 2015, 05:11:29 PM »
Then there is no reason for it not to run (;-)

What directory did you place the macropump in?

Have you restarted Mach3 ?

HOW do you know it is not working?

(;-) TP
Re: mach ignoring macropump code
« Reply #6 on: April 20, 2015, 09:03:53 AM »
Now it does work, so it must have been pilot error of some sort, although I feel sure I'm not doing anything differently today.

I have made a point of closing and reopening mach after each change to macropump file, but then I'm sure I did that yesterday as well. Maybe not...

Using the MDI line to provide a testable axis movement, it stops the axis (not very abruptly, but well enough for this application,) and gives me a status line that says  'MDI line paused.. hit CycleStart to continue'. As I don't want it to continue with the paused move, but instead go to the next line of code, I was thinking of adding 'DoOEMButton(1021)' twice after the 'Else' statement.

This seems a clumsy way to achieve this, is there a more 'normal' way to get it to execute the next line after stopping the axis's movement?
« Last Edit: April 20, 2015, 09:08:26 AM by moorea21 »

Offline BR549

*
  •  6,965 6,965
Re: mach ignoring macropump code
« Reply #7 on: April 20, 2015, 09:23:38 AM »
Mach3s Gcode was never intended to be stopped and started as such.  Being it is a buffered system it is a fudge to restart without position loss.  So to do it smoothly,  Well ? it is not going to happen. It is what it is.

(;-) TP
Re: mach ignoring macropump code
« Reply #8 on: April 20, 2015, 10:15:49 AM »
Okay, a fudge will do in this instance. But 'DoOEMButon (1021)' twice before 'else' for some reason doesn't work; I get the same status line telling me to press cyclestart. Why might that be?

Also, the script sometimes takes too long to respond, even though it's always activated in the same circumstances while only 1 axis is moving (same one each time.)

I know nothing about 'Brains' yet, but would that be a way to make sure the script runs more promptly?

Thanks

Offline BR549

*
  •  6,965 6,965
Re: mach ignoring macropump code
« Reply #9 on: April 20, 2015, 11:05:57 AM »
Post your code so I can see what you are trying to do.

(;-) TP