Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Pneumatics (http://www.chiefdelphi.com/forums/forumdisplay.php?f=54)
-   -   Auto off air compressior code (http://www.chiefdelphi.com/forums/showthread.php?t=81052)

Dark element 24-01-2010 18:15

Auto off air compressior code
 
Hello I was just wondering where to find the code that automatically. turns off the air compressor. Thank you

apalrd 24-01-2010 18:19

Re: Auto off air compressior code
 
WPIlib in LabVIEW has a set of blocks to open, start, stop, and close the Compressor. When you open a compressor, you set the slot and port of the compressor AND the pressure switch. The set of blocks for the compressor will automatically handle the pressure switch for you. If you aren't using LabVIEW, the code associated for the compressor will automatically handle the pressure switch.

wireties 24-01-2010 18:21

Re: Auto off air compressior code
 
Is there a C++ lib for this also?

ehochstein 24-01-2010 18:23

Re: Auto off air compressior code
 
Quote:

Originally Posted by apalrd (Post 906097)
If you aren't using LabVIEW, the code associated for the compressor will automatically handle the pressure switch.

It should automatically handle the switch I guess.

Michael DiRamio 24-01-2010 18:31

Re: Auto off air compressior code
 
In C++ and Java, after you create a compressor object and call its start method it will automatically turn the compressor on and off as needed.

You need to make sure you have the pressure switch wired up to a digital input correctly and that you specify the correct spike relay and digital input for the pressure switch when you create the object.

Dark element 24-01-2010 18:38

Re: Auto off air compressior code
 
Thank you for your post and I found it is the 2005 code

relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
relay8_rev = 0;

Thank you for your support

Mark McLeod 24-01-2010 19:04

Re: Auto off air compressior code
 
In 2005 the code needed a single line of code:
Code:

  relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
The pressure switch connects to Digital Input 18
The Spike for the compressor is controlled by Relay 8

Dark element 24-01-2010 19:24

Re: Auto off air compressior code
 
Quote:

Originally Posted by Mark McLeod (Post 906126)
In 2005 the code needed a single line of code:
Code:

  relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
The pressure switch connects to Digital Input 18
The Spike for the compressor is controlled by Relay 8

Ok now how can I change when the pump turns on and off

Mark McLeod 24-01-2010 20:10

Re: Auto off air compressior code
 
Whatever you want to do:

relay8_rev = 0; /* stays this way and doesn't change */

relay8_fwd = 1 /* Turns the compressor on */

relay8_fwd = 0 /* Turns the compressor off */

luc.bettaieb 26-01-2010 12:49

Re: Auto off air compressior code
 
This is all very useful stuff. Thanks!

Racer26 26-01-2010 13:50

Re: Auto off air compressior code
 
word of warning: 2005 code WONT work on your cRIOs. it was written under a MUCH different system, with completely different interfacing to the relays (Spikes) and motor controllers (jaguar/victor)


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

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