|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
Solenoid Breakouts?
Our electronics team has decided to use the solenoid (sp?) breakout on the cRio this year. My question is ... how do you define a solenoid (sp?) and control it in C++?
|
|
#2
|
|||
|
|||
|
Re: Solenoid Breakouts?
Quote:
I'm guessing you posted this before looking at the library. Or did you have a specific question that you forgot to include? |
|
#3
|
|||
|
|||
|
Re: Solenoid Breakouts?
I tried getting this to work today; I managed to get a green light on the solenoid breakout, but after defining the solenoid objects, using the Set() function did nothing.
Our code looks something like this. Solenoid *solenoidOne; Solenoid *solenoidTwo; solenoidOne = new Solenoid(1); solenoidTwo = new Solenoid(2); Into operator code... if(joystick->GetTrigger()) { solenoidOne->Set(true); solenoidTwo->Set(false); } else { solenoidOne->Set(false); solenoidTwo->Set(true); } I might be doing something completely wrong here. This our first year using pneumatics with the new control system, so I'm a bit confused. The code manages to get into the if statement, but the solenoid commands do nothing. Is there anything glaringly wrong that you can see? |
|
#4
|
||||
|
||||
|
Re: Solenoid Breakouts?
We were having the same problem today on our robot, does your solenoid have little buttons you can press to release pressure also? If so try pressing them and if it works it means you have your solenoid wired correctly.
|
|
#5
|
|||||
|
|||||
|
Re: Solenoid Breakouts?
Before we do any detailed debugging, did you remember to Enable the robot?
|
|
#6
|
|||
|
|||
|
Re: Solenoid Breakouts?
Yes. Everything else ran fine, (except for the stuttering caused by the watchdog glitch) including the jaguars and camera feed. We just plugged the solenoid breakout into the cRIO and then ran two wires from the solenoid breakout, one to each end of the solenoid assembly. Again, we haven't used the new system to control pneumatics, so I may be missing a critical step here.
|
|
#7
|
|||||
|
|||||
|
Re: Solenoid Breakouts?
Quote:
|
|
#8
|
|||
|
|||
|
Re: Solenoid Breakouts?
I'm pretty sure we didn't have it in slot eight; we were running the compressor off an external battery, so that code wouldn't be the problem. Why would the cRIO digital output be affected? We're running the solenoids from the solenoid breakout, right?
EDIT: We hooked the solenoid breakout to the 9472 module in slot eight. We connected the two cables to either side of the solenoid and used the code above...but nothing worked. The buttons on the solenoid do work for switching, but the trigger does not. Last edited by KRibordy : 05-02-2010 at 17:42. |
|
#9
|
|||||
|
|||||
|
Re: Solenoid Breakouts?
Quote:
Quote:
When you say "nothing worked", does that include no green lights on the output module? |
|
#10
|
|||
|
|||
|
Re: Solenoid Breakouts?
We solved our problem; it turned out to be a multitude of different problems with our code. I changed the code from using "true" and "false" to using "0" and "1" and also moved the module to slot eight. By removing all of our code except the solenoid commands, we were able to get the solenoid to switch back and forth between the two outputs every few seconds. Thanks!
|
|
#11
|
|||
|
|||
|
Re: Solenoid Breakouts?
shouldn't using true/false or 1/0 not make a difference?
|
|
#12
|
|||
|
|||
|
Re: Solenoid Breakouts?
That probably didn't; we changed a few things to make it work. But it works now, so I'm not worried.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| multiple solenoid breakouts | Wendy Holladay | Electrical | 2 | 26-01-2010 09:10 |
| 2 SOLENOID BREAKOUTS? Legal? | BaByGrL | Pneumatics | 1 | 19-01-2010 14:04 |
| Solenoid Question | RookieWookiez | Pneumatics | 2 | 18-01-2010 18:35 |
| how many analog breakouts do we actually need? | team2192 | Electrical | 6 | 16-01-2010 11:25 |
| Programming a Solenoid | Brigander | Pneumatics | 4 | 17-02-2007 14:06 |