From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-30-2017 12:08 PM - edited 03-30-2017 12:10 PM
Hi there,
I am writing a measurement software using LabView 2009 SP1. The program runs in a while loop and a number of data acquisition routines are accessible using a case structure. All of the measurement routines should display the acquired data in a central XY Graph, which is located on the most outer structure of the program.
Depending on the routines that is used we have one, two or three sets of data that have to be displayed simultaneously on the same XY Graph.
The way I have realised this is with a XY Graph indicator in the outer shell of the program and a local variable of it in the respective cases in that I write the sets of data using 'build array'.
The problem now is that when the graph is initialised to 2 graphs I can only feed two sets of xy data to it and when initialised to 3 graphs only three sets of data...
Is there a property I can modulate using a property node that can modulate the amount of data sets in a xy graph?
To visualise the problem I attached a sample vi that shows my problem in the most simple case and screenshots of it.
best,
Julian
Solved! Go to Solution.
03-30-2017 01:20 PM - edited 03-30-2017 01:22 PM
03-30-2017 01:25 PM
I don't understand what you mean by sending 2 sets of data or 3 sets of data.
In your simple VI, it looks like you are sending either 1 plot or 2 plots. You wind up with a wiring error because of the different data types. In one case it is a cluster of X and Y arrays. In the other it is an array of clusters of X and Y arrays.
Put a Build Array right after the bundle in default case 0. Now your wire will no longer be broken in the other case. You may need to wire it to the XY graph terminal first. (Actually, I'm not sure why you are even using local variables here.)