Go to Post The very fact that parts are rumored to be being re-used may be sufficient reason for the rule-makers to change a rule to prevent the re-use of that very part (not that they would ever be that devious!) - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2010, 17:10
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Question Reversing Relay for motor

reversing a relay is my next big issue; those solenoids was more of a "protect my own hide"

1. button pressed, motor spins "1". button released, motor stops
2. another button pressed, motor spins "-1". button released, motor stops

any ideas? I would somehow have to get a "negative true" to the relay in order to reverse it.

I looked at the included example, it didn't make any sense at all.
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2010, 18:08
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Question Re: Reversing Relay for motor

Here is what I think might work in response to my own question. The buttons give TorF values, which in turn produce 1, -1, or 0. T produces 1 or -1, respectively, and F gives 0 on both. They are then added, so that
TF gives 1,
TT gives 0,
FT gives -1, and
FF gives 0,
which then go to the reversing relay. Can someone please advise whether this would work?

Thanks
Attached Thumbnails
Click image for larger version

Name:	relay reversal.JPG
Views:	39
Size:	98.8 KB
ID:	8701  
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2010, 18:16
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Reversing Relay for motor

The Relay Set VI does not take values on the 1 to -1 scale. Look at the help for this VI to see which values correspond to which relay directions/values.

One way to do this is nested case structures. Another way to do this (and the way I will explain) is to use two Select VIs in series. The Select VI is found in the Comparison palette.

The Select VI takes 3 inputs. The middle input determines which of the other two inputs is passed through. The top input is passed through if the middle is true. The bottom input is passed through if the middle is false.

You want to make a Relay Set VI, right click on the Relay Value terminal and create a constant. Disconnect the constant from the terminal.

Make a Select VI and wire the middle terminal to one of the buttons. Wire the top terminal to the constant and set the constant to the direction you want the relay to go when that button is pressed (Forward or Reverse). Copy the constant and wire it to the bottom terminal and set it to Off.

Make a second Select VI and wire the middle terminal to the other button. the top terminal should be another copy of the constant set to the opposite direction. The bottom terminal should be the output of the first Select VI.

The output of the second Select VI goes to the Relay Value terminal of the Relay Set VI
Attached Thumbnails
Click image for larger version

Name:	SelectRelay.JPG
Views:	48
Size:	13.8 KB
ID:	8702  
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2010, 18:44
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: Reversing Relay for motor

It makes sense...

I'll work it tomarrow.

Thanks
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.

2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2010, 15:21
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: Reversing Relay for motor

This makes the most sense out of anything I've programmed to date, and a beutiful solution.

Thanks a whole bunch!
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2011, 00:07
TEAM-3871 TEAM-3871 is offline
Registered User
FRC #3871
 
Join Date: Feb 2011
Location: US
Posts: 10
TEAM-3871 is an unknown quantity at this point
Re: Reversing Relay for motor

Hey we are a Rookie team and i was wonding how do you change the RelayValue input to blue... sorry dont know much about this program yet

Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2011, 00:32
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Reversing Relay for motor

Quote:
Originally Posted by TEAM-3871 View Post
Hey we are a Rookie team and i was wonding how do you change the RelayValue input to blue... sorry dont know much about this program yet

It's pretty simple, for every input and output to a function, if you hover your mouse over the wiring port to get the wiring mouse icon, right click, then go to create -> Constant, it will make a constant of the right type (you can do the same with controls and indicators). It's much faster than going into the number pallet or whatever.

In case you were wondering, the blue thing that says "Off" or "Forward" or whatever is called an "enum." The data type is simply a number, but the datatype makes it so that when there's a control or constant it gives a word instead of a number. In this case, it's much easier for the user to select "forward" than to remember that forward is 2, so they used an enum. They're in the numeric pallet, and you add the text by right clicking on them and selecting "Edit" (you can also do that to see which name is which number).

I assume that's what your talking about, because there are several different "blue things"
Reply With Quote
  #8   Spotlight this post!  
Unread 16-02-2011, 09:38
TEAM-3871 TEAM-3871 is offline
Registered User
FRC #3871
 
Join Date: Feb 2011
Location: US
Posts: 10
TEAM-3871 is an unknown quantity at this point
Re: Reversing Relay for motor

Ok thanks i will try that tonight...
Reply With Quote
Reply


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
Programming 2 buttons for a relay team877 NI LabVIEW 15 18-02-2011 00:18
boolean selector for relay control windell747 NI LabVIEW 6 15-02-2009 22:12
Reversing motors railerobotics Programming 5 16-01-2006 18:36
Reversing controls? Calvin Programming 10 14-03-2005 22:46
Relay for Pump q? MI28Driver Technical Discussion 2 31-01-2002 00:12


All times are GMT -5. The time now is 22:02.

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