Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 6 occurred at GPIB Write

 

Hi

 

I am trying to code a Labview driver for my HP4275a LCR Meter in order to perform CV sweeps. I have already achieved this in C++, but my professor would prefer a Labview driver.

 

The GPIB does not seem to initialise properly most of the time. Sometimes Labview connects to the meter properly, but most of the time i get an "Error 6 occurred at GPIB Write" using the GPIB write command. This can sometimes be solved restarting the meter. However, nothing seems to make it work consistently.

 

I have tried looking at the Knowledge Base article:

 

http://digital.ni.com/public.nsf/websearch/2FA525A8585A92E9862566EE002A3755?OpenDocument#EABO 

 

I've tried various termination characters. Also the commands that I send work some of the time in Labview and all of the time in C++, so the commands are not the problem. The timeout can be set to any length of time with no improvement.

 

I got around this problem by using the following C++ code: 

 

int pna=ibdev(0, 17, 0, T10s, 1, 0);

ibclr(pna);

 

This clears the meter and commands can then be sent successfully all the time. However, I cannot reproduce this in Labview. I've tried using the initialisation and clear commands at the beginning of the program, but these seem to make no difference.

 

Any help kindly appreciated. 

 

 

 


 

 

 

0 Kudos
Message 1 of 5
(3,624 Views)
Do you see the same problem with the existing driver? Granted, it's old and unsupported but it's a place to start.
0 Kudos
Message 2 of 5
(3,619 Views)

The driver database VI does not seem to suffer from the same issue. This led me to clone the commands from the driver database VI into my own VI, which resulted in the issue reappearing.

 

I therefore wondered if there was something outside the block diagram which had an influence. However, putting a new block diagram into the driver database VI caused the problem to reappear. Ergo: I have no idea.

 

As I explained, the C++ commands in my previous post reboot the meter which results in a 100% success rate. I just need to reproduce these commands in Labview, I think. 

0 Kudos
Message 3 of 5
(3,606 Views)
Well, if the existing driver works, perhaps you should be using that.

Why don't you attach your code?
0 Kudos
Message 4 of 5
(3,600 Views)

Adam Craig wrote:

As I explained, the C++ commands in my previous post reboot the meter which results in a 100% success rate. I just need to reproduce these commands in Labview, I think. 


There is nothing special about the ibdev( ) and ibclr( ) functions.

If you want to use them, they are available in LabVIEW under the Instrument I/O -> GPIB

Use GPIB Initialization for ibdev( ) and GPIB CLR for ibclr( ).

0 Kudos
Message 5 of 5
(3,592 Views)