Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: muecker on December 27, 2006, 12:58:01 PM

Title: Checking for movement
Post by: muecker on December 27, 2006, 12:58:01 PM
I have an issue with the IsMoving() function. I'm trying to run it in a macro pump and everytime i use it i get an error with "cannot find recovery points, Solution too complex". I'm trying to use it in conjuntion with a door switch to pause the program. Code looks like this:

Moving = IsMoving()
DoorOpen = IsActive(Input4)
If DoorOpen and Moving then
      call DoOEMButton (1001)         'Set Safety Fault if door open and moving   
      call DeActivateSignal (Output7)
      call SetUserLED (1024,1)
Else
End If

If i rem out the Moving = IsMoving(), then it will run, but does not stop when the door is opened, since moving = false. And i want this action to happen only if it is moving and the door is open, not if the door is open only. Any ideas?

Thanks,
Max
Title: Re: Checking for movement
Post by: Chaoticone on December 27, 2006, 01:10:35 PM
Hi Max,
    I know nothing of code, but thought this may intrest you. You could wire your switch to input one and check this box in general config. See pic.