Using LabVIEW Mobile for GPIB Instrument Control
Table of Contents
Introduction
This article explores the possibilities of GPIB communication in conjunction with the LabVIEW Mobile Module, and provides software for setting up a test station on a Personal Digital Assistant (PDA) or a Windows CE device using LabVIEW Mobile.
PDAs are everywhere, and their capabilities are expanding faster than PCs. These pocket-sized devices are perfect candidates for wireless networks, and 802.11B/G wireless Ethernet capabilities are common on PDAs today. Combining these new devices and wireless communication with a tried-and-true test and measurement bus like GPIB can provide solutions to previously unworkable instrument control problems.
PDA advantages over traditional computers
PDAs have their own unique feature sets that set them apart from other computing devices. Some tasks are best accomplished with a PDA because of the factors below.
- Portability: Because are usually battery powered, a PDA can be used in places where reliable power is not available. This is especially important in situations where your test station is mobile.
- Compact Size and Weight: A PDA is much smaller than a laptop or a desktop, but still maintains a reasonably sized color display. Their weight is measured in ounces rather than pounds, meaning they can be tucked away in places where a traditional PXI chassis or PC could not.
- Cost: A ubiquitous consumer product, PDA prices continue to fall. They maintain a price point well below many other computing devices, allowing a reasonable amount of computing power at a low cost.
- Environment: Mostly solid state devices, PDAs can withstand more shock and vibration than an average desktop computer. Additionally, some industrial PDAs exist that are perfect for factory floors or other harsh environments.
- Touch-based Input: Almost all PDAs are equipped with a touch screen for simple input from a user that does not need or cannot use a traditional keyboard/mouse combination.
Combining PDAs with GPIB
There are a variety of use cases and reasons for using the LabVIEW Mobile Module with a GPIB-based instrument. There are a few types of devices that can make use of the LabVIEW Mobile Module: traditional consumer PDAs running PocketPC 2003 or PalmOS, industrial grade PDAs designed for harsh environments, and wired touch-panel Windows CE devices (often used with a human interface to a larger system). See the link below for more information on industrial PDAs and wired touch-panel Windows CE devices. The GPIB-ENET/100 VIs for LabVIEW Mobile can be used with any of these devices.
A full LabVIEW/Instrument communication program can now be implemented and run on any of these types of devices. The user input is handled by the program. All commands can be dispatched to GPIB instruments via the Ethernet connection with a GPIB-ENET/100 device. This connection can be wireless or wired. An intermediate computer is not required to perform instrument communication.
Before these VIs existed a user needed a computer to interface to the GPIB device, which then relayed information to a palm device via a webpage or other network connection. The GPIB-ENET/100 driver VIs allow you to take measurements directly from your palmtop device from an instrument anywhere on your network or the internet, with no intermediate PC required. Information that would previously have required a computer can now be easily accessed from a palmtop device.
Configuring the Wireless Router or Access Point (AP)
If you have already configured your wireless AP or if you are connecting to your GPIB-ENET/100 via a wired Ethernet connection, you may skip this section.
If you are using a GPIB-ENET/100 from a wireless PDA, configure your wireless access point (AP) and PDA to the point that you can ping from the PDA to the GPIB-ENET/100. Note that there are many different types of wireless connectivity devices and this section is meant to give a broad overview of the setup. Depending on your network and computer configuration, you may need a network administrator to assist in configuration of the wireless network.
Installation and setup of most wireless access points is usually rather simple. Generally, you connect the wireless router or access point to an existing network. Then, using a specified IP address and your web browser, you configure the settings for the AP–encryption type, password, number of users allowed, and so on. Once the router or AP is configured, both wireless-enabled laptops and PDAs should be able to access the wireless network by selecting it and entering the correct password, if applicable.
To complete your wireless test system connections, connect your wireless AP to the GPIB-ENET/100 with a standard twisted-pair Ethernet cable and a hub. You may connect the wireless AP to the GPIB-ENET/100 directly if you use a "crossover cable". The GPIB-ENET/100 then connects to your instrumentation system with a standard GPIB cable as shown in Figure 1.

Figure 1. Wireless Test System: PDA-to-GPIB connection via Ethernet
Configuring the GPIB-ENET/100
Because no GPIB-ENET/100 configuration utilities exist for the PDA platform, you must configure the GPIB-ENET/100 from a standard Windows, Macintosh, or supported-Linux system before proceeding. For a complete set of instructions, see the getting started card or booklet that came with your GPIB-ENET/100 or the GPIB Hardware Guide linked below.
Connect the GPIB-ENET/100 to your instrument using a GPIB cable and to the wireless AP as shown in Figure 1. Then, use GPIB Explorer or Measurement and Automation Explorer (MAX) to add the GPIB-ENET/100 to your system. The configuration process will allow you to assign an IP address to the GPIB-ENET/100. This address is important because it will be the way that you connect to the GPIB-ENET/100 from your PDA device in the next step.
See Also:
GPIB Hardware Guide (June 2005)
Installing and Using the GPIB-ENET/100 VIs
Next, install the GPIB-ENET/100 VIs on your LabVIEW system that will be authoring the code for the PDA. Download the file below and unzip it into the LabVIEW\instr.lib directory. Once you restart LabVIEW, you should see new VIs in your palette as described below.
The GPIB-ENET/100 driver VIs appear as an instrument driver on the standard LabVIEW palette. Rather than using the standard GPIB VIs to communicate to an instrument, navigate to Instrument I/O Palette»Instrument Drivers»ENET/100. Here you will find four basic VIs: open, write, read, and close. To communicate with your instrument, use them in that order. In the advanced folder are two more VIs for becoming controller in charge and performing a serial poll.
You must first fully configure and test your GPIB-ENET/100 on your Windows or Macintosh machine as outlined above. Once you have configured a valid IP address or hostname for the GPIB-ENET/100, you can use that in the program. See the VIs in the Example folder for simple LabVIEW VIs that perform GPIB tasks using these utility VIs. Substitute the hostname of your GPIB-ENET/100 or IP address before running any examples.
Note that the GPIB-ENET/100 driver VIs are locked. You cannot view or change their source.
Requirements
LabVIEW 7.1 or later
LabVIEW Mobile Module, correctly installed
GPIB-ENET/100, properly configured with a known IP address or hostname
Limitations
This solution only implements a small subset of the standard GPIB calls. The included VIs can write, read, and serial poll instruments on a GPIB-ENET/100 device. Parallel polling, triggering, secondary addressing, and certain types of termination are not supported.
Download, Installation, and Contact information for Technical support
To download the driver, visit the link below. These VIs are not officially supported by National Instruments.
See Also:
TCP ENET/100 Communication
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
