NE-4100 Series Serial Command Mode User’s Guide www.moxa.com/product First Edition, September 2004 Moxa Technologies Co., Ltd. Tel: +886-2-8919-1230 Fax: +886-2-8919-1231 www.moxa.com support@moxa.com.tw (Worldwide) support@moxa.
NE-4100 Series Serial Command Mode User’s Guide 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 2004 Moxa Technologies Co., Ltd. All rights reserved. Reproduction without permission is prohibited. Trademarks MOXA is a registered trademark of The Moxa Group. All other trademarks or registered marks in this manual belong to their respective manufacturers.
Table of Contents Chapter 1 Introduction ..................................................................................................... 1 Chapter 2 Serial Command Format and Command Set ................................................ 2 Chapter 3 Operation Flow Chart...................................................................................... 7 Chapter 4 Configuring Serial Command Mode by Entering Trigger Type .................. 8 Network Enabler Administrator.........................
NE-4100 Series Serial Command Mode User’s Guide 1 Chapter 1 Introduction The Serial Command Mode function described in this User’s Guide is built into the firmware of the Command Mode models of Moxa’s NE-4100 Series of Embedded Network Enablers. All five models, which are listed below, support auto-detecting 10/100 Mbps Ethernet.
NE-4100 Series Serial Command Mode User’s Guide 2 Chapter 2 Serial Command Format and Command Set In this chapter, we describe the structure of the data frames used to issue commands and receive replies to and from the device.
NE-4100 Series Serial Command Mode User’s Guide Reply Code Settings Y 1 2 3 4 5 E Comments Command was executed successfully Command not supported OP code not supported Invalid command encapsulation Invalid parameter Invalid return value Enter serial command mode OP Code / Parameter OP Code Parameter Settings BS BV BN BW BT BP BR NC NP NM NG NA AS AA | AP Device setting read only read only alphanumeric (Max. 15 bytes) 0: Disable 1: Enable 0: Disable 1: Enable alphanumeric (Max.
NE-4100 Series Serial Command Mode User’s Guide OP Code Settings Aa | Ap Parameter Device setting xxx.xxx.xxx.xxx | xxx.xxx.xxx.xxx (e.g., 255.255.255.0) Accessible Netmask 01 | Accessible Netmask 16 OM 0: Real COM 1: TCP Server 2: TCP Client 3: UDP Mode TM TL TT TI TX 1–4 0 – 65535 0 – 99 (minutes) 0 – 65535 (ms) 0: Disable 1: Enable 1 character 2: Enable 2 characters ascii character (e.g., ‘a1’) ascii character (e.g.
NE-4100 Series Serial Command Mode User’s Guide OP Code Settings C1 C2 C3 C4 CT CI CX CY CZ CF UL UA UB UC UD Ua Ub Uc Ud U1 U2 U3 U4 UX UY UZ Parameter Device setting 0 – 65535 0 – 65535 0 – 65535 0 – 65535 0 – 99 (minutes) 0 – 65535 (ms) 0: Disable 1: Enable 1 character 2: Enable 2 characters ascii character (e.g., ‘a1’) ascii character (e.g., ‘a1’) 0 – 65535 (ms) Client Port 1 Client Port 2 Client Port 3 Client Port 4 TCP Alive Check Timeout Inactivity Timeout Number of delimiters 0 – 65535 xxx.
NE-4100 Series Serial Command Mode User’s Guide OP Code Settings UF DM DS Parameter Device setting 0 – 65535 (ms) Force Tx Timeout Digital IO DIO Mode bytes 1 and 2 (DIO #): 0: DIO_0 1: DIO_1 2: DIO_2 3: DIO_3 byte 3 (DIO Mode) 0: input 1: output bytes 1 and 2 (DIO #) 0: DIO_0 1: DIO_1 2: DIO_2 3: DIO_3 (e.g., ‘000’ sets DIO_0 to input mode) DIO Status (e.g.
NE-4100 Series Serial Command Mode User’s Guide 3 Chapter 3 HW Trigger Poll DIO 0 Status DIO 0 High (HW Trigger Disabled) Operation Flow Chart Check Serial Command Mode Trigger Normal Serial-to-Ethernet Function DIO 0 Low (HW Trigger Enabled) SW Trigger Normal Data Detected Check Serial Port Data 3-character Trigger Detected Enter Serial Command Process Command NOTE Exit Command Mode and Restart 1. This flowchart represents a continual process.
NE-4100 Series Serial Command Mode User’s Guide 4 Chapter 4 Configuring Serial Command Mode by Entering Trigger Type In this chapter, we explain how to configure the type of trigger (hardware or software) that will activate Serial Command Mode. The trigger type can configured over the network with Network Enabler Administrator, Telnet Console, or Web Console, or through the serial console port by Serial Console. Network Enabler Administrator Network Enabler Administrator 2.
NE-4100 Series Serial Command Mode User’s Guide 3. Once the NE-4100-CMD is located, click on the product’s Model to highlight it, and then click the right mouse button. Select the Configuration option. 4. Check the Modify box to change the configuration. If the Enable box is not checked, then Serial Command Mode is disabled. There are two Enable options: HW Trigger Select H/W Control Pin (Use DIO 0) to trigger Command Mode by hardware.
NE-4100 Series Serial Command Mode User’s Guide NOTE 1. The default setting is HW Trigger Enabled. 2. Only one of the two trigger types (HW or SW) can be set at the same time. Telnet Console The Telnet Console provides a convenient text-based utility to configure your NE-4100-CMD. Keep in mind that if you are using Telnet to access a Network Enabler connected to the same LAN as your PC, the Network Enabler and PC must be on the same subnet. 1. From the DOS command prompt, type telnet 192.168.127.
NE-4100 Series Serial Command Mode User’s Guide Web Console The Network Enabler Web Console provides ready access to NE-4100-CMD via web browser. To access the Web Console, open your browser, type the NE-4100-CMD’s IP address in the Address field (default = 192.168.127.254), and then press Enter. 1. The NE-4100-CMD homepage will open. 2. Click on the Serial Command Mode folder under the left Main Menu.
NE-4100 Series Serial Command Mode User’s Guide 3. Modify the Trigger Setting and SW Trigger Character as needed, and then click on Submit. Serial Console To access NE-4100-CMD’s Serial Console utility, connect the Network Enabler Starter Kit’s serial console port (P1) to your PC’s serial port, and then use a terminal emulator program (such as Moxa PComm Terminal Emulator) to enter the Console Utility. The serial console port settings are “19200, no, 8, 1”.
NE-4100 Series Serial Command Mode User’s Guide 5 Chapter 5 Entering Serial Command Mode In this chapter, we explain how to enter Serial Command Mode. Trigger Type There are two types of trigger, HW (Hardware) and SW (Software). HW Trigger ! HW Trigger is passed through the GPIO 0 pin. ! Pull GPIO 0 as low to trigger (the pin will normally pull high). Note that the low level trigger must persist for more than 200 ms to qualify as a valid trigger.
NE-4100 Series Serial Command Mode User’s Guide Serial Port Parameters The serial port paramters for port P0 can be obtained from Network Enabler Administrator, or Network Enabler Console. For example, from Network Enabler Administrator, open the NE’s Confiuration panel, click on the Serial tab, click on the port’s information line to highlight it, and then click on Settings to open the Serial Settings window. Comments 1.
NE-4100 Series Serial Command Mode User’s Guide 6 Chapter 6 Exiting Serial Command Mode There are three ways to exit Serial Command Mode. All settings made while in command mode will be stored in RAM. After excuting Save / Restart, the settings will be saved in the flash memory. 1. Power Off Configuration will not take effect after powering back on, since the modifications were not saved. 2. Exit by Command (OP Code: BR) There are two possible exit behaviors ! Save & Restart ! 3.
NE-4100 Series Serial Command Mode User’s Guide 7 Chapter 7 Determining the Active Mode There are two ways to check if NE-4100-CMD is in Command Mode or Communication Mode. By Network Enabler Administrator Network Enabler Administrator displays clearly the active operation mode in the Configuration panel’s left Information column. In the example shown below, Status is listed as Data Mode, which indicates normal data transmission. Data Mode Data Mode implies normal data transmission.
NE-4100 Series Serial Command Mode User’s Guide By Text via the Serial Port If the NE module is in serial command mode, it will respond with a short message after receiving the serial command end character 0x0d, allowing the user to send a specific string or character to check if it is in serial command mode.
NE-4100 Series Serial Command Mode User’s Guide 8 Chapter 8 SW Reset Function Network Enabler Administrator provides an easy way to enable NE-4100-CMD’s software reset function. To enable this function, open the NE’s Configuration page, .click on the Digital IO tab, and then check the Enable SW RESET Function (Use DIO 1) checkbox. As indicated, the RESET command will be transmitted through GPIO1. NOTE ! SW Reset Pin: GPIO 1 ! Reset is executed by pulling GPIO 1 low (normal is pulling high) a.
NE-4100 Series Serial Command Mode User’s Guide 9 Chapter 9 Factory Defaults The factory default settings for the serial port, Ethernet port, operation mode, and trigger method are given in this chapter. Serial Port Defaults Baud Rate (transmission rate) 9600 bps Parity None Data Bits 8 Stop Bit 1 Flow Control No FIFO Enabled Ethernet Port Defaults IP Configuration Static IP Address 192.168.127.254 Netmask 255.255.255.
NE-4100 Series Serial Command Mode User’s Guide 10 Chapter 10 Demonstration/Testing Environment In this chapter, we give four examples that can be used to test the function of NE-4100-CMD. The testing environment is as follows: Hardware ! PC that has an RS-232 serial port. ! NE Starter Kit Software ! Windows operating system installed on testing PC. ! Network Enabler Administrator (NE Utility; installation program is on the NE software CD).
NE-4100 Series Serial Command Mode User’s Guide Example 1: Get Model Name using HW Trigger STEP 1: STEP 2: STEP 3: STEP 4: STEP 5: STEP 6: STEP 7: STEP 8: NOTE Configure trigger mode to HW trigger (Chap. 4). Check NE’s serial port settings (Chap. 5). Start Windows HyperTerminal and set PC’s serial port settings to the same settings recorded in STEP 2. Pull NE’s GPIO 0 to Low to enter Serial Command Mode. HyperTerminal displays “
NE-4100 Series Serial Command Mode User’s Guide Example 3: Get IP Mode using SW Trigger STEP 1: STEP 2: STEP 3: STEP 4: STEP 5: STEP 6: STEP 7: STEP 8: NOTE Configure trigger mode to SW trigger, and check the three trigger characters. For this example, assume the trigger is “2B 2B 2B” (Chap. 4). Check NE’s serial port settings (Chap. 5). Start Windows HyperTerminal and set PC’s serial port settings to the same settings recorded in STEP 2.