duplicate entry - check out the digital I/O group at
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000005F620000&USEARCHCONTEXT_CATEGORY_0=_31_%24_12_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_31_%24_12_&UCATEGORY_S=0
DIG_DB_TransferFor an input operation, DIG_DB_Transfer waits until NI-DAQ can transfer to a second buffer half the data from the buffer being used for double-buffered digital block input. NI-DAQ passes this second buffer to DIG_DB_Transfer. For an output operation, DIG_DB_Transfer waits until NI-DAQ can transfer the data from the buffer passed to the function to the buffer being used for double-buffered digital block output. You can execute DIG_DB_Transfer repeatedly to read or write sequential half buffers of data.You have to have setup with
DIG_DB_Config first
Enables or disables double-buffered digital transfer operations and sets the double-buffered options.and the group will have been setup with
DIG_Grp_ConfigConfigures the specified group for port assignment, direction (input or output), and size.DIG_Block_OutDIG_Block_Out initiates an asynchronous transfer of data from your buffer to a specified group. The hardware is responsible for the handshaking details. Call DIG_Grp_Config for the DIO-32F and 653X devices, or DIG_SCAN_Setup for the other devices at least once before calling DIG_Block_Out to select the group configuration for handshaking.In other words, DIG_Block_Out takes an specified amount of data, and throws it out using the current setup of the board, once initiated, the call to the driver returns, and program flow continues.
With DIG_DB_Transfer, you're relying on there being space in the buffer of data that has already been written, and the function call returns when the data has been transfered to the buffer - i.e. output is already occurring, and effectively you're just topping up the buffer so it can keep going.
Hope that helps
S.
// it takes almost no time to rate an answer