Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ data sampling discontinuous

Dear Sir:

Thanks for your reply. In my application, I just use analog and digital input for my 6023E DAQ. Recently, I just figure out that if I create an DAQmx configure input buffer, then this discontinuous condition did not happen again. Therefore, I suspect that since in my while loop, I take too much calculation to cause my while loop slow, and this would interfere the DAQ process memory to cause the DAQ input data been overwritten. Is that right? Besides, I also would like to check how much buffer I need to set up and can I also check this buffer content while running my program? Thanks for your help.

Best Regards.

Fred
0 Kudos
Message 11 of 18
(1,288 Views)
Dear Fred,

If you are losing data, it definitely sounds like your data is being overwritten. If you add a general error handler at the end of your program it will tell you if this is an issue. There is a DAQmx Property node that allows you to check where you are in the buffer when your program is running. Take a look at the DAQmx Read Property Node>>Status>>Available Samples Per Channel. Please let me know if you have any questions. Have a great day!

Marni S.
National Instruments
0 Kudos
Message 12 of 18
(1,270 Views)
Hi,

I have a similar problem. I use a pci-6013 board to acquire 6 analog channels, one counter to measure frequency and another counter to count pulses. I use ni-daqmx driver. When I'm just acquiring analog channels the program runs very fast and there's no problem. Tough when I acquire analog channels and counters my program runs very slowly and sometimes data is overwritten. How can I set the sampling frequency of the counters if I want to read N samples per channel?

Thanks,

Leandro H. Batista
Leandro H. Batista
0 Kudos
Message 13 of 18
(1,252 Views)
Hello Leandro,

You can do buffered counter measurements to set the number of samples. There is a great example in the Example Finder. Go to the Help menu and select Find Examples. Browse Hardware Input and Output>>DAQmx>>Counter Measurements. There are many buffered counter examples in here. Buffered measurements default to DMA transfer, so you should set it to IRQ by using a DAQmx channel property node. First, select the property Counter Input. Then select General Properties » Advanced » Data Transfer and Memory » Data Transfer Mechanism. Create a constant and choose Interrupts. Please let me know if you have any questions. Have a great day!

Sincerely,
Marni S.
0 Kudos
Message 14 of 18
(1,236 Views)
Hi Marni,

Take a look into my program please. I need to synchronize analog and counter measurements. I need to measure speed and position of an AC drive. I count pulses to measure position and I measure frequency to measure speed. I use a pci-6013 board and my sampling frequency is 6kHz. Now I'm not sure my hardware can do this kind of acquisition. I've found this thread
http://forums.ni.com/ni/board/message?board.id=240&message.id=2186&query.id=58173#M2186

Thank you for your help,
Leandro H. Batista
0 Kudos
Message 15 of 18
(1,229 Views)
Dear Leandro,

Please try this VI and let me know if it works. If you get errors we can start adding Interrupts. Let me know if you have any questions. Have a great day!

Sincerely,
Marni S.
0 Kudos
Message 16 of 18
(1,200 Views)
Hi Marni,

I don't have LV7.1. Can you save your vi in LV7.0 format please? Thanks.
Leandro H. Batista
0 Kudos
Message 17 of 18
(1,194 Views)
0 Kudos
Message 18 of 18
(1,180 Views)