|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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. |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
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! |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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.
|
|
#6
|
||||
|
||||
|
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 |
|
#7
|
||||
|
||||
|
Re: Adding Inputs or Outputs to existsing VIs
That's a nice tutorial chaos! Thanks guys, i think that's everything!
|
|
#8
|
|||
|
|||
|
Re: Adding Inputs or Outputs to existsing VIs
Quote:
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best Practice for Posting LabView VIs? | DonRotolo | National Instruments LabVIEW and Data Acquisition | 8 | 09-04-2010 22:37 |
| turning inputs into outputs | Huron Warriors | Programming | 4 | 19-04-2007 22:10 |
| Question about digital inputs and outputs | Torboticsmember | Electrical | 2 | 12-02-2007 22:51 |
| DAQmx VIs missing | Barry Lazzer | LabView and Data Acquisition | 2 | 30-01-2007 13:06 |
| Change to Initializing Inputs and Outputs | Jferrante | Programming | 4 | 07-01-2003 11:36 |