Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

6230 DIO programing hoping the helper

I want to use the DIO function of 6230 ,i used the following function,but  the printf() function give me  0XFF ,and the port of  the card 6230 did give me high voltage. can any body tell me why?

thank u very much.

 

 

function DO_out ()

 tAddressSpace  _Bar1;
 tstaticDIO *_board;
 
 _Bar1 = bus->createAddressSpace(kPCI_BAR1);
 _board = new tstaticDIO(_Bar1);

 //Configure Digital lines of Port 0 as Output
 //_board->IOSelect0.writeDirection(_board->IOSelect0.kDirectionOutput);
  
 //Write 0x01 to the port 0, output can be checked by putting a break point.
 _board->IOPort0Data.writeRegister(0xC0);
 _board->IOPort1Data.writeRegister(0x03);
 printf("\nWriting to Port 0...\n");


 //Read the digital pattern.
 //uPattern = _board->IOPort0Data.readRegister();

 printf("_board->IOPort0Data.readRegister() is 0x%x \n",_board->IOPort0Data.readRegister());
 printf("_board->IOPort1Data.readRegister() is 0x%x \n",_board->IOPort1Data.readRegister());


 delete _board;
 bus->destroyAddressSpace(_Bar1);

}

0 Kudos
Message 1 of 2
(6,494 Views)

Please see my reply in your other thread:

 

how to develop the DIO function for 6230

http://forums.ni.com/ni/board/message?board.id=90&view=by_date_ascending&message.id=1669#M1669

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 2
(6,479 Views)