Discussion:
9172 timing control
(too old to reply)
gtb1234
2008-08-06 21:40:05 UTC
Permalink
I am using a 9172 chassis with 6 -- 9217?s (RTD AI) and 2 ? 9203?s (Current AI). I initialize the AI?s and start the task running. The problem is I need to be able to read the values once every second or so. This read occurs in its own thread / loop. The problem is the ?circular memory? mechanism that?s used in Labview. It requires that I read the data  not to slow and not to fast or it stops and tosses an error? I have experimented a little and found some combinations of loop delay and sample rate that will run for a long time without crashing. Some crash sooner and some take quite a while. I guess it depends on how long the buffer takes to corrupt.

 

Is there anyway to read these devices like a DMM? In other words take a reading anytime you want whether the value has changed at all or changed many times before it is next read? The only way I have been able to do this is start the acquisition, then READ once then STOP the acq. This is at least stable.The major problem with this is it takes too much time to start and stop. Thanks.
Paul C.
2008-08-07 17:40:07 UTC
Permalink
Hi Gtb1234,The problems you describe are typically due to hardware timed acquisition.&nbsp; If you want the devices to work similiar to a DMM you can remove the hardware timing altogether and do a software timed acquisition.&nbsp; This can work without having to start and stop the task.&nbsp; Below is a picture of a very basic example of how you can program this acquisition in LabVIEW.&nbsp; I would recommend trying it this way and see if that doesn't work well enough for your application.<img src="Loading Image..."> Regards,Paul C.Message Edited by Paul C. on 08-07-2008 12:34 PM


swtimed.JPG:
http://forums.ni.com/attachments/ni/170/347621/1/swtimed.JPG
gtb1234
2008-08-08 22:10:05 UTC
Permalink
It was too easy. Thanks, it works. I am assuming that the use of the timing (DAQmx Timing.vi))&nbsp; directed the use of the hardware timing and disabled software. Default would be software timing? I've seen lots of info on DAQmx but I can't remember anything spelling out this distinction,
Paul C.
2008-08-11 15:40:05 UTC
Permalink
Hi gtb1234, Yes, if you use the DAQmx timing VI it assumes hardware timing.&nbsp; You can force the timing to software by removing the DAQmx timing vi or using the Sample Timing Type property.&nbsp;&nbsp; This information can be found in the DAQmx help file.&nbsp; This can be found by going to Start » Programs » National Instruments » NI-DAQ » NI DAQmx Help.&nbsp; Once inside the help file, you need to navigate to NI-DAQmx Key Concepts » Timing and Triggering » Timing, Hardware Versus Software.&nbsp; I hope this helps,Paul C.
Loading...