LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialization problems with 34970A on GPIB

Solved!
Go to solution

I have an executable, built in LabVIEW 7.1 that takes data from a 34970A and 34401A pair, using NI-488 comms.  I have no problems at all getting data. My problem - an intermittant one - happens during initialization of the 34970A.  The problem has persisted for some years.  I am using NI-VISA 3.1.

The problem is that the 34970A goes into Error during initialization, with a -113 error (Undefined header).  When single-stepping through the HP34970A Initialize.vi I can see that the error occurs as soon as the *IDN? query is sent to the 34970A via the VISA Write function.

Things I have tried: 1. Concatenated a Line Feed Constant to the *IDN? query.  2. Tried a later 34970A Driver.  3. Replaced the 34970A.  4. Replaced the trigger cable between 34970A and 34401A (although, as far as I can see, this is immaterial).  The only fix I have found is to power reset the 34970A.  Sometimes, this works.  In the attached picture, you can see where the *IDN? query is sent to the instrument.

 

0 Kudos
Message 1 of 6
(3,933 Views)

Hey JohnBoy,

 

Looks like the Undefined Header error message indicates that an improper command was sent to the device. You may want to monitor what commands are sent to the device to make sure those commands aren't getting corrupted anywhere in transmission.

 

 

Justin E
National Instruments R&D
0 Kudos
Message 2 of 6
(3,904 Views)
Solution
Accepted by topic author JohnBoy

Johnboy:

 

I think the problem is with the command sent before this one.  Maybe something left over in the send buffer that the *IDN? query command gets appended to, causing the equipment to get confused.  Time to break out NI SPY in MAX to check out what's going on.  🙂

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 6
(3,898 Views)

billko wrote:

Johnboy:

 

I think the problem is with the command sent before this one.  Maybe something left over in the send buffer that the *IDN? query command gets appended to, causing the equipment to get confused.  Time to break out NI SPY in MAX to check out what's going on.  🙂

 

Bill


Of course I run out of time to edit this message just as I am in the middle of editing it!

 

Anyway, thinking about it, I feel it must be a timing issue of some sort.  Agilent doesn't use flow control (i.e. *OPC? or something similar) in their drivers, so it could very well be that sometimes the instrument isn't done processing a command before another is sent.  This could result in the problem I mentioned above where two or more commands get jumbled together in the buffer.  Where I work, we wrote our own custom drivers to include *OPC? queries to ensure that the commands get acknowledged before proceding to the next one.

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(3,890 Views)

Hi billko

 

Your suggestion to use NI SPY was the key to solving this one.  I ran NI SPY simultaneously with the application and it soon showed a data corruption issue early in the dialog with the 34970A (as you suggested).  The fault was caused by dirty GPIB connectors (several contacts were dirty).  Because this equipment is connected to the PC only when required, the connectors have the opportunity to get dirty between-times. I'd never worked with SPY before, so I was pleasantly surprised how easy it was to use and how much information it gave me.  (I didn't run it from MAX).  The reason I haven't posted before this, is that this job is not run often, and I wanted to be sure I'd found the fault first.  Thanks!

0 Kudos
Message 5 of 6
(3,729 Views)

JohnBoy wrote:

Hi billko

 

Your suggestion to use NI SPY was the key to solving this one.  I ran NI SPY simultaneously with the application and it soon showed a data corruption issue early in the dialog with the 34970A (as you suggested).  The fault was caused by dirty GPIB connectors (several contacts were dirty).  Because this equipment is connected to the PC only when required, the connectors have the opportunity to get dirty between-times. I'd never worked with SPY before, so I was pleasantly surprised how easy it was to use and how much information it gave me.  (I didn't run it from MAX).  The reason I haven't posted before this, is that this job is not run often, and I wanted to be sure I'd found the fault first.  Thanks!


Glad to be of service!  LOL I forgot NI-SPY was a standalone app.  For some reason or other, I always associated it with MAX.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(3,723 Views)