LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error with plotting XY Graph

Hi Labview community,

I had a hopefully easy question about my Labview code. Attached is my .vi which takes in input data from 8 different instruments and just writes the output to a txt file. I also want to plot a realtime x-y graph in the front window while I am running the tests. This is where I am having issues. For some reason, the graph is not plotting.

I also wanted to output my computer time if possible to my text files. If anyone knows how to do this it would be greatly appreciated.


Thank You,

0 Kudos
Message 1 of 2
(2,463 Views)

Form a first glance, you need to press the "zero" button at least once. Before that, the "data" indicator is an empty array and subtrating it from a size=8 array will result in an empty array. Use a feedback node instead of a dummy indicator and initialize it with the data array multiplied by a scalar zero.

Also, your arrays need to be in shift regsiters, else they forget the previous data. In the second iteration you try to insert at an nonexistent location and the arrays will be empty again.

 

Overall, you have way too much code. For example,  you could use a single shift regsiter with a 2D array to keep things simple. ALso, instead of "insert into array" use Built array".

0 Kudos
Message 2 of 2
(2,456 Views)