LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

interrupt control programmimg

Hi folks,

I am doing a project using labwindow and visa to capture some signal timing with DIO. I used the visa wizard to get the hardware driver for the windows system.Do I need to do the vxd or wmd low level interrupt control programming.

Thanks,

Samy
0 Kudos
Message 1 of 6
(4,031 Views)
Hi Samy,

I assume you are using VISA to access a PCI/PXI resource. Is that correct?

With VISA you don't need to write a kernel driver. VISA already handles the low-level operation.

In the Driver Development Wizard, you need to specify that the driver is going to support interrupts. Then you need to provide VISA with a sequence of actions that allows the low-level driver to a) detect that your device is the one interupting ("is this mine?" sequence); and b) to clear the interrupt condition ("How to squelch?" sequence).

These sequences are used by the primary interrupt handler (running in kernel mode). The VISA driver will them call your installed handler. The event handler does not run in interrupt context. It is another thread in the main process.


Hope this helps.

DiegoF
National Instruments.
0 Kudos
Message 2 of 6
(4,031 Views)
Hi DiegoF,

Thank you for your help.

You are right, I'm using VISA to access a PCI resource. About "provide VISA with sequence of action", your meaning is InstallHandle, Enablevent,Waitonevent and UninstallHandler. Is it right. Thanks again

samy
0 Kudos
Message 3 of 6
(4,031 Views)
Hi Samy,

No. The sequence you are describing is to install the event handler. The information to detect and clear the interupt has to be provided in the Driver Development Wizard. Check these tutorials out:

Configuring LabVIEW Real-Time and NI-VISA to Recognize a Third Party Device

Using the PXI Driver Development Wizard and NI-VISA to Register-Level Program a PXI/PCI Device under...


Developing a LabVIEW Real-
Time Driver for a PXI or Compact PCI Device


Porting a Windows PCI Device Driver to LabVIEW Real-Time


DiegoF
National Instruments.
0 Kudos
Message 4 of 6
(4,031 Views)
Hi DiegoF,

I have already checked the tutorials, it's very helpfull stuff to me. According to your description and tutorials, I wrote the interrupt sequence, the program can call interrupt enable, however, when program runs to wait interrupt, the onWaitEvent function return an error number, Is it meanig that my interrupt sequence still have some mistake? I really appreciate your help.

samy
0 Kudos
Message 5 of 6
(4,031 Views)
Hi DiegoF,

I got the result, every thing is working well. It's wrong that I added the viWaitOnEvent function to using interrupt callback fuction. Thanks again.

Samy
0 Kudos
Message 6 of 6
(4,031 Views)