05-31-2019 12:01 PM
Hello! I'm new to the Producer/Consumer architecture and I've attached my VI where I have it running successfully, but slowly. I'm running the code on a Windows 10 device (Xeon E5-2630) and acquiring signals from 3 cards on an SCXI-1000 (TC and voltage) and an NI-cDAQ 9213 (also TC and voltage).
My experiment is looking for a critical heat flux event (CHF) that happens on the order of ~1ms. I would like to be able to capture data at that rate and also respond by cutting power to a heating element if certain temperature or resistance thresholds are exceeded.
Unfortunately, my producer loops lurches along at ~500ms. I believe this might be tied to using two devices for data acquisition.
In as previous (non-P/C) version of the code (attached as V1.4), I was able to read my shutoff signals at ~3ms which is close enough, but I wasn't logging the "fast" data.
Can anyone comment on where my delays might be coming from? Thanks for your time.
Solved! Go to Solution.
05-31-2019 12:17 PM - edited 05-31-2019 12:20 PM
So I've only looked at the "CHF Loop" so far (good job with documentation 🙂 ) but the loop rate will be controlled by the slowest of:
It seems unlikely any of the processing is taking problematic amounts of time, so I expect a problem in the task configurations for DAQmx, but I will note that you can use the "Boolean to (0,1)" node in place of your For loop and Select node. If you need DBL values, you can also add the To DBL node straight after (but it will be coerced if you connect it as it is now).
Edit: As an additional comment that won't help with your speeds, but might help remove some unnecessary elements from the BD (your choice) you don't need to wire sequential indices to Replace Array Subset (or Index Array). Just wiring the first is enough - the next will automatically be the first value plus 1. Then you can wire any non-sequential values.
05-31-2019 01:18 PM
According to the spec sheet the NI 9213 has a 75Sa/s Aggregate sampling rate. The SCXI-1000 is a chassis and you have not listed the cards being used. The 9213 cannot update with new values every 1 ms. You may need to rethink your equipment or your measurement.
mcduff
06-02-2019 09:04 PM
cbutcher,
Thank you very much for the comments. I'm always learning from you and others on the forum and I really appreciate it. I have those DAQmx tasks grabbing single sample from each channel with the idea that it ought to just race through them as quickly as it can. Unfortunately, I think mcduff is right that it's a hardware issue. I'm reading NI-1303s for temperatures on an SCXI-1000 being scanned by an NI-6239 on my control PC (where my code is running). It looks like the NI-1303s have a 2 Hz filter on their temperature out signals (explaining my 500ms tick rate).
Will probably have to update hardware... 😞
06-02-2019 09:14 PM
mcduff,
Thanks for the reply! With your prodding, I investigated my hardware and I have NI-1303s scanning for temperature, which seems to have a time filter on the temperature out of 2Hz, which likely explains my 500ms response time. Do you know of a way to get around that filter?
06-02-2019 10:10 PM
It's possible I'm misunderstanding the setup (indeed, quite likely) but here I go anyway...
The 1303 appears to be a thermal block for connecting thermocouples to - this provides essentially cold-junction compensation. It doesn't read the thermocouple values as far as I can see...
As you mentioned, the 1303 mentions a 2Hz filter on V_tempout (when used with a 1102 B/C module?). However, this is as far as I can tell only the temperature of the thermistor installed in contact with the block, which is used for CJC.
If you can acquire the voltages from the thermocouples faster (as you should be able to using the NI-6239) then you can certainly just use an old V_tempout (if it is only the thermistor temperature).
Mcduff commented on the acquisition rate of the 9213 C-series module you're using in your cDAQ. This can't acquire temperatures quickly (and there's really nothing you can do about that). However, 75S/s (aggregate) can still get you about 13ms resolution if you have only one channel (multiply the time period by number of channels for more - e.g. with 5 channels you're down to 15S/s per channel, or 13.3*5 = 66.7 ms period per channel (also not simultaneous)).
Can you move the critical temperature measurements to something that's connected to the 6239 (fast device) and use only less critical temperature measurements on the slower (but perhaps more accurate?) cDAQ device? Failing that, you could slightly (not sure how much) speed up the cDAQ acquisition by opting out from some of the accuracy improving measurements, e.g. CJC updates and auto-zeroing).
06-03-2019 11:14 AM
@elward wrote:
mcduff,
Thanks for the reply! With your prodding, I investigated my hardware and I have NI-1303s scanning for temperature, which seems to have a time filter on the temperature out of 2Hz, which likely explains my 500ms response time. Do you know of a way to get around that filter?
There are some properties in the DAQmx Channel Property node that may have access to the filter. See below. (Note I have never messed around with any of filter properties.)
However, the filter does not control the A/D conversion so removing the filter will not speed up your acquisition, and may make your measurement worse by introducing noise, aliasing effects, etc.
Your thermometer that you are using to measure temperature, (not the digitizer), has a certain thermal inertia, that is, it takes XX seconds to respond to a temperature change. You need to find out what that time is; it is quite possible that it is over 1 ms. So before you solve your slow analog to digital conversion woes, you need to make sure you have the right sensor in place first, otherwise your measurement will still not work correctly.
mcduff
06-04-2019 02:27 PM
Thanks!
Looking deeper, my TC readings come from the NI-1303 to the SCXI-1100 Amplifier (with the 2Hz filter) to the SCXI-1000 chassis before being reading by the PC-based NI-6239 Card.
I'm going to go around this by using a separate USB NI-6259 card to grab my time-critical readings (which I've gotten to ~4ms response time). I was hoping to consolidate everything into one P/C setup but it looks like I'll be using two (fast and slow) to be processed after running. Thanks again for your help.