Machsupport Forum

Mach Discussion => Mach Screens => Topic started by: Kenneth on February 04, 2019, 12:45:01 PM

Title: Probe
Post by: Kenneth on February 04, 2019, 12:45:01 PM
Below is a script i made with machscreen v1.7. but it tells me the the command is too long and points to the block(first line).
hope someone can help me. Thanks


'probe on Z axis 
Probe = 1.89  'probe height
Depth = -1.5   'z negative travel 
Feed = 4
Code "G20 G31 Z" & Depth & " F" & Feed
While IsMoving()
Wend
SetOEMDRO(802,Probe)
While IsMoving()
Wend
Code "G91 G00 Z.2"
While IsMoving()
Wend
Code "G90"
End
 
 
Title: Re: Probe
Post by: Kenneth on February 04, 2019, 12:50:07 PM
64 bit
win 10 pro
24g ram
3.4g processor
Title: Re: Probe
Post by: Kenneth on February 04, 2019, 01:08:14 PM
sorry, using Mach 3
Title: Re: Probe
Post by: Tweakie.CNC on February 05, 2019, 01:58:16 AM
I don't know if it helps but the line;

SetOEMDRO(802,Probe)

Should read;

Call SetOEMDRO(802,Probe)
Title: Re: Probe
Post by: Kenneth on February 05, 2019, 05:58:54 AM
Thanks Tweakie.CNC, i tried that and same error. i think there may be something that
tells the code that there's an end of line.since the error includes the first two lines.
i also have a corner probe button without the "Call" inserted and works fine.
i'm at a lost but will keep looking. Thanks for your info !
Title: Re: Probe
Post by: TPS on February 05, 2019, 11:05:14 AM
try to copy the code from machsreen Editor to an other Editor like Notepad++, just to see that there is a correct CRLF at the
end of each line.
Title: Re: Probe
Post by: Kenneth on February 05, 2019, 11:23:53 AM
there are no CRLF at the end of any line. does have NUL at end of file.
THANKS TPS
Title: Re: Probe
Post by: Klaus1311 on February 07, 2019, 01:15:20 PM
Hi Kenneth

When do you get that error message? When entering use data and close, or when you close MachScreen?

Klaus
Title: Re: Probe
Post by: Kenneth on February 07, 2019, 01:18:50 PM
i get the error message when i use the button in mach3.
its in the error label. where the estop message is.
Thanks Klaus !
Title: Re: Probe
Post by: Klaus1311 on February 07, 2019, 01:29:28 PM
Hi Kenneth,

did you try to debug your script in Mach3 with the script debugger?

Select your page with the button
Menu Operator -> Edit button script
click the flashing button of interest


Klaus
Title: Re: Probe
Post by: Kenneth on February 07, 2019, 01:30:59 PM
i didn't think of that. let me try.
Thanks Klaus
Title: Re: Probe
Post by: Kenneth on February 07, 2019, 01:37:09 PM
it won't let me edit it in mach3. the other buttons i can edit.
Thanks Klaus
Title: Re: Probe
Post by: Klaus1311 on February 07, 2019, 01:41:05 PM
Hi Kenneth,

you could send me your screenset files including the script to have a look at it. My email klaus.dietz@kd-dietz.de


Klaus
Title: Re: Probe
Post by: Kenneth on February 07, 2019, 01:45:35 PM
on it's way.
Title: Re: Probe
Post by: Klaus1311 on February 07, 2019, 02:04:37 PM
Hi Kenneth,

I suppose the buton of interest is "Height Probe". Try to change the "Standard Code" to 34 (Std  Execute Basic-Script)

Klaus
Title: Re: Probe
Post by: Kenneth on February 07, 2019, 02:06:35 PM
sorry, yes it's the "height probe" button. ok i'll try that.
THANKS.
Title: Re: Probe
Post by: Kenneth on February 07, 2019, 02:24:25 PM
i changed the oem and it works but i close mach3 and opened it again and now
ESTOP doesn't work. i had a script for it but i changed it to oem 1021. but still nothing.
THANKS Klaus for your attention and patience !
Title: Re: Probe
Post by: Klaus1311 on February 08, 2019, 03:24:07 AM
Hi Kenneth,

glad, I could help

Klaus