This VI generates confocal images by iterating voltage values through the points a 2D raster waveform, and collecting fluorescence data at each point using the DAQ counter. The problem I'm having now is that the array of data plots only after it is entirely collected. I would like to be able to see it update live. I have seen some posts about using control references, but I'm not sure how to implement.
Attached are the VIs I'm referring to. GPScanTEST.vi is the main program.
Thank you for any feedback on this matter.
Posting from phone so haven't seen your VIs (yet - will post again later but not sure when) but to update a graph during acquisition, put the graph inside the Acquisition loop.
If there's lots of processing (sounds likely) you might use (or already be using) a Producer/Consumer design. In that case, keep the graph in the consumer loop. This also works if your producer and consumer are in different VIs (but may require multiple steps):
Or similar. The flow above would usually use two queues and create them in the top level VI and pass them to the appropriate SubVIs (producer gets first queue, processing loop gets both queues).
Hi aerickson,
unfortunately you are using the latest LabVIEW version (2019) to attach your VIs, so I cannot look at them right now…
@aerickson5 wrote:
The problem I'm having now is that the array of data plots only after it is entirely collected. I would like to be able to see it update live.
Place the intensity graph inside the loop collecting samples for the 2D array of pixels. Everytime you write a pixel into the array you can also update the graph (if needed):
Hi aerickson,
I took a look at your VIs now and have the following comments and questions. Hopefully you can give a bit more insight and then we could give better suggestions:
Please let me know if I was wrong about the intention, or if you can clarify any of these questions.
Otherwise, perhaps you could make some of the suggested changes and see if that improves matters for you.
Thanks very much for the reply,
I think I was a bit vague in the last message. I wasn't sure how much of the hardware side/application I should include in this description, but it probably helps so it's clear what I'm interested in. Things are working as I want them too at the moment, besides the intensity plots not updating in real time. I'll just try to address each of the points you brought up
The only problem is that I cant figure out how to make it plot as it scans.
Thanks again for the response. I hope this helps to clear up my intentions and the bigger idea regarding what this program is being used to do.
Best regards,
Adam
I moved the plot inside the for loop which collects the data. Still, the graph displays only after the entire array of data is collected. Here's what it looks like now.
Can you see from this picture why the points don't plot in real time? Is there some property of DAQmx I can change which would help
Thanks,
Adam
Hi aerickson,
@aerickson5 wrote:
I moved the plot inside the for loop which collects the data. Still, the graph displays only after the entire array of data is collected.
The VI does what you want it to do: read data from DAQmx, then plot the data in the graph.
When you want to plot parts of data step by step then you need to read the data in smaller parts step by step...