Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to develop the DIO function for 6230

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);
}

0 Kudos
Message 1 of 5
(7,848 Views)
Hi Jude,

This has been discussed before, and the NI forums have a great advanced search page [1] that will help you find the answer you're looking for. Putting '6230 623x' into the 'With one or more of the words' field, and then selecting 'Driver Development Kit (DDK)' from the 'Return only posts from' drop-down box will get you the information you need.

[1] NI Forums Advanced Search
http://forums.ni.com/ni/search?advanced=true
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 5
(7,831 Views)
Thank u Joe Friedchicken, i have seen some but i cannt make my 6230 work at all. I really dont know why.
0 Kudos
Message 3 of 5
(7,818 Views)
in that case, you should first make sure weather your 6230 card is working well in the MAX.
0 Kudos
Message 4 of 5
(7,801 Views)
The post you need to re-read [1] mentions writing to the Static_AI_Control[7] register to enable the DO buffer on the other side of the isolation barrier.

[1] Turning Reference attenuation off for AOs on 6230 is causing DOs not to work
http://forums.ni.com/ni/board/message?board.id=90&view=by_date_ascending&message.id=1266#M1266
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 5 of 5
(7,791 Views)