Discussion:
AT-DIO-32HS: How to output 32 data bits with NO handshaking
(too old to reply)
Raminta
2006-12-12 18:10:10 UTC
Permalink
I can see in the examples how to OUTPUT 8 bits to a single port with no handshaking. But how do I output 32 bits to ports 0-3 in one coding statement, WITHOUT setting up any handshaking ?? It seems if I assign 4 ports to a group, then handshaking is automatically assumed.
 
Any help is appreciated !
Thank You !
Raminta
2006-12-14 14:40:14 UTC
Permalink
Hello !
 
I am writing a program in C++ using the TRADITIONAL NI-DAQ library. I want to be able to control the lines of PORT 4 individually  and programmatically, so my understanding, based on the documentation, is that I can NOT use GROUPS  in order to output 32 bits of data (and I don;t want to use BLOCK output because it is asynchronous). So yes, my solution for now will be to place the 32 bits if data on each of the 4 ports (ports 0-3) individually, and then raise the appropriate line in PORT 4. So in my code, I will have to have something like this:
 
Dig_Prt_Out(DEV_NUMBER, PORT0, BYTE0);             // place byte 0 of 32-bit work onto port 0
Dig_Prt_Out(DEV_NUMBER, PORT1, BYTE1);             // place byte 1 of 32-bit work onto port 1
Dig_Prt_Out(DEV_NUMBER, PORT2, BYTE2);             // place byte 2 of 32-bit work onto port 2
Dig_Prt_Out(DEV_NUMBER, PORT3, BYTE3);             // place byte 3 of 32-bit work onto port 3
Dig_Line_Out(DEV_NUMBER, PORT4, 1 /*line#*/, 1);   // let device know data is ready
 
What I would like to do is REPLACE the first 4 lines of the example above with a single statement, such as:
 
Dig_???(DEV_NUMBER, PORTS0123, BYTES0123);   // place entire 32-bits of data on all ports in a single programming statement
Dig_Line_Out(DEV_NUMBER, PORT4, 1 /*line#*/, 1);   // let device know data is ready
 
 
 
I am still learning how to use the NI-DAQ library, so I hope my question is not too basic. If this is still not clear, please let me know. I appreciate your help !
 
 
 

Loading...