Author Topic: how to start from the previous line after pushing a button  (Read 817 times)

0 Members and 1 Guest are viewing this topic.

Offline hamettal

  • Active Member
  • Posts: 8
    • View Profile
how to start from the previous line after pushing a button
« on: October 30, 2015, 01:38:03 PM »
i am having so many problems since i can't find too much information about the IF conditions topic (and i'm just too dumb to understand what i have read before) .

I need to find a way to set a condition that IF i pause my code it can return to a determined line (GOTO) when i start it again

Let's say i am trying to screwing 3 allen bolts with a pneumatic screwer. This screwer sends a fault to a PLC when it doesn't found a bolt, i set the PLC to send a signal to MACH3 to pause the program when the screwer didn't screw the bolt (to let me or the user verify if there is a bolt missing) . But When i push the start button, the program will run  from the next line and i need to repeat the previous line to screw the bolt i just set up
 
thank you and sorry for my bad english haha

Offline hamettal

  • Active Member
  • Posts: 8
    • View Profile
Re: how to start from the previous line after pushing a button
« Reply #1 on: November 09, 2015, 05:23:16 PM »
just for the record...
i just solved my problem using inputs to stop and start the program in case of a missing bolt... so every time there is a missing bolt i press a button that runs a macro with a g-code that makes my Z axis go down and up, screws and it continuous with the rest of the program after that :D