Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DIO96 - Port I/O calls (_outp(...) & _inp(...) ) result in 'Priveleged Instruction' exception on win2k... workaround?

Please don't tell me I need to write a device driver!
0 Kudos
Message 1 of 3
(4,035 Views)
Hi,
maybe this is a stupid answer, BUT: why don't you use the NI-DAQ functions DIG_In_Prt() and DIG_Out_Prt() to address your DIO96 ? Using the ANSI C port in and out functions forces you to address directly the device, instead of using a higher level programming. I worked with the above functions and they allow simple I/O on ports and lines quite easily. If your concern is instead to obtain higher throughputs, maybe the DIO96 is not enough efficient, and you should switch to a DIO-32HS board.
In addition, to use the inp() and outp() functions under WinNT (and Win2K is designed on WinNT) it is necessary to load the low-level support driver.
Hope this helps....
best regards,
Marco
0 Kudos
Message 2 of 3
(4,035 Views)
I agree that using NI-DAQ greatly simplifies the programming process. However, if you are interested in this topic, you might want to check out the Knowledge Base Titled "How Can I Access Hardware Registers or Implement In Port and Out Port on Windows NT? How Can I Read or Write Physical Memory?"

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/62790c9621f599cf8625659f0068e6e9?OpenDocument

It also has a link to Port and Memory Utilities for Windows which includes a dll written in LabWINDOWS/CVI that can be used in LabVIEW.
0 Kudos
Message 3 of 3
(4,035 Views)