VXI/VME/MXI/PXI Application Development
Primary Software: Driver Software>>NI-VXI/VISA
Primary Software Version: 3.2
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: VXI/VME/MXI, PXI/CompactPCI
Problem: How do I get started building my VXI/VME/MXI/PXI application?
Solution: There are several factors to consider when developing applications that utilize VXI/VME/MXI/PXI modules as listed below:
- Use development environments such as LabVIEW, LabWindows/CVI or Measurement Studio that are specifically designed for instrumentation applications. These development environments feature an extensive set of instrumentation and analysis libraries and offer numerous debugging and interactive execution tools that are ideally suited towards test, measurement and automation applications.
- Use the NI Developer Zone for resources to develop your application:
"Welcome to the NI Developer Zone! Find the latest technical information and code samples, as well as discussion forums to share techniques. Access content from within National Instruments, as well as partners like Prentice Hall PTR, LabVIEW Technical Resource, and GlobalSpec.com."
- Configure your devices using the Measurement & Automation Explorer:
"Measurement & Automation Explorer (MAX) provides access to all your National Instruments DAQ, GPIB, IMAQ, IVI, Motion, VISA, and VXI devices. With MAX, you can configure your National Instruments hardware and software, add new channels, interfaces, and virtual instruments, execute system diagnostics, and view the devices and instruments connected to your system.
MAX installs automatically with NI-VISA version 2.5 (or higher) and NI-VXI version 3.0 (or higher). MAX is only available for Win32-based operating systems." See our KnowledgeBase entry on Using MAX to Configure VXI/VME Devices.
- Use the Logical Address Wizard to configure a multi-chassis VXI/VME system:
"The Wizard uses the rules documented in the System Configuration sections of the VXI-MXI-2 and VME-MXI-2 user manuals to determine the set of logical addresses that you can assign to the devices in each chassis. One must carefully select the logical address assignments for devices in a multi mainframe VXI/VME configuration. The logical address wizard is helpful in making these choices."
- Determine if an instrument driver is available for your VXI or VME module. Instrument drivers are available on the device manufacturer's Web site or at the Instrument Driver Network in the NI Developer Zone. The use of an instrument driver will faciltate the use of the instrument module, as you can avoid using the low level commands that are normally associated with programming the instrument to perform a specific task. You may find that there is no instrument driver available for your device, in which case you will have to use the low level commands provided by the instrument manufacturer in order to program it.
- Use the PXI Driver Development Wizard to write your own driver with NI-VISA register-level programming:
"Each PCI device must have a kernel level driver associated with it; this is done in Windows via an .inf file. For NI-VISA to recognize your device, you must run the PXI Driver Development Wizard, available via the Start menu under National Instruments » VISA." NI-VISA User Manual.
- To increase the maintainability of your program, use VISA calls:
"As a step towards industry-wide software compatibility, the alliance developed one specification for I/O software-the Virtual Instrument System Architecture, or VISA. The VISA specification defines a next-generation I/O software standard not only for VXI, but also for GPIB, serial interfaces, [PXI, VXI-11, and TCPIP]. With the VISA standard endorsed by over 35 of the largest instrumentation companies in the industry including Tektronix, Hewlett-Packard, and National Instruments, VISA unifies the industry to make software interoperable, reusable and able to stand the test of time. Before VISA, there were many different commercial implementation of I/O software for VXI, GPIB, and serial interfaces; however, none of these I/O software products were standardized or interoperable." NI-VISA User Manual.
The NI-VISA User Manual is an invaluable programming reference. It explains the basics of VISA programming. There are also many samples of code, both in C and Visual Basic. Other useful VISA programming references are the NI-VISA Help and the NI-VISA Programmer Reference Manual. NI-VISA Help is a searchable help file which explains the VISA functions in detail. In NI-VXI 3.2 the VISA and corresponding VXI calls are listed together. The NI-VISA Programmer Reference Manual also describes the VISA functions. Functions are defined in both C and Visual Basic Syntax. These manuals load as PDFs with NI-VISA.
- A convient tool to verify that the instrument is functioning correctly and/or to verify any low level NI-VISA commands is the VISA Interactive Control:
"NI-VISA comes with a utility called VISA Interactive Control (VISAIC) on all platforms that support VISA, with the exception of Macintosh and VxWorks. This utility gives you access to all of VISA’s functionality interactively, in an easy-to-use graphical environment. It is a convenient starting point for program development and learning about VISA." See the NI-VISA User Manual.
- For debugging your code in Windows use NI Spy:
"NI Spy tracks the calls your application makes to National Instruments test and measurement (T&M) drivers, including NI-VXI, NI-VISA, and NI-488.2. NI Spy highlights functions that return errors, so you can quickly determine which functions failed during your development. NI Spy can also log your program’s calls to these drivers into a file so you can check them for errors at your convenience." NI-VISA User Manual.
- For key support issues and other tips, see our Technical Support pages:
VXI/VME/MXI Support PXI Support Request Support
- Finally, the user manual for your device should contain all of the specific function calls for that device. See our Product Manuals Library.
Related Links: Developer Zone: Instrument Driver Network
Attachments:
Report Date: 09/21/2001
Last Updated: 12/31/2007
Document ID: 2DK6F758
|
|