LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

self updating array help

hello all,

 

i am new to labview and i was wondering if you could help me on a project i am working on.
The overall long term project is to make an automated dynamometer that asks for rpm values, measures the
rpm values as well as torque values and records them on a graph. I have a basic idea of how the project should behave but i am having trouble
with the syntax of labview. right now i am having problems with the updatable aray, it was workig earlier but now there seems to be a mistake.

 

updatable array:

so for this chunk i would like my UI to let the user select the number of input values and also let the user input those values.
similar to how a job application site or a online store website would allow you to select the size of items then input the items.
So for example, the UI will let the user select a value of RPM's he/she would like to measure. The user selects 10 and now ten
input sections open for the user to add in all the desired RPM's. ex. 10, 20, 30, ...100. i did some research and i tried setting
an event structure to detect the value change of a numeric control. My issue here is that my vi no longer updates the array size

earlier i would run the program and select dimension value the after hitting the "Update" button array would change size to the

value i selected. i am also stuck on the element part of this project. earlier when it was working the array values would update

but only to one value. so lets say i updated the dimension to 10 and the element to 9 i would see ten 9's in a row. could anyone

show me how to update the array size with different values of my choosing. 

 

I will attach the vi to give you an idea of how far ive gotten.

 

i want to be able to input 10 different values when the "10" dimension option is set. like this:
10
20
30
40
50
60
70
80
90
100

 

any input is appreciated. i am using labview 2013

 

0 Kudos
Message 1 of 7
(3,340 Views)

You really need to spend several hours carefully working through the LabVIEW Tutorials, following along with your PC and doing all of the exercises.  There is an orderly process to learning LabVIEW -- it is extremely difficult to "jump in to the middle" without having a better idea where you are going.

 

If you do a Web search for LabVIEW Tutorials for Beginners or LabVIEW Programming for Beginners, you will find several not-too-bad tutorials.  There is also a list of them floating around in these Forums -- I always have to look for them ...

 

Bob Schor

0 Kudos
Message 2 of 7
(3,326 Views)

@Bob_Schor wrote:

You really need to spend several hours carefully working through the LabVIEW Tutorials, following along with your PC and doing all of the exercises.  There is an orderly process to learning LabVIEW -- it is extremely difficult to "jump in to the middle" without having a better idea where you are going.

 

If you do a Web search for LabVIEW Tutorials for Beginners or LabVIEW Programming for Beginners, you will find several not-too-bad tutorials.  There is also a list of them floating around in these Forums -- I always have to look for them ...

 

Bob Schor


I did try a bunch of tutorials, but most of them deal with topics that are not related to what i want to do. could you point me in the right direction?

0 Kudos
Message 3 of 7
(3,318 Views)

@Bob_Schor wrote:

You really need to spend several hours carefully working through the LabVIEW Tutorials, following along with your PC and doing all of the exercises.  There is an orderly process to learning LabVIEW -- it is extremely difficult to "jump in to the middle" without having a better idea where you are going.

 

If you do a Web search for LabVIEW Tutorials for Beginners or LabVIEW Programming for Beginners, you will find several not-too-bad tutorials.  There is also a list of them floating around in these Forums -- I always have to look for them ...

 

Bob Schor


I did try a bunch of tutorials, but most of them deal with topics that are not related to what i want to do. could you point me in the right direction? i just need to know where to look,

0 Kudos
Message 4 of 7
(3,313 Views)

So here is a broad suggestion (which is surprisingly applicable to more than just LabVIEW Programming) -- think more about what you want to do than how you want to do it.

 

So what do you want to do?  You want your user to be able to enter multiple values in something that looks (to them) like an array of numbers.

 

OK, create a Control on the Front Panel that has an array of numbers (you can choose whether they are Integers or Floats, which will help clue the User).  Do you know how to make the Array an Integer or a Float?

 

Now help the User even more by making your Array control (which doesn't look much like an Array) "look like" an array -- drag down on the bottom edge until you have space for about 10 elements.

 

The "index" box (to the left of the Array) isn't very mnemonic compared to a scrollbar.  Right-click on the Control, choose Visible Items, turn off "Index Display" and turn on "Vertical Scrollbar".  One more thing that I like to do is to get rid of the increment/decrement control -- right-click the inner cell and turn it off.

 

Your user can now fill in as many entries as they like.  How will you know when they are done?  Ah, you have a big "Push Me When All Values Are Enterred" button, which is the only thing you need in the Event loop.

 

Bob Schor

0 Kudos
Message 5 of 7
(3,303 Views)

I did try a bunch of tutorials, but most of them deal with topics that are not related to what i want to do. could you point me in the right direction?


If you are an Expert, you can choose the Tutorial Topics that appeal to you.  If you are a Beginner, do not "pick and choose", but do them in the order the Expert thought would be best.  Find the most basic tutorials and do them first, of course ...

 

BS

0 Kudos
Message 6 of 7
(3,298 Views)

@Evilerthunder wrote:

I did try a bunch of tutorials, but most of them deal with topics that are not related to what i want to do. could you point me in the right direction? i just need to know where to look,


This is a habit you don't want to maintain.  If you want to build a house, you'll want to start at the foundation.  You'll want to build the frame.  You don't want to randomly go in and place doors and hope they'll stand.

 

You were pointed in the right direction.  The tutorials start you off with the basics.  It looks like you want to put multiples into your array.  You can't do this without understanding the math functions.  You won't be able to do it easily without loops.  You will want to maintain data between loop iterations.  You'll want to understand the difference between controls and indicators.  None of these have anything to do with arrays directly.  Indirectly, they all are paramount to what you want to work towards.  If you ignore the basics, you'll end up working harder engineering ways to solve problems that have already been solved.

0 Kudos
Message 7 of 7
(3,269 Views)