Go to Post Well, I think it's awesome and the best thing ever. But I'm biased. ;) - OldDan1168 [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 03-02-2011, 22:04
WireFreaks2156's Avatar
WireFreaks2156 WireFreaks2156 is offline
.Keep it simple.
AKA: Jessica Hageman
FRC #2156 (WireFreaks)
Team Role: Team Spirit / Cheering
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Sacramento, California
Posts: 30
WireFreaks2156 is a jewel in the roughWireFreaks2156 is a jewel in the roughWireFreaks2156 is a jewel in the rough
Variables

In LabVIEW, how are variables set to have a value? Our programmers are trying to have a variable set to a dynamic value then have the program read it as such.

We want to have Joystick 1: Button 1 set the value to 0, Joystick 2: Button 1 set the value to 1. Then we want to put that value into the solenoids, to get them to open or close depending on the value of the variable.

Thank you in advance for your help.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2011, 23:07
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Variables

Here are two answers.

The first picture goes to the root of what you need to do to set a solenoid. It doesn't bother to remember the last value sent to the solenoid, because the solenoid will remember whatever it was last set to. It doesn't need to be set to the same value over and over.

The second picture remembers the value from the last button pushed and keeps setting the solenoid to it over and over again even though it's an unnecessary action.

There are still more ways to accomplish this kind of action. These are only examples.
Variables are not used in LabVIEW, a data flow language, the way you'd use them in a procedural language.
Attached Thumbnails
Click image for larger version

Name:	Solenoids.jpg
Views:	38
Size:	50.1 KB
ID:	9956  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 03-02-2011 at 23:36.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2011, 12:34
Nerd_Skywalker's Avatar
Nerd_Skywalker Nerd_Skywalker is offline
Walker of Skies
FRC #1111
Team Role: Animator
 
Join Date: Dec 2010
Rookie Year: 2008
Location: -Classified-
Posts: 42
Nerd_Skywalker is an unknown quantity at this point
Re: Variables

What our team has done is make a sub-vi that just has an indicator and a control (Both wired to each other in the block diagram). Then you add the control/indicator to their respective connectors. This seems to work.
__________________
Re-dun-dant adj. 1. See redundant
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


All times are GMT -5. The time now is 21:16.

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