Hi,
I have a large application that handles communication with 5 devices. Three of these devices communicate using telnet via a terminal server. The other two devices are on a GPIB bus. The two GPIB devices are an Agilent 34970 data recorder, and a Chroma 61605 AC source. I am having problems reading data quickly from the Chroma 61605 AC source in the large application. The read time for 5 measurements (AC Voltage, Frequency, etc.) is ~45 seconds when in the large application. Each measurement consists of a VISA write and a corresponding VISA read. Both the VISA write & VISA read take ~4.5s to execute when in the large application. So, 4.5 seconds for each read & write for five measurements gives the 45s read time (4.5s*2*5=45s).
However, when I pull the measurement functionality out and put it into simplified code, taking all 5 AC source measurements takes ~ 90 ms. This is more along the time I was expecting for the read. I have tried setting all VISA reads & writes to asynchronous which didn’t resolve the delays.
A few more details that may or may not be important:
- I am dynamically calling the Vis that communicate with all the instruments
- I am reading from & writing to some of the instruments. When I do this I use a semaphore to ensure that I am not doing both at the same time
- The Vis that I call dynamically for communicating with Agilent recorders are reentrant because I spawn 1-4 instances depending on how many recorders I am communicating with
Thanks in advance for your help!
B