12-18-2014 07:31 PM
Hey All,
I am attempting to implement some new code in an existing VI. I currently have the ability to create an XY plot that "builds" whenever a button is pressed. This works fine, but the data that ends up on the chart is somewhat useless without a reference line.
This will be used for DAQ work. So hypothetically, I could have 5 strain gages hooked up to this chart. On the chart, I plot strain as a function of displacement. The relationship should be linear. As such, when I collect data at different points throughout the range, I should have points that more or less follow an expected linear function (aka a nice, straight line)
I have the data to create this "expected trendline", it is simply two points. However, I cannot seem to come up with a simple way to both:
I've tried a number of fixes, but each seems to get out of control. For example, I created 10 different arrays, each containing the X or Y points to create the 5 different static trendlines, and then attempted to combine this with the existing chart, but the shear number of arrays seemed ridiculous. Any advice would be much appreciated-
Below shows what I desire, and the current code I am working with.
This is my current plot. Highlighted points in the top right and left show what I can currently create, these are "live" data points. I'd like to be able to add in the "dead" static trendlines, shown in red and blue (poorly drawn in...)
The code I have, for the plot that "builds" with the press of a button, creating the points shown highlighted in the image above:
12-19-2014 02:34 AM - edited 12-19-2014 02:35 AM