LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB commands - Send separately or all at once?

I am just curious as to whether there is a general rule of thumb or what the pros and cons are of each method (as far as time and robustness). If it is possible to send multiple SCPI commands over the GPIB using a single call of VISA write, it it better to do it this way or to send each command independently. I am most interested in time and robustness benefits. Thanks for your help!

 

-Anthony

0 Kudos
Message 1 of 3
(4,772 Views)

Check your instrument documentation about the syntax of multiple commands. A common method is to separate them with a ';'.

 

I have not done any benchmarking in a while. Using a single write is a bit faster but not sure whether you would notice it.

0 Kudos
Message 2 of 3
(4,770 Views)

By sending combined commands you can improve throughput in two ways.

 

First- you make one call to the VISA API so the machine only needs to go through the VISA overhead once (not a lot of CPU usage but it does save some)

 

More importantly, you can send fewer characters over the GPIB interface.  not all commands need to transition all the way to root";" so multiple commands only need to navigate to the nearest common branch. For Example: "Trig:Sour imm;Trig:lev 1.0" is identical to "Trig:Sour imm:lev 1.0" semi colon transitions to root colon backs up 1 level of the command tree 


"Should be" isn't "Is" -Jay
Message 3 of 3
(4,758 Views)