06-13-2016 08:55 AM
06-13-2016 09:06 AM
Just kidding, I figured it out. Index array worked great. I had no idea it could do that to a 2d array. Here's what I've got, though it's still behaving strangely. The load display is cutting off whenever the xy graph displays a new data point and the xy graph to the right is the only one displaying anything, though it also clears the previous data every time it records. I should have a noisy doughnut shape on my xy graph, but I'm getting single chunks of the doughnut that change periodically.
06-13-2016 09:55 AM
Duh. I added a shift register and an insert into array VI to keep the old data. The gaps are still happenning, though, and I get stuck in the Start event (the button won't change back to gray). Also I have to abort the VI to make it stop, since I can't click anything once I have started displaying the data on the xy graph. Here's a screenshot of my data, since i can't show you my MAX task.
06-13-2016 11:36 AM - edited 06-13-2016 11:37 AM
Additionally, I can't seem to find a way to effectively clear the data stored in the arrays used in the xy graph. I can clear the visible graph, but when I hit start again everything that was there before shows up again and the new data is appended to it. The event 'Clear Data' value change is where I've been experimenting with different invoke and property nodes, but it looks like I need to have a write to array subVI to actually clear it, and I can't do that continuously because of the structure I've used.
06-13-2016 01:03 PM - edited 06-13-2016 01:13 PM
Hi guy,
when you want to clear the graphs plots you need to clear the data buffers!
And your data buffers are those shift registers where you store XY data!
Btw. get rid of all those DeleteFromArray and Split1DArray functions! When you want to get the single waveforms in your waveform array you should use IndexArray!
This would also simplifiy the subVI in your ZIP: it would take a scalar waveform instead of an array and you wouldn't need the FOR loop. Basically it would just contain the WaveformMinMax function!
See this:
06-13-2016 02:15 PM
Ahh thank you! That is so much simpler. I've changed my VI considerably. It clears the data effectively now, but the skips in the data are still a problem. I'm sure it's connected to the front panel freezing, but I can't find where the problem is. (I've also used probes/hilight execution to see if I could find where they get stuck). Here's my VI (again) and thank you both for all of your help so far!
06-13-2016 02:39 PM
AHA The freezing was an issue with the event structure. Apparently LabVIEW defaults to having the front panel disabled while an event is running, all I had to do was uncheck this box.
Data is still skipping strangely, though. Any thoughts?
06-13-2016 03:47 PM
OK so I figured the rest of it out (i think)! The problem only happens when two DAQmx Read vis are running in parallel loops. I'm working on having the loops stop each other so that both will function. Should be a fix, I'll mark this as a solution and upload my finished VI when I get it tested!