Hello Guest it is April 25, 2024, 07:38:35 PM

Author Topic: Macropump Interlock - Reg  (Read 3107 times)

0 Members and 1 Guest are viewing this topic.

Macropump Interlock - Reg
« on: November 23, 2013, 02:35:54 AM »
HI

Below I mentioned the vb script i used in macropump. It starts homing my axis when i press reset button. But I want my machine to do the homing function only once when i press the Reset button. Since, I used a Macropump it continuously executes the code again and again until i press the reset button again. Can anyone help me in this. Thank you.

'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)
DeactivateSignal(output3)

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: Macropump Interlock - Reg
« Reply #1 on: February 03, 2014, 08:43:22 AM »
please understand i'm new at this.
but.. i think you need to change

If Not(GetInput(1)) And x>0 Then

to

If Not(GetInput(1)) And x=1 Then
Kenneth