LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make a constant line on a graph whose axis changes?

This is probably a fairly simple question, but I can't figure this out after hours of working. How do I plot a line of a constant value in my graph? I have a program that takes user input values and plots it, which I need to show in comparison to the constant value plotted across the entire graph. If I just have a constant it does not connect the constant values every time the program runs but instead just has one plot.

 

Thank you! 

0 Kudos
Message 1 of 6
(4,106 Views)
You would need to create an array that has as many elements as the user input array. Get that array size and pass it to the Initialize Array function that also has the constant wired to it.
0 Kudos
Message 2 of 6
(4,096 Views)
The user input is constantly changing. Sorry, new to labview programming. I tried to make a 1D array, but I don't know how large to make it, since it is constantly changing.
0 Kudos
Message 3 of 6
(4,090 Views)

So what if it's constantly changing? As I said, you use the array size and pass that to the initialize array.

 

 

 

Message Edited by Dennis Knutson on 02-18-2010 12:39 PM
Message 4 of 6
(4,082 Views)
Two things. I had trouble finding where a double array was. I've attached two pictures of the program. I don't see why I need what you labeled as user input also. 
Download All
0 Kudos
Message 5 of 6
(4,070 Views)

If you recall, you said 'have a program that takes user input values and plots it'. That is the input I labeled 'User Inputs'. If your user input is a file, then data from there is what you need to wire up. You will have to convert from that evil dynamic data to get a 1D array from one of the columns.

 

Why or why would you post an almost unreadable image. Do you not know how to do a screen capture? In windows, an Alt-Print Screen will capture the active window. Open Paint and paste. Save as png. Even better, attach the VI but using the strangely named 'Add Attachments' right below the message body.

Message 6 of 6
(4,064 Views)