Go to Post Y'know... I think I'd much rather have big balls than hang myself... - FotoPlasma [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-06-2002, 23:56
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
HELP!!! PBasic and I just don't get along!!!

Posted by Joe at 1/31/2001 7:48 PM EST


Student on team #506 from St. Anthony's HS.



I'm attempting to do some minor editing to the control program and am running into a few problems. My main problem is trying to put in the Tank Drive setup so I can drive it with one joystick instead of using two. I put in the program exactly as the instructions said and after several attempts finally got it to upload to the robot controller. But for some reason instead of being able to control pwm 1 and 2 with 1 joystick I can't control either. pwm1 refuses to move while pwm 2 only goes full forward. Is the file outdated? What might I be doing wrong? What other information do you need? Somebody please help me!!!

I have also a perhaps easier question that is about programming but is not related to the first. I managed to successfully get relay 7 to go forward only and cut off when the pump hits 60 psi. The program for that section reads...
relay5_fwd = rc_sw1 'Port 1 Aux1 = Relay 5 Forward
relay5_rev = o 'Relay 5 Forward only

I then plugged in the wires on the cutoff switch on the tank to digital inputs 1 and 6. That way when the tank hits 60psi it shuts off the pump. The problem comes with the instant it goes below 60psi the pump turns back on. Is there a way I can either program a delay into this so it waits x seconds before turning on or preferably have it so it turns off at 60psi and doesn't turn back on till it reaches 40psi. Any help would be greatly appreciated. Thanks.



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #2   Spotlight this post!  
Unread 23-06-2002, 23:56
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: HELP!!! PBasic and I just don't get along!!!

Posted by Matt Leese at 1/31/2001 8:07 PM EST


Other on team #73, Tigerbolt, from Edison Technical HS and Alstom & Rochester Institute of Technology.


In Reply to: HELP!!! PBasic and I just don't get along!!!
Posted by Joe on 1/31/2001 7:48 PM EST:



As for the tank drive problem, the program works just fine as specified. Double check what you have actually entered so that's it correct and make sure that PWM1 and PWM2 are correctly passed on the output line and are expected to be passed as output by the controller (read the comments in the program for more information). The most likely event I see happening is that you have a wiring problem. Does the robot work with two joystick control? I can't really give you any better help without more information.

As to setting a delay, probably the best way is to just iterate a value every time through the loop and wait for it to reach a certain threshold value before turning the pump back on.

Matt



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #3   Spotlight this post!  
Unread 23-06-2002, 23:56
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: HELP!!! PBasic and I just don't get along!!!

Posted by Joe Ross at 1/31/2001 8:18 PM EST


Engineer on team #330, Beach Bot, from Hope Chapel Academy and NASA/JPL , J&F Machine, and Raytheon.


In Reply to: Re: HELP!!! PBasic and I just don't get along!!!
Posted by Matt Leese on 1/31/2001 8:07 PM EST:



: As for the tank drive problem, the program works just fine as specified. Double check what you have actually entered so that's it correct and make sure that PWM1 and PWM2 are correctly passed on the output line and are expected to be passed as output by the controller (read the comments in the program for more information). The most likely event I see happening is that you have a wiring problem. Does the robot work with two joystick control? I can't really give you any better help without more information.

Innovation First has a copy of the default program with single joystick control. The best thing to do would be to compare the code that you have with their code (link below).

Like Matt said, without more details about what changes you did and what the symptoms are, it will be hard to diagnose.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #4   Spotlight this post!  
Unread 23-06-2002, 23:56
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: HELP!!! PBasic and I just don't get along!!!

Posted by Nick at 1/31/2001 8:58 PM EST


Student on team #240, Mach V, from Jefferson Monroe High School and Visteon.


In Reply to: Re: HELP!!! PBasic and I just don't get along!!!
Posted by Joe Ross on 1/31/2001 8:18 PM EST:



If you decide to make a loop for the pausing of the pump the code would look something like this:

Declare Variables:
coun VAR byte (you cannot use count as a variable)

Mainloop:
coun = coun + 1
if coun
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #5   Spotlight this post!  
Unread 23-06-2002, 23:56
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
use delta_t or packet_num for more stable counting...

Posted by Joe Johnson at 1/31/2001 10:21 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: Re: HELP!!! PBasic and I just don't get along!!!
Posted by Nick on 1/31/2001 8:58 PM EST:



My only improvement on the code given by Nick is to use
the packet_num or delta_t to increment the counter.

By using this method you can have relatively stable
timing even if your program goes insane or your radio
signal gets very noise. In those cases, it can take a
LONG time to get through a loop. But you still get
relatively stable timing because delta_t and packet_num
have the information that let you keep track of
approximately how long it took to get through the loop.

BOTTOM LINE:

set the config's to used Delta_t

change Nick's count increment line to:

coun = coun + 1 + Delta_t

Joe J.



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #6   Spotlight this post!  
Unread 23-06-2002, 23:57
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Thanks Everyone

Posted by Joe at 2/1/2001 6:24 PM EST


Student on team #506 from St. Anthony's HS.


In Reply to: use delta_t or packet_num for more stable counting...
Posted by Joe Johnson on 1/31/2001 10:21 PM EST:



Thanks for the help everyone. I found my error in editing the program and managed to get the tank drive working. I'll be trying this weekend to see if i can get the pump delay to work. This is my first time working with pbasic or any type of programming so it may take a few tries.
Thanks again


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC ARCTAN function Greg Ross Programming 14 11-05-2003 12:28
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
RoboEmu 1.09 (supports PBASIC 2.5) rbayer Programming 22 21-01-2003 17:22
PBASIC Loop Speed? archiver 2001 3 23-06-2002 23:46


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

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