Age1439_init – Agilent Technologies VXI E1439 User Manual

Page 142

Advertising
background image

132

Agilent E1439 Programmer's Reference

Functions listed alphabetically

age1439_init

Initializes the I/O driver for a module.

VXIplug&play Syntax

#include "age1439".h

ViStatus age1439_init(ViRsrc rsrcName, ViBoolean idQuery, ViBoolean resetInstr,

ViPSession id);

Description

age1439_init must be the first routine called when you use the Agilent E1439 library. It
establishes communication with the module and returns a module identification which is used
with all subsequent functions involving this module. This function performs whatever
initialization the I/O driver needs for the environment in which this library is running.

Parameters

id

is a pointer to the VXI instrument Session identifier returned by this function for the module. This
identifier is then used with all other functions which address this module. This value is not a
VISA id and so cannot be used with VISA functions. Use

age1439_attrib_get

to get the VISA id.

idQuery

set to

AGE1439_MAG

verifies the identity of the instrument by checking the manufacturer ID

and model number in the module's VXI register set.

If set to

AGE1439_OFF

the function does not verify the module's identity. It is helpful to disable

the id query if you want to use the driver with a similar module but do not need to modify the
driver source code.

resetInstr

places the module in the reset state when set to

AGE1439_ON

.

If set to

AGE1439_OFF

, the function disables the reset. Disabling the reset is useful for

debugging in cases where resetting would take the instrument out of the state you want to test.

rsrcName

specifies the interface and logical address. This descriptor varies depending on your I/O library.

An example of the descriptor form for the VISA I/O library is:

VXI[Board]::VXIlogical address [::INSTR]

Comments

If you receive a resource descriptor error, see your I/O library documentation to determine the
correct descriptor form.

Return Value

AGE1439_SUCCESS indicates that a function was successful.

Values other than AGE1439_SUCCESS indicate an error condition or other important status
condition. To determine the error message, pass the return value to

“age1439_error_message” on

page 102

.

Advertising
This manual is related to the following products: