LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrays, sub VIs

Hi,
 I'm having trouble writing the code for a problem on a labview exercise.  I've tried several ways to do this but I end up with error messages each time. Here is the problem as stated below:
 
Problem 4
Build a VI that has two inputs, Threshold and Input Array, and one output, Output Array. Output Array contains values from Input Array that are greater than Threshold.
Save the VI as Array Over Threshold.vi in the C:\Exercises\LabVIEW Basics I directory.
Create another VI that generates an array of random numbers between 0 and 1 and uses the Array Over Threshold VI to output an array with the values greater than 0.5.
Save the VI as Using Array Over Threshold.vi in the C:\Exercises\LabVIEW Basics I directory.
 
 
My understanding was that I'd have to build the two VIs and then use the first VI as a sub VI in the second. Is this correct?.  I can't get past even the seemingly easier first VI.  I'd like any suggestions on how to deal with the entire problem. I've attached the code of one of the several attempts I made on the first VI. 
 
Thanks
 
  
0 Kudos
Message 1 of 39
(4,574 Views)
You really haven't gotten very far with that program, have you?Smiley Wink
 
You should look at http://www.ni.com/academic/lv_training/how_learn_lv.htm for learning LabVIEW basics. Once you've done that, then you should look through the shipping examples. There is an array example that does the first part. It's under the Fundamentals>Arrays and Clusters section.
Message 2 of 39
(4,561 Views)
I still can't find it. Can you post the url that will take me to the "shipping examples" ?. 
0 Kudos
Message 3 of 39
(4,526 Views)

URL?

You have a help menu in LabVIEW. Under that help menu is 'Find Examples'. Select it.

Message 4 of 39
(4,511 Views)

Hi Mbdeck,

here is a picture of one way to solve it. Hope it helps.

Mike



Message Edited by MikeS81 on 06-02-2008 03:42 PM
Message 5 of 39
(4,509 Views)

Mbdeck,

Even though Mike gave an answer to your homework question, you should still look at the example that comes with LabVIEW.

Message 6 of 39
(4,494 Views)

Hi Mike,

I'm not on my computer where I have the labview programme was installed. I think I understand most of your code but I would have prefered the two step process that was described in the problem where you have to build two VIs and use the other as a sub VI. In any case, what is that function in the middle of the For loop with the boolean input called?. 

 

0 Kudos
Message 7 of 39
(4,486 Views)

Dennis

This is not a homework. I'm just trying to learn this stuff on my own and I'm seeking help because I got stuck. There is no instructor. It is a free online course.

http://cnx.org/content/m12251/latest/

0 Kudos
Message 8 of 39
(4,480 Views)
Sorry, the reference to the assignment made me think this was a school assignment.
 
In any case, what Mike gave you would be the subVI. You would still have to create the top level VI to create the random numbers.
 
You might want to wait until you get to a pc with LabVIEW before asking questions about the functions. You will also be able to look at the example program I mentioned.
Message 9 of 39
(4,463 Views)
hi

i assuem that you have LabVIEW installed on one system.

next time you open LabVIEW, do these

you start with a 'Getting Started' window. on your right, you have a series of links.
You will find these among them:  'LabVIEW Help', and  ' Find Examples'.

open them both and get used to entering a random keyword and looking for information.

OR, you open a Blank VI. Open the functions pallette in the Block Diagram. You have a search option in it. Enter the word 'array' to find all functions that have 'array' in theri name.

Go through all the functions under 'Programming' . these are the basics functions you should know to start off.

And start using 'Ctl+H'  and 'Ctl+Shift+?' to get more help

We will be glad to guide and help you through. that will also refresh our knowledge.

0 Kudos
Message 10 of 39
(4,452 Views)