i am developing PXI 6341 DAQ DIO Read/Write functions.
i like to support similar ones in DAQmx interfaces:
i am looking into
dioex1.cpp—Single-point on-demand digital input and output on ports 0, 1, and 2
dioex2.cpp—Finite hardware-timed digital input <<<<<<<<<<<<<<<<<<<<
dioex3.cpp—Finite hardware-timed digital input with change detection
dioex4.cpp—C ontinuous hardware-timed digital input with optimized DMA
dioex5.cpp—C ontinuous hardware-timed digital output with regeneration <<<<<<<<<<<<<<<<<<<<<
dioex6.cpp—C ontinuous hardware-timed digital output with the Watchdog Timer
We have three exmaples for Digital Inout and two for Output as above.
i am thinking of using
(1) DIO_Write - dioex5.cpp
(2) DIO_Read – dioex2.cpp 0r dioex4.cpp
Can anyone confirm or give some comments?
What operating system are you using? From what you described, if you are unable to use the DAQmx driver, it looks like you are going in the right direction with those particular C++ examples in the NI-MHDDK. Have you tried implementing any of the functions already? Let us know if you run into difficulty.
OS - Linux - Fedora 15.
i think i was looking at wrong examples - again i am tring to accomplish setBits and resetBits of NI 6341 24 DIO lines.
i believe the correct example i should be using is
Appreciate if this can be confirmed.
i am in the middle of impelementing - dio fuctions: setBits(), resetBits(), ReadPort().
On X Series devices, dioex1.cpp performs Single-point on-demand digital input and output on ports 0, 1, and 2. If this is what you are looking to do, this is the correct example. I have included the Readme for the NI-MHDDK below for your reference.
Any other information you can give me about your system would help us determine if this is the correct example you should be using.
i find below in the example dioex1.
Would you expaline what does the setTristate true mean? i noticed that it resets upon exit.
when do you set true or set false?
// Create subsystem helpers
tBoolean tristateOnExit = kTrue;
nNISTC3::dioHelper dioHelper(device.DI, device.DO, status);
if (_tristate || _exampleStatus.isFatal())
reset(NULL, 0, status); <<<<
I've included a link to a community webpage for the Driver Development Kit. This forum has active members who work with this software. I would recommend posting here!