|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Air Compressor
Before you read: My goal is to make an air cannon
I've only been programming for a year and this is our teams second year to compete and last year's game made it especially to just program a simple push bot. I had no experience and volunteered to take the position of head programmer because no one else wanted to. I'm considerably more knowledgeable now than I was last year but i've never touched VIs or things such as solenoids and autonomous mode. Please Correct me if i'm wrong: A solenoid sort of acts like a button (that's a big sort of) in that when it is turned on it sends a true or on statement and when it is off, it sends a false or off statement. It controls things like Gyros, accelerometers, and of course air compressors and the like. Now to set one up (programming wise) I know that I have to do all the basic good stuff like opening it in begin.vi and closing it in finish.vi. But what im wondering is how to send the signal for on or off? Does it act like a jaguar or PWM for the compressor? And if so do I need to program a reverse command so that their is a forward and reverse? |
|
#2
|
||||
|
||||
|
Re: Air Compressor
I can help you with theory but I will not be a big help with code.
For your robot, it is usually best to run a solenoild off the relay board in port 8 of the cRio. This board has two pins on each port. They are usually off (both set to ground). When it is switched on, one (I don't know which) is set to 12/24 volts and the other is ground. Therefore the circuit is completed and the solenoid is triggered. This might be as you understand it, I am just trying to clarify. Gyros and accelerometers are not controlled by a relay. They should be hooked to the analogue input board in slot 1 or 2 of your cRio. Last edited by ATannahill : 10-04-2011 at 21:20. |
|
#3
|
|||||
|
|||||
|
Re: Air Compressor
I'm not sure what you're talking about, but it isn't a solenoid.
In FRC, the word "solenoid" usually refers to a pneumatic solenoid valve. It takes an electrical signal, either from a Spike relay module or from the cRIO's solenoid breakout, and controls the flow of pressurized air to a pneumatic cylinder. They are most often used simply to extend or retract the cylinder. Gyros are sensors; the ones from the Kit of Parts connect to an analog breakout on the cRIO. Accelerometers are also sensors; some are analog similar to the gyro, and others use a structured digital communication protocol like IIC or SPI. The air compressor is turned on and off using a Spike relay module, under the control of a pressure switch which is connected to a Digital Input. In order to properly explain how to program something, I need to know what that something is. Tell me what kind of mechanism you want to control, and I can tell you an appropriate way to control it. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|