LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multi xy plot (irregular data) with timestamp

Hello,

I am programming Labview for a physical instrument. The data we obtain each has an index which corresponds with the plot i want to have the point in (the other plots should be empty e.g. (NaN, 1, NaN, NaN). I already did this with a wavechart, which works very well, but the i cant display the time. so i tried to convert the whole thing to a xy graph, but I am not able to do so, since it is not possible to add a point to a specific plot or the timestamp isn't working. In the file the wavechart top right is what I want, but with a timestamp. All other xy graphs are just ideas were i think just a small hint is missing. Since I am a beginner in Labview I really don't know how to solve the problem. It would be great if somebody could help. Thanks a lot!

Luc

0 Kudos
Message 1 of 4
(2,570 Views)

Luc,

 

The biggest problem is that you have only one point in the X array (timestamp) while you have 10 points in the Y array. Thus you only get one point on the X-Y graph.  I am not sure how you want to define the timestamps for the XY graph so I cannot suggest a way to create the array.

 

Similarly the array fed to Amplitude and to the Y array of XY Graph 2 always has only one none NaN value at a time so only one point will show on the graph.  I think you may want a shift register to pass the data from one iteration to the next.

 

Also your control index will always be zero or one.  You probably want to mutiply the random value by the number of elements in the array (10) and convert it to an I32 integer. Then it will change any value in the array. 

 

I made a few changes in your VI which illustrate some of these things, although I doubt this is exactly what you want.

 

Lynn

0 Kudos
Message 2 of 4
(2,562 Views)

Dear Lynn,

thanks for your reply. It helped me to come to a solution. To explain it a bit more. We are collecting spectras corresponding to a certain mode. We write all data down, and let them fit with a lossy queue. Therefore not every spectra is fitted and it can happen that a spectra of the same mode comes after each other. (see figure bottom) And we want to indicate at which time the fit was done. Besides we want to keep all the values in the graph (thats why i use the VI xy graph buffer).

I now have a solution which works for our purpose. It is not written that nicely, maybe you have a good idea with arrays to do this VI automatically. But this should be ok. Thanks again for your good impact

Luc

 

Download All
0 Kudos
Message 3 of 4
(2,552 Views)

Luc,

 

Other than some diagram clean-up to make it easier to read, nothing jumps out as an obvious improvement.  I have a vague suspicion that there are more improvements which could be made, but I do not understand your entire system well enough to be sure.  The benefits to any other changes might be small compared to the effort required to make them.

 

Lynn

 

ColrFit.png

0 Kudos
Message 4 of 4
(2,534 Views)