07-22-2020 05:40 AM
Hi!
I capture four waveform graphs one after one, and would like to display them in a single digital waveform graph.
So I start with an array of four empty waveforms and feed it to the waveform indicator.
As soon as a wafeform is captured, it replaced the corresponding array element, and the new array is sent to the indicator.
Now... the digital waveform indicator ignores empty waveforms and displays only non-empty ones. That is, after the capture of the first waveform, there is only this waveform displayed in the indicator and in the plot legend.
I would prefer to see all four plots in the legend, even if some of them do not contain any data. Is this possible?
So, this is my code and the result:
But I would like something like this:
07-22-2020 07:39 AM
I think the problem is that LabVIEW has trouble distinguishing between a Digital Waveform with no data (so one that you do not want to display, but still one you want to leave "unplotted") and a Waveform that has a constant, unchanging value. This is the difference between Binary (Yes or No) and Ternary (Yes, No, and Not There) logic.
If I had to do this, I'd be sure that, for N channels, I had N Waveforms capable of being plotted. I'd have another array of N Booleans that say "Plot this Channel". If this value is True, you plot the Channel as normal. If it is False, you figure out how to "plot" the Channel, but not have it "visible" on the Graph/Chart. You can do this for Waveform Graphs/Charts by plotting NaN at every point. You could also set the Plot color to be the same as the background (e.g. Black) so (as Monty Python would say) "It cannot be Seen".
Bob Schor
07-22-2020 07:51 AM - edited 07-22-2020 07:53 AM
On your array initialization element, put NaN for the dt instead of 0, and put a single element in the Y data:
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.