Home Hard & Software What's New! Feedback Search References



LabVIEW 7.0

Labtronics, Inc. (CollectCE)



Develop your own using the Visual Studio .NET Compact Framework

Pocket DAQ

The Smart Device Framework v 1.1 from OpenNETCF.Org

National Instruments LabVIEW 7.0 (LV PDA)

The following information was extracted from data provided by National Instruments.  Contact them for more information.

You can do DAQ operations in LabVIEW 7.0. You will need to install the LabVIEW PDA module for PocketPC for PocketPC 2002/2003 devices. Once you have the PDA module installed, you will need to run the DAQ for PocketPC installer (refer to the User's Manual). DAQ for PDA allows you to do the following I/O operations:

Analog Input/Output VIs

  1. PDA AI Acquire Waveform: Acquires a specified number of samples at a specified sample rate from a single input channel and returns the acquired data.
  2. PDA AI Sample Channel: Measures the signal attached to the specified channel and returns the measured data.
  3. PDA AO Generate Waveform: Generates a timed, simple-buffered waveform for the given output channel at the specified update rate.
  4. PDA AO Update Channel: Writes a specified value to an analog output channel.

Digital Input/Output VIs

  1. PDA Read From Digital Line: Reads the logical state of a digital line.
  2. PDA Read From Digital Port: Reads the logical state of a digital port.
  3. PDA Write To Digital Line: Sets the logical state of a digital line to high or low.
  4. PDA Write To Digital Port: Outputs a decimal pattern to a digital port.

Counter/Timer VIs

  1. PDA Count Events or Time : Configures one or two counters to count external events or elapsed time. An external event is a high or low signal transition on the specified SOURCE pin of the counter.
  2. PDA Generate Delayed Pulse: Configures and starts a counter to generate a single pulse with the specified delay and pulse-width on the counter's OUT pin.
  3. PDA Generate Pulse Train: Configures the specified counter to generate a continuous pulse train on the counter's OUT pin or to generate a finite-length pulse train using the specified counter and an adjacent counter.
  4. PDA Measure Pulse Width or Period: Measures the pulse width (length of time a signal is high or low) or period (length of time between adjacent rising or falling edges) of a TTL signal connected to the counter's GATE pin.

Currently the DAQ cards that are supported are: National Instruments DAQCard-6062E, DAQCard-6024E, DAQCard-AI-16XE-50, DAQCard-AI-16E-4. For details, refer to the DAQ for PocketPC 2002/2003 section on page 11 of the LabVIEW PDA Module Release Notes. Also refer to the Release Notes for additional information regarding differences and known issues with DAQ for PocketPC.

Any PocketPC PDA can run the LabVIEW PDA module. However, there are some limitations on which PDAs fully support National Instruments DAQCards. As mentioned before, currently only PocketPC 2002 or 2003 based devices can do DAQ operations. You will need a device (maybe with a PCMCIA adapter) that can accept any PCMCIA card. This should allow you to use National Instruments DAQCards.

InstantHMI is a low cost HMI software that converts your Pocket PC handheld into a powerful yet simple Industrial HMI ( Human Machine Interface ).  InstantHMI supports most devices compatible with Pocket PC Platforms.  Incorporating the wireless connectivity InstantHMI allows portable 'anywhere, anytime' information access in the field and on the factory floor.  Connect the handheld to your controller and you have a low cost HMI for machine diagnosis, troubleshooting and on-demand data collection. Tag Groups, Data Logging, Recipes and Scrollable Monitor Screen allow easy HMI configuration and monitoring. Wireless IR (Infrared) and RF (802.11b) Connectivity is supported in addition to serial cable connectivity.  The image at the right shows a "Palm style" device.  However, InstantHMI also is supported on the PocketPC platform.

InstantHMI Desktop Companion software allows for tag, recipe and message databases to be created conveniently on a Windows PC and then downloaded to the Pocket PC handheld. Likewise any changes made or data logged with InstantHMI in the Pocket PC can be uploaded to the Windows PC for analysis in Microsoft Excel or other software.


The Microsoft® Visual Studio .NET 2003 Compact Framework

There are three critical elements that are needed when you decide to write your own code for Pocket PC based data acquisition systems.  These may be obvious, but should be discussed anyway.

  1. The physical interface is of primary concern.  For current generation hardware, both Pocket PC and data acquisition add-ons, this interface will rely on the Pocket PC serial port (see Hardware for more information).  The Compact Framework has no built-in support for serial communications (this situation will change when Visual Studio 2005 is released).  Fortunately, I have done all of the "heavy lifting" here.  All that you need to do is to download the CFSerialIO .NET assembly (DLL) from here.  This furnishes the properties and events that you will need to control serial devices and to receive data from them.

  2. Creating the visual interface (User Interface or UI) can be a time-consuming process.  If you can find add-on tools to help, then you should use them.  An inexpensive Visual Interface toolset for the Compact Framework is available from Mooseworks Software.  These controls consist of three graphical controls: XY Graph, Strip Chart, and Bar Chart controls, and a Slider control that can be used with either horizontal or vertical orientation.  Other graphical controls are available, such as ComponentOne Studio for Mobile Devices, which consists of Grid, Charting, and ZIP controls for the Compact Framework.

Do It Yourself Visual Studio 2003 Compact Framework (SDE) Example

Download Example (about 37 KB)

I created a simple data logger using hardware that I had used for other projects.  It was comprised of an iPAQ 3635 Pocket PC, upgraded use Microsoft ® Pocket PC Version 3.0.11171 (Build 11178) -- otherwise known as the Pocket PC 2002 OS, and a B & B Electronics 232SDA10 serial data acquisition module.  Note, the 232SDA10 requires external 12V power.  It is designed to operate from power furnished by the serial port.  However, Pocket PC serial ports cannot furnish sufficient voltage or current to operate this sort of external hardware.

The 232SDA10 module has 11 analog inputs.  I used only eight of these inputs.  It also has four digital Input and Output lines which I did not use.  However, the SDA232 VB6 project illustrates these other features.

I used the Mooseworks XY Graph control for data display (above), and the CFSerialClass dll (above) for the serial interface.  You may download the complete Visual Studio 2003 project using the link below.  The image at the left illustrate live data captured using the program compiled from this project.  The actual sample rate for this data logger is 5 Hz, which with the hardware constraints probably is a practical maximum.  On the other hand, most data loggers will have MUCH lower sample rates.  Download my example code here.


The Mooseworks Strip Chart control might be more useful for one, two or three channel data (at higher sample rates).  It has a History feature that provides a built-in data display FIFO. 

Here is a view of the Visual Studio IDE ToolBox with Mooseworks Instrumentation controls added.  These provide a wide range of HMI controls suitable for many professional data acquisition projects.  I will post VB .NET examples here as I develop them.






DATAQ Instruments, Inc sells the DI-1000TC with these features:

1000VDC and Peak AC Input-to-Output and Channel-to-Channel Isolation.

Supports Seven Thermocouple Types.

Built-in Open Thermocouple Detection.

High Accuracy and Resolution Design.

Extremely Wide CJC Range.

Built-in RS-422 Interface and optional RS-232 or USB adapters.

RS-422 interface allows remote temperature data acquisition and module expansion over a distance of up to 4,000 feet (over 1.2 kilometers).

Daisy chain up to 32 units (256 channels).



The DI-1000TC is shown here connected to a Palm based handheld, running temperature data logging software that is furnished with the unit.

Nice.  However, this isn't too useful for those of us who might want to use this with a Pocket PC or Windows CE based computer.  As of this writing DATAQ doesn't provide very much information that is useful for interfacing with this device from a non-Windows x86 computer.

What is needed?


The serial protocol that is used is MODBUS/ASCII, and the physical interface is RS-422.  This the first step.


The actual data (commands and responses) are not described in sufficient detail to write code.


So, what I did was to monitor the serial data between a working application (Windaq Lite) and the DI-1000TC.


The DI-1000TC temperature data is 16-bits per channel, with an accompanying 16-bit value that represents the


Cold Junction Temperature.  The CJC temperature is a scaled-offset value (-50 to150 degrees C), while the


thermocouple values are raw signed integer.  All thermocouple linearization and Cold Junction Compensation


must be done in software by the application program.  The ActiveX control takes care of this for desktop apps


but we must provide our own code for this for our Pocket PC application.  The basic calculations for linearization


are straight forward, as is the addition of CJC.  Here are a couple of references:


http://www.temperatures.com/tctables.html (which I found to be quite useful, when combined with the next link)




Contact me directly if you are interested in more detailed information for a specific application.  Here is a look at


a Compact Framework SmartDevice application using the DI-1000TC.  I haven't added a graphical (chart) display,


but will if that is desired:


PocketDAQ is a Pocket PC application from Applied PDA Software that allows you to collect and examine data in real-time, and with speed and accuracy from devices such as:

bullet barcode scanners
bullet GPS receivers
bullet sensor equipment
bullet other data loggers
bullet RFID instruments
bullet scales and balances

and a multitude of other instruments which can be connected to Pocket PC's using RS232 serial communications, infrared, or wireless Bluetooth.

No programming required!  Free demo (go to the Applied PDA Software site to download).

OpenNETCF.org is the web's central repository for information and open-source projects specifically targeting the Microsoft .NET Compact Framework.

OpenNETCF.org was started by the members of the OpenNETCF Advisory Board as an independent source for Compact Framework development information working under the spirit of the open-source movement.

For free-flow, unedited, warranty-free (and untested) code, use the OpenNETCF Forums. These forums are the largest repository of independent Compact Framework code on the web.

Smart Device Framework

Smart Device Framework v2.0

The Smart Device Framework is an application framework which enriches and extends the .NET Compact Framework. There are a lot of new class libraries and controls along with all the existing class libraries and controls available from www.opennetcf.org.


Send mail to dick_grier@hotmail.com with questions or comments about this web site.
Last modified: 11/25/09
Hit Counter