[QUOTE=woffler;2184526]Hi all i am trying to modify this little bit of code on my post and it keeps throwing a error , i sure could use some help with this it starts after Lathe return string (G99), iwas trying insert the G96 code .
I am not sure what i should have put after the G99 ? and then how to end it ?
If MILL_GetUserSelectComboVariable(0) = 0 Then
Lathe_SetReturnString("G98")
Else
Lathe_SetReturnString("G99")
Then
Lathe_SetReturnString("G96")
End If
Thank You in advance[/QUOTE]
Hello,
you have a programiing error. You cannot use your code.
Correct can be this.
[COLOR=#000000]If MILL_GetUserSelectComboVariable(0) = 0 Then[/COLOR]
[COLOR=#000000]Lathe_SetReturnString("G98")[/COLOR]
[COLOR=#000000]Elseif [/COLOR][COLOR=#000000]MILL_GetUserSelectComboVariable(0) = 1 then[/COLOR]
[COLOR=#000000]Lathe_SetReturnString("G99")[/COLOR]
[COLOR=#000000]else[/COLOR]
[COLOR=#000000]Lathe_SetReturnString("G96")[/COLOR]
[COLOR=#000000]End If[/COLOR]
but it is also not good. Not sure what is your all code. It is only example.
You cannot use
If some_variable = true then
"do something"
else (in this line you say if "some_variable = true" do someting else)
"do something else"
then (it is syntax error)
endif
Hope understable
Marek