LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW, VISA, PXI interrupts.

Hi,
Where can I find a documentation or an example for PXI interrupts with VISA
in
LabVIEW?
Thanks.
Denys.
0 Kudos
Message 1 of 4
(2,973 Views)
Denys,

Interrupts in PXI function as same as a PC, so you may want to look for the info for common PC interrupts. There are some examples in your LabVIEW software and also right here in the Developers Zone, go to the link that says Resource Library in your left, then click on the link for "Search/Upload Examples"... and search for "interrupt", it will give some examples. Also you may search this Dev Zone for Interrupt programming documents.

Good Luck!...

Nestor Sanchez
Applications Engineer
National Instruments
Nestor
0 Kudos
Message 2 of 4
(2,973 Views)
Denys:

PXI documentation is a bit thin in the current release and we are improving it for NI-VISA 2.6. In addition to register accesses, NI-VISA supports the event VI_EVENT_PXI_INTR (0x3FFF2022) to provide notification to an application that the specified device has generated a PCI interrupt. This event allows a user to write an entire device driver or instrument driver at the user level, without having to write any kernel code. You use the same VISA event functions (Enable Event, Wait on Event, etc.) as you do for GPIB or any other hardware interface.

The only difference is that for PXI, the OS must associate your plug-in card with the NI-VISA kernel driver. Therefore, you have to create an INF file for your device. We have a utility that creates thi
s for you at Start>>Programs>>National Instruments>>VISA>>PXI Driver Development Wizard.

The wizard has you enter the register accesses that must be done in the kernel at interrupt time to determine whether your device is interrupting, and to squelch (temporarily turn off) the interrupt. This information is put in the INF file. Then at run time when this information indicates that your device has interrupted, a VISA event is created to notify your application.

Hope this helps,
Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 3 of 4
(2,973 Views)
Hi,

I have been struggling badly to try to implement this with PXI Wizard for a custom cPCI system, but I can't seem to get the OS (WIN98) to "squelch" the interrupt.(WIN98 eventually crashes after about 5 sec (watchdog timer??) due to this interrupt being "stuck on")..

From the documentation, it is not clear at all how to chain together these vi's but my assumption for my simple application is:
1. Open VISA Session
2. VISA Enable Event with 0x3FFF2022 (PXI Interrupt)
3. VISA Out32 (this write function generates an interrupt)
4. VISA Wait on Event
5. VISA Disable Event
6. Close VISA session

Two problems:

1. Using a bus analyzer, I can see that the interrupt READ/COMPARE command that I called out in the PXI Driver Development Wizard is
never invoked.

2. I see that I get a -1073807300 ("Insufficient System Resources to perform memory allocation") error as the result of the VISA Enable Event (set to PXI Interrupt), which is probably why #1 above never happens.

I have carefully followed "Using the PXI Driver Development Wizard and NI-VISA to Register-Level Program a PXI/PCI Device under Windows" (web enhanced version of App Note 185), but I just can't get it to work... Any hints or suggestions?? I put the *.inf file in the C:\Windows\system directory. Looks good in MAX and VISA Interactive Control (although I don't see any indications of any IRQs associated with it). Windows Control Panel sees it and reports interrupt 11...???

I have temporarily disabled the conflicting device that also uses IRQ11 (USB Controller) to prevent system crashes and I do my own READ/COMPARE to clear the interrupt.. But this is just a temporary work around...

Any help would be greatly appreciated....
0 Kudos
Message 4 of 4
(2,973 Views)