Go to Post Now why did it take 24 pages for someone to think of that?? It's so obvious it's painful. - Nuttyman54 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 03-02-2005, 18:01
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Default code and the Compressor

I diffed your 2005 code to the Default code released by FIRST and, as expected, it is identical.

This makes me believe that your compressor and/or pressure switch is wired incorrectly.

Try making the following modification and see what you see

Code:
 
relay5_rev = p1_sw_aux2;
relay6_fwd = p3_sw_aux1;
relay6_rev = p3_sw_aux2;
relay7_fwd = p4_sw_aux1;
relay7_rev = p4_sw_aux2;
relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
relay8_rev = 0;
   
/******************/
/* THIS CODE IS ADDED */
printf("Switch %d  Relay  %d\r",(int)rc_digin18,(int)relay8_fwd);
/******************/

   /*---------- PWM outputs Limited by Limit Switches  ------------------------*/
In the case that the switch always shows 0, your compressor is wired incorrectly. If the relay is showing green, doublecheck the compressor's connection to it. If the relay doesn't change color, check the PWM connection between the relay and relay port 8.

If you see that the switch is always reading 1, then your compressor will never turn on. If that is the case, your switch may be wired incorrectly or defective. To verify this, remove the ! from the line that sets relay8_fwd. If the compressor runs and shuts off at 115 psi, then there's some weirdness on why your switch is returning an inverted value. If the compressor never shuts off, doublecheck all connections between the switch and the RC.

Hopefully that helps...
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
Chassis Material/Construction sanddrag Technical Discussion 51 05-12-2003 12:59
New software?? mjt902 Programming 2 08-01-2003 10:40
PBASIC 2.5 answer from Parallax JasonS Programming 6 07-01-2003 19:21
Team 237 unleashes a "Beast" Elgin Clock Robot Showcase 5 27-03-2002 21:09


All times are GMT -5. The time now is 20:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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