Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: salttank on June 21, 2020, 01:08:41 AM

Title: help with simple code
Post by: salttank on June 21, 2020, 01:08:41 AM
i'm getting syntax error while tryng to compile this code. please help!
Quote
If GetVar(Param1()) <> Param2() Then
   Code("M98 P") & Param3()
End If   
Title: Re: help with simple code
Post by: Tweakie.CNC on June 21, 2020, 01:50:19 AM
Perhaps

Code: [Select]
If GetVar(Param1()) <> Param2() Then
   Code ("M98 P" & Param3())
End If
Title: Re: help with simple code
Post by: TPS on June 21, 2020, 03:23:05 AM
you do not Need the Getvar

Quote
If Param1() <> Param2() Then
   Code ("M98 P" & Param3())
End If
Title: Re: help with simple code
Post by: salttank on June 21, 2020, 09:29:54 AM
you do not Need the Getvar

Quote
If Param1() <> Param2() Then
   Code ("M98 P" & Param3())
End If
That does it, thank you  ;D
Title: Re: help with simple code
Post by: StudioRadiQ on November 28, 2020, 04:19:07 PM
I would like the machine to automatically move to the x500 y500 position after pressing REF.  What should my script look like?

sorry for my English.  I hope you understand what's going on
Title: Re: help with simple code
Post by: ZASto on November 28, 2020, 05:11:13 PM
Do you mean, after referencing machine clicking on Ref All Home, to move to 500, 500?