예제 #1
0
void DTFUN::InitBoard( const char *board_name, bool new_outputclockonusercounter )
{
    UINT    uiElement;
    UINT    uiBits;

    outputclockonusercounter=new_outputclockonusercounter;

    SetBoardName(board_name);

    lpszName= BoardName;  // "BCI_IN";
    lphDev = NULL;
    uiElement= 0;

// initialize this board
    status= olDaInitialize( lpszName, &lphDev );

// get a handle to the A/D subsystem
    status= olDaGetDASS( lphDev, OLSS_AD, uiElement, &lphDass) ;

// do we want to output the sample clock onto the user counter pin?
// (this user counter pin is used as an A/D sample clock input for this board
// and can also be used to synchronize boards
    if (outputclockonusercounter)
        status= olDaGetDASS(lphDev, OLSS_CT, 0, &lphDassCT);

    uiDataFlow= OL_DF_CONTINUOUS;
    status= olDaSetDataFlow( lphDass, uiDataFlow );

    iMsg= status;

    status= olDaGetResolution( lphDass, (LPUINT)&uiBits );
    ADSize= (int)uiBits;
}
예제 #2
0
BOOL OctopusLaser::OnInitDialog() 
{
	CDialog::OnInitDialog();
	ECODE status = NULL;
	TRACE("Initializing OctopusLaser\n");
 
	hdrvr_9812 = NULL;
	hdass_9812_DAC = NULL;
    status = olDaInitialize(PTSTR("DT9812(00)"), &hdrvr_9812 );	
    if (status != OLNOERROR)
	{
	  TRACE("Error: %lu\n ",status);
      AfxMessageBox(_T("Connect to DT9812 board failed.\nHave you plugged it in and turned it on?"));
	}
	status = olDaGetDASS( hdrvr_9812, OLSS_DA, 1, &hdass_9812_DAC );
	status = olDaSetDataFlow( hdass_9812_DAC, OL_DF_SINGLEVALUE );
	status = olDaConfig( hdass_9812_DAC );
	if( status != OLNOERROR  ) 
	{
		TRACE("Error: %lu\n ",status);
		AfxMessageBox(_T("Error at Subsystem DAC"));
	}
	return TRUE;
}