09-24-2019 07:05 AM
Hi everybody,
I've had this error 'Timeout expired before operation completed' at the vi GET Video BW.vi.
I've searched for solution through Google and got a tips that adding a wait sequence,
between VISA Write and Read as shown in RSFSU Initialize.vi below.
But I still have the same error 'Timout...' popped up.
Anyone at this forum knows how to solve it.
I included too avi for Get ResBw.vi.
Regards,
/mctnnn
09-24-2019 07:32 AM
If you are getting an error in the Get Video BW.vi, why are you editing the Initialize VI? What driver are you using? What instrument are you trying to talk to?
09-24-2019 07:44 AM
Thank you for your reply.
I use a computer remotely to work with spectrum analyzer.
As I understood the Initialize VI must be used to fetch things such as
start-, stop-, center frequency, and resolution- respective video bandwidth.
I've read by searching around that one of the reasons one gets error message 'Timeout...',
could be the VISA Write and Read are needed more time.
Instrument drivers from Rohde&Schwart and NI VISA 17 are used for a old spectrum analyzer.
A computer is used to talkt to spectrum analyzer via GPIB bus.
/mctnnn
09-24-2019 07:50 AM
When you add the Wait function, you're delaying the Read relative to the Write operation. This is only relevant if the specific Read that you're delaying is the one that times out (and that given more time, it would not).
Probably increasing the timeout is a simpler solution here, but if you want to try what you're demonstrating in the opening post, you need to determine which operations are timing out. Use of error probes, or carefully reading the error message call chain, should help with this.
Highlight Execution might also help show where problems occur, but will change the timing of your system and so might create false problems or hide real ones.
09-24-2019 07:51 AM
Hi,
can you record the IO trace of the communication?
09-24-2019 01:01 PM
Does your *IDN? have a termination character at the end of it? From what little I can tell form a screenshot, I believe you forgot it.
09-25-2019 01:49 AM
Thank cbutcher for your reply.
You're right, the Wait function in this case seems do not have the effect as I wanted.
I got the same error message regardless Wait function was included or not.
I may have not been put the Wait function at the right place.
I will try the suggested solution you mentioned and be back.
Kind regards,
/mctnnn
09-25-2019 01:53 AM
Hi RavensFan,
Is it the termination character at the end of a command or which one
I need to have for?
'\r' : carriage return
'\n' : line feed
'\r\n' : end of line
*IDN?\n
*IDN?\r\n
/mctnnn
09-25-2019 02:06 AM
Hi MM_RohdeSchwarz,
The RSFSU Initialize.vi which I've downloaded from RS website,
and together with Get Res Bw.vi are a part of a bigger vi.
I think the extra Wait function which I've put in between VISA Write and Read in the RSFSU Initialize.vi is not the righ way to do here.
I'll download some open source program to record the screen and be back to you later.
Regards,
/mctnnn
09-25-2019 04:29 AM
Hi mctnnn
it is better if you record the I/O communication. From the screen recording you can not see all the details. Here is a small tutorial on how you start and record the IO Trace with NI VISA:
https://www.rohde-schwarz.com/driver-pages/remote-control/3-visa-and-tools_231388.htm
BR
Milo