Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

An VISA program can be successfully run only for the first time。 For the second time, Timeout expired。

Solved!
Go to solution

I made a very simple VISA program to control a device。

 

For the first time, after restart the device,I can successfully run the program。No error appears.

 But if I run the program agian,Such error appears ------1073807339 occurred at VISA Write, Timeout expired before operation completed。

 

If I restart the device again, the program still can run, but only for the first time.  So, I need to restart the device again and again.

  

Thank you very much if you can give me some advice. 2.jpg

 

 

0 Kudos
Message 1 of 5
(4,476 Views)

First, verify that the instrument is supposed to return something with the command. The command is not terminated with a '?' like instruments that implement SCPI. The command does not look like SCPI though so your instrument may not use that standard.

 

If the command is supposed to return something, run an error query on the instrument to see if it thinks there is a problem with the command. Some instruments will not respond until the error buffer is cleared.

 

What is the make and model of the instrument. Providing that would help.

Message 2 of 5
(4,467 Views)

Many thanks to Dennis Knutson,

The device is a monochromator  made by Chromex.

(model---chromex  250is/sm  spectrograph / monochromator)

Command AE is used to adjust the slit of the monochromator, as shown in the manual(in the picture blow)

 

My problem is   the AE  command (and also other commands) can only be run for one time.

when I run the program for the first time , no problem, the device works well. It returns a '=' to read buffer.

But when I run the program for the second time, the device doesnot work.

 

The  discription of the AE command

 

command.jpg

0 Kudos
Message 3 of 5
(4,464 Views)
Solution
Accepted by laoda

The only thing I see is that there is a second read after the '=' character is obtained. This is the line labeled 'Wait for completed'.

 

You can use the VISA Interactive Control or the GPIB Interactive Control in MAX to test communication. The GPIB Interactive control uses the ibrd/ibwrt commands that you see in the example you posted.

Message 4 of 5
(4,461 Views)

Thanks a lot!  The problem has been solved.

Following your advice, I add another VISAread after the first  VISAread. Now everytiong is OK.

The results are shown below

 

AE1.jpgAE2.jpg

0 Kudos
Message 5 of 5
(4,423 Views)