Go to Post We always cut our parts to a tolerance of /- the width of that particular sharpie mark. - Whippet [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 24-06-2002, 01:02
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
Joy2 Wheel use as switch

Posted by Vicente Gonzales at 2/18/2001 2:28 PM EST


Engineer on team #647, CyberWolves, from Shoemaker High School and Operational Test Command.



I am trying to use the wheel off of joystick 2 as a relay output to a spike to control a cylinder. I've tried to change the program, but have been unsuccessful. Does anyone know where I can get some info on how to change a PWM input (from the wheel, in my case) to a relay output?

Thanks in advance for any help.


__________________
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 24-06-2002, 01:02
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: Joy2 Wheel use as switch

Posted by Nate Smith at 2/18/2001 3:20 PM EST


Other on team #66, Frostbite, from Willow Run High School and GM Powertrain.


In Reply to: Joy2 Wheel use as switch
Posted by Vicente Gonzales on 2/18/2001 2:28 PM EST:



: I am trying to use the wheel off of joystick 2 as a relay output to a spike to control a cylinder. I've tried to change the program, but have been unsuccessful. Does anyone know where I can get some info on how to change a PWM input (from the wheel, in my case) to a relay output?

: Thanks in advance for any help.

Try this...

1. First, use the debug statement in your program to get the values for the positions that you want to use, just in case that the max and min values are not quite 0 and 254.

2. Then, put code similar to this in your program
(note: this code assumes relay 3)

relay3_fwd = 0
relay3_rev = 0

if p2_wheel = 0 then relay_3_reverse
if p2_wheel = 254 then relay_3_forward

; turn off relay 3
goto relay_3_done

relay_3_reverse:
relay3_rev = 1
goto relay_3_done

relay_3_forward:
relay3_fwd = 1

relay_3_done:

Try that out and feel free to ask if you have any questions...

Nate
__________________
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 24-06-2002, 01:02
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: Joy2 Wheel use as switch

Posted by Joe at 2/18/2001 8:32 PM EST


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


In Reply to: Re: Joy2 Wheel use as switch
Posted by Nate Smith on 2/18/2001 3:20 PM EST:



That would work but I believe there is an easier way. Rather than relying on the max and min numbers just use greater than/less than. That way if the max and min are off then it will still function
(keeping with using relay 3)
relay3_fwd = 0
relay3_rev = 0

if p2_wheel > 170 then relay_3_forward
if p2_wheel
__________________
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 24-06-2002, 01:02
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: Joy2 Wheel use as switch

Posted by Gui Cavalcanti at 02/21/2001 5:00 PM EST


Student on team #422, Mech Tech, from Governor's School (GSGIS) and Verizon.


In Reply to: Re: Joy2 Wheel use as switch
Posted by Joe on 2/18/2001 8:32 PM EST:



While the previous two suggestions are OK, I'm thinking that for a switch you don't need a massive deadzone. Try this, it's also very streamlined. Remember that the potentiometer wheel's middle is 127!
This is just a lot easier than any of the previous suggestions and divides the wheel equally right down the middle. Psst... it's easier to use a 3-state toggle switch, by the way

if (p2_wheel > 127) then relay_3_forward
relay3_fwd = 0
relay3_rev = 1
goto SkipForward:

relay_3_forward:
relay3_fwd = 1
relay3_rev = 0

SkipForward:
__________________
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
spike for pressure switch? Rob Colatutto Rules/Strategy 4 23-02-2003 15:42
Using a switch before autonomous operation KZos550 Programming 11 04-02-2003 19:12
Need help with 255 Variable Joseph F Programming 18 26-02-2002 14:49
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 06:53.

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