Go to Post It's not about the equipment, it's about the program. - Taylor [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-02-2002, 22:22
sjharobotics sjharobotics is offline
Registered User
#0581 (San Jose High Robotics Team)
 
Join Date: Feb 2002
Location: San Jose High Academy
Posts: 2
sjharobotics is an unknown quantity at this point
Error found in programming for the pump and pressure switch

In programming the pump to be controlled by the pressure switch from the sample that we got from Chief Delphi about wiring and programming information for the pump and pressure switch, the program was not working because the two variables that control the relay were being written over in subsequent sections of the default code. These are relay5_fwd and relay5_rev. After entering the given code into the section for that in the default code, these variables were reinitialized in the section right below it. To solve the problem, just comment those two variables in the "Buttons to Relays" section.
__________________
581 - San Jose High Robotics Team
  #2   Spotlight this post!  
Unread 02-02-2002, 07:39
MrB's Avatar
MrB MrB is offline
871 Team Leader
AKA: Brian Buonomo
FRC #0871 (WI RoboTechs)
Team Role: Teacher
 
Join Date: Feb 2002
Rookie Year: 2002
Location: West Islip, NY
Posts: 145
MrB is a jewel in the roughMrB is a jewel in the roughMrB is a jewel in the roughMrB is a jewel in the rough
I've seen quite a few examples of code posted. All of which we have had problems getting to run. We are a rookie team and this so far has been are greatest challenge.

Would it be possible for you to paste a copy of the code you are referring too? It would be a great help. Thanks in advance.
  #3   Spotlight this post!  
Unread 02-02-2002, 13:59
sjharobotics sjharobotics is offline
Registered User
#0581 (San Jose High Robotics Team)
 
Join Date: Feb 2002
Location: San Jose High Academy
Posts: 2
sjharobotics is an unknown quantity at this point
This is the program:

' Test the state of the pressure switch
if rc_sw1 = 1then pump_on 'jump if under the pressure limit

' 110 psi pressure limit has been reached
' turn pump off

pump_off:
relay5_fwd = 0
relay5_rev = 0
goto nextaction:

'turn pump on
pump_on:
relay5_fwd = 1
relay5_rev = 0

nextaction:


you need to comment the lines containing these right below it

Hope this helps
__________________
581 - San Jose High Robotics Team
  #4   Spotlight this post!  
Unread 03-02-2002, 16:10
MrB's Avatar
MrB MrB is offline
871 Team Leader
AKA: Brian Buonomo
FRC #0871 (WI RoboTechs)
Team Role: Teacher
 
Join Date: Feb 2002
Rookie Year: 2002
Location: West Islip, NY
Posts: 145
MrB is a jewel in the roughMrB is a jewel in the roughMrB is a jewel in the roughMrB is a jewel in the rough
Thanks for the help. Our programmer actually figured out his own code, works in a similar fashion:


'In Varibles section
'====== Compressor hold command variable====
HOLD VAR byte

'in "---------- Initialize Inputs & Outputs ---"
'====== COMPRESSOR RUN CODE============
HOLD = 1

'====================================
'====== COMPRESSOR LIMIT RUN CODE========
'====================================
'
'

if rc_sw1 =0 then relayoff:

if rc_sw2 =1 then relayON:
if HOLD =1 then relayON:
goto endloop:


RelayON:
relay7_fwd = 1
hold =1
goto endloop:


RelayOFF:
relay7_fwd = 0
hold =0
Goto endloop:

EndLoop:

It may be a bit lengthy, but he figured it out :-) Logic tables and all. :-)

Thanks again...
  #5   Spotlight this post!  
Unread 06-02-2002, 17:46
zorro zorro is offline
Registered User
#0292 (PantherTech)
 
Join Date: Jan 2002
Location: Kokomo, IN
Posts: 21
zorro is an unknown quantity at this point
Send a message via AIM to zorro
If you are using two sensors for your pump, the following is the easiest code.

pump = alias to relayX_fwd
highsen = alias to rc_swY (the higher of two pressure sensors)
lowsen = alias to rc_swZ (lower of two pressure sensors)
the pressure sensors read 0 when full
.......

pump_code:
If highsen <> lowsen Then end_pump
pump = 1 - (1 - highsen)

end_pump:
........

Basically when the two sensor values are equal (both are full or empty), the pump will engage depending on whether the high pressure sensor is tripped. Unless you clear your pump output variable every loop, this code should work.
__________________
Greg Szorc
gregszorc@cwru.edu

Last edited by zorro : 06-02-2002 at 18:01.
Closed Thread


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
spike for pressure switch? Rob Colatutto Rules/Strategy 4 23-02-2003 15:42
Auto Air Pump Code zorro Programming 25 05-01-2003 16:50
Need help with 255 Variable Joseph F Programming 18 26-02-2002 14:49


All times are GMT -5. The time now is 10:52.

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