Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

convert digital I/O functions from traditional daq to daqmx

I have been analyzing code to attempt a conversion from traditional daq to daqmx in a digital I/O application.  Aside from having to add the idea of a "task," I think I have the right method conversions, but would someone be able to tell me that my assumptions are correct?  I still don't feel in the least bit confident with understanding this software.
 
Init_DA_Brds --->> DAQmxResetDevice
    --The main intent with our use of this was to clear the device of any running tasks and put back in the default settings
dig_grp_config --->> DAQmxCreateDIChan
    -- Configure group one as dual input ports, with no handshaking
GetNIDAQErrorString --->> DAQmxGetErrorString
    --self-explanatory
DIG_Block_PG_Config --->> DAQmxCreateDIChan
    --Configure for input via pattern generation mode
DIG_Trigger_Config --->> DAQmxCfgDigPatternStartTrig
    --set a mask trigger to start the transfer when a signal was received
DIG_Block_In --->> DAQmxReadDigitalU32
    --begin reading data
dig_block_check --->> DAQmxWaitUntilTaskDone
    --We had a loop checking to see if it was done, but now this method will just pause the program until it's done, right?
Align_DMA_Buffer --->> DAQmxSetDIDataXferReqCond
    --we were initially throwing all of the data directly from the board to the PCI bus (6533 board), but now are trying to hold it all on the 6534's onboard memory until the transfer completes. 
Get_DAQ_Device_Info --->> DAQmxGetDevProductType
    --We had a loop looking at all of the PCI slots until this returned information, then we knew we found our device's slot.  I think this method call within the loop will do the same?
 
 
I don't know if I've given enough information or not..... hopefully I gave enough for someone to understand what I was doing and to tell me I'm probably on the right track.  I'm ready to post more information if necessary.
 
Thank You,
MES

Message Edited by MES on 03-21-2006 11:10 AM

0 Kudos
Message 1 of 5
(3,104 Views)

Is this question too general/specific?    Should I have asked less?  What about this post makes it not worthy of a response like...  "sure," "definitely not," or "I'll look into it?" 

0 Kudos
Message 2 of 5
(3,068 Views)

Is this question too general/specific?    Should I have asked less?  What about this post makes it not worthy of a response like...  "sure," "definitely not," or "I'll look into it?"  Do I

0 Kudos
Message 3 of 5
(3,069 Views)

Is this question too general/specific?    Should I have asked less?  What about this post makes it not worthy of a response like...  "sure," "definitely not," or "I'll look into it?"  Do I just

0 Kudos
Message 4 of 5
(3,070 Views)
MES,

In the context of a given program, these function calls seem right for your application. I will caution you, however, that you often need to do more than function for function replacement when upgrading from Traditional DAQ to DAQmx. I would suggest taking a look at somet of the shipping examples to get a general idea of the task structure and program flow. The ReadDigPort-ExtClk.c example in the C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Read Values\Read Dig Port-Ext Clk directory should yield a good starting point. You will also have to add start triggering (before calling Start Task), transfer conditions, etc. You may also want to check out some links in this KnowledgeBase to ease your transition. Note that several of the DAQmx LabVIEW links apply just as well to text-based programming - the DAQmx driver structure is the same. Please have a look at the example and let us know if you encounter any difficulty converting your existing code to DAQmx.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 5 of 5
(3,059 Views)