NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the double circular buffer, is the all DAQ memory or only the buffer I defined in DIG_Block_Out ?

Hi guys,
I didn't understand What is the exact relations between DIG_Block_Out and DIG_DB_Transfer ?
Is the Buffer in DIG_DB_Transfer is half of the double buffer size,defined in DIG_Block_Out ?
If yes why? Is there any conection between them?
Thanks In advance
0 Kudos
Message 1 of 3
(3,153 Views)
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_Transfer
For 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_Config
Configures the specified group for port assignment, direction (input or output), and size.

DIG_Block_Out
DIG_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 Smiley Wink
Message 2 of 3
(3,153 Views)
Hello;

See
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

Regards
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,153 Views)