Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Why do the pneumatics not work? (http://www.chiefdelphi.com/forums/showthread.php?t=132200)

xXhunter47Xx 05-01-2015 22:58

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.

ejb1123 05-01-2015 23:11

If you don't define pcmID it defaults to 0.

x86_4819 05-01-2015 23:16

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.

tStano 05-01-2015 23:23

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.

nickmcski 05-01-2015 23:28

Re: Why do the pneumatics not work?
 
Quote:

Originally Posted by xXhunter47Xx (Post 1422424)
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.


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.

xXhunter47Xx 06-01-2015 12:34

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!


All times are GMT -5. The time now is 02:43.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi