11-18-2009 09:05 AM
I want to use the DIO function of 6230, the next part is the sub function i used ,but it didn't work yet .i don't know why ,i just want all DO port give a high Voltage.
can any body give me some example? thank you very much.
void Cpci6230::DOUT()
{
// create register map
tAddressSpace _bar1;
tMSeries *_board;
_bar1 = bus->createAddressSpace(kPCI_BAR1);
_board = new tMSeries(_bar1);
// ---- Start DIO task, Port 1 DO, Port 2 DI ----
_board->PFI_Output_Select_1.writeRegister (0x4210);
_board->PFI_Output_Select_2.writeRegister (0x4210);
_board->PFI_Output_Select_3.writeRegister (0x210);
_board->PFI_Output_Select_4.writeRegister (0x000000);
_board->PFI_Output_Select_5.writeRegister (0x000000);
_board->PFI_Output_Select_6.writeRegister (0x00);
// ---- Write to port ----
_board->PFI_DO.writeLowerPort (0xC0);
_board->PFI_DO.writeUpperPort (0x03);
//printf ("\nDIO test\n");
//cleanup
delete _board;
bus->destroyAddressSpace(_bar1);
}
11-20-2009 08:42 AM
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)
11-21-2009 07:41 AM
11-23-2009 12:52 AM
11-23-2009 01:22 PM
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)