LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

duplicate controls with a button creating a segment

Hello all,

 

This is my first post. I am pretty proficent at Labview, however, I have run into a wall on how to address a problem I am having. I will explain. Let says I want to plot a piecemeal function of linear graphs. So for example, y = x + b from 0 < x < 10 and then y = 2x + b from 10 < x < 20 and b is from -infinty to infinity. The control boxs would be x and b. I then want a box that will allow me to add additional segments. So for example, I plot y = x + b from 0 < x < 10 with control x and b in place, but now I want to add the function y = 2x + b1 from 10 < x1 < 20 with a new set of controls say x1 and b1 that adds to end of the original function on a chart. Now, I believe I can figure out how to deal with the chart, what is holding me up is how to code the controls (x and b) so that when I hit a button it duplicates the controls (say x1 and b1) and outputs a new function. I have attached a picture depicting what i am trying to describe here. Essentially, the core of my question is what is the best approach to write this code. I was trying to build an array of clusters and simply add dimensions to the array which will provide additional controls, but this does not work out very well. Any help would be greatly appreciated. 

 

Thank You

 

0 Kudos
Message 1 of 3
(2,905 Views)

Am confused.  Is it adding the element to the segment array that you need help with?  Calculating / prepopulating the newly created segment? Plotting the segment and/or updating the graph to include the new one?   

 

It looks like you provided screenshots of a VI that you've already been working on -- please post that if you can so I can get a better idea what you've got so far.

 

Attached something that may or may not answer your questions....

Message 2 of 3
(2,873 Views)

That is exactly what I was trying to do! Thank you very much! I should be able to figure everything else out. Thanks again. 

0 Kudos
Message 3 of 3
(2,870 Views)