Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Double buffering with DAQmx OR equivalent of DIG_DB_Transfer in DAQmx

Hi,

I have another post on the forum under a different subject. Thought I'd ask again now that I think I'm closer to my problem with a better subject title. I have old VB6 code which calls
    DIG_DB_Config(deviceNumber, Group, dbMode, oldDataStop, partialTransfer)    // to turn on double buffering
    DIG_DB_Transfer(iDevice%, iGroup%, piHalfBuffer%(0), ulPtsTfr&)                     // to grab a half buffer
So it uses double buffering, I need the equivalent of this in DAQmx. I've tried port reads with a DigitalSingleChannelReader and it's not the same thing. Any traditional legacy daq experts out there who have had to upgrade code that know how to do this?

Thanks for any help,
Chris
0 Kudos
Message 1 of 2
(3,343 Views)
 

Hi Chris,

I am going to post this response in both forums so everyone else can see it as well. The DAQmx driver automatically performs the double buffering for continuous digital input operations. Therefore, there is no extra programming/functions needed for this operation. You will only need a continuous digital input application.

I found a continuous digital input example configured for an external clock. Here is the link: C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Read Values\Cont Read Dig Chan-Ext Clk. You will have to make some modifications which are documented in the NI-DAQmx C API Visual Basic 6.0 Help which is located in Start >> All Programs >> National Instruments >> NI-DAQ.

Here is the link to a tutorial which has some useful information about the DAQmx driver: Answers to Frequently Asked Questions about NI-DAQmx and Traditional NI-DAQ (Legacy). I hope that you find this information helpful.

Regards,

Hal L.

 
0 Kudos
Message 2 of 2
(3,333 Views)