V2401/2402 Series WinXP Embedded User’s Manual First Edition, February 2010 www.moxa.com/product © 2010 Moxa Inc. All rights reserved. Reproduction without permission is prohibited.
V2401/2402 Series WinXP Embedded User’s Manual The Moxa software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement. Copyright Notice Copyright © 2010 Moxa Inc. All rights reserved. Reproduction without permission is prohibited. Trademarks MOXA is a registered trademark of Moxa Inc. All other trademarks or registered marks in this manual belong to their respective manufacturers.
Table of Contents Chapter 1 Introduction ..................................................................................................1-1 Overview.................................................................................................................................. 1-2 Software Specifications ........................................................................................................... 1-2 Application Development Environment .....................................................
1 Chapter 1 Introduction Thank you for purchasing the Moxa’s V2401/2402 series of x86 ready-to-run embedded computers. This manual introduces the software configuration and management of V2401/2402 computers running the Windows Embedded Standard 2009 operating system. For hardware installation, connector interfaces, setup procedures, and upgrading the BIOS, please refer to the V2401/2402 Series Hardware User’s Manual.
V2401/2402 WinXP User’s Manual Introduction Overview The V2401 and V2402 come with four RS-232/422/485 serial ports, and the V2401 has an additional eight RS-232 ports, making them ideal for connecting a wide range of serial devices. The dual 10/100/1000 Mbps Ethernet ports offer a reliable solution for network redundancy, delivering continuous operations for data communication and management.
V2401/2402 WinXP User’s Manual Introduction y DirectShow—Base filter graph and device enumeration support for all DirectShow applications. This component also provides most DirectShow filters. y Distributed Transaction Coordinator (MSDTC) —A distributed transaction facility for Microsoft Windows systems, which uses transaction-processing technology. MSDTC exploits loosely coupled systems to provide scalable performance.
V2401/2402 WinXP User’s Manual Introduction Networking and Communication Capabilities The V2401/2402-XPE embedded computers provide powerful hardware communication interfaces for network-centric embedded applications, including 2 Ethernet and 2 serial ports, and also support the networking and communications capabilities that are built into Windows Embedded Standard 2009 with SP3 OS.
V2401/2402 WinXP User’s Manual Introduction Supporting Services and Daemons In addition to development and communication capability, the V2401/2402-XPE embeds the services and daemons shown below. These common and easy-to-use application servers help users migrate industrial communication applications to the V2401/2402-XPE embedded computer very easily and conveniently. y COM+ Services—The next evolution of Microsoft Component Object Model (COM) and Microsoft Transaction Server (MTS).
V2401/2402 WinXP User’s Manual Introduction Inserting a USB Mass Storage Device into the Computer Inserting a USB mass storage device will generate a new drive on the V2401/2402-XPE. The new drive should be visible in the File Explorer.
V2401/2402 WinXP User’s Manual Introduction Inserting an CF Card in the Computer The V2401/2402-XPE computer is equipped with a CompactFlash slot for CompactFlash (CF) card storage expansion support. Please make sure to turn off the computer before inserting the CF card into the CF slot on the front panel. The V2401/2402-XPE does not support CF “Plug and Play” and “Hot Swap.” Please make sure to turn off the computer before inserting a new CF cards.
V2401/2402 WinXP User’s Manual Introduction Inserting a SATA Hard disk into a V2400 Computer Before inserting a SATA hard disk, make sure that the computer is powered off. Insert a SATA Hard disk device will create a new disk in the V2401/2402-XPE. You should see it in the File Explorer.
V2401/2402 WinXP User’s Manual Introduction NOTE: The V2401/2402 embedded computer supplies only 5V DC power for 2.5 inch SATA hard disks. If you want to use a 3.5 inch hard disk, you will need to use external power supply for your SATA hard disk. Four RS-232/422/485 Serial Ports The serial ports of the V2401/2402-XPE computer from button to top are named “COM1” to “COM4” COM1 to COM4 are RS-232/422/485 serial ports. Each of these ports supports baudrate settings of up to 921.6 Kbps.
V2401/2402 WinXP User’s Manual Introduction */ unsigned int hDIO; unsigned int port_no; int data; int intDout,intDin; int nDout=0; int port=0,mode=0; int n=0; WCHAR sin,smode; printf("UART Mode Test Program\n"); printf("\t (0) Exit Program\n"); printf("\t (1) Display DIN\n"); printf("\t (2) Display DOUT\n"); printf("\t (3) Set DOUT value\n"); printf("\t (4) Display both DIN and DOUT\n"); sin=getwchar(); n=_wtoi(&sin); do { switch (n) { // if char == '1', display the digital input case 1: //Open dio
V2401/2402 WinXP User’s Manual Introduction mxdio_close(hDIO); break; // if char == '2', display the digital output case 2: //Open dio hDIO=mxdio_open(); for(int i=0;i<=3;i++) { //Get digital input port_no=i; intDin=mxdio_get_dout(hDIO,port_no); printf("Dout%d = %d\n",port_no,intDin); } //Close DIO mxdio_close(hDIO); break; // if char == '3', Set the digital output case 3: //Get Port Number getwchar(); printf("Input the Port Number (0 ~ 3) = \n"); smode=getwchar(); port_no=_wtoi(&smode); //Get Value getwc
V2401/2402 WinXP User’s Manual Introduction { printf("Set digital output fail!\n"); } else { printf("Set digital output success!\n"); } //Close DIO mxdio_close(hDIO); break; case 4: // if char == '4', Get both digital input and digital output //Open dio hDIO=mxdio_open(); for(int i=0;i<=3;i++) { //Get digital input port_no=i; intDin=mxdio_get_din(hDIO,port_no); intDout=mxdio_get_dout(hDIO,port_no); printf("Din%d = %d, Dout%d = %d\n",port_no,intDin,port_no,intDout); } //Close DIO mxdio_close(hDIO); break;
V2401/2402 WinXP User’s Manual Introduction Eight RS-232 Serial Ports (V2401 only) The V2401 also offers eight RS-232 serial ports by connecting with a 68-pin VHDC cable. These eight serial devices will be named “COM5” to “COM12” Follow the steps below to set the operation mode of each COM port: A. Go to the Control Panel Æ Ports (COM & LPT) and select the COM port (ex. MOXA Port 0 (COM1)). B. Right-click the COM port and click Properties. C.
V2401/2402 WinXP User’s Manual Introduction In some situations, you may want to change the port name to accommodate your program. Follow the steps below to change the name of the ports: A. Go to the Control Panel Æ Multi-port serial adapters and select the adapter. B. Right-click the adapter and click Properties.
V2401/2402 WinXP User’s Manual C. Introduction At the Port Configuration tab, select the port you want to change its name and then click [Port Setting].
V2401/2402 WinXP User’s Manual Introduction D. Uncheck “Auto Enumerating COM Number” if you want to change the port name separately. E. Select the port name you want to change, and then press [OK].
V2401/2402 WinXP User’s Manual F. Introduction Make sure the port names are correct, and then click [OK] to apply these settins.
V2401/2402 WinXP User’s Manual G. Introduction Now, you can see that the port names have been changed under Ports (COM & LPT). NOTE: Make sure each port name is unique, or the duplicate names will lead to inaccessible devices.
V2401/2402 WinXP User’s Manual Introduction Also, you can set the operation mode by programming; the example “UartMode” can be found in \examples\C++\ of the Software DVD.
V2401/2402 WinXP User’s Manual Introduction printf("Invalid value!!\n"); break; } printf("COM%d=%s\n",port,mode_array[mode]); break; // if char == '2', Set the UART Mode case 2: //Get Port Number printf("Input the Port Number (1~4) = \n"); wscanf(L"%s",wcs_port); port=_wtoi(wcs_port); //Get Mode Value printf("Input the Mode value (0 ~ 3) = "); wscanf(L"%s",wcs_mode); mode=_wtoi(wcs_mode); //Set UART Mode if(uart_setmode(port,mode)==-1) { printf("Invalid value!!\n"); printf("Set UART Mode Fail!!\n"); } els
2 Chapter 2 Software Configuration In this chapter, we explain how to operate a V2401/2402-XPE computer directly or from a PC. Instructions are given on how to adjust the system time, troubleshoot network connectivity, and manage other functions. Some of these operations can be done with system commands after gaining access to the computer, and others can be done from the “Control Panel,” which is described in a later chapter.
V2401/2402 WinXP User’s Manual Software Configuration Starting Your V2401/2402-XPE Computer Connect the CRT monitor or LCD monitor to the target computer, and then power it up by connecting it to the power adaptor. It takes about 30 to 40 seconds for the system to boot up. Once the system is ready, the Desktop will appear on your monitor. Resetting Your V2401/2402-XPE Computer y Reset Button A Reset button is located on the front panel of V2401/2402-XPE.
V2401/2402 WinXP User’s Manual Software Configuration Changing the LVDS Settings The V2401/2402-XPE computer comes with an LVDS connector, allowing users to connect an LVDS display. Before you connect your LVDS panel to the embedded computer, be sure the display settings match your LVDS panel. Use the following steps to adjust LVDS settings. 1. Select [Advanced] tab in the BIOS Menu. 2.
V2401/2402 WinXP User’s Manual Software Configuration 5. Select the Color Quality (32 bit or 18 bit), Screen Resolution, and Refresh Rate compatible with your LVDS display. You may also select the Enable Rotation checkbox if you need rotation functions. 6. You can also use hot keys to change your display settings. When finished, click Apply and then OK.
V2401/2402 WinXP User’s Manual Software Configuration Changing the Network Settings The V2401/2402-XPE computer comes with two network interfaces. Both of the default IP addresses are DHCP. Choose Start Æ Control panel Æ Network Connections to enter the network settings page. Select the connection and choose Properties on the pop-up menu by right-clicking. You can specify the IP address manually or by DHCP. In addition, you can disable or enable either one or both connections with the pop-up menu.
V2401/2402 WinXP User’s Manual Software Configuration Operating Your V2401/2402-XPE Computer with a Telnet Client Use a crossover Ethernet cable to connect your development workstation directly to the target computer, or use a straight-through Ethernet cable to connect the computer to a LAN hub or switch. Next, use a telnet client on your development workstation to connect to the Telnet console utility of the target computer.
V2401/2402 WinXP User’s Manual Software Configuration Adjusting the System Time y Setting the System Time Manually: Use the date/time command line utility to query the current system date/time or set a new system date/time. y Date/Time Control panel: Go to the Control Panel and double click the Date and Time icon.
V2401/2402 WinXP User’s Manual y Software Configuration SNTP: In the Date and Time Properties window, you can see the NTP server setting. Starting and Stopping Services Select Start Æ Control Panel Æ Administrative Tools and double click Services. Select and right-click on the service name, and then choose to stop or start.
V2401/2402 WinXP User’s Manual Software Configuration Simple Network Management Protocol (SNMP) To check SNMP agent capabilities on a target V2401/2402-XPE (e.g., suppose the network IP is 192.168.3.127) computer, log on to the workstation computer on which the SNMP manager resides and then type: \> snmpwalk -v 2c -c public 192.168.3.127 system You will see a series of messages from the SNMP agent on the V2401/2402-XPE computer that allow you to monitor and manage the computer.
V2401/2402 WinXP User’s Manual Software Configuration Make sure that the Allow users to connect remotely to this computer checkbox is selected. Next, click Select Remote Users, and add the users allowed to connect to your desktop. When finished, click OK. Serial Ports V2401/2402-XPE embedded computers have 4 serial ports on the back panel. These ports are designed to provide reliable, high-speed, 3-in-1 (RS-232, RS-422, and RS-485) operation. Each of the ports supports baudrates up to 115,200 bps.
V2401/2402 WinXP User’s Manual Software Configuration Enhanced Write Filter The “Enhanced Write Filter” protects the contents of a volume on the target media volume by redirecting all writes to another storage location called on overlay. Use the following steps to enable the Enhanced Write Filter. 1. Type EWFMGR C: to check if the state of the Enhanced Write Filter is Disabled. 2. To enable the filter, type EWFMGR C: -enable. 3. Reboot the system to activate the change. 4.
V2401/2402 WinXP User’s Manual Software Configuration Follow the steps below to enable FBWF: 1. In the command prompt, type fbwfmgr /displayconfig to check the current FBWF status. The status defaults to disabled. C:\>fbwfmgr /displayconfig File-based write filter configuration for the current session: Filter state: disabled. File-based write filter configuration for the next session: Filter state: disabled. C:\> 2. Type fbwfmgr /enable to enable FBWF.
V2401/2402 WinXP User’s Manual Software Configuration 4. You may copy a file (in this example, we will use TestFile.txt) to C:\temp and to C:\, and then reboot the system. 5. After rebooting the system, you should see that the file in C:\ has disappeared and that the file in C:\temp remains.
3 Chapter 3 Management Tools The V2401/2402-XPE ready-to-run embedded computers are shipped with the Windows Embedded Standard 2009 operating system already installed. This network-centric platform is designed to serve as a front-end for data acquisition and industrial control applications. A set of Windows XP management tools are installed on the V2401/2402-XPE computer to resolve management issues.
V2401/2402 WinXP User’s Manual Management Tools Computer Management [Control Panel] Æ [Administrative Tools] Æ Computer Management. You can use the tools for a variety of tasks, such as disk partition, disk mount/dismount, and create/remove users. You can also check services in the Computer Management window.
V2401/2402 WinXP User’s Manual Management Tools Component Services [Control Panel] Æ [Administrative Tools] Æ Component Services. You can install/view/remove COM components with this tool.
V2401/2402 WinXP User’s Manual Management Tools Event Viewer [Control Panel] Æ [Administrative Tools] Æ Event Viewer. Every V2401/2402-XPE event, including system, applications, and security events are logged in this event database.
V2401/2402 WinXP User’s Manual Management Tools Internet Information Services (Web/FTP) [Control Panel] Æ [Administrative Tools] Æ Internet Information Services. If you need to set up Web or FTP, you must use this tool for configuration purposes, and you can also start/stop HTTP/FTP services.
V2401/2402 WinXP User’s Manual Management Tools A default web page is located in the directory c:\Inetpub. Use this default page to test your web server. Follow the steps shown below to create the virtual directory. 1. Create a virtual directory by selecting Default Web Site Æ New Æ Virtual Directory.
V2401/2402 WinXP User’s Manual Management Tools 2. Follow the virtual directory creation wizard and complete the steps to create the virtual directory c:\Inetpub.
V2401/2402 WinXP User’s Manual Management Tools Type the alias into the text box. Click Next to continue.
V2401/2402 WinXP User’s Manual Management Tools 3-9
V2401/2402 WinXP User’s Manual Management Tools 3. When you complete the steps, the virtual directory WEB will appear under Default WEB Site. 4. On your desktop, type [IP Address]/WEB/Default.htm (e.g., 192.168.1.127/WEB/Default.htm). The following message will appear. The steps are indicated in the following sequence of diagrams.
V2401/2402 WinXP User’s Manual Management Tools If you need to use the FTP server, you must create the default password for your account and turn on the write permission on your home directory located in c:\intepub\ftproot. Select FTP Sites Æ Default FTP Site Æ Properties Æ Home Directory, and checkmark the Write checkbox. You should now be able to transmit files through the ftp server.
V2401/2402 WinXP User’s Manual Management Tools ODBC Data Source Administrator [Control Panel] Æ [Administrative Tools] Æ Data Sources (ODBC) This database source configuration tool is for users to add, delete, or set up the data source, and then display information about the installed ODBS drivers. You can create a new data source or trace the calls to ODBC functions.
V2401/2402 WinXP User’s Manual Management Tools Performance Monitor [Control Panel] Æ [Administrative Tools] Æ Performance. You can use this tool to monitor system and network resources.
V2401/2402 WinXP User’s Manual Management Tools Services [Control Panel] Æ [Administrative Tools] Æ Services You can use this utility to start/stop/restart services. (e.g. If you do not need telnet service you can stop it and set the “startup option” to “manual”.
4 Chapter 4 System Recovery The V2401/2402-XPE ready-to-run embedded computers are a Windows Embedded Standard 2009 platform. This chapter describes the recovery process in the event of system instability.
V2401/2402 WinXP User’s Manual System Recovery Recovery Environment The environment includes a V2401/2402-XPE embedded computer and a bootable USB disk with the recovery programs and system image file. Hardware The hardware used includes a PC, a V2401/2402-XPE computer and a USB disk with the recovery programs. (Note: The USB disk should be at least 2GB.).
V2401/2402 WinXP User’s Manual System Recovery Click Browse and select the folder you wish to install to and then click Next. Click Next to start the installation.
V2401/2402 WinXP User’s Manual System Recovery Click Close to finish. Step 2: Extract Recovery Image from PC to USB disk After the installation is complete, you will see the XPeRecovery shortcut on your desktop. You can start the USB disk recovery utility by opening this shortcut. Double-click the shortcut then click OPEN to select the image file. This file is located on the software CD in the recovery folder, and the filename is V2400_V1.0_Build_yymmddhh.wim. You may also copy this file to your PC.
V2401/2402 WinXP User’s Manual System Recovery Click the drop-down list and select your USB disk drive letter (in this example, it is the E drive), and check Format USB Disk.
V2401/2402 WinXP User’s Manual System Recovery Click Apply to start the process; the utility will display the progress and time remaining This message will appear when the process is complete. Click OK.
V2401/2402 WinXP User’s Manual System Recovery Step 3: Change the BIOS Settings On the V2401/2402-XPE computer, you need to change the BIOS settings to boot from USB disk. Turn on the computer and press DEL to enter the BIOS setup menu. Select Hard Disk Boot Priority and press Enter. Select USB disk and then press “+” to make it the first boot device. Warning: Incorrect boot disk priority will lead to recovery failure. Press F10 and then press Enter to save and leave the BIOS setup.
V2401/2402 WinXP User’s Manual a. System Recovery Select Removable Device Priority. b. Make sure that the USB disk has been detected. Press Esc to exit. c. Make sure that the First Boot Device is Removable. If not, select First Boot Device, press Enter and select it from the list.
V2401/2402 WinXP User’s Manual System Recovery d. Select Exit Æ Save & Exit Setup and then press Enter. e. Choose Y to save to the CMOS and then exit. Step 4: Reboot the Computer and Start Recovery Insert the USB disk on any USB port of the V2401/2402-XPE, and then reboot the computer. The system will boot from the USB disk and the Windows Pre-installation Environment and the recovery utility will appear. Click Recover to start system recovery.
V2401/2402 WinXP User’s Manual System Recovery Click OK when the recovery process is complete and system will reboot. Step 5: Change the BIOS Setting to Boot from Original Disk. Now, you need to change the boot priority so that it can boot from the original disk. As the system reboots, press DEL to enter BIOS setup menu. Select Hard Disk Boot Priority and press Enter. Make sure that the hard disk has first boot priority.
V2401/2402 WinXP User’s Manual System Recovery Press F10 and then press Enter to save and leave the BIOS settings. Step 6: Reboot the Computer. Remove the USB disk from the USB port before restarting and rebooting the V2401/2402-XPE. You need to wait for about ten to fifteen minutes while the system recovers. DO NOT power off or shut down the computer during this time or the IIS service will be terminated.