Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB read error

Hi All,
 
I am working on the GPIB for the first time,I am controlling the power supply using GPIB.
 
I am finding it difficult to read the powersupply voltage , I can easily write into powersupply any value.
 
Whenever I test for writing and reading, I will get File I/O error.
 
I am attaching the code for the reference.
 
Thanks in advance.
0 Kudos
Message 1 of 6
(4,228 Views)

Without the commands you are sending and the make and model of your instrument, it's next to impossible to say what might be wrong. IYou need to provide that information.

Did you do a search for an existing driver for the power supply? You can go to your Tools menu and select Instrumentation>Find Instrument Drivers. You could also go straight to http://sine.ni.com/idnetwork/. If you don't find a driver, you should debug the commands/queries in MAX first before writing any code.

I would also recomend that you use VISA instead of the lower level GPIB functions. You'll have a more portable program if you do. If you stick with the GPIB functions, there is no reason to do the initialization every time.

0 Kudos
Message 2 of 6
(4,214 Views)

Hi,

A bit of a messy VI., you dont need to use the Sequence Frame especially as your linking your vi's with the error in / error out.

But to see if you write and read are working, send *idn? with the byte count at least 200. Assuming your instrument response to *idn? you should get the instrument name, model, version etc.

Secondly, you might just try the example supplied with labview for GPIB. "LabVIEW - GPIB.VI".

Finally, try looking for the instrument driver as Dennis suggested.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 6
(4,207 Views)
Hi,
 
One more point,
 
Your VI sends some data to the instrument and after a small delay performs a Read.
 
Well most power supplies and other instrument do not response to the same command with the Send and Read.
For the Send you might use VOLT 25, to set the voltage level but you wouldn't perform the read after this command.
To ask the power supply for its setting you would send MEAS:VOLT? then perform the Read and expect the value 25.0 back.
 
You will notice that the ? at the end of the string is a good indication that your instrument will return some data.
 
These are only examples so don't expect these commands to work for you as you didn't say what Power Supply you are trying to programme.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 6
(4,205 Views)
Hello Ray,

In saw your previous posts for controlling the power supplies... they seems to be very useful, in our project i are using the below mentioned power supply

http://www.tti-test.com/products-tti/text-pages/psu-ql-series.htm

As you mentioned in the previous posts, for the above mentioned power supply, the GPIB address is 7 & if is enter that address & these characters *IDN? then its
displaying the name and model of the power supply. So far so good

But my specific question is where can i get the commands for setting the voltage ,current etc, reading back them...
I was trying to find the commands but couldn't. Can you please help me out.

Thanks
Basha
0 Kudos
Message 5 of 6
(4,166 Views)
At the web sit you posted, there is a link to a support page and on the support page it says that drivers and manuals are available. Since the vendor is the first place you should look for programming manuals, did you even try that? I think the drivers they wrote are also available at http://www.ni.com/devzone/idnet/.
0 Kudos
Message 6 of 6
(4,155 Views)