Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB control of Rohde and Schwarz receiver

Hello. I am using GPIB from VB6 to setup and read a Rohde and Schwarz ESVS30 receiver. I can set the instrument to perform a frequency sweep, measuring voltage as it goes along and returning the measurement data in blocks during the sweep. This works fine. There is an LED on the receiver that indicates when a results data transfer is taking place. For the first six block transfers the LED flickers on and off so fast it is barely noticable, but from the seventh transfer the LED remains on for about 1.5 seconds and it is clear that transfers have slowed drastically. If I perform a second sweep all of the transfers are now slow. Switching the receiver off then on again does not clear the problem, but if I exit the program then start it again I get six more fast transfers before it slows down again. This happens both from the VB6 IDE and from a compiled exe version of my program. The relevant lines of code are:-

strRead = space(2000)
Call ibrd(intDescriptor, strRead)

There is then some code that deals with the contents of strRead and the whole thing is in a loop that cycles until the sweep is complete. strRead is declared as a string in the public sub. I belive that I have the newest (but quite old!) versions of NIGLOBAL and VBIB32 in my software. If anyone can shed any light on this behavior I'd be very grateful!

0 Kudos
Message 1 of 2
(2,005 Views)

strRead = Space(2000) creates a string with 2000 spaces.

Not sure how ibrd uses it.

I suspect that you need to investigate what happens when you keep calling ibrd.

It's been a while since I programmed in VB6.

 

.

0 Kudos
Message 2 of 2
(1,983 Views)