01-26-2010 03:41 AM
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.
Solved! Go to Solution.
01-26-2010 07:16 AM
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.
01-26-2010 07:47 AM
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
01-26-2010 08:59 AM
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.
01-27-2010 01:08 AM
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