View Single Post
  #1   Spotlight this post!  
Unread 09-02-2010, 22:22
OldBug OldBug is offline
Registered User
FRC #3167
 
Join Date: Feb 2010
Location: Philadelphia
Posts: 7
OldBug is an unknown quantity at this point
Problems Working with Multiple Solenoids

Hello,

We're having an odd issue with firing solenoids. We have two solenoid objects as class members, and at some point in the code, we have this sequence:

Code:
Solenoid1.Set(true);
Wait(0.5);
Solenoid1.Set(false);
Wait(1.0);
Solenoid2.Set(true);
Wait(0.5);
Solenoid2.Set(false);
Solenoid 1 is initialized with the arguments (8,1) and solenoid 2 is initialized with (8,2). We are using the Festo 24V solenoid (but I don't think that's relevant to this problem).

The behavior we are expecting is that the first solenoid is momentarily activated, then a second later, the second solenoid is momentarily activated. What actually happens is that the first solenoid is momentarily activated, then nothing else happens. I am looking at the lights on the NI9472 in slot 8 to determine if the code is working - I see the first light flash on for a split second, then nothing else happens. We tried hooking everything up (pneumatics, etc.) and we got the same result - the first cylinder fired, but not the second.

We tried different channels for the second solenoid, but nothing helped. I removed the calls to turn the first cylinder on and off, and the result was that no lights on the 9472 came on, but when I actually removed the first solenoid from the code altogether, the second solenoid started working (so only the second light was flashing on then off).

Any ideas? We're not sure what to try next.

Thanks!

p.s. It just occurred to me that these long delays may affect the watchdog - do I need to feed the watchdog between these Wait() calls?