Hello Guest it is October 23, 2019, 12:38:30 PM

Author Topic: Using a macro to "ref all home"  (Read 4818 times)

0 Members and 1 Guest are viewing this topic.

Re: Using a macro to "ref all home"
« Reply #20 on: August 16, 2018, 10:27:58 AM »
I see.

Offline TPS

*
  •  1,391 1,391
    • View Profile
Re: Using a macro to "ref all home"
« Reply #21 on: August 16, 2018, 03:09:07 PM »
witch motioncontroler areyou using?
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Using a macro to "ref all home"
« Reply #22 on: August 16, 2018, 05:50:10 PM »
Mach3 XHC MK4-IV  

Offline TPS

*
  •  1,391 1,391
    • View Profile
Re: Using a macro to "ref all home"
« Reply #23 on: August 17, 2018, 01:42:43 AM »
ok, but anyhow it is courios, that you can run the M12 via MDI without any Problem,
and by enabling the Ignore M calls while loading it should not go into the macro.


i have two further ideas to test (without any idea of the real reason):

- rename the M12 to M312 for example

- put additional code into M12

If Not() IsLoading() Then

   ..your M12 code here

End If

Thomas
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Using a macro to "ref all home"
« Reply #24 on: August 21, 2018, 07:03:09 PM »
I copied M12 and renamed to M312... same results

I modified the M312/M12 file, it now reads as:

If Not() IsLoading() Then

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

End If





When I type M312 into MDI, I get this error - Scripter Compile Error. In:M312.m1s
Re: Using a macro to "ref all home"
« Reply #25 on: August 21, 2018, 07:36:17 PM »
Hi,
I don't know VB but:

Quote
Not() IsLoading()
Doesn't look right to me.

Try:
 Not(IsLoading())

Craig
My wife left with my best friend...
     and I miss him!

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Using a macro to "ref all home"
« Reply #26 on: August 21, 2018, 07:40:40 PM »
Try :

If Not IsLoading() Then
...
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Using a macro to "ref all home"
« Reply #27 on: August 21, 2018, 07:48:55 PM »
I rewrote the Macro with both Not(IsLoading()) and Not IsLoading(), Not IsLoading() returned the same error and Not(IsLoading()) ran the macro in MDI OK and caused the same loop when running as a part of my header
Re: Using a macro to "ref all home"
« Reply #28 on: August 21, 2018, 08:04:05 PM »
Hi,
Gerry is way more experienced in VB than I, if he suggests:
Not IsLoading() that is the correct syntax.

Craig
My wife left with my best friend...
     and I miss him!
Re: Using a macro to "ref all home"
« Reply #29 on: August 21, 2018, 08:26:02 PM »
The code runs fine like this in MDI
If Not(IsLoading()) Then

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

End If





Code returns the error   Scripter Compile Error. In:M312.m1s     when written like this:

If NotIsLoading() Then

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

End If