Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Pneumatics (http://www.chiefdelphi.com/forums/forumdisplay.php?f=54)
-   -   Pnuematics Programming Issues (http://www.chiefdelphi.com/forums/showthread.php?t=124738)

wildbot3844 16-01-2014 08:19

Pnuematics Programming Issues
 
Our team has never used pnuematics and we started this year, and we hooked up and wired up everything right according to the manuals, BUT when i try to add the compressor to the program and deploy the code my robot WILL NOT DO ANYTHING,.. does anyone know a solution to this?

sergioCorral842 16-01-2014 09:03

Re: Pnuematics Programming Issues
 
It would help if you can include what language you are using, and post the code you are using.

wildbot3844 16-01-2014 10:43

Re: Pnuematics Programming Issues
 
i'm using Java and when i deploy this code and my compressor will pulse on when i first enable it then it will just cut off.





public class RobotTemplate extends IterativeRobot {

Compressor compressor = new Compressor(1, 1);

public void robotInit() {
compressor.start();

}

otherguy 16-01-2014 12:04

Re: Pnuematics Programming Issues
 
Looks like that portion of your code is without errors.

When the compressor stops running, do you see any error messages printed out to the DriverStation or, if you are connected to your coding computer, in the console?

Are other functions of your robot still operating when the compressor stops running? for example, can you still drive the robot around?

Can you post the rest of the code from your project?
Note, use the [ code ] and [ / code ] tags (without spaces) around a block of code, and it will be easier for people to read.

example:
Code:

public class RobotTemplate extends IterativeRobot {

  Compressor compressor = new Compressor(1, 1);

  public void robotInit() {
    compressor.start();
  }
}


captianjroot 16-01-2014 15:35

Re: Pnuematics Programming Issues
 
Hi, my team is encountering similar problems. We're also using Java, but our code is a little different.

Code:

//this is all within our main robot class
   
    Compressor compress;
   

    public void robotInit(){

        compress=new Compressor(1,1);

    }

    public void operatorControl() {
        while(isOperatorControl()&&isEnabled()){
           

            if(!compress.enabled())
            {
                compress.start();
            }

           
        }
    }


feverittm 16-01-2014 16:44

Re: Pnuematics Programming Issues
 
Quote:

Originally Posted by captianjroot (Post 1328155)
Code:

//this is all within our main robot class
   
    Compressor compress;
   

    public void robotInit(){

        compress=new Compressor(1,1);

    }

    public void operatorControl() {
        while(isOperatorControl()&&isEnabled()){
           

            if(!compress.enabled())
            {
                compress.start();
            }

           
        }
    }


This is of course assuming that the compressor is connected to a spike that is connected to relay channel 1 (on the first digital sidecar if you have more than one) and that the pressure switch is connected to digital input #1 on the same digital sidecar. Also note that you don't really need the 'enabled' clause, you can continually 'start' the compressor. It doesn't hurt anything.
This will only start the compressor in teleop.

puneeth.meruva 30-01-2014 12:19

Re: Pnuematics Programming Issues
 
We are having similar problems but the compressor will not turn on at all. We have the same code as the very first presented sample code. Could it be that something is wrong with our sidecar or relay?

Joe Ross 30-01-2014 13:35

Re: Pnuematics Programming Issues
 
Quote:

Originally Posted by puneeth.meruva (Post 1334796)
We are having similar problems but the compressor will not turn on at all. We have the same code as the very first presented sample code. Could it be that something is wrong with our sidecar or relay?

There are several things related to the pressure switch that could keep the compressor from turning on that are not related to the Digital Sidecar or Relay. Is the pressure switch plugged into the port defined in your code? Is the pressure switch wired between signal and ground? Is the Digital Sidecar properly powered (are all 3 power LEDs brightly lit) if you remove the DB-37 cable?

puneeth.meruva 30-01-2014 13:46

Re: Pnuematics Programming Issues
 
The led's for power to the sidecar do turn on and I believe that the pressure switch ports are correctly assigned in the code. How exactly is the pressure switch supposed to be wired?

otherguy 30-01-2014 13:50

Re: Pnuematics Programming Issues
 
Quote:

How exactly is the pressure switch supposed to be wired?
See response to your question in the other thread:
http://www.chiefdelphi.com/forums/sh...44&postcount=7


All times are GMT -5. The time now is 16:29.

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