Hello Guest it is April 26, 2024, 07:03:48 PM

Author Topic: Checking for movement  (Read 2899 times)

0 Members and 1 Guest are viewing this topic.

Checking for movement
« 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

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Checking for movement
« Reply #1 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.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!