LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you access the BIOS software interrupts?

I need to be able to access the PCI configuration registers for a card. I have access to proven software that does this but it uses the DOS software interrupt function and I can't find this capability in CVI.
0 Kudos
Message 1 of 5
(3,652 Views)
I would recommend using NI-VISA for this purpose. Check out this document for more information.

Bilal Durrani
NI
0 Kudos
Message 2 of 5
(3,642 Views)

That definitely looks like the proper way to go, a little involved but thorough.

Is there another way? I have a proven documented application available to me that works under a DOS using the interrupts and I was hoping to reuse the code by replacing the interrupt calls with something CVI understands and I'd be done in a half hour versus a few days for a totally new application.

We have a few custom cards that are FPGA controlled I/O that we will be controlling with simple I/O register accesses and no interrupts. All I supposedly need to do is get the base address then use the offsets from that to communicate with the FPGA.

Thanks.

0 Kudos
Message 3 of 5
(3,638 Views)

Howdy ljstrick,

 

Using NI-VISA is the recommended method of doing that low-level programming. If you don't want to use that method, you might check out the KnowledgeBase Register Programming a PCI Device and Finding the Correct Address.

 

We do have some low-level functions that can be found in the Library Tree under the Utility Library. Specifically check out the Port IO and Physical Memory Access categories. 

 

For further information on low-level programming inside LabWindows/CVI, select Help >> Contents; Type register-based in the Index tab; Notice there is a whole section discussing register-based communication. 

 

Hope this helps!

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 4 of 5
(3,619 Views)
If you are planning to access any kind of hardware under a modern Windows OS, you need to look into creating kernel-mode drivers. DOS was a much simpler OS that did not use concepts like kernel/user mode and any code that was designed for DOS will not work on Windows XP/2k without a significant rewrite.

VISA provides a kernel-mode driver with a user mode API that was designed for the kinds of tasks you require. And we do our best to ensure that the API does not change over the years. So once you make that initial port, you won't have to worry about changing the code for the next Windows OS.

You can also try using the low-level driver that ships with CVI. Looks for functions like ReadFromPhysicalMemory() under the Utility library >> Physical Memory Address. This might be a simpler workaround than VISA. These functions won't assign a base address to the device though. Some kind of device driver will be required for the I/O boards to be detected by Windows. VISA lets you do this.

But just a heads up. The CVI low-level API will not work for Vista because of the way Vista is implemented. VISA will continue to work for Vista.

Hope this helps.


Bilal Durrani
NI
0 Kudos
Message 5 of 5
(3,584 Views)