Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni 9188 Chassis low sampling rate

Ok I implemented that Node like you told me. But still after 15-20 Minutes the program does not keep sampling at 3Hz but becomes slower. I am using the following code. If you have a solution for that final problem I would be really glad 🙂

0 Kudos
Message 11 of 14
(888 Views)

Hi Duncan-

 

You need to actually update the 'Offset' value.  Right now it isn't being set.  To do this you need to change that node from a property Read to a property Write; this is a right-click option on the node.  Based on your usage of the '1sample' flavor of DAQmx Read, I assume you want that value to be '0', which is also the default.  If that is the case then you can just remove the Offset parameter alltogether.

 

When you mention that the sampling rate seems to be degrading, are you referring again to the rate at which your input data changes, or are you referring to the loop rates you are seeing on your single-point read operations?  Is your CPU and/or memory utilization trending upwards leading up to the point at which you notice the performance degradation? 

 

You might want to consider using an 'NSamples' flavor of DAQmx Read instead of '1Sample' to allow your application to throttle itself as samples become available.  For example, you might want to call DAQmx Read with '3' samples to read.  In that case you would want an 'offset' value of -2 (since you want the most recent sample and its two predecessors).  Alternatively, you could insert a 'wait ms' node into your loop and set it to something less than 3Hz, perhaps 250mS, to help throttle your main loop and avoid unnecessary CPU utilization.

 

 

Tom W
National Instruments
0 Kudos
Message 12 of 14
(876 Views)

Thanks for the advice with the offset node.

 

The Problem with the decreasing sampling rate was that i opened a new channel regularly in an subVI. It's now fixed. SOrry that it took me so long to find. 😉

 

Thanks for all your help though!

 

Duncan

0 Kudos
Message 13 of 14
(874 Views)

Hey Duncan-

 

Great- I'm glad to hear you are up and running now. Smiley Happy

Tom W
National Instruments
0 Kudos
Message 14 of 14
(872 Views)