LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph that outputs NaNs and 1s based on conditions

Hi!

 

I'm trying to create a graph where it takes an array that is initialized with '1' and replaces some portions of the graph with NaNs. The x axis is time dt and Y is the data being received.

I've attached an image showing the vi.

The initialized vi needs to be replaced in 3 sections, the index input will be seconds divided by dt. Each portion of the array will be replaced at time (seconds/dt). 

When I merge the output of the 3 arrays in the For loop and wire it to the waveform graph I don't get the desired output where the graph should contain spaces where I have replaced an array of 1 with NaNs at certain locations. Help me debug! 

Thanks!

0 Kudos
Message 1 of 5
(2,964 Views)

Please do not attach pictures of code -- attach the actual VI (or VIs, or a compressed version of the Folder containing all your VIs).  We cannot clearly see, probe, try to execute, "look behind" a picture.

 

Bob Schor

0 Kudos
Message 2 of 5
(2,932 Views)

Here's the vi.

0 Kudos
Message 3 of 5
(2,931 Views)

The loop in the bottom right makes no sense without 3 shift registers. As it is, each loop iteration modifies the original data, so only the last iteration is on the output of the loop.

 

If this needs to grow, you might consider cleaning up a bit.

0 Kudos
Message 4 of 5
(2,889 Views)

The VI you have attached has very little resemblance to the code in the first picture. Please reduce the problem to a small simplified example that demonstrates what you want to do. Make sure it contains (or simulates) typical data.

 

Also, please don't over-customized the front panel appearance when you attach VIs. Things like disallowing resizing and hiding the scrollbars is not very nice to us, especially if the front panel has an odd size and objects are partially clipped. If you think you need these restrictions, they should be the very last thing before distribution.

 

 

0 Kudos
Message 5 of 5
(2,882 Views)