Showing results for 
Search instead for 
Did you mean: 

Variable, Multi-plot XY Graph?

Hey all, first text to the forums so here goes:


The issue I have deals with processing data from a number of strain gages.  My goal is to do the following:


   -  At the press of a button ("Push to Snapshot XY Points"), I need to collect a "snapshot" of the strain data that is continuously flowing out of the DAQ Assistant


   -  This strain data is currently being pulled from DDT and converted to a 2D array "Collected Data", which holds the current value of each channel in its own row.


   -  I want to take each individual channel of this information and pair its "collected data snapshot" value with the current Load Case (a double value I control), creating an (x,y) coordinate pair for each channel (all channels will be assigned the same "Load Case")


   -  I want to then Plot & Store these (x,y) pairs of data for each channel.  When I proceed to then change the "Load Case" and take another snapshot, I want to create a new set of coordinate pairs for each channel, corresponding to the new load case.  The overall goal is to enable the code to produce a XY Graph that looks like the one shown below.  I want this XY Graph to "build" to the right each time I take a new snapshot.


I currently have some code that takes the "Collected Data" Array, and moved it through a FOR loop setup with auto indexing enabled (I imagine I will need some sort of smart FOR loop to handle the variation in channel count).  From here I am having trouble organizing the data into the correct arrays/clusters such that I can store and plot it.  Any help would be much appreciated, thanks!


To Note: LabVIEW 2014, Windows, cDAQ Hardware


Desired Output Graph:








Current Code:


Current Code.JPG





Current Front Panel View of Arrays Being Built:



0 Kudos
Message 1 of 3

Without getting too hung up with the correctness of what you're doing (or what I did for that matter), attached is a VI that should do what (I think) you're asking. The values get appended to the storage arrays and those get forward to the start of the next loop iteration via the shift registers.  The transpose array functions are there soley so that I could use auto indexing on the FOR loop when creating the 1D array of clusters for the XY graph.


couple points about your code:

   1] set you "from DDT" signal conversion to 1D array of scalars so you don't have to auto index and then index array inside the FOR loop.  The data is 1D already.

   2] inside your FOR loop you create a cluster and then convert from cluster to array.  Use a single "build array" instead.




0 Kudos
Message 2 of 3

Thank you so much!  This is exactly what I was looking for!  Setting the signal conversion to 1D was a huge help.


Much appreciated, thanks again!

0 Kudos
Message 3 of 3