Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

53132A Instrument Driver

Hi,
I am using AG5313xA driver that is written by Karel Pisala (National Insturments). The driver was last updated on 5/28/2003. I have the following problems:
1) If I run for the first time and try to measure a signal that does not exist, the driver crashes (time out). I would expect  either error or a value of 0 Hz. I see on the counter display "HP-IB  -410" . This error would not be cleared unless I initialize the counter.
 
2) If I run for the first time and measure a frequency source (value say X Hz), then I would try to measure another source that is OPEN ( no singanl) the driver would report to me the previous value. This can cause my program to pass bad devices.
 
3) The problem in 2) exists even in the older driver. However, the older driver had another problem which is if the
 
4) I would like you to direct my to the right driver or if you have any suggestions to solve the problem that I am having.
 
Thanks,
0 Kudos
Message 1 of 6
(4,601 Views)

There are four different ag53132A drivers available. Which one are you using? When you say the driver crashes, how do you mean? If you get a timeout message, then that is a proper error. What function are you using to get the reading? Could it be a 'Fetch'?. A Fetch does not initiate a new measurement and that could be the cause of getting an old reading.

Also, if you want to clear an instrument error, usually all you have to do is run the error query function. As the function runs, it gets the information from the instrument's error queue and this will clear the queue.

0 Kudos
Message 2 of 6
(4,598 Views)
Dennis,
First, thanks for your quick response. I do not know which revision I have. It may help to cut and paste the header from the source file of the driver that I have. Here it is
 
/*****************************************************************************
 *  Copyright 2002 National Instruments Corporation.  All Rights Reserved.   *
 *****************************************************************************/
/*****************************************************************************
 *  AG5313xA Universal Counter Instrument Driver                              
 *  LabWindows/CVI 5.0 Instrument Driver                                    
 *  Original Release: 12. srpna 2002                                 
 *  By: Karel Pisala, ELCOM, a.s.                             
 *      PH. +420696996930   Fax +420696996921                             
 *                                                                          
 *  Modification History:                                                   
 *                                                                          
 *       August 12, 2002 - Instrument Driver Created.
 *
 *       December 3, 2002
 *         Changed:
 *            Flag IVI_VAL_NEVER_CACHE was set for attribute AG5313XA_ATTR_TRIGGER_LEVEL
 *       5/28/2003 - [AL] Set attribute IVI_ATTR_IO_RESOURCE_DESCRIPTOR
 *                        in initialize time.                                                                          
 *****************************************************************************/
Woud you please let me know where can I get the most updated driver for this counter.
 
To answer your questions;
 
1) You wrote "If you get a time-out message, then that is a proper error."
I am not sure. When you are running production you do not want to get a popup dialog box letting you know that there is a time out. All what I am doing is to measure a signal. If it is not there return a value of 0 or an error but not a message that tells me there is time-out error and if I need to break or coninue.
 
2) You wrote "Could it be a 'Fetch'?."
Yes you are right. Now I am using "ReadMeasurenent" function. I do look for a return error. If there is a time-out, I get an error back. I had to add DisableBreakOnLibraryErrors () function to prevent the popup dialog box.
 
I would like to know how can I set the measurement time-out.
 
3) Thanks for your information about clearing the error. 
 
4) Sometimes, when I try to initialize the counter after it generated an error, the initialization function fails. I would like to know if there is a function I can run to clear/reset all the devices connected to the GPIB bus before initializing any device on the GPIB bus. 
 
5) My last request is if you know of a driver for Agilent power supply N5747A for LabWindows.
 
Thanks for your help in advance.
 
0 Kudos
Message 3 of 6
(4,593 Views)

You are using the IVI driver. I had assumed that you were using LabVIEW with automatic error dialogs turned on. This sounds similar to your DisableBreakOnLibraryErrors (). This is probably normal for CVI but it has been a very long time since I've used CVI with an instrument driver. You might want to post this question to the CVI forum to see if there is any other way. I don't see any code in the driver itself that calls a pop-up.

You can try the viClear() operation.

No, I don't know if a LabWindows or IVI driver exists for the N5747A. Have you checked with Agilent?

0 Kudos
Message 4 of 6
(4,585 Views)

Dennis,

Thanks for the reply. When I used LabView in the past I did not have any troubles with any of the drivers I used. You guys are really good.

There is no drivers from Agilent or NI that I know of. I will try to post my question in LabWindows forum.

Again, thanks for your help. 

0 Kudos
Message 5 of 6
(4,583 Views)
Izzy,
      You might have seen this already, but here is the link to the 5313x drivers available on the ID net.  Also, here is a link to a LabVIEW 6.1 driver for the 5747.  As far as the bad readings that you are receiving, do they occur when you manually control the instrument?  Or when pass single commands?

Cheers,

NathanT
0 Kudos
Message 6 of 6
(4,571 Views)