|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Why do the pneumatics not work?
https://github.com/Patribots4738/BattleOfTheBorder
Here's our code on git. Currently the solenoid fires once and then the code crashes, and the compressor does not start. The pressure switch is wired correctly, NC connected to DIO signal and C connected to DIO (-). The compressor is wired to a spike, and the spike is connected to a RELAY port. In the code you can see that they're both correctly inputted (if the right code is uploaded of course). We're kind of stumped. |
|
#2
|
|||
|
|||
|
If you don't define pcmID it defaults to 0.
|
|
#3
|
||||
|
||||
|
Re: Why do the pneumatics not work?
Why do you have a "while (true)" loop inside your TeleopPeriodic? TeleopPeriodIc will automatically get called every 20ms, so there is no need for you to have your own loop inside of it. That is probably the source of your problem, as you aren't letting anything else run while your while loop is iterating infinitely.
|
|
#4
|
|||
|
|||
|
Re: Why do the pneumatics not work?
Is this on a roboRIO or a cRIO?
if its a roboRIO, there are multiple issues with the legality and likely the functionality of this. You will need a pneumatics control module in your system, on a CAN network with the roboRIO, Power distribution panel, etc. If its a cRIO, the people above me probably are on the right track. |
|
#5
|
|||
|
|||
|
Re: Why do the pneumatics not work?
Quote:
![]() With the 2015 wiring you don't need to connect the compressor to a spike, just wire it into the PCM (Pneumatic control module) along with the pressure sensor. |
|
#6
|
||||
|
||||
|
Re: Why do the pneumatics not work?
Should have specified, it's a cRIO. The issue was a crimped PWM. I'll bring up the while loop issue with the rest of programming though. Thanks everyone!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|