VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

Using VISA and VXI interrupts

Hello All,
I am in the process of updating some Labview software that uses NIVXI to use VISA. I’m having trouble with one aspect of using interrupts. I’m using a type of bridge signal conditioning module that can be configured to generate an interrupt in case of an excitation error (either short or open). A system can have many of these modules, and in a multi-chassis system nearly unlimited. The way I handled this using NIVXI was to enable each module to generate an interrupt and sensitize the controller to listen for that interrupt. When an interrupt occurred, I got the LA from the status ID and went to that module to service the alarm. (Very neat and simple.) Using VISA, it appears that I have to open a session to each instrume
nt instead of to the interrupt level itself. This seems much more cumbersome than the old way. Does anyone know of a better way of doing this? I’m concerned of leaving the NIVXI calls in the program as NI has made it clear that the interface from NIVXI to Labview may not be supported in future releases.
0 Kudos
Message 1 of 4
(5,779 Views)
Hi rls,

I agree with your decision to use the NI-VSA API instead of the NI-VXI API. NI-VISA is generally easier to use because it takes care of some of the lower level functionality of NI-VXI. It is true that you will need to open a VISA session to each instrument with which you want to communicate. I understand that it may be cumbersome to write the VISA functions to communicate with each instrument. This situation demonstrates why instrument drivers are useful. I recommend you either download an instrument driver for you VXI instrument from the instrument manufacturer or write one yourself.
You could create a single function to open a visa session to your instrument and enable the interrupt. You would then call that function once for each instrument. Each
time you call this function, you will pass the VISA resource descriptor into the function to differentiate between instruments. Once all of the instruments are initiated, you can enable the interrupt on the controller.

Regards,

David Shatila
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(5,779 Views)
Enabling the interrupts on each instrument is fairly simple. It's the controller end that's giving me trouble. The only way I've been able to make interrupts work at all using VISA is like the example (VXI/VME Interrupt Event Handler) that ships with LabView. Open a session to the instrument that generates the interrupt then wait for the interrupt to occur.
It seems more logical to open the session to the controller and wait on it but I can't seem to make that work.
0 Kudos
Message 3 of 4
(5,779 Views)
Hi rls,

You are correct. You will need to wait on the interrupt for each instrument. This may sound cumbersome, but with little effort, this can actually be fairly simple to program. I recommend you build an array out of the VISA sessions for each instrument. You could then pass this array into a for loop with auto-indexing enabled. Inside this for loop, you would place your VISA Enable Event and your VISA Wait on Event.

Regards,

David Shatila
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,779 Views)