Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does ibrd sometimes take 50 - 60 ms to return.

The following is code that I am using to communicate with a power analyzer:

ibwrt(PowerAnalyzer, "OD", 2);

ibrd(PowerAnalyzer, tempstring1, 55);
ibrd(PowerAnalyzer, tempstring2, 55);
ibrd(PowerAnalyzer, tempstring3, 55);
ibrd(PowerAnalyzer, tempstring4, 55);
ibrd(PowerAnalyzer, tempstring5, 19);
ibrd(PowerAnalyzer, tempstring6, 4);

The data inside tempstring1-6 looks great, but sometimes these calles take less than 1msec, other times they take 50 - 60msecs.

Thanks for the help
Mark
0 Kudos
Message 1 of 2
(3,084 Views)
The time it takes between an IBRD's instantiation to its completion is dependent on how the communication is terminated. If you are depended on EOI then execution time is dependent on how long the instrument takes to properly assert the EOI. You may be seeing cases where the instrument is taking excessive time to generate a response to be read. You may be able to distinguish if there is a timing issue with your instrument using the board level and multiline interface messages to manually address the bus in order to cut back on some of the overhead.
0 Kudos
Message 2 of 2
(3,084 Views)