02-07-2018 07:58 AM
I am creating a temp monitoring vi that will display temps in real time on a waveform chart. It will log temperatures over the course of a week so I need to limit the number of data points I take and keep it computer resource efficient. I only need to record temperature to the wave form chart every 10 or 15 minutes but I would like to have the current temp as a numeric indicator update more frequently so you can see its working.
I'm looking for a way to collect data from a daq at maybe 10 samples per second to average and display on the numeric indicator but then at 15 minutes collect 100 samples per second to average and add to the waveform chart.
02-07-2018 08:12 AM
you could compute an average for the times when you only update the numeric indicator
and use the quotient remainder vi to trigger graph/chart updates every x iterations
02-07-2018 09:35 AM
You didn't post any code so I will just say this. If you are using a proper program architecture like a state machine you can have separate measuring, displaying and logging states.
Then your program goes something like this:
02-07-2018 09:52 AM
Yes I was thinking of using a state machine in a way similar to your idea but how does the daq assistant fit into that. Can I have separate daq assistants in different states that reference the same pins on the daq?
02-08-2018 07:23 PM
No, you cannot generate two tasks for the same channels on a single device.
It seems like the snippet that jwscs posted is what you are looking for. Have the task set to sample the data at the rate of the numeric indicator, then every x-cycles of the while loop (10 in jwscs' example) you can jump into a case statement and write the latest value(s) to your waveform charts