08-08-2017 04:12 PM
Hello All,
I am running a project where I am measuring 4 different thermocouples in one VI. I am using the cDAQ 9714 and the C module 9211 (thermocouple module). I would like to use a low sample rate because I am exporting the data to excel so I can create graphs. A high sample rate is just too much data.
When my sample rate is low (1-10 samples/s) then the values only flash in my thermometer and accompanying indicators. I would like for the last value to remain in the indicator and displayed in the thermometer until the next sample is taken. I have done some research and it seems that using another while loop with a shift register could solve my problem. However, I am just not sure how to implement it in this case. I have used shift register before but I am at a loss.
Any help would be appreciated. Attached is my VI. I am using Labview 2013.
08-08-2017 04:49 PM
I replaced your task with a simulate signal VI and I'm getting what I think is the behavior you're looking for (look at the grill surface indicators only). So I think the problem is in your signal. I recently did something very similar with a daqMX task and had no issues, the indicators held their value until the next sample was acquired, so I'm wondering if the issue is in your auto zero case structure. Are you having the same issue even when you bypass auto zero? You shouldn't need another while loop for this.
08-08-2017 05:03 PM - edited 08-09-2017 11:37 AM
Just to reiterate, indicators have their own data-copy and hold their values until the code updates it with a new value. If you see "flickering", it means that not all your read operations succeed. I am actually puzzled why you don't read "N channels, 1 sample", because that's all you really need here.
08-09-2017 04:21 PM - edited 08-09-2017 04:27 PM
ALBacala I am not sure. Up to this point I have always used the auto zero. I will try it without. (also I forgot to add the timer VI which is in the case structure. This is for the elapsed time.)
08-09-2017 04:25 PM
Im sorry I forgot to attach that VI. This is a simple timer that keeps track of elapsed time. This uses the shift register. The problem also occurs in the thermometer indicators. The numerical indicators is just to keep the display similiar in style. The digital displays have a different style box. Can you elaborate on "you do not need the dynamic data. just index out the waveforms"? I a not at my work computer and cannot attach the timer vi.
08-10-2017 09:49 AM - edited 08-10-2017 09:50 AM
@altenbach wrote:
- What's the missing VI in the case structure? What's the point of it?
- You only need to set the plot names once before the loop and not over and over.
- I don't have DAQmx installed here, so I cannot look at your DAQ code. Do you get a measurement for each indicator with every iteration? You take a new reading with each iteration, so nothing should "flash".
- Your shift register makes no sense at all. All it does is delay the value of the switch by one iteration.
- You don't need any dynamic data here at all. Just index out the four waveforms.
- Instead of these extra indicators, just show the digital display of each thermometer. Only one terminal each needed.
Just to reiterate, indicators have their own data-copy and hold their values until the code updates it with a new value. If you see "flickering", it means that not all your read operations succeed. I am actually puzzled why you don't read "N channels, 1 sample", because that's all you really need here.
Im sorry I forgot to attach that VI. This is a simple timer that keeps track of elapsed time. This uses the shift register. The problem also occurs in the thermometer indicators. The numerical indicators is just to keep the display similiar in style. The digital displays have a different style box. Can you elaborate on "you do not need the dynamic data. just index out the waveforms"?
08-10-2017 03:22 PM
@CalebN wrote:
Can you elaborate on "you do not need the dynamic data. just index out the waveforms"?
You get an array of data with each measurement, but only displaying the last one in the digital indicator. All you need is only get one point for each channel, or take the average (or max, or whatever).
Here's a comparison: