09-08-2017 03:49 PM
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!
09-08-2017 04:19 PM
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
09-08-2017 04:22 PM
Here's the vi.
09-09-2017 09:07 AM
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.
09-09-2017 11:33 AM
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.