LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pda

i am using pci-mio-16-E-4 multifunction DAC card. how to integrate programs for data acquisition and hardware controlling in a single program without any data dependancy between them
0 Kudos
Message 1 of 4
(2,897 Views)
Hi bali,

I'm confused about what you want to do. Would you mind explaining an example where there would be data dependency? What kind of problems are you trying to avoid?
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 4
(2,856 Views)
i have written a program for data acquisition and a program for TTL pulse counting. The pulses come at some 10 pulses per second. The counting program when run individually counts the pulses as and when they appear. When the two loops are run in the same program, the counting program is not updating fast . If the count value is 60 this instant, when the counter reads in next iteration the count value is now 70 or so.what shall i do to make the counter read at one pulse interval    
0 Kudos
Message 3 of 4
(2,832 Views)
Hi bali,

What driver and version are you using to program your card?

If you're using the Traditional NI-DAQ driver, then you may be experiencing the single-threaded nature of the driver [1]. Only one call can be made to the driver at any time, so if the driver is asking the board for analog samples, you cannot read from the counter until the analog input read is finished. If this is the case, then the two different operations are trading time with the driver and there isn't much more you can do.

If you're using the new DAQmx driver, you may be not making calls to it correctly. For an example of making parallel calls to the driver, take a look at the shipping example called "Multi-Function-Synch AI-Read Dig Chan.vi" [2].

Finally, if your program also does a lot of data post-processing or screen updates, then those other operations may be using processor time and delaying the counter read. You can use queues [3] or pipelining [4] to improve that performance.

[1] Why Do Parallel Loops with AI Read in My LabVIEW Program Seem to Wait?
http://digital.ni.com/public.nsf/allkb/118EB2ABA2DBBAD186257356005C4A30?OpenDocument

[2] Multi-Function-Synch AI-Read Dig Chan.vi
Choose 'Find Examples...' from the LabVIEW Help menu, and navigate to Hardware Input and Output » DAQmx » Synchronization » Multi-Function

[3] Optimizing Automated Test Applications for Multicore Processors with NI LabVIEW
http://zone.ni.com/devzone/cda/tut/p/id/5899

[4] Programming Strategies for Multicore Processing: Pipelining
http://zone.ni.com/devzone/cda/tut/p/id/6425
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 4 of 4
(2,813 Views)