Hello Guest it is November 15, 2019, 04:55:23 AM

Author Topic: How to enable axis after Disable Momement on Axis ?  (Read 1411 times)

0 Members and 1 Guest are viewing this topic.

How to enable axis after Disable Momement on Axis ?
« on: October 14, 2013, 11:00:33 AM »
Hi there.

I am very new with VS scripting.
Now i am tryintg to do script with will pause G-code execution, turn off shpindle, raise Z coord for 5mm and lock X Y and Z manual jogging (moving).
Here it is -

Code: [Select]
DoButton (1)
Code "G4 P1" 
Code "M5"
Code "G91"
Code "G0 z5"                 
Code "G90"
DoOEMButton (250)
Sleep (1000)
DoOEMButton (251)
Sleep (1000)
DoOEMButton (251)
Sleep (1000)

It works BUT disables only X axis. And i cant activate movements when i try to go back to work (with other VS script button).

Code: [Select]
Code "M3"
Code "G4 P5"
Code "G91"   
Code "G0 z-5"
While (IsMoving())
sleep (100)         
Wend                     
Code "G90"
 DoButton (0) 

I try to use JogOff and JogOn but its dont work at all. I need your help to know HOW TO disable movemets with button1 and enable movements with button2. Thanks.