Go to Post The few people who don't ever make mistakes are the same people who simply don't do anything. What people do after they make a mistake tells others what they are made of. - Andy Baker [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 01-12-2009, 05:52 PM
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Unhappy Adding Inputs or Outputs to existsing VIs

Hi, so i've been beating my head against the wall for a couple hours now. I need to add an input/output to an existing, preconstructed VI.

Specifics: i'm using the advanced framework, and i'm doing some processing in the Vision VI. i want to send two numbers to the Teleop VI. I've tried making variables, i've tried copy pasting other output/input things (the little blocks, like in the image), nothing works. Does anyone know how to do this?

Thanks in Advance.
Attached Images
File Type: bmp periodic task data.bmp (22.0 KB, 40 views)
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
Reply With Quote
  #2   Spotlight this post!  
Unread 01-12-2009, 06:57 PM
rfolea's Avatar
rfolea rfolea is offline
Registered User
AKA: Rick Folea
no team (Forsyth Alliance)
Team Role: Mentor
 
Join Date: May 2005
Rookie Year: 2005
Location: US
Posts: 209
rfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant future
Re: Adding Inputs or Outputs to existsing VIs

You want to generate number sin Vision and then use them in Teleop?

If so, then just create a global variable, write to it in Vision and read from it in Teleop.

Step By Step:

1. From Block Diagram, right click, bring up Pallete, select the loops button
In the pallet you can select a GLOABL variable. Do it and drop it on the
Block diagram.

2. Double Click on that to bring up it's front panel. Drop what ever kind of control you want - you probably want a numeric of some kind. Save it

3. Now go click on the Global variable on the block diagram (to refresh the display)

4. Now you can write to that variable. Put it in your vision app and write to it.

5. Make a copy of it and drag or paste that into the teleop routine.
Right click and select "Change to Read"
Now you can read from that variable.

Bottom Line: Create a variable you can write to, then use that to create a version you can read from.

Let me know if you need more.

- Rick Folea
Atlanta Beta Team
Reply With Quote
  #3   Spotlight this post!  
Unread 01-12-2009, 07:54 PM
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Adding Inputs or Outputs to existsing VIs

That was EXACTLY what i needed to know! thank you!
Of course, now i have another question
Is there any way to create case structures that are more than 1 or 0 ?
That is, can i make a case structure that takes an integer, does A if it's less than -10, B if it's greater than -10 and less than 10, and C if it's greater than 10? Thanks a lot!
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
Reply With Quote
  #4   Spotlight this post!  
Unread 01-12-2009, 09:35 PM
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: Adding Inputs or Outputs to existsing VIs

Regarding adding inputs and outputs - if you right click on the icon for the VI in the upper right corner (typical from the front panel), you can select "edit connections" (if memory serves) and select a different node map. Then you simply click a node and then click on the input/output on the front panel. Click node then input/output and repeat until you're wired up. It's very simple once you understand that EVERYTHING (almost) is available via right-clicking. When in doubt - right-click. You'll be amazed at what you'll find.

Case structures can be controlled by almost any data type. My favorite is to use an enumerated type and let the case structure automatically assign cases to each value. I know that, when using a fixed point number to determine case, you can use ".." to denote a range (for example, "1..5" to refer to any value between 1 and 5, inclusive). I don't believe that this works for floating point numbers and I'm not sure that you can do this with > or <. You can certainly, however, use the boolean operators and "in range?" function to determine TRUE/FALSE or enumerated values to drive your case structure's input.

Russ
Reply With Quote
  #5   Spotlight this post!  
Unread 01-12-2009, 09:47 PM
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Adding Inputs or Outputs to existsing VIs

Russ: that's great! thanks so much. i tried to right click stuff, but i never thought to right click that icon.
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
Reply With Quote
  #6   Spotlight this post!  
Unread 01-12-2009, 09:51 PM
TotalChaos's Avatar
TotalChaos TotalChaos is offline
Registered User
AKA: Austin
FRC #2837 (Freebird Robotics)
Team Role: College Student
 
Join Date: Apr 2008
Rookie Year: 2006
Location: Gilbert AZ
Posts: 112
TotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud ofTotalChaos has much to be proud of
Send a message via MSN to TotalChaos
Re: Adding Inputs or Outputs to existsing VIs

Also, to add to outputs and inputs - and what Russ said - I have a tutorial written up on exactly that same topic. It's very straightforward, just how Russ described, but if you want something with a few visuals you can check out the tutorial HERE.

Good luck!

- Austin
__________________
The 39th Aero Squadron - Team 39! (Visit our website!)
Team Role: 3 Years as Driver - College Student/Mentor!


Freebird Robotics - On a 1 year hiatus! (Visit our website!)
Arizona 2009: Semifinalists! (69 and 498), Delphi "Driving Tomorrow's Technology" Award
Reply With Quote
  #7   Spotlight this post!  
Unread 01-12-2009, 10:13 PM
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Adding Inputs or Outputs to existsing VIs

That's a nice tutorial chaos! Thanks guys, i think that's everything!
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
Reply With Quote
  #8   Spotlight this post!  
Unread 01-12-2009, 10:39 PM
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Adding Inputs or Outputs to existsing VIs

Quote:
Originally Posted by paulcd2000 View Post
That is, can i make a case structure that takes an integer, does A if it's less than -10, B if it's greater than -10 and less than 10, and C if it's greater than 10?
Yes, but your instructions don't explain what to do with 10 and -10. I'll make some assumptions. First right click on the case and add another case. Then click on the text in the structure and edit it to something similar to ..-10, -9..9, and Default.

You can find details in the help, but the general rules are A..B for a range including A and B. Then there are lists with commas such as 1, 3, 5, 7.

Greg McKaskle
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
Best Practice for Posting LabView VIs? DonRotolo National Instruments LabVIEW and Data Acquisition 8 04-09-2010 10:37 PM
turning inputs into outputs Huron Warriors Programming 4 04-19-2007 10:10 PM
Question about digital inputs and outputs Torboticsmember Electrical 2 02-12-2007 10:51 PM
DAQmx VIs missing Barry Lazzer LabView and Data Acquisition 2 01-30-2007 01:06 PM
Change to Initializing Inputs and Outputs Jferrante Programming 4 01-07-2003 11:36 AM


All times are GMT -5. The time now is 11:34 AM.

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