Hello Guest it is April 19, 2019, 04:58:15 PM

Author Topic: reference Script  (Read 6541 times)

0 Members and 1 Guest are viewing this topic.

Offline 1hxo

*
  •  20 20
    • View Profile
reference Script
« on: April 23, 2013, 04:53:23 PM »
Hello
I have a big Problem with the script for my reference script.
When i push the button ref all home my Z axes run to the switch,touch the switch and release the switch.The same for X and Y.
But when the axes touch the switch mach3 zero the machine coords DRO then my machine release the switch and the DRO goes on and stop at about +0,0400 to +0,0100 the Leds dont turn green.
It is possible to zero the machine coords DRO with a script like the work DRO?
When i use setoemdro(800,0) the work DRO will reset to zero
Somebody knows the Command for Zero the machine coords DRO?

My controll board is the Pokeys 56U
All switches are activate and they are function.
The only thing is i want to reset the Machine coords after a Ref All Home call

Offline 1hxo

*
  •  20 20
    • View Profile
Re: reference Script
« Reply #1 on: April 23, 2013, 05:40:14 PM »
Ok And a other problem with the vb scripting:
When i use the mach3 vb script editor and then enter:

DoButton( 22 )
While IsMoving()
Wend
Code "G53 G0 X0"

And now when i hit the button run the machine drives to ref x and then he should go in machine coords and g0 to x0?
instead the vb script editor hangs untill i push the reset button twice then the vb script drives the x axes in g53 to x0
Is this normal?

Offline 1hxo

*
  •  20 20
    • View Profile
Re: reference Script
« Reply #2 on: April 23, 2013, 07:23:47 PM »
Now i have try several scripts
When i use:

code"g0 x30"
while ismoving()
wend
code"g53 g0 x0"

Then the script runs fine.
as soon as i use at first command a dobutton(22) then the scripteditor hangs untill i press reset button.
The same when i use G28 command
When i first use a dobutton(22) then press stop then can i use a code"g53 go xo"
Have someone an idea where i have a mistake?

Offline Hood

*
  •  25,779 25,779
  • Carnoustie, Scotland
    • View Profile
Re: reference Script
« Reply #3 on: April 24, 2013, 03:00:02 AM »
What revision of Mach are you using?
Hood

Offline 1hxo

*
  •  20 20
    • View Profile
Re: reference Script
« Reply #4 on: April 24, 2013, 03:06:03 AM »
I use mach3 R3.043.66
The latest lockdown version

Offline Hood

*
  •  25,779 25,779
  • Carnoustie, Scotland
    • View Profile
Re: reference Script
« Reply #5 on: April 24, 2013, 03:11:27 AM »
Ok well that does not surprise me ::) the latest lockdown and Dev versions have lots of issues and in my opinion should not be available for download or if they are  they should at least have  a warning that they have issues.
I am not saying that is definitely your issue but I am fairly confident it is, download and install an earlier version and see if it cures your issues, I use 056 and 057 on my machines but anything up to 062 may be ok, you will find them here.
ftp://machsupport.com/Mach/

Hood

Offline 1hxo

*
  •  20 20
    • View Profile
Re: reference Script
« Reply #6 on: April 24, 2013, 04:03:50 AM »
Ok i give different version a try.
Only with over installing the version.
test script:
 DoButton(22)
 While IsMoving()
 Wend
 Code "G53 G0 X0"
version 0.56 crash i must restart mach3 nothing happens
version .057 the same
up to version .060 the script does the same at my first try's
At this point i think its the pokeys mach3 plugin.
I dont can try this on an lpt port.
But when i use Code "g0 x10" instead of Dobutton(22) the script runs fine.
As soon as i use Commands for reference Like dobutton(22) or G28 the script hangs after do the first commando and then i must press reset or stop then the script runs to his end.
running this script on a lpt port as it should? When this script running fine on a lpt port then the mach3 pokey plugin has a fault.

Offline Hood

*
  •  25,779 25,779
  • Carnoustie, Scotland
    • View Profile
Re: reference Script
« Reply #7 on: April 24, 2013, 05:06:40 AM »
Ok instead of
DoButton(22)
 try
DoOemButton(1022)

Hood

Offline 1hxo

*
  •  20 20
    • View Profile
Re: reference Script
« Reply #8 on: April 24, 2013, 06:02:18 AM »
7Always the same.
And always with the homing function.All other makro's run fine.
i'm not able to move the axes to a point after reference with a script.mach3 stop always after execute dobutton(22), dooembutton(1022) or a g28 command and wait that i push the stop button that he can execute the rest of the script.

Offline Hood

*
  •  25,779 25,779
  • Carnoustie, Scotland
    • View Profile
Re: reference Script
« Reply #9 on: April 24, 2013, 06:34:59 AM »
Looks like it is a PoKeys issue then, maybe it needs the latest version of Mach? I do know there are issues with the latest versions and homing scripts as I had them, it would need 2 or 3 executions of the script before it would complete fully.
Hood