PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA PCI driver with interrupt detection

Solved!
Go to solution

Hello everyone,

 

I am new to PCI and PCI driver, encounter an problem when use the NI-VISA to program a PCI driver with the interrupt detection.

 

Here is the situation:

 

This PCI card is made of two chips : the PCI9030 pci bridge chip and ET1100 chip (the local chip that connected to PCI9030). The memory of ET1100 is mapped 1:1 to the PCI9030 memory starting at BAR2. Now I want the PCI card generates an interruption when the content of register at offset 0x221 changes.  

 

Capture.JPG

 

I add the interrupt detection (see the figure above or the attachment), interruption removal and disarm following the guide "Using the NI-VISA Driver Wizard and NI-VISA to Develop a PXI(e)/PCI(e) Driver in Windows". However, when I completed and installed this driver in the LabVIEW RT OS, the system can recognize the card, but cannot generate the interruption when the register at offset 0x221 changes, therefore does anyone tell me the reason ? Or tell me how to program this driver using NI-VISA?

 

Any suggestions is welcome.

 

And Thank you in advance:) 

 

0 Kudos
Message 1 of 12
(7,991 Views)
Solution
Accepted by topic author XiaolinAtUB

Hi,

 

What Application development environment are you using? If you are using LabVIEW, there are some additional considerations you will need to keep in mind: http://www.ni.com/white-paper/3789/en/#toc6

 

Have you been able to get the interrupt working in Windows?

 

 If you can post some code that would also be helpful. 

 

I was going to reccomend that you post to the Instrument control board, but I see you just did that. The PXI forum is typically used to post questions regarding PXI Controlelrs, Chassis, or Cards, 

Trevor B.
PSE
National Instruments
Message 2 of 12
(7,973 Views)

Hi Trevor,

 

Thank you for replying.

 

No one reply my post, I guess it may goes to the wrong place so I repost it here.

 

The application development environment I am using is the LabVEIW, and the application will run on the LabVIEW RT OS. I have got the driver for windows, unfortunately, it does not support the interrupion (the hardware itself supports the interruption, the windows driver just does not include the interruption function) , therefore I have to program the driver with interrupt detection and cannot migrate the windows driver to the LabVIEW RT OS.

 

I make the driver using NI-VISA, so it only generate the .ini and inf file and there is no code for the driver.  For the driver I want to detect the change of register at offset 0x220 at BAR2, but the driver fails to generate the interruption, because I can monitor the content of the regsiter at offset 220. 

 

I am working on the driver in the LabVIEW RT OS not the Windows, but I think making the interruption working in windows at first is an good advise.

 

Thank you,
Yan

 

 

 

0 Kudos
Message 3 of 12
(7,963 Views)

HI Yan,

 

As mentioned in that white paper I linked in my last message, the basic way to catch the interrupt is to use the VISA Wait on Event.vi to catch the interrupt. You may be missing the interrupt with the method you are using because the VISA driver will clear the interrupt automatically.

Trevor B.
PSE
National Instruments
Message 4 of 12
(7,944 Views)

Thank you, I have read it carefully again. I try both methods: the queuing method (namely using the Wait On Event.vi ) and the callback method. Neither of them works. So I am not sure whether the VISA driver can generate the interrupt. Do you have any advise to make sure the VISA driver can really generate the interrupt ?

 

One more question: the whtie paper says that the Real-time application must use the Queuing method. therefore does the real-time application support the callback methods ?

 

Thank you,

Yan

0 Kudos
Message 5 of 12
(7,934 Views)

HI Yan,

 

Other than putting an oscilloscope on the interrupt lines, I do not know how to make sure that the interrupt is actually being sent. 

 

Callbacks are only a C-Based language concept. LabVIEW does not have callbacks, so the only way to catch the interrupt is to poll the VISA driver as we discussed.

 

Trevor B.
PSE
National Instruments
Message 6 of 12
(7,914 Views)

Hello Trevor,

 

When I do the VISA driver, do I need to configure the PCI9030 PCI-bridge chip ? for instance, enable the PCI9030 interrupt ?

 

Thank you,

Yan

0 Kudos
Message 7 of 12
(7,876 Views)

Hi Yan,

 

I am not sure what you have to do with the PCI9030. Perhaps the documentation for that chip will be helpful. 

Trevor B.
PSE
National Instruments
Message 8 of 12
(7,844 Views)

Hi Trevor,

 

PCI9030 is an PCI-bridge chip, so I just wonder that does the NI-VISA  take care of the PCI9030 configuration automatically ? if so, I don't need to configure the PCI9030....

 

Thank you,

Yan

0 Kudos
Message 9 of 12
(7,840 Views)

Hello Trevor,

 

I saw the ISRs on the screen show below :

 

ISRs

 

My question is that : Does the percentage of ISRs go up if an VISA event/interrupt take place ? if so by observing the ISRs I can know whether the VISA-driver whether can generate a interrupt.

 

Thank you,

Yan

0 Kudos
Message 10 of 12
(7,649 Views)