|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Solenoid Code Does Not Work!
Assuming your code is reflecting the connection of channels accurately, the code looks find. However, without knowing what the solenoid configurations are, I would guess there is one more mistake.
Code:
if (stick->GetRawButton(1) && !btn1state) //button is pressed but not being held
{
btn1state = 1; //button is being pressed
s1->Set(true); //activate quick release retract
Wait(1.0); //for 2 seconds
s1->Set(false); //reset state
s1->Set(true); <<< Should this be s3??? //activate reset piston extend
Wait(1.0);
s3->Set(false); //restet state
s2->Set(true); //activate quick release piston extend
Wait(1.0);
s2->Set(false); //reset state
s4->Set(true); //activate reset piston retract
Wait(1.0);
s4->Set(false); //reset state
}
|
|
#2
|
|||
|
|||
|
Re: Solenoid Code Does Not Work!
ooh, nice catch, thank you.
Gah still 12hours till i can test my code again! |
|
#3
|
||||
|
||||
|
Re: Solenoid Code Does Not Work!
also, one of the simplest ways to mess up that pneumatics board is double checking that it's in slot 8 on the CRIO and using the constructor that specifies slot as well as channel, for code clarity mostly.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Solenoid code not working | ssmith2 | NI LabVIEW | 6 | 03-02-2010 10:11 |
| Eclipse does not work | jasonpeinko | Programming | 7 | 22-02-2008 09:51 |
| Autonomous mode does not work | Sunny | Programming | 9 | 16-01-2008 15:31 |
| Arcade Mode (12) does NOT work | jakk | Programming | 2 | 10-07-2006 19:27 |
| Chaos theory does not work!!!!! | S9ar7acu3 | General Forum | 3 | 09-02-2003 11:46 |