07-01-2012 12:32 PM
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.
07-01-2012 01:26 PM
07-02-2012 04:38 AM
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.
07-02-2012 07:16 AM
07-02-2012 09:21 AM
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( ).