Hello Guest it is March 29, 2024, 01:52:01 AM

Author Topic: Macro pump interlock, (or Flash frame scan interlock), example...........  (Read 16214 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
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
fun times
Re: Macro pump interlock, (or Flash frame scan interlock), example...........
« Reply #1 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 
Re: Macro pump interlock, (or Flash frame scan interlock), example...........
« Reply #2 on: November 23, 2013, 02:27:48 AM »
I edited the DoOEMbutton as 102. is it right?