LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SRQ using VISA

Hi all, 

 

I've made a QMH-type program which asynchronously reads data from multiple instruments in my lab, and processes it. There is an asynchronously running VI in the program which continuously waits for SRQs, and notifies the individual instrument-reading VIs when to check the status bytes of their instruments for data ready. 

 

So far I've been using the IEEE 488.1 GPIB functions to communicate with the instruments, because a lot of them are very old, and also because all of the other programs that were currently being used worked in the same way. However, we bought a new agilent GPIB card, and it appears I will have to use NI VISA to be able use it with LabVIEW.

 

I was wondering if there was a simple way to do what I've described above using the VISA functions? It seems to me that the wait on event function only works for a single VISA resource session, but if I want to replace the GPIB functions using my old code it would be better to have something to monitor all of the addresses at once.

 

(It may be that I'll have to rewrite the code to have the SRQ-monitoring for each session in their respective VIs?)

 

Hopefully my question makes sense.

 

Thank you in advance!

0 Kudos
Message 1 of 11
(5,222 Views)

@smallmediumlarge wrote:

 

 However, we bought a new agilent GPIB card, and it appears I will have to use NI VISA to be able use it with LabVIEW.

 

Why? 
And why would you buy an Agilent/Keysight GPIB card when you are using LabVIEW?
0 Kudos
Message 2 of 11
(5,219 Views)

To my best understanding, because as you pointed out they're from different manufacturers, LabVIEW has some compatibility issues with the agilent board. Basically, the NI utilities can't even see the Agilent board unless you change some settings.

 

You can still use the board in LabVIEW and MAX by enabling the NiVisaTulip.dll Passport, which allows NI-VISA to automatically find the device. I've tested this and VISA works with the card. However I found no documentation showing that I could use the 488.1 GPIB functions, and indeed, as it is I get an "error in connecting to GPIB device". Maybe there is some way to use the old functions and I just don't know how, but either way it would probably be beneficial to switch to VISA in the long run.

 

As to why, it's not really relevant. I do need to make it work though. 

 

 

0 Kudos
Message 3 of 11
(5,198 Views)
No, you cannot use the low level GPIB functions since they are specific to NI controllers. One of the reasons for VISA is portability so enable the tulip support and do the switch.
0 Kudos
Message 4 of 11
(5,179 Views)

@smallmediumlarge wrote:

 

 

As to why, it's not really relevant. I do need to make it work though. 

 

 


Not relevant? I hope you weren't in the decision making step.

 

I would say it is highly relevant given the requirement of compatibility with NI-488.2

0 Kudos
Message 5 of 11
(5,160 Views)

Thank you for your reply. I had already enabled tulip, and am now trying to figure out how to make VISA work with my old program. Do you know of any way to reproduce the old GPIB functionality of monitoring several resources for service requests at the same time using GPIB Wait? 

0 Kudos
Message 6 of 11
(5,158 Views)

@nyc_(is_out_of_here) wrote:

@smallmediumlarge wrote:

 

 

As to why, it's not really relevant. I do need to make it work though. 

 

 


Not relevant? I hope you weren't in the decision making step.

 

I would say it is highly relevant given the requirement of compatibility with NI-488.2


 

Sorry, I meant I don't believe it's relevant to my question about how to use VISA.

 

I'm aware there are compatibility issues, and that's partially why I'm asking this question.

 

Incidentally, I wasn't included in the decision making step, and there was no rationale behind buying the Agilent board besides not being aware of the compatibility issues. We're also deciding whether or not we should just send back the board and order a different one from NI. It would be more optimal this one would work.

0 Kudos
Message 7 of 11
(5,151 Views)

@smallmediumlarge wrote:

 We're also deciding whether or not we should just send back the board and order a different one from NI. It would be more optimal this one would work.

The costs of the boards will be similar.

 

There will additional time not sure how long to update the software. TIme = $$$

So I am not sure what is "optimal" about keeping the Agilent/Keysight board.

 

It is a no-brainer to me which way I would go especially given that you are using LabVIEW and not VEE.

0 Kudos
Message 8 of 11
(5,142 Views)

I see your point.

It would only be optimal if there was an easy answer to my question regarding SRQs, because it wouldn't take too long then to fix up my code with VISA. We are planning to use it pretty soon, which is why changing my program seemed like the easier alternative. 

 

 

But nonwidthstanding any argument about use of the Agilent board, do you know any workaround for the VISA issue? Everywhere I look, it seems to be the preferred API because of its compatibility characteristic. 

 

My impression was that VISA, despite being 488.2, still had all the functionality it needs to properly communicate with 488.1 instruments. I may be wrong, but that's why I'm looking for help.

 

 

0 Kudos
Message 9 of 11
(5,131 Views)

A few years ago I worked with some rather ancient HP not Agilent counters.

I had trouble using NI-VISA. I had to resort to NI-488.2

 

I cannot imagine how much more problematic it will be for 488.1

 

I had an NI GPIB card.

0 Kudos
Message 10 of 11
(5,113 Views)