All other trademarks or registered marks in this manual belong to their respective manufacturers.
Disclaimer
Information in this document is subject to change without notice and does not represent a commitment on the
part of Moxa.
Moxa provides this document “as is,” without warranty of any kind, either expressed or implied, including, but
not limited to, its particular purpose. Moxa reserves the right to make improvements and/or changes to this
manual, or to the products and/or the programs described in this manual, at any time.
Information provided in this manual is intended to be accurate and reliable. However, Moxa assumes no
responsibility for its use, or for any infringements on the rights of third parties that may result from its use.
This product might include unintentional technical or typographical errors. Changes are periodically made to the
information herein to correct such errors, and these changes are incorporated into new editions of the
publication.
The Moxa EM-1240-LX Series of Mini RISC-based Ready-to-Run Embedded Computer features
dual 10/100 Mbps Ethernet ports and four RS-232/422/485 serial ports in a built-in µClinux
ARM9 module. In addition, EM-1240-LX provides SD memory card for storage expansion, offers
high performance communication and unlimited storage in a super compact, palm-size module.
EM-1240-LX is an ideal solution for embedded applications that use a lot of memory and must be
housed in a small physical space without sacrificing performance. This chapter covers the
following topics:
¾ Grounding EM-1240-LX
Connecting Data Transmission Cables
¾ Connecting to the Network
¾ Connecting to a Serial Device
¾ Serial Console Port
Internal SD Socket
Additional Functions
¾ Reset Button
¾ Real-time Clock
EM-1240-LX User’s Manual Introduction
Overview
The EM-1240-LX Series of mini RISC-based communication platforms are ideal for your
embedded applications. The EM-1240-LX comes with 4 RS-232/422/485 serial ports and dual
10/100 Mbps Ethernet LAN ports to provide users with a versatile communication platform.
The EM-1240-LX uses the MOXA ART ARM9 RISC CPU. Unlike the X86 CPU, which uses a
CISC design, the ARM9’s RISC design architecture and modern semiconductor technology
provide the EM-1240-LX with a powerful computing engine and communication functions, but
without generating too much heat. The built-in 8 MB NOR Flash ROM and 16 MB SDRAM give
you enough storage capacity and an additional SD socket provides you with flexible storage
expansion to run applications. The dual LAN ports built into the ARM9 make the EM-1240-LX an
ideal communication platform for some of the simple data acquisition and protocol conversion
applications, and the two RS-232/422/485 serial ports allow you to connect a variety of serial
devices.
The pre-installed µClinux operating system provides an open software operating system for
software program development. Software written for desktop PCs is easily ported to the
EM-1240-LX by using a GNU cross complier, so that you will not need to spend time modifying
existing software code. The operating system, device drivers, and your own software can all be
stored in the EM-1240-LX’s Flash memory.
Package Checklist
EM-1240-LX
Mini RISC-based ready-to-run embedded computer with 4 serial ports, dual Ethernet, SD, μClinux
OS.
EM-1240-LX Series products are shipped with the following items:
• 1 EM-1240 embedded module
• 1 EM-1240 Development Kit (optional)
• Quick Installation Guide
• Document & Software CD
• Cross-over Ethernet cable
• CBL-RJ45M9-150: 150 cm, 8-pin RJ45 to male DB9 serial port cable
• CBL-RJ45F9-150: 150 cm, 8-pin RJ45 to female DB9 console port cable
• Power cord
• Product Warranty Statement
NOTE: Notify your sales representative if any of the above items are missing or damaged.
Product Features
EM-1240-LX Series products have the following features:
• MOXA ART ARM9 32-bit 192 MHz communication processor
• On-board 16 MB RAM, 8 MB Flash ROM
• 4 software-selectable RS-232/422/485 serial ports
• 2 10/100 Mbps Ethernet
• RS-232 console full signal and PPP supported
• Ready-to-run μCLinux Kernel 2.6.9 communication platform
• SD signal supported
1-2
EM-1240-LX User’s Manual Introduction
Product Specifications
Hardware Specifications
Model
CPU
RAM
Flash
LAN
LAN Protection
Serial Port
Serial Console
Storage Expansion
EM-1240 Embedded Module
MOXA ART ARM9 32-bit 192 MHz processor
16 MB
8 MB
Auto-sensing 10/100 Mbps x 2
Built-in 1.5 KV magnetic isolation
Four serial ports supporting RS-232/422/485 signals
JFFS2 for Kernel, Root File System (Read Only) and User Directory
(Read / Write)
Minix shell command
Dial in/out over serial port daemon
Point-to-Point over Ethernet daemon
SNMP V1/V2c Agent daemon
Linux normal command utility
login and user manager utility
Telnet server daemon
Telnet client program
TCP server manager program
FTP server program
FTP client program
Web server daemon
Network Time Protocol client utility
Tool Chain
Arm-elf-gcc (V2.95.3): C/C++ PC Cross Compiler
uClibc (V0.9.26): POSIX standard C library
Arm-elf-gcc (V2.95.3): C/C++ PC Cross Compiler
uClibc (V0.9.26): POSIX standard C library
UC’s LAN IP broadcast searching utility for Windows and Linux
1-4
EM-1240-LX User’s Manual Introduction
Hardware Block Diagram
Appearance
EM-1240 Embedded Module + Development Kit
EM-1240
Development Kit
EM-1240
Embedded Module
1-5
EM-1240-LX User’s Manual Introduction
EM-1240 Embedded Module
EM-1240 Development Kit
1-6
EM-1240-LX User’s Manual Introduction
Dimensions
EM-1240 Embedded Module.
EM-1240 Development Kit
1-7
EM-1240-LX User’s Manual Introduction
Installing the EM-1240-LX
If you would like to use the EM-1240 Embedded Module and the EM-1240 Development Kit,
insert the EM-1240 Embedded Module vertically onto the Development Kit. Note that the pin
marked “JP4” on the Embedded Module must be matched with the pin marked “JP6” on the
Development Kit; and the Pin marked “JP3” on the Embedded Module must be matched with the
Pin marked “JP4” on the Development Kit. Be careful when inserting the module to avoid
damaging the product.
LED Indicators
The following table explains the function of the five LED indicators located on the EM-1240-LX’s
top panel.
LED Name LED Color LED Function
Ready Green Power is on and functioning normally.
Green Serial port 1 or 2 is transmitting data. P1/P2 (Tx)
Off Serial port 1 or 2 is not transmitting data.
Yellow Serial port 1 or 2 is receiving data. P1/P2 (Rx)
Off Serial port 1 or 2 is not receiving data.
Wiring Requirements
This section describes how to connect the EM-1240-LX to serial devices.
You should heed the following common safety precautions before proceeding with the installation
of any electronic device:
yUse separate paths to route wiring for power and devices. If power wiring and device wiring
paths must cross, make sure the wires are perpendicular at the intersection point.
NOTE: Do not run signal or communication wiring and power wiring in the same wire
conduit. To avoid interference, wires with different signal characteristics should be routed
separately.
yUse the type of signal transmitted through a wire to determine which wires should be kept
separate. The rule of thumb is that wiring that shares similar electrical characteristics can be
bundled together.
y Keep input wiring and output wiring separate.
y It is advisable to label the wiring to all devices in the system.
1-8
EM-1240-LX User’s Manual Introduction
ATTENTION
Safety First!
Be sure to disconnect the power cord before installing and/or wiring your EM-1240-LX.
Wiring Caution!
Calculate the maximum possible current in each power wire and common wire. Observe all
electrical codes dictating the maximum current allowable for each wire size.
If the current goes above the maximum ratings, the wiring could overheat, causing serious
damage to your equipment.
Temperature Caution!
Be careful when handling the EM-1240-LX. When plugged in, the EM-1240-LX’s internal
components generate heat, and consequently the outer casing may feel hot to the touch.
Connecting the Power
Connect the “live-wire” end of the 12-48 VDC power adapter to the EM-1240-LX’s terminal block.
If the power is properly supplied, the “Ready” LED will glow a solid green after a 25 to 30 second
delay.
Grounding the EM-1240-LX
Grounding and wire routing help limit the effects of noise due to electromagnetic interference
(EMI). Run the ground wire from the ground screw to the grounding surface prior to connecting
devices.
ATTENTION
This product should be mounted to a well-grounded mounting surface such as a metal panel.
SG
V+V-
12-48V
SG: The Shielded Ground (sometimes called
Protected Ground) contact is the left most contact
of the 3-pin power terminal block connector when
viewed from the angle shown here. Connect the
SG wire to an appropriate grounded metal surface.
Connecting Data Transmission Cables
This section describes how to connect the EM-1240-LX to the network, serial devices, and serial
COM terminal.
1-9
EM-1240-LX User’s Manual Introduction
Connecting to the Network
Connect one end of the Ethernet cable to the EM-1240-LX’s 10/100M Ethernet port and the other
end of the cable to the Ethernet network. If the cable is properly connected, the EM-1240-LX will
indicate a valid connection to the Ethernet in the following ways:
yThe top-right LED on the connector glows a solid green when connected to a 100 Mbps
Ethernet network.
yThe top-left LED on the connector glows a solid orange when connected to a 10 Mbps
Ethernet network.
yThe LEDs will flash when Ethernet packets are being transmitted or received.
The 10/100 Mbps Ethernet LAN 1 and LAN 2 ports use 8-pin RJ45 connectors. Pinouts for these
ports are given in the following diagram.
8-pin RJ45
10 Mbps
indicator
1
100 Mbps
indicator
8
Pin Signal
1 ETx+
2 ETx3 ERx+
4 --5 --6 ERx7 --8 ---
Connecting to a Serial Device
Connect the serial cable between the EM-1240-LX and the serial device(s).
Serial ports P1 and P2 use male DB9 connectors, and can be configured for RS-232/422/485 by
software. The pin assignments are shown in the following table:
The serial console port is a 4-pin pin-header RS-232 port. It is designed for serial console
terminals, which are useful for identifying the EM-1240-LX boot up message.
Serial Console Port & Pinouts
4
3
2
1
Pin Signal
1 TxD
2 RxD
3 NC
4 GND
Internal SD Socket
The EM-1240-LX provides an internal SD socket for storage expansion. It allows users to plug in a
Secure Digital (SD) memory card compliant with the SD 1.0 standard for up to 1 GB of additional
memory space. To install an additional SD card, you must first remove the EM-1240-LX’s outer
cover to access the slot. The internal SD socket is located at the backside of the EM-1240-LX
bottom board; you can find the SD plug-in slot at the right of the EM-1240-LX, lower than the
cover screw. Plug the SD card into the socket directly and remember to press the SD card first if
you want to take it out. Please note that the SD function shares the same chipset with DIO. If you
would like to enable SD function, the DIO must be disabled. If you would like to enable DIO, the
SD function must be disabled.
Additional Functions
Serial Console Cable
Reset Button
Press the Reset button on the EM-1240-DK continuously for at least 5 seconds to load the factory
default configuration. After the factory default configuration has been loaded, the system will
reboot automatically. We recommend that you only use this function if the software is not working
properly and you want to load factory default settings. To reset an embedded Linux system, always
use the software reboot command />reboot to protect the integrity of data being transmitted or
processed. The Reset button is not designed to hard reboot the EM-1240 Development Kit.
1-11
EM-1240-LX User’s Manual Introduction
ATTENTION
Resetting to factory defaults will not format the user directory and erase all of the user’s data.
Loading factory defaults will only load the configuration file. The files in the EM-1240-LX that
will be replaced include:
a. /etc/boa.conf
b. /etc/hosts
c. /etc/inittab
d. /etc/password
e. /etc/ramfs.img
f. /etc/resolv.conf
g. /etc/version
h. /etc/group
i. /etc/inetd.conf
j. /etc/motd
k. /etc/protocols
l. /etc/rc
m. /etc/services
n. /home/httpd/index.html
ATTENTION
This function only takes effect when the user directory is working correctly. If the user directory
has crashed, the kernel will automatically load the factory defaults.
Real-time Clock
The EM-1240-LX’s real time clock is powered by a lithium battery. We strongly recommend that
you do not replace the lithium battery without the help of Moxa’s support team. If the battery
needs to be changed, contact the Moxa RMA service team for RMA service.
ATTENTION
The battery may explode if replaced by an incorrect type. To avoid this potential danger, always
be sure to use the correct type of battery.
1-12
2
2
Chapter 2 Getting Started
In this chapter, we explain the basic procedure for getting the EM-1240-LX connected and ready
for your needs.
In this chapter, we cover the following topics:
Powering on the EM-1240-LX
Connecting the EM-1240-LX to a PC
¾ Console Port
¾ Telnet
Configuring the Ethernet Interface
Installing a Secure Digital (SD) Memory Card
Developing Your Applications
¾ Installing the EM-1240-LX Tool Chain
¾ Compiling Hello.c
¾ Uploading “Hello” to the EM-1240-LX
¾ Running “Hello” on the EM-1240-LX
¾ Make File Sample Code
EM-1240-LX User’s Manual Getting Started
Powering on the EM-1240-LX
Connect the SG wire to the Shielded Contact located on the upper left corner of the EM-1240-LX,
and then power on the EM-1240-LX by connecting the power adaptor. It takes about 16 seconds
for the system to boot up. Once the system is ready, the Ready LED will light up.
ATTENTION
After connecting the EM-1240-LX to the power supply, it will take about 16 seconds for the
operating system to boot up. The green Ready LED will not turn on until the operating system is
ready.
Connecting the EM-1240-LX to a PC
There are two ways to connect the EM-1240-LX to a PC.
Console Port
The serial console port offers users a
convenient means of connecting to the
EM-1240-LX. This method is particularly
useful when using the EM-1240-LX for the
first time. Since the communication is over a
direct serial connection, you do not need to
know either of the IP addresses in order to
make contact.
Use the serial console port settings shown on
the right. Once the connection is established,
the following window will open.
Serial Console Port Settings
Baudrate
Parity
Data bits
Stop bits
Flow Control
Terminal
19200 bps
None
8
1
None
VT100
2-2
EM-1240-LX User’s Manual Getting Started
Telnet
If you know at least one of the
two IP addresses and netmasks,
then you can use Telnet to
connect to the EM-1240-LX’s
console.
Telnet can be used locally by using a crossover Ethernet cable to connect your computer to the
EM-1240-LX, or over a LAN or the Internet. The default IP addresses and netmasks are shown
above. To login, type the Login name and password as requested. The defaults are:
Login: root
Password: root
LAN 1
LAN 2
Default IP Address Default Netmask
192.168.3.127 255.255.255.0
192.168.4.127 255.255.255.0
Once you open the “msh command shell” you can proceed to configure the EM-1240-LX’s
network settings, as described in the next section.
ATTENTION
ySerial Console Reminder: Remember to choose VT100 as the terminal type. Use the
CBL-RJ45F9-150 cable that comes with the EM-1240-LX to connect to the serial console
port. If you are not able to conect on the first try, unplug and then re-plug the EM-1240-LX’s
power cord.
yTelnet Reminder: When connecting to the EM-1240-LX over a LAN, you must configure
your PC’s Ethernet card to be on the same subnet as the EM-1240-LX you wish to contact.
2-3
EM-1240-LX User’s Manual Getting Started
Configuring the Ethernet Interface
In this section, we use the serial console to explain how to modify the EM-1240-LX’s network
settings.
1. Change directories by issuing the command cd /etc.
2. Type the command vi rc to use the VI Editor to edit the configuration file. The IP addresses
for the EM-1240-LX’s LAN1 and LAN2 are given as
ifconfig eth0 192.168.3.127
ifconfig eth1 192.168.4.127
as shown in the following figure. Edit these two lines to modify the static IP addresses.
2-4
Loading...
+ 44 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.