01-18-2009 09:29 PM
I am new to programming in Labview (and programming in general) and so I am trying to learn the different functions within Labview that are likely to be of relevance to the work I will be doing. One of the functions that I will be taking advantage of in Labview is the curve fitting functions. To that end I have found a number of the tutorials that are available in the developer zone, and the plan is to work my way through any applicable tutorials in order to understand the processes involved (and how to use functions etc).
The tutorial I am currently working my way through is the Introduction to the Curve Fitting tutorial, and it is here that I am currently stuck. In working through the linear least squares curve fitting vi, as shown in Figure 3 of the tutorial, I can't seem to find the function that the linear data vi and the curve fitting vi are connected to and which then connects to the linear model graph. When I say I can't find the function I do mean that I cannot find the function with the samew icon in the version of Labview that I am currently useing (this is the Labview 8.6 Development System). Can I get some help as to the function I need to use?
I do notice, however, that the tutorial was written in 2006. Could that be why I am unable to find the particular function shown (ie, it has changed since this tutorial was written)? If this is the reason, does anybody know what the correct function now is?
The tutorial can be found here: http://zone.ni.com/devzone/cda/tut/p/id/7669,
Thanks for your help.
Solved! Go to Solution.
01-18-2009 11:08 PM - edited 01-18-2009 11:08 PM
Hey Scottum,
That is the Build Array function in the Array palette under Programming.
If you mouse over it on the top and bottom of the function you should see two little squares. Mouse over the squares and your mouse will turn into a vertical double headed arrow. You can drag the mouse in the vertical direction to expand the function to include more inputs.
Hope this helps,
01-18-2009 11:09 PM
Are you talking about the Build Array function located in the Array palette?
It may look a bit different than shown on the palette. Its appearance transforms based on the dimensions of the arrays going into and whether it is set for Concatenate Mode or not.
01-18-2009 11:13 PM
Thanks for that jiggawax and also to Ravens Fan. That solved the problem. Your right Ravens Fan, I got confused because it does look different on the palette. Once I dragged it onto the block diagram and expanded it it looked right.
Thanks again.
01-18-2009 11:36 PM
I realise that I got a response that solved my initial question, but once that was rectified in my VI, another question has arisen. However, since I don't want to go off and start another thread I thoguht I would ask the question here and hopefully someone will read this question as well.
Now as for my additional question, I do realise it might be a simple problem, but given that I am just starting on using Labview I am finding it hard to work things out, so any help is appreciated. So for the question, now that I have used the build array function, how do I then use that to produce the graph that is shown in Figure 4 because trying to follow the VI description in FIgure 3 doesn't follow through to a graph. Hence my confusion. I have tried connecting the wire from the build array function but that doesn't work. I can get an appended array from the build array function, but I don't see of a way to then connect a graph to this.
Thanks again for any help.
01-19-2009 12:42 AM
Hi Scottum,
So basically it is a simple graph that is on your front panel. So place a Waveform Graph on your front panel. Then you should have a terminal on the block diagram. Yours may look like an icon and not like in figure 3. Right click on the graph on your front panel and click on Find Terminal. It will highlight the correct one on your Block Diagram. Then wire the output of the Build Array into that. It will automatically pick up on the fact that it's a double array and change automatically.
Make sure it's a Waveform graph and not the Waveform Chart. They have different functionalities.
Regards,
01-19-2009 12:43 AM
One more thing-
Don't hesitate to open a new thread. By keeping them seperate it makes searching for issues a lot easier.
Cheers,
01-19-2009 12:49 AM
Hi jigg,
Thanks for that, makes sense. I had been using a XY graph and not a waveform, which sort of explains why I was getting the broken wire. Also I think I was getting confused because I wasn't seeing the graph icon and trying to work out how to connect it to a graph. Forgetting of course that I could have looked at making it not display the icon (as I had for some of the other functions). I knew it would be something fairly obvious, just couldn't work out exactly how obvious!
As for not wanting to open up a new thread, I suppose I didn't want to start off on here as though I was spamming the boards with basic questions. Next time I won't hesitate to break the questions up a bit (whilst still not trying to look like I am spamming the boards).
Thanks again for your help, it is much appreciated!
Scott
01-19-2009 10:26 AM
No problem!! Let us know if you need anything else. You'll find the NI environment is quite helpful and friendly.
Good Luck in your programming,