Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jve on June 21, 2012, 02:07:48 AM

Title: vb for g31
Post by: jve on June 21, 2012, 02:07:48 AM
hi guys
i am trying to make a vb but no luck what i want to do is when i have a G31 in my code i need to activate a output and when it is ready deactivate the output is this possiple
regards
jekran
Title: Re: vb for g31
Post by: jve on June 21, 2012, 10:45:15 AM
i can also have in the code m31 and g31 so i can make a macro m31 can any one help me do this ?
Title: Re: vb for g31
Post by: jve on June 21, 2012, 02:26:44 PM
it seems i dont have luck here too
Title: Re: vb for g31
Post by: Hood on June 21, 2012, 03:29:44 PM
What exactly are you wanting to do? You said switch an output then off again when its ready but what makes it ready?
Hood
Title: Re: vb for g31
Post by: jve on June 21, 2012, 11:33:31 PM
What exactly are you wanting to do? You said switch an output then off again when its ready but what makes it ready?
Hood
OK sorry for not explaining my self  so i could have in the code G31 M31 , so this means that the machine is going to digitize the z axis and call a macro which i called it M31 so i don't confused with the others
now when i have G31 M31 in my code i want the machine to give a output and when the digitize led come active the output will go off that's all i need i been searching all day yesterday to find some thing similar but no luck
Title: Re: vb for g31
Post by: jve on June 22, 2012, 03:23:10 AM
i am trying to this macro but with no luck


Sub main ()
ActivateSignal (output4)
while ismoving()
wend
'system wait for (probe)
while not (isactive(probe))
wend
deactivateSignal (output4)
end sub
main