Using Windows NT Embedded and National Instruments Products
Overview
The use of an embedded form of Windows NT is intended for applications where a small, feature filled OS is desired. Although Windows NT normally does not work for these applications, the Microsoft Windows NT Embedded 4.0 toolkit, marketed by Microsoft, allows a user to create an image of NT with only the features needed for the given application. Using the Windows NT Embedded toolkit, for instance, you can create an OS image that includes networking components, but no display or CD-ROM components, or a system with a display and keyboard support, but without any shell or diagnostic applications. You can create relatively small NT images that can be installed on truly embedded target machines.
National Instruments has created several Component Definition Files (.kdf), used by the Embedded NT toolkit, to ensure that its hardware and software products can be used in an Embedded NT environment. Also, new installation techniques now allow remote installation of NI-DAQ on Embedded NT machines. This document describes the basic procedures and methods used to create these files and perform installations.
Table of Contents
KDF Files
In order to build a bootable NT image, we must first define its installed components. To do this, Microsoft provides two applications in its Windows NT Embedded 4.0 toolkit. The first creates one Component Definition file (.kdf) for each of the components you wish to include in our OS image. Component Designer allows you to specify registry keys and values, dependencies on other components, and files, along with their appropriate locations on the target system.The second application, Target Designer, uses the .kdf files generated by Component Designer to build a bootable NT image. Target Designer uses a tree type interface to allow you to add/delete/configure individual components as part of an Embedded NT image build.
The files created to support NI products are listed below:
- National Instruments.kdf--Used to name a branch in the tree interface where other NI components are placed. Required by all NI components.
- NI-PAL.kdf--Defines the files and registry entries required by NI-PAL. Required by NI-DAQ.
- NI-DAQ 6.7.kdf (also 6.6)--Defines a minimal install for a standalone installation of NI-DAQ. Does not install MAX or allow for remote configuration or RDA (Remote Device Access). Required by hardware specific .kdf files.
- LabView App.kdf--Lists the files and locations needed for execution of a compiled LabVIEW application to be run on the target system. Also defines a batch file that is placed in the Windows StartUp folder. This batch file runs NIAutoConfig.exe and points to the LabVIEW application to execute. This component requires that NI-DAQ and the appropriate NI hardware component be present.
- PCI_PXI 6035E.kdf--Device specific registry entries.
- PCI_PXI 6052E.kdf--Device specific registry entries
- PCI-MIO-16E_PXI 6070E.kdf--Device specific registry entries
- PCI-PXI 6602.kdf--Device specific registry entries
- PCI_PXI 6527.kdf--Device specific registry entries
- PCI-DIO-96_PXI 6508.kdf--Device specific registry entries
- PCI_PXI 6704.kdf--Device specific registry entries
- PCI_PXI 6713.kdf--Device specific registry entries
- PCI-DIO-32HS_PXI 6533.kdf--Device specific registry entries
- Remote_PC.kdf--Defines the files needed to run the server side of Remote_PC. This software is unlicensed and used only for testing purposes. This software can be distributed in its complete form, but has a 30 day trial period after which it must be registered. (NOTE: Other types of similar software are available and work for this application.)
The LabView App.kdf works with any LabVIEW application so long as the compiled file is named application.exe and is placed in the appropriated source directory on the development system. The labview.bat file can also be modified to reflect any desired behavior.
See Also:
KnowledgeBase 251BSUKN (contains the *.kdf files)
Setup
Several different install procedures were used in testing NI products with Embedded NT. Various items from the following list are needed for each particular type of installation:
- A development PC with a hard drive partitioned into a least TWO logical drives, and a network card
- A second PC on the same network running Windows 9x
- MS Windows NT Embedded 4.0 toolkit
- National Instruments .kdf files
- Any required National Instruments PCI/PXI cards
- NI-DAQ CD or access to installable version via network
- Software for remote control of PC via network (e.g. Remote PC)
- Software to analyze the PCI bus (e.g. PCI View)
The development PC should have a current, installed version of Windows NT on the SECONDARY partition with the boot.ini file set to default boot from this partition. The Embedded NT toolkit (Component Designer and Target Designer) should also be installed on this partition. Format the PRIMARY partition and perform a basic install of NT on this partition (no need to update the Service Pack). This step insures that the boot record on the primary partition is set correctly for NT. Do not install any additional software on this partition. It is be used to hold the Embedded NT image each time it is created. This process overwrites any previous software installations.
Once the development system is configured and operational, create a directory on the SECONDARY partition to store the .kdf and source files. Also, create a directory to temporarily hold the Embedded NT image as it is created by Target Designer before it is copied to the primary partition. Be sure to edit the appropriate settings in Target Designer to indicate the location to the temporary directory and the location of the CD-ROM containing the Embedded NT toolkit CD.
Refer to the following sections for more information on different installation types.
Standalone System
The standalone system represents the most limited or reduced NT image. Because standalone systems are usually headless with no monitor, keyboard, or mouse, and because a network connection is usually absent, there is no way to install and configure NI software after the Embedded NT image has booted. Therefore, all installation and configuration must be done in Target Designer as the image is created. This is where the bulk of the .kdf files come into play.
The NI-DAQ and NI-PAL components are used to "manually" place all required driver related files in the necessary directories. The components also make registry entries. The hardware specific components make additional registry entries to indicate what type of NI hardware is in the system.
The labview.bat file, placed by the LabVIEW App component, is used to run NIAutoConfig.exe on bootup and to start up the user’s LabVIEW application.
Because of the restrictive nature of this process, and the default behavior of NIAutoConfig, only systems with one unit of installed NI hardware are recommended. Otherwise, multiple cards in a system would be assigned non-deterministic device numbers by NIAutoConfig, which might correspond to device numbers set in the LabVIEW application. There would be no way of correcting this problem after the machine had booted.
Using Target Designer, add the NI components in the following order:
1. National Instruments
2. NI-PAL
3. NI-DAQ 6.7 (or NI-DAQ 6.6)
4. Hardware specific component
5. LabVIEW App
Build and install the NT image. Once the install is complete, delete the contents of the primary partition, but do not format this partition. Then copy the contents of the temporary image directory on the secondary partition to the primary partition, which places the new NT image on the primary partition. The new image can be booted by restarting the machine and selecting the primary partition from the boot menu.
If everything has been properly installed (including the appropriate hardware), the OS should boot and run the labview.bat file. This file executes NIAutoConfig and the installed LabVIEW application.
Networked System
The networked system, although more involved than the Standalone type, is much easier to configure and more forgiving because once the system has booted and successfully connected to the network, it is possible to add and remove software and make other changes. There are no NI specific .kdf files used for this configuration. The goal with this system is to create an NT image that boots, connects to the network by getting an IP address, then executes the server end of remote control software. Once this happens, NI-DAQ can be installed and configured.
It is important in this type of installation to ensure the proper configuration of all network parameters in Target Designer. Use the “Minimal With Network” sample in Target Designer as a guide to which network components to add. The desired configuration consists of the proper network card and driver, TCP/IP protocol, NO domain or workgroup participation, and automatic logon. The TCP/IP properties must be set to obtain an IP address from DHCP; other TCP/IP property settings are not needed. The proper bus and slot number must be selected in the network card configuration box. These numbers can be obtained by using PCI bus analysis tools such as PCI View. The last major component to add is Remote PC under the Applications branch. This software allows remote control access to the Embedded NT machine once it has booted.
After the image is created, delete the contents of the primary partition and copy the new embedded image from the temporary folder on the secondary partition to the primary partition. Also, change the system’s boot.ini file so that the image on the primary partition is the default partition to boot. Reboot the machine; the Embedded NT image should start, perform an automatic logon, get an IP address from the DHCP server, and launch the remote control software.
Now NI-DAQ or any other software can be installed. The first step in this process is to connect the Embedded NT machine with the Windows 9x PC via the network. This is accomplished by running the client portion of Remote PC (or any other remote control software) on the Windows 9x PC, and connecting to the IP address given to the Embedded NT machine at bootup. Once a connection is established, the NT system is under remote control and its desktop is displayed in a window on the Windows 9x machine. The user can simply use the mouse on the Windows 9x system and point to icons on the NT machine. Highlight the Remote PC window on the NT system and check the box to restart Remote PC when NT reboots.
Via this interaction, NI-DAQ can be installed by mapping a drive on the Windows 9x system to the Embedded NT system. Make sure that the Windows 9x machine has the proper File/Print Sharing parameters set in its network properties box - the drive containing NI-DAQ should be shared with full access and NO password. The mapped drive should be set to reconnect at login. This setup allows the NT system to restart during the installation of NI-DAQ, as in a typical installation, and finish the installation after bootup.
After all the sharing and mapping parameters are set, proceed with the installation of NI-DAQ. Be sure to reconnect Remote PC after the Embedded NT machine has restarted. After the install is complete, the Embedded NT system can be configured remotely with MAX or remotely using Remote PC and MAX running locally. The user can add/delete/launch any other files as needed including LabVIEW applications.
Additional Notes
The two applications provided by the NT Embedded toolkit were developed by VentureCom. Microsoft licensed the software, but not the documentation. Therefore, as of the publication of this document, there is still no documentation available for either Component Designer or Target Designer. However, support for Component Designer or Target Designer is provided by Microsoft’s support for developers. Each licensed copy of the software comes with two free support incidents.
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/).
