Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB thru VISA. How the command queue works?

Hi,

 

The question above is triggered by the small project I currently on.

 

I need to do two things:

1. I need to control the PSUs by changing the voltage. That's trivial.

2. I need to check what is the current voltage set to. That' trivial as well.

 

But when I have to to check randomly what the voltage is set to whilst the PSU can receive the command to increase/decrease the voltage it gets complicated.

 

My questions:

1. Do I need to open two VISA sessions to the PSU or I can share one of it?

2. Does the GPIB will held the queuing and buffering of the commands or I have to using the semaphores?

3. Shall I use synchronised or asynchronised mode of the communication?

4. Shall I allow for session to be duplicated?

 

I'm using LV2011 + MAX

 

Many thanks.

0 Kudos
Message 1 of 3
(3,568 Views)

Hi MimiKLM,

 

 

To ensure that your application works properly, you need to make sure that the increase/decrease voltage command that you send needs to have completed before you send a query to monitor the current voltage of your PSU (I am assuming that however randomly you want to check the voltage, you wouldn’t want to query for the current voltage when there is a current increase/decrease voltage command that is being processed by your device). This means that you need to achieve synchronisation between these two commands. This would not needed if your PSU takes care of the synchronisation for you (some instruments have this feature). Have a look at the command synchronisation part of this white paper http://www.ni.com/white-paper/2927/en  which may help you with your application.

 

 

To answer some of the questions you have, you would not be able to open two concurrent VISA sessions to the same device and you have to explicitly code for your commands to be queued through command synchronisation unless the instrument itself takes care of this.

Thanks and Regards,
Supreeth.K

0 Kudos
Message 2 of 3
(3,497 Views)

Hi,

 

The link you send me was very good. Thanks. But the second part contains false satement.

 


@Supreeth.K wrote:

 

(...) To answer some of the questions you have, you would not be able to open two concurrent VISA sessions to the same device (...)


Of course you can have two (or even more) concurent VISA sessions to the device.

I've been writing some artice on this subject.

 

Finally, the problem has been solved but it costs a lot of effort to find out th way how to do this.

 

Hopefully, I write the article in nearest future. It was a lot of misleading information on the way to solve that.

 

 

0 Kudos
Message 3 of 3
(3,491 Views)