Chapter 3
Developing Your Application
©
National Instruments Corporation
3-3
The
History
window shows the result of the command execution, such as:
Return Status (0): Success.
Value = 0x4ff6
If the value ends with
ff6
, you have successfully read the National
Instruments manufacturer ID from the VXI/VME-MXI-3 ID register.
You may now want to read the configuration registers from other VXI
devices in your system using the command
vxiinreg
. This command
accesses only the upper 16 KB of A16 space. Try reading a register from
each device listed in the MAX configuration view. In this way, you can
verify that your VXI-8340 series can access each device in your VXI
system successfully.
You can also access VXI and VME devices configured in A16, A24, and
A32 address space by using the
vxiin
or
vxiout
commands. For more
information regarding VIC operation and commands, refer to the VIC
online help.
Alternately, you can use VISAIC to interact with your devices.
VISAIC lists the available devices, similar to what MAX displays.
By double-clicking on a given device, you can open a VISA session and
access the device through it. For more information regarding VISAIC,
use the right-click help available from all panels.
Programming with VXI
National Instruments provides two different programming interfaces
for accessing your instruments: NI-VISA and NI-VXI. NI-VISA is the
National Instruments implementation of the VISA API as defined by the
VXI
plug&play
standard. It is very useful in situations where you have
different types of instruments in your system (such as VXI, GPIB, PXI, and
serial devices) because the NI-VISA functions have the same interface.
NI-VXI is the National Instruments proprietary interface for
programming VXI instruments. Both NI-VXI and NI-VISA grant you
register-level access of VXI instruments as well as messaging capability
to message-based devices. With either interface you can service
asynchronous events, such as triggers and signals, and also assert them.
The best way to learn how to program with NI-VXI or NI-VISA is by
reviewing the example programs included in your software. In the
examples directory are examples for many different types of applications.