Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: poppabear on September 19, 2007, 10:47:10 PM

Title: Macro pump interlock, (or Flash frame scan interlock), example...........
Post by: poppabear on September 19, 2007, 10:47:10 PM
this is some code to put in your Macro pump, or, in your flash frame scan.
since macropump and flash frames scan at 10 times (12 on ave. for flash) per second, this allows an input to only to only Push the buton once per push (since the the button would be scanned faster than most humans can remove there finger.

x=getuserdro(1000) 'each input has its on dro Input1 is a physical button

If GetInput(1) and x=0 then         'comming off the modbus but any input can be used here
SetUserDRO(1000,1)                     'counter dro
DoOEMButton(*********)                       'button pushed on
End If

If Not(GetInput(1)) and x>0 then
SetUserDRO(1000,0)
DoOEMButton(*********)          'button pushed again for off
End If

scott
Title: Re: Macro pump interlock, (or Flash frame scan interlock), example...........
Post by: naveenkumarm.ece on November 23, 2013, 02:13:03 AM
HI

Below I mentioned the vb script i used in macropump. It starts homing my axis when i press reset button.

'power on the optical home detector and wait 500 ms before homing
ActivateSignal(Output3)
Sleep (500)
' home 3 axis
DoButton(24)
DoButton(23)
DoButton(22)

But if i add the code below with above code, it doesn;t even start homing my axis when i press reset button. can u please help me in this.

x=getuserdro(1000) 'each input has its on dro Input1 is a physical button

If GetInput(1) And x=0 Then         'comming off the modbus but any input can be used here
SetUserDRO(1000,1)                     'counter dro
DoOEMButton(*********)                       'button pushed on
End If

If Not(GetInput(1)) And x>0 Then
SetUserDRO(1000,0)
DoOEMButton(*********)          'button pushed again for off
End If 
Title: Re: Macro pump interlock, (or Flash frame scan interlock), example...........
Post by: naveenkumarm.ece on November 23, 2013, 02:27:48 AM
I edited the DoOEMbutton as 102. is it right?