NPort 1220/1240 USB-to-Serial Hub User’s Manual First Edition, May 2003 Moxa Technologies Co., Ltd. Tel: +866-2-8919-1230 Fax: +886-2-8919-1231 www.moxa.com support@moxa.com.
NPort 1220/1240 USB-to-Serial Hub User’s Manual The 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 2003 Moxa Technologies Co., Ltd. All rights reserved. Reproduction without permission is prohibited. Trademarks MOXA is a registered trademark of Moxa Technologies Co., Ltd. All other trademarks or registered marks in this manual belong to their respective manufacturers.
Table of Contents Chapter 1 Introduction ......................................................................................1-1 Chapter 2 Driver Installation.............................................................................2-1 Chapter 3 Serial Programming Tools ..............................................................3-1 Appendix A Technical Reference ....................................................................... A-1 Appendix B Service Information .......................
1 Chapter 1 Introduction Welcome to MOXA NPort 1220/1240 USB-to-Serial Hub. NPort 1220 provides 2 RS-422/485 serial ports and NPort 1240 provides 4 RS-232 serial ports.
Overview Connect a compact NPort 1200 Series product to your computer—you don’t even have to power-down—install the supplied software, and then connect your serial devices directly to the NPort. In minutes, and with state-of-the-art accuracy, you’re capturing data—temperature, pressure, sound level, whatever you need. And you’ve done this without programming, without opening up your PC, without even thinking about IRQs, board configuration, power requirements, or connection schemes.
Introduction Product Specifications NPort 1240 USB Compliant with USB 1.1, 1.0 USB 2.0 backwards compatible Connector USB type B Speed Full speed 12 Mbps Serial No. of Ports Interface Connector FIFO Serial line protection 4 RS-232: TxD, RxD, RTS, CTS, DTR, DSR, GND DB9 Male 64 bytes 16 KV ESD for all signals Serial Communication Parameters Parity None, Even, Odd Data bits 7, 8 Stop bit 1, 2 Flow Control ADDC (Auto Data Direction Control) Speed 600 to 115.
NPort 1220 USB Compliant with USB 1.1, 1.0 USB 2.0 backwards compatible Connector USB type B Speed Full speed 12 Mbps Serial No. of Ports Interface Connector FIFO Serial line protection 2 4-wire RS-422: TxD+/-, RxD+/-, GND 4-wire RS-485: TxD+/-, RxD+/-, GND 2-wire RS-485: Data+/-, Data+/-, GND Terminal Block 64 bytes 16 KV ESD for all signals Serial Communication Parameters Parity None, Even, Odd Data bits 7, 8 Stop bit 1, 2 Flow Control ADDC (Auto Data Direction Control) Speed 600 to 115.
Introduction Panel Layout Å NPort 1240 Top Panel Å NPort 1220 Top Panel Å NPort 1240 serial interfaces Å NPort 1220 serial interfaces NPort 1220/1240 USB-to-Serial Hub User’s Manual 1-5
Dimensions Å NPort 1240 Å NPort 1220 DIP Switch Settings This example shows DIP Switch settings for port 1, which uses DIP Switches 1 and 2. The settings for port 2, which uses DIP Switches 3 and 4, are similar. You can refer to the DIP Switch diagrams at the right, or to the table on the next page for the correct settings.
Introduction DIP Switch No.
2 Chapter 2 Driver Installation This chapter includes information about installing the driver for NPort 1220/1240.
Installing the Driver 1. Connect NPort 1220/1240’s USB Port to your computer’s USB port. Make sure NPort 1220/1240 and your computer is properly connected. 2. After you connect NPort 1220/1240 to your computer, a Found New Hardware window will automatically open. 3. When the Found New Hardware Wizard starts up, click Next to continue installing the USB driver. 4. The setup program will prompt you with an Install Hardaware Device Drivers window.
Driver Installation 5. A window will open asking you where you want to locate the driver files. Check Specify a location box, .and then click Next. 6. A window will open asking you to insert the installation disk. Insert the installation disk into your CD drive,and then click Browse to locate the installation file.
7. Select klsibus.inf, and then click OPEN. 8. 2-4 Click OK to continue.
Driver Installation 9. A window will open showing the Driver Files Search Results. Click Next to install the driver. 10. When the Completing the Found New Hardware Wizard window opens, click Finish to close the wizard.
11. A welcome message will appear. Click Next to continue installing Moxa [Port 1]. 12. A window will open asking you to insert the installation disk. Insert the installation disk into your CD drive, and then click Browse to locate the installation file. Select klsiw2k.inf and then click OPEN. Click OK to continue.
Driver Installation 13. A window will open showing the Driver Files Search Results. Click Next to install the driver. 14. When Completing the Found New Hardware Wizard window opens, click Finish to close this wizard.
NOTE 2-8 If you wish to install the driver using “Install Driver” program, you will need to follow the instructions below. 1. Insert the software CD (included in the NPort 1220/1240 package) into your computer’s CD drive, and then click on Install Software. 2. When the Install Driver window opens, click on Install to install the driver files in the default folder (C:\Program Files\Moxa USB to Serial\drivers), or click on Browse to select a different folder. 3. Click OK to complete the installation.
Driver Installation Checking the Installation You can check the installation of NPort 1220/1240 under your computer’s Device Manager window. You should check under both Ports (COM & LPT) and Universal Serial Bus controllers. Windows 98 Windows 2000/XP NOTE To double check that the driver and port installation is correct, unplug the NPort 1220/1240 from your computer’s USB port—while the Device Manager window is open.
Configuring the Ports Port configuration for NPort 1220/1240 differs slightly between Windows 98 and Windows 2000/XP. To modify the configuration for a particular port, double click on the listing for that port under Ports (COM & LPT) in the Device Manager window. Windows 98 Click on the Port Settings tab to change the Bits per second (data transmission speed), Data bits, Parity, Stop bits, and Flow control. Click on Advanced… to open the Advanced Port Settings to modify FIFO buffer settings.
Driver Installation Windows 2000/XP The figures shown here were created under Windows 2000. The procedure for Windows XP is essentially the same. Click on the Port Settings tab to change the Bits per second (data transmission speed), Data bits, Parity, Stop bits, and Flow control. Click on Advanced… to open the Advanced Port Settings to modify FIFO buffer settings. You may also select a new COM port number using the drop-down list located next to COM Port Number.
Uninstalling the Driver To uninstall the driver, open the Device Manger window, and simply delete the NPort 1220/1240 ports under Ports (COM&LPT). NOTE If you used the Install Driver program discussed at the beginning of this chapter, you can make use of the Uninstall Driver program to remove the driver files from the directory in which they were installed, and uninstall NPort 1220/1240’s ports. 1. Click on Uninstall to start the uninstallation procedure. 2. Click OK. 3.
3 Chapter 3 Serial Programming Tools Moxa supports a class of easy to use, yet powerful serial programming libraries and communication troubleshooting utilities under Windows NT/2000/XP and Windows 95/98. Use these MOXA Serial Programming Tools to decrease your software development time. In the following sections, we describe the installation of the library, and the utilities supported for various programming platforms.
Overview PComm, a professional serial comm tool for PCs, is a software package that runs under Windows NT/2000/XP and Windows 95/98. PComm provides: z A powerful serial communication library for easy programming in the most popular programming languages. The serial communication library is useful for developing applications for data communications, remote access, data acquisition, and industrial control under Windows NT/2000/XP or Windows 95/98.
Serial Programming Tools Diagnostic (for MOXA boards only) A convenient diagnostic program, ONLY for MOXA boards and ports, provides internal and external testing of IRQ, TxD/RxD, UART, CTS/RTS, DTR/DSR, DTR/DCD, etc. It allows the user to check the function of both software and hardware. To run the Diagnostic program, click on Start Æ Program Æ PComm Lite Æ Diagnostic.
Terminal Emulator Terminal Emulator can be used to connect to various ports to see if data transmission is functioning correctly. Terminal Emulator features multi-windows, and supports VT100 and ANSI terminal types. You can transfer data interactively, send patterns periodically, and transfer files using ASCII, XMODEM, YMODEM, ZMODEM, and KERMIT protocols. To run Terminal Emulator, click on Start Æ Program Æ PComm Lite Æ Terminal Emulator.
A Appendix A Technical Reference In this appendix, we cover the following topics.
Win32 API Function Compatible List Windows 98 Test function 1. PurgeComm 2. ClearCommBreak() 3. SetCommBreak() 4. ClearCommError 5. EscapeCommFunction 6. GetCommMask 7. GetCommModemStatus() 8. SetCommMask 10. SetCommState 11.SetCommTimeouts 13. HWFlowContrl() 14. CloseHandle() 15.
Technical Reference Windows 2000/XP Test function 1. PurgeComm Test Flag PURGE_TXABORT PURGE_RXABORT PURGE_TXCLEAR 2. ClearCommBreak() 3. SetCommBreak() 4. ClearCommError 5. EscapeCommFunction CE_BREAK CE_RXPARITY CE_FRAME CE_RXOVER fCtsHold fDsrHold fXoffHold cbInQue cbOutQue SETDTR SETRTS SETXON SETXOFF SETBREAK,CLRBREAK 6. GetCommMask EV_CTS EV_DSR EV_RING EV_RLSD EV_RXCHAR EV_RXFLAG EV_TXEMPTY 8. GetCommModemStatus() 9. SetCommMask 10.
11.SetCommTimeouts 12. HWFlowContrl() 13. ReadFile() ReadIntervalTimeout ReadTotalTimeoutMultiplier ReadTotalTimeoutConstant WriteTotalTimeoutMultiplier WriteTotalTimeoutConstant dcb.fRtsControl=RTS_CONTROL_HANDSHAKE General Technical Reference Question 1 Why does the port stop responding when I use a program to fast open/close the port? On the other hand, if I just do a normal port open/close, the port will stop responding after about 100 times.
B Appendix B Service Information This appendix shows you how to contact Moxa for information about this and other products, and how to report problems. In this appendix, we cover the following topics.
MOXA Internet Services Customer satisfaction is our number one concern, and to ensure that customers receive the full benefit of our products, Moxa Internet Services has been set up to provide technical support, driver updates, product information, and user’s manual updates. The following services are provided E-mail for technical support ............................... support@moxa.com.tw World Wide Web (WWW) Site for product information: ............................ http://www.moxa.com .................
Service Information Problem Report Form MOXA NPort 1220/1240 Customer name: Company: Tel: Fax: Email: Date: 1. Moxa Product: NPort 1220 2. Serial Number: NPort 1240 _________________ Problem Description: Please describe the symptoms of the problem as clearly as possible, including any error messages you see. A clearly written description of the problem will allow us to reproduce the symptoms, and expedite the repair of your product.
Product Return Procedure For product repair, exchange, or refund, the customer must: Provide evidence of original purchase. Obtain a Product Return Agreement (PRA) from the sales representative or dealer. Fill out the Problem Report Form (PRF). Include as much detail as possible for a shorter product repair time. Carefully pack the product in an anti-static package, and send it, pre-paid, to the dealer.