LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display calculated values for x and y

Solved!
Go to solution

Hi guy,

 

the 2D array constants are wired to IndexArray functions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 11 of 18
(1,341 Views)

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. 

0 Kudos
Message 12 of 18
(1,338 Views)

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.

 

donut.PNGdonut.PNG

0 Kudos
Message 13 of 18
(1,330 Views)

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. 

0 Kudos
Message 14 of 18
(1,325 Views)

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:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 18
(1,316 Views)

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!

0 Kudos
Message 16 of 18
(1,309 Views)

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. Capture.PNG

 

Data is still skipping strangely, though. Any thoughts?

0 Kudos
Message 17 of 18
(1,302 Views)
Solution
Accepted by topic author try_guy90

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!

0 Kudos
Message 18 of 18
(1,293 Views)