Need Help! Need to figure out were i went wrong


Results 1 to 2 of 2

Thread: Need to figure out were i went wrong

  1. #1
    Member
    Join Date
    Dec 2007
    Location
    usa
    Posts
    341
    Downloads
    0
    Uploads
    0

    Default Need to figure out were i went wrong

    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

    Similar Threads:


  2. #2
    Member Maroslav4's Avatar
    Join Date
    Apr 2015
    Location
    Czech Republic
    Posts
    327
    Downloads
    7
    Uploads
    0

    Default Re: Need to figure out were i went wrong

    [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

    Postprocessors, VBA macros, .NET programming.
    www.ccsoftcz.com


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Need to figure out were i went wrong

Need to figure out were i went wrong