Agilent Technologies

VISA and VXIplug&play: Illustrate the Use of Several Utility Functions Read Me

This sample program illustrates the use of several VXIplug&play driver utility functions using Microsoft® Visual Basic.

Date: October 2004

Version: 1.0

Language: Microsoft Visual Basic 6

Instruments: Oscilloscopes

OS Requirements: Microsoft Windows® 98 SE, NT® 4.0, ME, 2000, or XP

Additional Software: Agilent IO Libraries M.01.01.04 (or later)

hp548xx VXIplug&play driver Sample #2 for Visual Basic

To try this program sample, paste the code into the Declarations section of a form and then press F5 and click the form.

hp548xx_init
hp548xx_close
hp548xx_reset
hp548xx_revision_query
hp548xx_timeOut
hp548xx_self_test
hp548xx_error_message
hp548xx_error_query

Illustrates the use of several utility functions:

hp548xx_errorQueryDetect
Sets the driver to check the instrument for errors.

hp548xx_cmd
Sends a command string to the instrument. In this Sample, it sends a command which generates an error which then illustrates the use of hp548xx_error_query and hp548xx_error_message (in the vb_err ). It is also used to send a command that clears event status registers.

One of the most interesting things about this Sample is the error detection portion, most of the second half of the program. After trying it out, you might think that setting errorQueryDetect to true is a great idea! In fact, it's not a bad idea for the hp548xx, but beware of the potential performance impact. With errorQueryDetect set on, the instrument is queried at least once, if not several times, for all functions which access the instrument. If your application is sensitive to performance, this might make the application too slow.

One effective strategy is to create and debug your application with errorQueryDetect set on, then remove it and leave it off for production applications.

 

AGILENT PROVIDES THIS FREE SOFTWARE "AS IS". ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO ANY WARRANTY OF NON-INFRINGEMENT, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, REASONABLE CARE AND SKILL, AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Agilent shall not be liable in any way whatsoever for any damages of any nature arising from its use. In no event shall Agilent be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to: procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence or otherwise) except if caused by willful misconduct or gross negligence arising in any way out of the use of this software, even if advised of the possibility of such damage and if it has been ensured that such data can be reconstructed with reasonable expenditure from data material provided in machine-readable form.

Windows is a U.S. registered trademark of Microsoft Corporation.

Microsoft is a U.S. registered trademark of Microsoft Corporation.

Windows NT is a U.S. registered trademark of Microsoft Corporation.

Copyright © 2004 Agilent Technologies, Inc.


© Agilent 2000-2006