31
EM100 Ethernet Module (EM100SK Starter Kit) Tibbo TECHNOLOGY Technical Manual* 46mm No external components, just add a connector h=13mm 28mm Tibbo NetModule TIBBO TECH. INC. TAIWAN MODEL NO: EM100 PART NO: EM100-00 S/N: A 0801 0601 Please, register at www.tibbo.com to receive update notifications Version: 2.1a Tibbo Technology, Inc. 2001, 2002 * Formerly User’s Manual Thank you for taking an interest in Tibbo’s Products! Always check for updates! Our every Product is an “ongoing Project”. Basing on our Customer’s feedback we are constantly working on improving and enhancing the EM100 Ethernet Module. Chances are, the User’s Manual you are reading now is outdated. Visit our website at www.tibbo.com for up-to-the-minute firmware, software, and documentation. You can also subscribe to our periodic e-mail newsletter to stay informed on the latest developments at Tibbo Technology. The EM100 can be customized in many ways. Have an idea? Let us know now ! Is this Manual for you? This User’s Manual was designed to serve as a reference for Hardware Engineers, Software Developers and System Integrators seeking in-depth information on the EM100 functionality and programming. Our Connectivity Manual provides an additional information on the installation, setup, and use of the EM100-enabled devices and Tibbo Device Server Toolkit software ( including Virtual Serial Port Driver). This Manual assumes that the Reader is a technical specialist with a knowledge of Ethernet and TCP/IP networking Is your firmware up to date? This Manual describes the functionality of the EM100 Ethernet Module running V2.1x firmware. If your EM100 has an older firmware you need to upgrade to this new firmware first. See Firmware Download Mode for a complete information on how to upgrade the EM100.

EM100 Tech Manual V2_1a (Print)

Embed Size (px)

Citation preview

Page 1: EM100 Tech Manual V2_1a (Print)

EM100 Ethernet Module (EM100SK Starter Kit) Tibbo

TECHNOLOGY

Technical Manual*

46mm

No external components,just add a connector h=13mm

28mm

TibboNetModule

TIBBO TECH. INC. TAIWANMODEL NO: EM100PART NO: EM100-00S/N: A 0801 0601

Please, register at www.tibbo.com to receive update notifications Version: 2.1a

Tibbo Technology, Inc. 2001, 2002

* Formerly User’s Manual

Thank you for taking an interest in Tibbo’s Products!

Always check for updates!

Our every Product is an “ongoing Project”. Basing on our Customer’s feedback we are constantly working on improving and enhancing the EM100 Ethernet Module. Chances are, the User’s Manual you are reading now is outdated. Visit our website at www.tibbo.com for up-to-the-minute firmware, software, and documentation. You can also subscribe to our periodic e-mail newsletter to stay informed on the latest developments at Tibbo Technology.

The EM100 can be customized in many ways. Have an idea? Let us know now!

Is this Manual for you?

This User’s Manual was designed to serve as a reference for Hardware Engineers, Software Developers and System Integrators seeking in-depth information on the EM100 functionality and programming. Our Connectivity Manual provides an additional information on the installation, setup, and use of the EM100-enabled devices and Tibbo Device Server Toolkit software ( including Virtual Serial Port Driver).

This Manual assumes that the Reader is a technical specialist with a knowledge of Ethernet and TCP/IP networking

Is your firmware up to date?

This Manual describes the functionality of the EM100 Ethernet Module running V2.1x firmware. If your EM100 has an older firmware you need to upgrade to this new firmware first. See Firmware Download Mode for a complete information on how to upgrade the EM100.

Page 2: EM100 Tech Manual V2_1a (Print)

3

Seekin

g fu

rther assistan

ce

If you cannot find an answer to your question or problem

you are encouraged to send us an e-mail:

• support@

tibbo.com for technical problem

s

• feedback@

tibbo.com for your suggestions

• sales@

tibbo.com for sales inquiries

• info@

tibbo.com for all “other” inquiries

Ho

w to

prin

t ou

t this M

anu

al

This M

anual is supplied in two form

s: screen-optimized and print-optim

ized. Use the screen-optim

ized docum

ent ( EM

100 Technical M

anual) to conveniently view the M

anual on your PC

screen. Use the print-

optimized version of the above (E

M100 T

echnical Manual (print)) to m

ake a hardcopy of the Manual. T

he printed version arranges 2 sm

all document pages per single A

4 sheet.

4

Tab

le of C

on

tents

1. Introduction

6 1.1.

What is the E

M100?

6 1.2.

Three basic w

ays of using the EM

100 6

2. C

ontrols, operating modes, and signals

Erro

r! Bo

okm

ark no

t defin

ed.

2.1. E

M100 connectors and controls

7 2.2.

Operating m

odes 8

2.3. S

umm

ary of Status LE

D signals

14 3.

Operation in the N

ormal M

ode 20

3.1. G

eneral information

20 3.2.

Slave and M

aster routing modes

21 3.3.

Serial!

Ethernet data routing

26 3.4.

Buffer-related issues

29 4.

Program

ming the E

M100

30 4.1.

General inform

ation 30

4.2. S

erial Program

ming M

ode 31

4.3. N

etwork P

rogramm

ing 33

5. A

vailable comm

ands and replies 35

5.1. List or com

mands

35 5.2.

List of possible reply codes 35

5.3. D

etailed Com

mand description

36 6.

Available S

ettings 42

6.1. List of S

ettings by groups 42

6.2. D

etailed Setting description

43 7.

Available P

arameters

54 7.1.

List of Param

eters 54

7.2. D

etailed Param

eter description 54

8. F

irmw

are Dow

nload Mode

56 8.1.

Dow

nloading new firm

ware file

56 8.2.

Initializing the EM

100 58

8.3. P

ossible download problem

s and LED

signaling 59

9. I/O

Connector pin assignm

ent & C

able wiring

60 9.1.

EM

100 I/O connector pin assignm

ent 60

Page 3: EM100 Tech Manual V2_1a (Print)

5

9.2. R

S232 cable w

iring 60

9.3. E

thernet cable wiring

61 10.S

pecifications, packing & ordering Inform

ation 62

10.1. S

pecifications & packing inform

ation 62

10.2. O

rdering Information

62

1. Intro

du

ction

1.1. W

hat is th

e EM

100?

The E

M100 is an E

thernet Module. T

he main function of the E

M100 is to netw

ork-enable existing serial devices. U

sing the EM

100 you can add an Ethernet port practically to any serial device w

ith RS

232 interface. Y

ou can then comm

unicate with your serial device from

any PC

(or other device) connected to your LA

N. A

nd if your LAN

has a direct connection to the Internet, then you can access and control your serial device from

anywhere in the w

orld*!

1.2. T

hree b

asic ways o

f com

mu

nicatin

g w

ith th

e EM

100

• If yo

u h

ave a serial device th

at you

wan

t to co

ntro

l via the n

etwo

rk usin

g an

existing

PC

so

ftware then you can use the E

M100 to netw

ork-enable this serial device and comm

unicate with

it from the P

C through our V

irtual Serial P

ort Driver (V

SP

D). V

irtual Serial P

orts (VS

Ps) created by

the driver are logical CO

Ms that behave like standard hardw

are CO

Ms but in reality transparently

reroute the data via the TC

P/IP

network to the E

M100-enabled serial device. V

SP

s allow you to

continue using your existing PC

software w

ithout any modification.

• If yo

u h

ave a serial device an

d are creatin

g a n

ew P

C so

ftware to

con

trol it then you can

develop softw

are that

comm

unicates w

ith the

EM

100 directly

(without

VS

PD

). T

he E

M100

transmits the data using industry-standard U

DP

/IP and T

CP

/IP com

munications protocols. M

ost softw

are developm

ent packages

like V

isual B

asic from

M

icrosoft®

provide an

easy to

use com

ponents that simplify exchanging data w

ith the EM

100. Turn to our tutorial U

sing VB

to com

municate w

ith the DS

100/EM

100 for more inform

ation.

• Y

ou

can also

create a virtual serial lin

k over th

e network by using the E

M100-enabled serial

device on one side and the DS

100 Serial D

evice Server on the other side. T

he serial port of the D

S100 on the other side of the link w

ill literally be an extension of your serial device’s own serial

port.

* P

rovided that you have assigned a valid “true” IP-address to the E

M100. “T

rue” IP-address is the address that is unique Internet-w

ide.

Page 4: EM100 Tech Manual V2_1a (Print)

2. Hard

ware d

escriptio

n

2.1. E

M100 I/O

pin

assign

men

t RX

+R

X-

1

11 12 13 14 15 16 17 18 19 202345678910

P3

P2

CT

SR

TS

TX

RX

MDP1

P0

RS

TT

X+

TX

-

VC

CE

R/W

SE

GS

GS

R

GN

D

EM100

Fig. 1. E

M100 pin assignm

ent

Eth

ernet p

ort p

ins

TX

+

Output

Positive line of the differential output signal pair

TX

- O

utput N

egative line of the differential output signal pair R

X+

Input

Positive line of the differential input signal pair

RX

- Input

Negative line of the differential input signal pair

Serial p

ort p

ins

TX

O

utput S

erial transmit line

RX

Input

Serial receive line

RT

S/D

IR

Output

Full-duplex m

ode: request to send, Half-duplex M

ode: data direction control

8

CT

S/S

EL

Input C

lear to Send line, also full-duplex/half-duplex m

ode selection line L

ED

con

trol p

ins

SG

O

utput, 10mA

max.

Green S

tatus LED

control line S

R

Output, 10m

A m

ax. R

ed Status LE

D control line

EG

O

utput, 10mA

max.

Green E

thernet LED

control line E

R/W

S

Output, 10m

A m

ax. R

ed Ethernet LE

D control line, also w

atchdog strobe line G

eneral-p

urp

ose I/O

pin

s P

0 Input/O

utput R

emotely controlled (through P

arameter com

mand) input/output

P1

Input/Output

Rem

otely controlled (through Param

eter comm

and) input/output P

2 Input

Rem

otely controlled (through Param

eter comm

and) input P

3 Input/O

utput R

emotely controlled (through P

arameter com

mand) input/output

EM

100 con

trol p

ins

RS

T

Input R

eset, active high (10us min. pulse length)

MD

Input

Mode selection pin (see O

perating modes and m

ode selection) P

ow

er sup

ply p

ins

VC

C

+

5V nom

inal +/- 5%

(4.75…5.25V

) DC

power (70m

A m

ax) G

ND

Ground

2.2. D

etailed p

in d

escriptio

n

Eth

ernet p

ort p

ins

The E

M100 is designed to attach directly to the R

J45 10BaseT

Ethernet connector. S

tandard magnetics

circuitry (YC

L part 20F001N

) has been included onboard to provide a “glueless” interface to the Ethernet

network.

When perform

ing the PC

B layout for the host serial device observe the layout guidelines set forth in .

Page 5: EM100 Tech Manual V2_1a (Print)

9

Serial p

ort p

ins

The serial port includes four interface lines and can w

ork in a Full-duplex or H

alf-duplex Transm

ission M

ode. In the Full-duplex T

ransmission M

ode the EM

100 supports RX

, TX

, RT

S, and C

TS

signals. In the H

alf-duplex Transm

ission Mode the E

M100 provides R

X, T

X, and D

IR signals. D

IR pin is used to control the

data direction.

All lines of the E

M100s serial interface are C

MO

S level, active low

. TX

and RX

lines are high when idle,

start bit is low level, and stop bit is high. H

igh on CT

S and R

TS

lines means “transm

ission prohibited”, low-

“transmission allow

ed”.

Serial lines of the E

M100 can be connected directly to the serial port pins of m

ost microcontrollers and

microprocessors, also to the R

S232 driver IC

(i.e. MA

X232) for F

ull-duplex operation or RS

485 driver IC (i.e.

MA

X485) for H

alf-duplex operation.

Half-duplex or F

ull-duplex operation can be selected through the Serial Interface S

etting or in hardware

using CT

S/S

EL and E

R/W

S pins. S

ee Full-duplex/H

alf-duplex Serial T

ransmission M

ode selection.

LE

D co

ntro

l lines

The E

M100 can drive four LE

Ds:

• A

pair of green and red LED

s connected to the SG

and SR

lines will provide a visual indication of

the EM

100s operating mode as w

ell as error conditions (see Sum

mary of S

tatus LED

signals)

• A

nother pair of green and red LED

s connected to the EG

and ER

/WS

lines will provide a visual

indication of the Ethernet port operation. G

reen LED

is normally on and is turned off m

omentarily

when the E

M100 receives E

thernet packets. Red LE

D is norm

ally off and is turned on mom

entarily w

henever there is a data collision on the Ethernet netw

ork.

All LE

D lines are active low

, so the LED

s must be connected as show

n on Fig. 2. ~300 O

hm resistors

should be connected in series with each LE

D.

10

The E

R/W

S line of the E

M100 also acts as a w

atchdog reset line and Serial T

ransmission M

ode selection line. T

his does not interfere with the m

ain function of this pin (to drive the Red E

thernet LED

).

VC

C

ER

/WS

EG

SG

SR

EM100

300

Fig. 2. C

onnecting LED

control lines to the LED

s

Gen

eral-pu

rpo

se I/O p

ins

The E

M100 features four general-purpose I/O

pins that can be used to switch on and off loads and

sense the status of connected sensors. I/O pins can be set and sensed rem

otely over the network using the

Param

eter comm

and. All four pins (P

0, P1, P

2, and P3) can be used as inputs w

hile only three pins (P0, P

1, and P

3) can be used as outputs.

General purpose I/O

pins are of open-collector type. A w

eak pull-up resistors are already included in the E

M100 m

odule. A sim

plified circuit diagram of each pin is show

n on Fig. 3. In order to sense the input status

of a pin the output driver of this pin must first be set to high otherw

ise the pin will be kept at low

state by its ow

n output driver.

Page 6: EM100 Tech Manual V2_1a (Print)

11

OU

TP

0...3

IN Not present

on P2

VC

C

Fig. 3. S

implified circuit diagram

of the general-purpose I/O pins

EM

100 con

trol p

ins

Tw

o control pins of the EM

100 are RS

T and M

D.

• R

ST

provides a reset to the internal circuitry of the EM

100. Holding this pin high for at least 10uS

resets the E

M100. T

he RS

T pin m

ust be connected to a proper reset circuit, otherwise the E

M100

may not function properly.

• M

D pin is used to select the operating m

ode of the EM

100.

Po

wer su

pp

ly pin

s

The E

M100 w

orks on 5VD

C (+/- 5%

) power.

2.3. O

peratin

g m

od

es and

mo

de selectio

n

The E

M100 has three m

odes of operation:

12

• N

orm

al Mo

de is entered after the pow

erup, software restart, or hardw

are reset provided that the M

D line is not pulled low

. It is in the Norm

al Mode that the E

M100 perform

s its Ethernet"

!S

erial data routing. N

etwork P

rogramm

ing of the EM

100 can also proceed in the Norm

al Mode in parallel

with the data routing

• S

erial Pro

gram

min

g M

od

e is entered when the M

D line is pulled low

for at least 100ms or escape

sequence is sent into the EM

100’s serial port while the E

M100 is in the N

ormal M

ode. This m

ode is used to program

the EM

100’s functioning parameters (S

ettings) via the serial port

• F

irmw

are Do

wn

load

Mo

de is entered w

hen the EM

100 is powered up, restarts, or exits from

reset w

ith the MD

line pulled low. T

his mode is used to dow

nload new firm

ware file into the E

M100.

RS

TR

ST

MD

MD

Norm

al mode

F-w

are d-load mode

Prog. m

ode

T1

T3

T2

Entering the S

erial Program

ming M

odeE

ntering the Firm

ware D

ownload M

ode

T1

Max

1s “N

o reaction zone”- time it takes the E

M100 to enter the

Norm

al Mode of operation after the pow

erup, software

restart, or hardware reset

T2

Min

20ms

MD

holding time to enter the S

erial Program

ming M

ode T

3 M

in 1m

s M

D holding tim

e to enter the Firm

ware D

ownload M

ode

Fig.4. U

sing MD

line to change the operating mode

Page 7: EM100 Tech Manual V2_1a (Print)

13

2.4. F

ull-d

up

lex/Half-d

up

lex Serial T

ransm

ission

Mo

de selectio

n

The E

M100 can perform

serial comm

unications in the Full-duplex or H

alf-duplex Serial T

ransmission

Mode. M

ode selection is effected through the Serial Interface S

etting or through the CT

S/S

EL and E

R/W

S

pins. When the S

erial Interface is set to “Auto”, the E

M100 selects betw

een the Full-duplex and H

alf-duplex S

erial Transm

ission Modes basing on the hardw

are configuration. When the C

TX

/SE

L line is connected to the E

R/W

S line the E

M100 selects the H

alf-duplex mode. W

hen the CT

S/S

EL line is not connected to the

ER

/WS

, the EM

100 selects the Full-duplex m

ode. When the S

erial Interface Setting is program

med to “F

ull-duplex” or “H

alf-duplex” it doesn’t matter w

hether the CT

X/S

EL line is connected to the E

R/W

S or not- the

interface is selected according to the Setting.

Serial T

ransmission M

ode selection happens only once when the E

M100 enters the N

ormal M

ode (during the “no reaction zone T

1 ” shown on F

ig. 4).

2.5. R

eset op

tion

s

Reliable external reset m

ust be provided in order for the EM

100 to work correctly. T

here are several w

ays to do this:

• B

y external reset IC

. Use a specialized reset IC

(like MA

X810) to provide a proper pow

erup reset. R

eset ICs are m

ore reliable than RC

reset circuits since the latter are not very stable and also do not provide reset during brow

nouts.

• B

y external reset/w

atchd

og

IC. E

ven better solution is to use a reset IC w

ith a watchdog function.

ER

/WS

pin provides a watchdog strobe (w

atchdog timer reset pulse) at a rate of 100H

z. This

doesn’t interfere with the prim

ary function of the ER

/WS

pin (which is to drive the LE

D) since the

watchdog reset pulses are very short (~2uS

).

• B

y an I/O

pin

of th

e main

micro

con

troller. If the D

S100 operates as a “netw

ork coprocessor” to the m

ain CP

U (m

icrocontroller) of the host serial device a regular I/O line of this m

icrocontroller can be connected to the R

ST

pin of the EM

100. I/O pins of m

any popular microcontrollers (like 80C

51)

14

default to high upon reset. Thus, connecting such an I/O

pin to the RS

T input of the E

M100 w

ill provide a reset sim

ultaneous with the reset of the m

ain microcontroller itself and at least as “w

ide” (in duration) as the reset applied to the m

ain microcontroller. It w

ill be a responsibility of the main

microcontroller’s firm

ware to release the E

M100 out of reset. T

his reset method is recom

mended

because this way the m

ain microcontroller can reset the E

M100 and change the E

M100’s operating

mode at any tim

e.

2.6. T

ypical ap

plicatio

n circu

its RX

+R

X-

P3

P2

CT

S/S

EL

RE

DE

ABD

IR

O

RT

S/D

IRTX

RX

MDP1

P0

RS

TR

ST

ST

LTC

1232

LT485

TX

+T

X-

VC

CE

R/W

SE

GS

GS

R

GN

D

EM100

RJ45

RJ45

EthernetStatus

Bypass caps

Pin num

bers on theR

J45 connector may

vary

Setup

Button

Grn.Grn. RedRed

300

300

300

300

VC

C

VC

C

VC

C

VC

C

+

Stan

dalon

e application

circuit (R

S485)

Fig. 5. S

tandalone application circuit

• S

tand

alon

e op

eration

(RS

485 version shown on F

ig. 5). The LT

C1232 reset/w

atchdog IC is used

to provide reset to the EM

100. Watchdog reset strobe com

es from the E

R/W

S line. A

pushbutton is connected to the M

D pin of the E

M100 and can be used to put the E

M100 into different m

odes of operation. C

TS

/SE

L line is connected to the ER

/WS

which selects the R

S485 interface. T

X and R

X

Page 8: EM100 Tech Manual V2_1a (Print)

15

serial interface lines are connected to the MA

X485 driver IC

. RT

S/D

IR controls R

S485 data

direction. Ethernet lines (T

X+

, TX

-, RX

+, R

X-) go directly to the R

J45 connector. It is recomm

ended that all four S

tatus LED

s are provided. It is a comm

on practice to place Ethernet LE

Ds next to the

RJ45 connector.

RX

+R

X-

P3

P2

CT

S/S

EL

RT

S/D

IRTX

RX

MDP1

P0

RS

TT

X+

TX

-

VC

CP

1.1E

R/W

SP

1.0E

GP

3.1/TX

SG

P3.0/R

XS

RP

1.2

GN

DP

1.3

EM100

80C51

RJ45Ethernet

Bypass caps

Pin num

bers on theR

J45 connector may

vary

Green Red

300

300

Microprocessor or

microcontroller w

ithbuilt-in S

erial port

Co

mm

un

ications cop

rocesso

r app

lication

circuit

VC

C

VC

C

+

Fig. 6. C

omm

unications coprocessor application circuit

• C

om

mu

nicatio

ns co

pro

cessor (F

ig. 6). The E

M100 is controlled by the m

ain microcontroller

(80C51 on the circuit diagram

below). B

y directly manipulating the R

ST

and MD

lines of the EM

100 the m

ain microcontroller can put the E

M100 into different m

odes of operation. This w

ay the main

microcontroller can program

the EM

100’s Settings and even dow

nload new firm

ware into the

EM

100. Four serial interface lines (T

X, R

X, C

TS

, RT

S) are connected directly to the I/O

pins of the m

icrocontroller. Ethernet lines (T

X+

, TX

-, RX

+, R

X-) go directly to the R

J45 connector. Four LE

D

lines may or m

ay not be connected to the LED

s. It is a comm

on practice to place Ethernet LE

Ds

next to the RJ45 connector.

16

2.7. M

echan

ical dim

ensio

ns

TibboN

etModule

Ld

W

p

H

l

m

PC

B fo

otp

rint

Lead

“flash”

Pin

#1 key

Reco

mm

end

edP

CB

thru

-ho

le size:1m

m

11011 20

Fig. 7. M

echanical dimensions of the E

M100

L

Max.

46.2mm

Length

W

Max.

28mm

W

idth H

M

ax. 13m

m

Height

I M

in. 4.5m

m

Pin length

m

Max.

1mm

Lead “flash”

d

Aver.

40.6mm

D

istance between pin row

s p

A

ver. 2m

m

Pin pitch

Page 9: EM100 Tech Manual V2_1a (Print)

17

2.8. B

oard

layou

t con

sideratio

ns

The follow

ing layout tips should be followed:

• T

he EM

100 should be located physically as close to the RJ45 connector as possible

• S

hort, direct lines should connect the EM

100’s TX

+, T

X-, R

X+

, and RX

- lines to the RJ45

• T

he board area should be flooded (filled) with ground w

here possible except for the area around T

X+

, TX

-, RX

+, and R

X- lines. D

o not bring the ground or power planes too close to these four

lines.

Follow

ing these recomm

endations will decrease the noise, em

itted by the EM

100 and make passing the

EM

I and ES

D parts of the F

CC

/CE

tests easier. Fig. 8 illustrates the above points:

RJ45

EM

100

Ground

Pin #1

Fig. 8. G

ood board layout example

2.9. S

um

mary o

f Statu

s LE

D sig

nals

The E

M100 features four pins that can drive E

thernet and Status LE

Ds.

This S

ection details the Status LE

D signaling for the N

ormal and S

erial Program

ming M

odes. LED

signaling in the F

irmw

are Dow

nload Mode is detailed in P

ossible download problem

s and LED

signaling.

18

Entering the N

ormal M

ode R

ed and Green LE

Ds blink 3 tim

es S

etting error, cannot enter the Norm

al mode

Red LE

D is blinking constantly (Initialize the E

M100)

In the Norm

al Mode:

• S

lave Routing M

ode •

Master R

outing Mode

• D

estination IP-address is not reachable*

• D

estination IP-address is reachable*

When buffer overflow

is detected

Green LE

D is constantly on

Green LE

D is blinking

Green LE

D is constantly on

Red LE

D blinks m

omentarily

In the Serial P

rogramm

ing mode

Green and R

ed LED

s are blinking (Green-R

ed-Green...)

*The E

M100 is constantly sending pings to the D

estination IP-address w

hen in the Master R

outing M

ode (once in every 5 seconds). The G

reen Status LE

D is blinking if no reply is received. T

he Green S

tatus LE

D is constantly on w

hen the destination replies to pings.

2.10. EM

100SK

Starter K

it

EM

100SK

Starter K

it consists of the EM

100 Ethernet M

odule installed on a test PC

B that provides a

necessary “environment” for testing. T

he board includes (Fig. 9):

• S

etup

Bu

tton

(connected to the MD

pin of the EM

100). Pressing the button w

hile the EM

100 is in the N

ormal M

ode forces the EM

100 into the Serial P

rogramm

ing Mode. P

owering the E

M100S

K up

with the button pressed puts the E

M100 into the F

irmw

are Dow

nload Mode.

• S

tatus

LE

Ds

(connected to

SG

and

SR

pins

of the

EM

100) indicate

EM

100’s operating

mode/conditions. S

ee Sum

mary of S

tatus LED

signals for details

• E

thern

et Statu

s LE

Ds are connected to E

G and E

R/W

S pins of the E

M100. G

reen LED

blinks w

hen the data packet is received, Red LE

D indicates netw

ork data collision error

• E

thern

et (10BaseT

) po

rt is connected to the TX

+, T

X-, R

X+

, and RX

- pins of the EM

100

• S

erial (RS

232) po

rt is connected to the RX

, TX

, RT

S/D

IR, and C

TS

/SE

L pins of the EM

100 via the R

S232 driver IC

.

Page 10: EM100 Tech Manual V2_1a (Print)

19

• P

ow

er Jack- connected to the voltage regulator providing 5V pow

er for the EM

100 and other circuits on the board. U

se DC

12V, 200m

A (m

in.) power adaptor

• R

eset IC provides a proper reset for the E

M100 Tibbo

NetM

odule

EM

100SK

Red

Status1

Status2

Ethernet

Data R

XE

thernetC

olD

ownload

Setup

Green

Green

Red

Statu

s LE

Ds

Ethern

et LE

Ds

Setu

p B

utto

n

RS

232 po

rt

10BaseT

po

rt

Po

wer Jack

Fig. 9. E

M100S

K S

tarter Kit

3. Op

eration

in th

e No

rmal M

od

e

3.1. G

eneral in

form

ation

The m

ain function of the EM

100 is to route the data between its E

thernet and serial ports. Routing

means that the data received into the serial port is sent out via the E

thernet port and vise versa. Data routing

is effected through two routing buffers, one for each routing direction.

The E

M100 perform

s the routing in the Norm

al Mode of operation. A

number of user-program

mable

Settings and P

arameters define the w

ay the EM

100 works in the N

ormal M

ode. Settings define perm

anent functionality of the E

M100 and are program

med into the E

M100 via its serial port in the S

erial Program

ming

Mode or via the netw

ork in the Netw

ork Program

ming S

ession. Param

eters are temporary overrides for

certain Settings. P

arameters can be changed via the netw

ork only. For m

ore information see P

rogramm

ing the E

M100.

Eth

ernet p

ort an

d n

etwo

rk com

mu

nicatio

ns

The E

thernet port of the EM

100 is of 10BaseT

type. Just like any other Ethernet device each E

M100

has a unique Ethernet (M

AC

) Address and m

ust be assigned a valid IP-address to function properly on the

network.

Logically, the EM

100’s network interface has tw

o ports. A user-definable D

ata Port is used to exchange

the data between the E

M100 and other stations on the netw

ork. Another port called C

omm

and Port has a

fixed number 65535 (F

FF

F H

ex) and is used to send programm

ing comm

ands to the EM

100’s over the netw

ork.

The E

M100 can exchange data w

ith remote stations using the U

DP

/IP or T

CP

/IP transport protocols as

defined by the Transport P

rotocol Setting. D

epending on the Routing M

ode Setting the E

M100 can act as a

network S

lave or Master (see S

lave and Master routing m

odes for details).

Other netw

ork-related settings include Destination IP

-address, Destination D

ata Port N

umber, G

ateway

IP-address, N

etmask, and C

onnection Tim

eout.

Page 11: EM100 Tech Manual V2_1a (Print)

21

Besides U

DP

and TC

P protocols used for data transm

ission the EM

100 also supports AR

P and IC

MP

(ping) protocols. Y

ou can ping the EM

100 just like any other device on the TC

P/IP

network.

Serial p

ort

The serial port of the E

M100 supports T

X, R

X, C

TS

, and RT

S signals and can w

ork at baudrates up to 115200. In the N

ormal M

ode the serial port transmits the data betw

een the EM

100 and attached serial device (m

icrocontroller). In the Serial P

rogramm

ing Mode the port is used to program

the EM

100’s Settings.

Settings that define the operation of the serial port include the B

audrate (150~115200bps), P

arity (none, even, or odd), B

its Per B

yte (7 or 8), and Flow

Control (none or C

TS

/RT

S). E

ach of these Settings has a

matching P

arameter that overrides the value of a corresponding S

etting.

Ro

utin

g b

uffer

The data betw

een the Ethernet port and the serial port is routed via tw

o independent 255-byte buffers, one for each routing direction. B

uffers are necessary because the Ethernet and the serial port operate at

different speeds and in different ways. E

thernet carries the data in “packets” (i.e. groups of data), while the

serial port sends and receives a serial “stream” w

here each data byte is independent. Here is how

the E

M100 transform

s the Ethernet packets into the serial stream

and back:

• E

thern

et !!! !serial data routing is sim

ple: the EM

100 outputs the contents of arriving Ethernet data

packets byte by byte via the serial port. The E

M100 does not check of filter the contents of data

being routed in the Ethernet !

serial direction

• S

erial !!! !

Eth

ernet

routing requires

grouping arriving

serial data

into packets

and is

more

complicated. S

everal Settings define exactly w

hat serial data is accepted into the buffer and when

and how this data is com

bined into an Ethernet packet and sent out. D

etailed information on the

subject can be found in Serial !

Ethernet data routing.

3.2. S

lave and

Master ro

utin

g m

od

es

The E

M100 routes the data in one of tw

o modes as defined by the R

outing Mode S

etting:

22

• In

the S

lave Ro

utin

g M

od

e the EM

100 never sends any data transmission in the serial port!

E

thernet direction before it receives some data from

the remote station first (i.e. the data in the

Ethernet!

serial direction). The serial data received into the E

M100’s serial port before the rem

ote station “contacts” the E

M100 is discarded. In the S

lave Mode the E

M100 w

ill “work” w

ith any station on the netw

ork that contacts it;

• In

the M

aster Ro

utin

g M

od

e the EM

100 does not wait for the rem

ote station to send the data first and routes the data in the serial!

Ethernet direction as soon as there is a data to be sent. T

he data is alw

ays sent to a specific destination (as defined by the Destination IP

-address and Destination

Data P

ort Num

ber Settings of the E

M100). A

lso, the EM

100 only accepts the data sent from the

remote station w

hose IP-address m

atches the one set in the Destination IP

-address. The E

M100

will discard the data sent from

any other IP. N

ote, that data port number of the sender is not verified

so the data can be sent from any port.

Wh

en to

use th

e Slave an

d M

aster Ro

utin

g M

od

es

• U

se the S

lave Ro

utin

g M

od

e to network-enable serial devices that never send out the data by

themselves but instead are “polled” for data from

the PC

. Exam

ples of such devices are time

recorders, access control panels and other “hardware term

inals”.

• U

se th

e M

aster R

ou

ting

M

od

e to

network-enable

serial devices

that send

out the

data “spontaneously” i.e. w

ithout waiting for the request from

PC

. Exam

ples of such devices are barcode scanners and other “readers” that just output the data after each successful read.

• A

lso u

se the M

aster Ro

utin

g M

od

e in cases when the serial data m

ust flow independently in both

directions (i.e. Ethernet !

serial and serial !E

thernet). This is the case, for instance, w

hen you are creating a “netw

ork modem

” that must pass the data in both directions sim

ultaneously.

Req

uired

netw

ork settin

gs fo

r the S

lave and

Master R

ou

ting

Mo

des

• In

the S

lave Ro

utin

g M

od

e the EM

100 only “responds” to other stations on the network. W

hen the E

M100 receives the data from

remote station it m

emorizes this station’s IP

-address and data port

Page 12: EM100 Tech Manual V2_1a (Print)

23

number. W

hen routing the data in the serial!E

thernet direction the EM

100 will reply to this IP

-address and data port num

ber. Therefore, the only netw

ork settings that must be set in the S

lave R

outing Mode are the E

M100’s ow

n IP-address and the D

ata Port N

umber. T

his is true even if there is a router betw

een the remote station and the E

M100. Y

ou don’t have to set the Netm

ask and G

ateway IP

when using the E

M100 in the S

lave Routing M

ode;

• In

the M

aster Ro

utin

g M

od

e the EM

100 needs to be able to send the data to a predefined remote

station at any time. T

his means that not only E

M100’s ow

n IP-address and D

ata Port N

umber m

ust be set but also the D

estination IP-address and the D

estination Data P

ort Num

ber. If the destination rem

ote station and the EM

100 are residing in different network segm

ents then the Netm

ask and G

ateway IP

-address must also be set.

Slave an

d M

aster rou

ting

mo

des vs. U

DP

/IP an

d T

CP

/IP tran

spo

rt pro

toco

ls

UD

P/IP

and TC

P/IP

provide completely different data transm

ission so EM

100s behavior in the Slave

and Master R

outing Modes is slightly different under U

DP

/IP and T

CP

/IP T

ransport Protocols .

• U

DP

/IP T

ransp

ort P

roto

col

o

Slave R

ou

ting

Mo

de. A

ll UD

P data packets arriving from

any remote station and addressed to

the Data P

ort of the EM

100 are routed to the serial port. For the serial !

Ethernet direction the

EM

100 always sends the data to the IP

-address and the port number that w

ere received in the last (latest) U

DP

packet. Once the E

M100 receives a U

DP

packet from a different station it w

ill start sending all its serial !

Ethernet data to this new

station. After pow

er up and before the E

M100 receives the first U

DP

data packet the EM

100 doesn’t have any IP-address and port

number to send the data to so all the data received into the E

M100’s serial port is sim

ply discarded.

o

Master R

ou

ting

Mo

de. T

he EM

100 only accepts and routes to the serial port the data packets that have originated from

the remote station w

hose IP-address m

atches the one defined by the D

estination IP-address S

etting. Source data port num

ber need not match the one defined by

the Destination D

ata Port N

umber S

etting so the packet can be sent from any port. W

henever

24

the EM

100 has the data to transmit in the serial!

Ethernet direction it w

ill send the data to the D

estination IP-address and D

estination Data P

ort Num

ber. The packet w

ill be sent to the D

estination Data P

ort Num

ber even if the packet received by the EM

100 from the rem

ote station originated at a different port. T

herefore, it possible that the EM

100 will be receiving the

data from one port but sending it to another port!

• T

CP

/IP T

ransp

ort P

roto

col

o

Slave R

ou

ting

Mo

de. T

he EM

100 will accept an incom

ing TC

P connection from

any station on the netw

ork. The E

M100 w

ill not attempt to establish a connection w

ith a remote station by

itself even it the EM

100 has the data to transmit in the serial !

Ethernet direction. O

nce the rem

ote station has established the connection the data can flow independently in either

direction. Pending serial!

Ethernet data received by the E

M100 prior to the T

CP

connection establishm

ent is discarded when the connection is established.

o

Master R

ou

ting

Mo

de. T

he EM

100 will both accept an incom

ing TC

P/IP

connection and attem

pt to establish a connection with the rem

ote station by itself depending on which side

sends that data first- remote station or attached serial device. Incom

ing TC

P connection w

ill only be accepted from

a station whose IP

-address matches the one defined by the D

estination IP

-address Setting of the E

M100. S

ource port number need not m

atch the one defined by the D

estination Data P

ort Num

ber Setting so the connection can be initiated from

any port. When

the E

M100

needs to

initiate a

TC

P/IP

connection

the it

will

attempt

to connect

to the

Destination IP

-address and Destination D

ata Port N

umber. O

nce the connection has been established the data can flow

independently in either direction. Note that unlike in case of

UD

P/IP

there will never be a situation w

hen the EM

100 receives the data from one port but

sends the data to another port. Once the T

CP

/IP connection has been established both sides

exchange the data using a single port on each side.

Co

nn

ection

s with

mo

re than

two

no

des

In many real-life situations it is often necessary to have several P

Cs (netw

ork stations) access the same

serial device through the EM

100 (“many clients to one data source”) or have m

any serial devices (each

Page 13: EM100 Tech Manual V2_1a (Print)

25

connected to the network via its ow

n EM

100) send the data to a single PC

(“many data sources to one

client”).

An exam

ple of “many clients to one source” installation is a hardw

are terminal or sensor that can be

polled for data from m

any PC

s on the network. A

typical “many sources to one client” situation is w

hen several barcode scanners m

ust send the data to a single PC

on the network.

• M

any clien

ts to o

ne d

ata sou

rce operation is achieved by using the EM

100 in the Slave R

outing M

ode. The E

M100 w

ill reply to any sender in this mode, so any station w

ill be able to access the host serial device w

ith the EM

100 inside.

o

UD

P/IP

Tran

spo

rt Pro

toco

l should not be used if there is a chance that several different clients w

ill send the requests to the same E

M100/serial device at the sam

e time. D

ata mix up

will result on the serial side and the E

M100 w

on’t be able to route the data back to the respective sender of each com

mand correctly.

o

TC

P/IP

Tran

spo

rt Pro

toco

l can be used safely since when one client is already connected to

the E

M100

others w

on’t be

able to

gain access

to the

same

EM

100 until

this client

disconnects. T

o prevent

one client

from

holding the

TC

P/IP

connection

to the

EM

100 indefinitely there is a C

onnection Tim

eout Setting that defines after how

long the EM

100 will

abort the connection in case there is no data transfer in any direction.

• M

any d

ata sou

rces to o

ne clien

t operation is achieved by using the EM

100 in the Master R

outing M

ode. In this mode the E

M100 w

ill route all its serial !E

thernet data to the Destination IP

-address and D

estination Data P

ort Num

ber. Any num

ber of EM

100s can be set to send the data to the sam

e destination.

o

UD

P/IP

Tran

spo

rt Pro

toco

l can be used in this arrangement but you m

ust make sure that

each serial data block output by the serial device (for instance, a complete barcode from

a barcode scanner) is sent out in a single U

DP

packet. Potential data m

ix up can occur on the receiving end if the serial data block is transm

itted in several UD

P packets and several E

M100

are sending data at the same tim

e. The upside of using the U

DP

/IP is that you w

ill only need to m

aintain one listening socket on the receiving end to get the data from all data sources

26

(unless, of course, you want to distinguish betw

een the data sources). Several E

M100’s

Settings define how

the incoming serial data is com

bined into Ethernet packets so you can

make sure that the serial data block from

is not split into several packets (see serial!E

thernet data routing for details).

o

TC

P/IP

Tran

spo

rt Pro

toco

l can be used safely but you will have to m

aintain a separate socket on the receiving end for every data source sending the data.

3.3. S

erial!!! !E

thern

et data ro

utin

g

The E

M100 provides a w

ay to choose which incom

ing serial data is accepted into the serial!E

thernet buffer, how

this data is combined into E

thernet packets and when it is sent out via the E

thernet port.

Serial d

ata blo

cks

The E

M100 treats all incom

ing serial data as a sequence of data blocks. The term

“data block” here does not m

ean that the EM

100 is only capable of working w

ith a structured serial data. An absolutely

random serial stream

can also be processed- as one continuous infinite serial data block.

Serial data blocks begin w

hen a start condition is detected and end when a stop condition is detected.

After

the start

condition is

detected the

EM

100 begins

recording the

incoming

serial data

into the

serial !E

thernet buffer. Thus, the start condition is said to open the serial data block.

When the stop condition is detected the E

M100 seizes recording the data into the buffer and attem

pts to send out all the data accum

ulated in the buffer via the Ethernet port. T

herefore, the stop condition closes the serial data block. T

he inter-block serial data i.e. the data received after the stop condition is detected and before the next start condition is detected is discarded.

Besides the start and stop conditions there is also a break condition. W

hen the break condition is detected the E

M100 doesn’t close the serial data block (i.e. it continues recording subsequent serial data

into the serial!E

thernet buffer) but sends out the data already accumulated in the buffer through the

Ethernet port. B

reak conditions provide a way to subdivide large serial data blocks.

Page 14: EM100 Tech Manual V2_1a (Print)

27

Start co

nd

ition

s

The S

tart On A

ny Character S

etting defines if the EM

100 recognizes any character received into the serial port as a start condition or requires a predefined S

tart Character to open the serial data block. W

hen S

tart On A

ny Character is set to “yes” the E

M100 w

ill accept any character following the end of the previous

serial data block as the beginning of the next block.

When S

tart On A

ny Character is set to “no” the E

M100 w

ill only open the serial data block when one of

the preset Start C

haracters is received. Up to three different S

tart Characters can be defined.

Start C

haracters received after the serial data block has been opened are treated as normal characters

and do not “restart” the serial data block.

Sto

p co

nd

ition

s

Up to three different S

top Characters can be defined to close the serial data block.

Once one of the preset S

top Characters is detected the E

M100 closes the serial data block and

attempts to send out the contents of the serial!

Ethernet buffer via the E

thernet port. All subsequent serial

data is ignored until the next start condition is met.

The

use of

Start

Characters

and S

top C

haracters assum

es that

these characters

will

not be

encountered in the data block body. Som

e comm

unications protocols use checksums (or other form

s of data integrity verification). C

hecksum can potentially take any value and occasionally m

atch the AS

CII codes of

the Stop C

haracters. To avoid possible confusion som

e comm

unications protocols put the checksum bytes

behind the Stop C

haracters. The E

M100 deals w

ith this by allowing to define a N

umber O

f Post-characters

for each enabled Stop C

haracter . For exam

ple, if the Num

ber Of P

ost-characters for a certain Stop

Character is set to 2 then the E

M100 w

ill additionally receive and count as belonging to the current serial data block 2 bytes of data after this S

top Character has been encountered.

28

Break co

nd

ition

s

The M

aximum

Data Length S

etting defines the maxim

um num

ber of data bytes in the serial !E

thernet buffer. (can be set betw

een 32 and 255). Once this num

ber is reached the EM

100 attempts to send out the

contents of the buffer via the Ethernet port. T

his Setting only w

orks when the U

DP

/IP T

ransport Protocol is

selected. This is because T

CP

/IP has its ow

n way to determ

ine what size of data chunks is best for

transmission over the netw

ork.

The M

aximum

Intercharacter Delay S

etting defines the maxim

um tim

e gap between the arrival of tw

o consecutive serial characters into the serial port (can be defined in 10m

s increments betw

een 10ms and

2.55 sec). Once this tim

e is exceeded the EM

100 attempt to send out the contents of the serial !

Ethernet

buffer via the Ethernet port. S

etting the Maxim

um Intercharacter D

elay to 0 disables the function.

Defau

lt start/stop

/break co

nfig

uratio

n

By default (i.e. after the Initialization) the E

M100 is configured to handle a random

data stream that

doesn’t have any structure. To achieve this the S

tart On A

ny Character is set to “yes”, no S

top Characters

are defined, the Maxim

um Intercharacter D

elay is set to 10ms, and the M

aximum

Data Length is set to 255

bytes (the latter is needed only for the UD

P/IP

Transport P

rotocol). As a result the very first byte received

into the serial port is regarded as a beginning of the serial data block that never ends. Once there am

ount of data in the serial!

Ethernet buffer reaches the lim

it or there is a gap in the serial transmission the E

M100

combines all serial data it has already received and sends it out.

Practice show

s that this arrangement w

orks very well not only for a random

data flow but also for

structured data. Consider, for exam

ple, a case in which a hardw

are terminal w

ith the EM

100 exchanges the data w

ith PC

using comm

and-reply comm

unications protocol. In this situation every time the hardw

are term

inal finishes transmitting a reply to the P

C it starts w

aiting for the next comm

and to process. This

creates a gap in the serial data coming into the E

M100’s serial buffer. A

fter a small delay of 10m

s the E

M100 routes the (end of) reply to the P

C. T

he 10ms delay slow

s a system dow

n a little bit but is, in fact, negligible for m

ost serial applications.

Page 15: EM100 Tech Manual V2_1a (Print)

29

3.4. B

uffer-related

issues

When using the E

M100 be careful not to overflow

its internal Ethernet!

serial and serial!E

thernet buffers. T

he overflow can occur because of the difference in receive/transm

ission speeds on the Ethernet

and the serial sides of the EM

100 (Red S

tatus LED

blinks mom

entarily when overflow

happens). In addition, the internal receiving buffer of the host serial device can potentially overflow

if the EM

100 outputs the serial data too fast.

• E

thern

et!!! !S

erial bu

ffer

o

UD

P/IP

Tran

spo

rt Pro

toco

l. The E

thernet !serial buffer can easily overflow

because the E

thernet is much faster than the serial port and U

DP

/IP has no inbuilt protection against buffer

overflows. U

DP

/IP should not be used to send continuous data flow

and is only suitable for sending short data blocks that can fit in the buffer.

o

TC

P/IP

Tran

spo

rt Pro

toco

l has an inbuilt protection from buffer overflow

ing. You can safely

send the data of any size.

• S

erial !!! !E

thern

et bu

ffer. The only w

ay to protect the buffer is to enable the RT

S/C

TS

Flow

Control

in the EM

100 and on the host serial device. This w

ay the EM

100 will be able to signal the host

serial device to stop transmitting the data once the buffer becom

es full.

• In

ternal receivin

g b

uffer o

f the h

ost serial d

evice. This buffer can also be protected by using the

RT

S/C

TS

to regulate the exchange of data between the E

M100 and the serial device.

Usin

g T

CP

/IP an

d R

TS

/CT

S is th

e mo

st reliable w

ay of tran

smittin

g d

ata thro

ug

h th

e EM

100

4. Pro

gram

min

g th

e EM

100

4.1. G

eneral in

form

ation

Settin

gs an

d P

arameters

The operation of the E

M100 in the N

ormal M

ode is controlled by a number of user-definable S

ettings and P

arameters:

• S

etting

s define the permanent functionality of the E

M100. S

ettings are stored in the non-volatile m

emory and are preserved even w

hen the EM

100 is switched off. A

fter having been changed new

Setting values take effect only after the E

M100 is restarted (rebooted)

• P

arameters are tem

porary overrides for certain Settings. C

hanging Param

eters have an imm

ediate effect on the E

M100 operation. P

arameters are preserved only until the E

M100 is sw

itched off or restarted.

Ways o

f pro

gram

min

g th

e EM

100

The E

M100 can be program

med in tw

o different ways:

• T

hro

ug

h th

e serial po

rt of the EM

100 in a Serial P

rogramm

ing Mode

• O

ver the n

etwo

rk using UD

P packets sent to a com

mand port 65535 (F

FF

F H

ex). This m

ethod is called N

etwork P

rogramm

ing

There are several differences betw

een the Serial P

rogramm

ing Mode and the N

etwork P

rogramm

ing:

• S

erial Program

ming M

ode is a separate mode of operation. T

he EM

100 is not performing its data

routing function when in the S

erial Program

ming M

ode. In contrast the Netw

ork Program

ming is not

a separate mode of operation but a m

ethod of programm

ing. Netw

ork Program

ming can proceed in

parallel with the norm

al operation of the EM

100.

Page 16: EM100 Tech Manual V2_1a (Print)

31

• C

ertain comm

ands can only be executed through the network. S

ome com

mands have different

result w

hen executed

in the

Serial

Program

ming

Mode

and through

the netw

ork (Initialize

comm

and)

• S

erial Program

ming M

ode can always be entered, even w

hen the EM

100 is not properly setup and needs to be Initialized. N

etwork P

rogramm

ing can only be used when the E

M100 is already

functional.

Gro

up

s of co

mm

and

s

The E

M100 is program

med using program

ming com

mands that fall into three categories:

• S

etup

com

man

ds are used to program

the Settings of the E

M100. S

etup comm

ands can be issued both in the S

erial Program

ming M

ode and using the Netw

ork Program

ming, in a so-called

Netw

ork Setup S

ession.

• P

arameter co

mm

and

s are used to change the Param

eters (and also retrieve the values of certain P

arameters). T

hese comm

ands can only be sent over the network.

• B

road

cast com

man

ds are sent in the E

thernet broadcast mode and are used for autom

atic discovery of the E

M100s on the netw

ork and over-the-network assignm

ent of new IP

-addresses. N

aturally, the Broadcast com

mands can only be sent over the netw

ork.

See A

vailable comm

ands and replies for a complete description of all com

mands.

4.2. S

erial Pro

gram

min

g M

od

e

Serial P

rogramm

ing Mode is a separate m

ode of operation that can only be used to edit Settings (via

Setup

comm

ands). P

arameter

comm

ands and

Broadcast

comm

ands cannot

be issued

in the

Serial

Program

ming M

ode.

Serial P

rogramm

ing is effected by sending comm

ands to and receiving replies from the E

M100’s serial

port.

32

En

tering

the S

erial Pro

gram

min

g M

od

e

There are tw

o ways of entering the S

erial Program

ming M

ode:

• B

y pressin

g p

ullin

g th

e MD

line lo

w w

hile in

the N

orm

al Mo

de (on the E

M100S

K there is a

Setup B

utton connected to the MD

line) This forces the E

M100 to enter the S

erial Program

ming

Mode w

ith default comm

unications parameters of 38400-8-N

-1, flow control=

”none”.

• B

y send

ing

an escap

e sequ

ence o

f three co

nsecu

tive SO

H (A

SC

II cod

e 1) characters to

the

serial po

rt (“soft en

try”). The S

oft Entry S

etting of the EM

100 defines if escape sequence will

work. S

oft Entry is disabled by default. E

scape characters must be sent at a current baudrate.

When entering the S

erial Program

ming M

ode through escape sequence the EM

100 preserves the current baudrate, defined by the B

audrate Setting. H

owever, the parity is still set to “none”, num

ber of bits- to 8, and the flow

control- to “none” regardless of the values of Parity , B

its Per B

yte, and F

low C

ontrol Settings.

The state of the R

TS

(output) line of the EM

100 must be ignored w

hen in the Serial P

rogramm

ing M

ode. Therefore, you m

ust disable the flow control in the host serial device for the duration of the S

erial P

rogramm

ing Mode.

Exitin

g S

erial Pro

gram

min

g M

od

e

You can exit the S

erial Program

ming M

ode either by hardware-resetting the E

M100 through the M

D pin,

or by using the Exit com

mand. In both cases the E

M100 restarts operation using the new

Setting values.

Serial co

mm

and

and

reply fo

rmat

All com

mands sent to the E

M100 in the S

erial Program

ming M

ode must have the follow

ing format:

ST

X (2)

Co

mm

and

cod

e S

etting

nam

e (if any)

Settin

g valu

e (if any)

CR

(13)

ST

X (A

SC

II code 2) and CR

(AS

CII code 13) provide necessary encapsulation. C

om

man

d co

de field

always consists of one character (i.e. “S

”, “G”, etc.). S

etting

nam

e and Settin

g valu

e fields are only

Page 17: EM100 Tech Manual V2_1a (Print)

33

required for certain comm

ands. Settin

g n

ame alw

ays consists of two characters (i.e. “B

R”, “S

A”, etc.).

Settin

g valu

e format depends on the type of S

etting.

All replies returned by the E

M100 in the S

erial Program

ming M

ode have the following form

at:

ST

X (2)

Rep

ly cod

e S

etting

value (if an

y) C

R (13)

Rep

ly cod

e is always present and inform

s you of the comm

and processing status (OK

, failed, etc.). S

etting

value field is only present for com

mands that return S

etting values.

4.3. N

etwo

rk Pro

gram

min

g

Setup com

mands, P

arameter com

mands, and B

roadcast comm

ands can all be sent over the network.

Param

eter comm

ands and Broadcast com

mands can be sent at any tim

e. Executing S

etup comm

ands requires a N

etwork S

etup Session to be opened first.

Netw

ork programm

ing is effected by sending comm

ands to and receiving replies from the com

mand

port (65535 or FF

FF

Hex) of the E

M100. E

ach comm

and and reply must be sent in its ow

n UD

P packet.

Op

enin

g N

etwo

rk Setu

p S

ession

(Lo

gin

)

The N

etwork S

etup Session is opened by logging in using a Login com

mand. C

orrect password

matching that defined by the Login P

assword S

etting must be supplied. Login com

mand m

ust be used even if the Login P

assword is set to N

UILL (default after the Initialization).

If you forgot the password you can use the S

erial Program

ming M

ode to set a new passw

ord since the S

erial Program

ming M

ode is not password-protected.

Clo

sing

Netw

ork S

etup

Sessio

n

Netw

ork Setup S

ession is closed either by hardware-resetting the E

M100 through the M

D pin or by

using an Exit com

mand. In both cases the E

M100 restarts operation using the new

Setting values.

34

Co

mm

and

and

reply fo

rmat fo

r Setu

p an

d P

arameter co

mm

and

s

The form

at of Setup and P

arameter C

omm

ands and replies sent via the network is sim

ilar to that of S

etup comm

ands and replies exchanged in the Serial P

rogramm

ing Mode w

ith the only exception that ST

X

and CR

characters are not required- sending each comm

and and reply in a separate UD

P packet provides a

necessary encapsulation already.

Setup and P

arameter C

omm

ands have the following form

at:

Co

mm

and

cod

e S

etting

/Param

eter nam

e S

etting

/Param

eter value

Co

mm

and

cod

e field always consists of one character (i.e. “S

”, “G”, etc.). S

etting

/Param

eter nam

e field and S

etting

/Param

eter value fields are optional and only required for certain com

mands. N

ame

always

consists of

two

characters (i.e.

“BR

”, “S

A”,

etc.). V

alue

format

depends on

the type

of S

etting/Imm

ediate.

All replies sent by the E

M100 over the netw

ork have the following form

at:

Rep

ly cod

e S

etting

/Param

eter value

Rep

ly cod

e field is always present and inform

s you of the comm

and processing status (OK

, failed, etc.). S

etting

/Param

eter value field is only present for replies that return values.

Fo

rmat o

f Bro

adcast co

mm

and

s

Broadcast com

mands have no unified form

at. Form

at of each Broadcast com

mand and corresponding

reply is described in Available com

mands.

Page 18: EM100 Tech Manual V2_1a (Print)

5. Availab

le com

man

ds an

d rep

lies

5.1. L

ist or co

mm

and

s

Co

de

S

N

B

L

Descrip

tion

S

etup

com

man

ds

L

+

Login (open Netw

ork Setup S

ession) S

+

+

+ S

et (write) new

Setting value

G

+ +

+

Get (read) current S

etting value I

+ +

+

Initialize (restore Settings to their default factory values)

E

+ +

+

Exit S

erial Program

ming M

ode/Netw

ork Setup S

ession (restart the EM

100) V

+

+

G

et firmw

are version P

arameter co

mm

and

s P

+

C

hange Param

eter value B

road

cast com

man

ds

X

+

+

Request echo from

all listening EM

100s A

+ +

A

ssign new IP

-address to the EM

100 with the specified E

thernet address

Colum

ns: “S”- com

mand is available in the S

erial Program

ming m

ode; “N” -com

mand can be issued

through the network; “B

”- comm

and can be issued through the network in broadcast m

ode; “L”- when issued

through the network this com

mand requires prior login (N

etwork S

etup Session m

ust be opened first).

5.2. L

ist of p

ossib

le reply co

des

Co

de

Descrip

tion

A

C

ompleted successfully, m

ay be followed by data (if this com

mand returns data)

C

Invalid comm

and, Setting/P

arameter nam

e, or Setting/P

arameter value

F

Com

mand execution failed (internal error or m

alfunction) D

A

ccess denied. This reply code can only be sent in response to a netw

ork comm

and. It m

eans that you haven’t logged in properly or have supplied an incorrect Login Passw

ord.

36

5.3. D

etailed C

om

man

d d

escriptio

n

Com

mand and reply strings below

are shown w

ithout ST

X and C

R characters. S

TX

/CR

encapsulation is required w

hen sending comm

ands via the serial port (see Serial com

mand and reply form

at for details).

Lo

gin

(L)

Opens N

etwork S

etup Session for the program

ming of E

M100’s S

ettings over the network

Com

mand form

at: “Lp

pp

…p

”, where p

pp

…p

- login password

Possible replies: “A

”, “F”, “D

Can be issued through the netw

ork only (broadcast not allowed)

Login password is defined by the Login P

assword S

etting. Default passw

ord is NU

LL but login is still required to open the N

etwork S

etup Session.

F reply m

ay happen because of the EM

100’s internal malfunction (for exam

ple, inability to retrieve current passw

ord from the non-volatile m

emory). D

reply code is returned when the supplied passw

ord is incorrect.

Set (S

)

Set (w

rite) new S

etting value

Com

mand form

at: “Sn

nvvv…

v”, where n

n- S

etting name, vvv…

v- Setting value

See A

vailable Settings for a com

plete description of Settings

Possible replies: “A

”, “C”, “F

”, “D”

Can be issued in the S

erial Program

ming M

ode or through the network in the N

etwork S

etup Session

(broadcast not allowed, prior login required)

Page 19: EM100 Tech Manual V2_1a (Print)

37

C reply code is returned if the S

etting name is incorrect or new

Setting value is invalid (out of range, has

invalid formatting, etc.). F

reply may happen because of the E

M100’s internal m

alfunction (for example,

failure to save new S

etting value into the non-volatile mem

ory). D reply code is returned w

hen comm

and is issued through the netw

ork and the Netw

ork Setup S

ession is not opened (i.e. without prior login).

Exam

ple. Set the IP

-address of the EM

100 to “192.168.100.40”:

SIP192.168.100.40

A G

et (G)

Get (read) current S

etting value

Com

mand form

at: “Gn

n”, w

here nn

- Setting nam

e

See A

vailable Settings for a com

plete description of Settings

Possible replies: “A

vvv…v”, “C

”, “F”, ”D

”, where vvv…

v- Setting value

Can be issued in the S

erial Program

ming M

ode or through the network in the N

etwork S

etup Session

(broadcast not allowed, prior login required)

C reply code is returned if the S

etting name is incorrect. F

reply is returned when current S

etting value is invalid or could not be retrieved (situation can be rectified by setting correct value using the S

et comm

and or using the Initialize com

mand to restore all S

ettings to their default factory values). D reply code is

returned when com

mand is issued through the netw

ork and the Netw

ork Setup S

ession is not opened (i.e. w

ithout prior login).

Exam

ple. Get the IP

-address of the EM

100:

GIP

A192.168.100.40

38

Initialize (I)

Initializes the EM

100 (restores all Settings to their default factory values)

Com

mand form

at: “I”

Possible replies: “A

”, “F”, ”D

Can be issued in the S

erial Program

ming M

ode or through the network in the N

etwork S

etup Session

(broadcast not allowed, prior login required)

This com

mand perform

s the following: (1) all S

ettings are restored to their default values with the

following exceptions: (a) F

actory Ethernet address is not initialized (because it contains unique address set

by the factory), and (b) IP-address and C

urrent Ethernet A

ddress of the EM

100 are not initialized in case this com

mand is issued through the netw

ork; (2) in case this comm

and is issued in the Serial P

rogramm

ing M

ode the value of the Factory E

thernet address Setting is copied into the C

urrent Ethernet address S

etting.

If this comm

and fails (F reply code), this m

aybe because the Factory E

thernet address Setting contains

invalid value. In this case initialize it first by setting any address you can think of (i.e. “204.134.165.0.44.55”) b

ut m

ake sure th

at the first n

um

ber is even

, then try to use the Initialize comm

and again. D reply code is

returned when com

mand is issued through the netw

ork and the Netw

ork Setup S

ession is not opened (i.e. w

ithout prior login).

Exit (E

)

Exits the S

erial Program

ming M

ode or Netw

ork Setup S

ession, also restarts the EM

100 which puts new

S

etting values into effect

Com

mand form

at: “E”

Possible replies: no reply in case of success, “D

Can be issued in the S

erial Program

ming M

ode or through the network in the N

etwork S

etup Session

(broadcast not allowed, prior login required)

Page 20: EM100 Tech Manual V2_1a (Print)

39

No reply is returned in case of successful execution because the E

M100 restarts. D

reply code is returned w

hen comm

and is issued through the network and the N

etwork S

etup Session is not opened (i.e.

without prior login).

Get firm

ware versio

n (V

)

Gets firm

ware version of the currently loaded firm

ware

Com

mand form

at: “V”

Possible replies: “A

vvv…v”, w

here vvv…v - version string

Can be issued in the S

erial Program

ming M

ode or through the network (broadcast not allow

ed, prior login is not required)

The version string is alw

ays encapsulated in “<” and “>

” characters, begins with the version num

ber in the “X

.XX

” format and possibly contains a sm

all comm

ent after a space. Version num

bering follows this

system:

change in

the first

digit- m

ajor release,

change in

the second

digit- new

m

inor features

or alterations, change in the third digit- bug fixes but no functionality changes.

Exam

ple:

V

A<V2.10 RELEASE2 final>

Param

eter (P)

Changes (and retrieves) P

arameters of the E

M100

Com

mand form

at: “Pp

pv”, w

here pp

- parameter, v- value if any

See A

vailable Param

eters for a complete description of P

arameters

Possible replies: “A

”,”C”,”D

Can be issued through the netw

ork only (broadcast not allowed, prior login not required)

40

The E

M100 only accepts P

arameter com

mand w

hen the Rem

ote Control is set to “yes”.

C reply code is returned if supplied param

eter name or value is incorrect. D

reply code is returned if com

mand is rejected because the R

emote C

ontrol is set to “no”. The only case w

hen this comm

and returns som

e data along with the A

reply code is when the status of general-purpose I/O

pins is read using the Pin

Get com

mand.

Ech

o (X

)

Request E

cho from all listening E

M100s

Com

mand form

at: “X”

Possible replies: “A

ether_ad

dr/p

ort_n

um

”, where eth

er_add

r is Current E

thernet Address of the

EM

100, po

rt_nu

m- current D

ata Port N

umber

Can be issued through the netw

ork only (broadcast mode should be used)

This com

mand can be utilized to auto-detect all the E

M100s on a local netw

ork segment. W

hen sent in the broadcast m

ode it reaches all locally attached EM

100s. Each E

M100 then replies w

ith its Current

Ethernet A

ddress and Data P

ort Num

ber (IP-address is not returned because it is already contained in the

IP-packet’s header). R

eply will reach the sender even w

hen the IP-address of the E

M100 is not valid.

Ethernet address of each particular E

M100 is needed for an over-the-netw

ork assignment of the new

IP-

address to the designated EM

100 using the Assign com

mand.

It is noteworthy that broadcast packets cannot penetrate routers, bridges, etc. and, therefore, are

confined to a local network segm

ent. Consequently, it is im

possible to use this comm

and to discover the E

M100s outside the local netw

ork segment.

Exam

ple:

X

A192.168.100.40/1001

Page 21: EM100 Tech Manual V2_1a (Print)

41

Assig

n (A

)

Assign new

IP-address to the E

M100 w

ith the specified Ethernet (M

AC

) address

Com

mand form

at: “Aeth

er_add

r/passw

ord

/ip_ad

dr”, w

here ether_ad

dr- E

thernet (MA

C) address of

the EM

100 that is to be assigned a new IP

-address, passw

ord

- Login Passw

ord for this EM

100, ip_ad

dr-

new IP

-address to be assigned.

Possible replies: this com

mand is never replied to

Can be issued through the netw

ork only (broadcast mode should be used)

This com

mand is used to assign a new

IP-address to the E

M100 w

ith specific Ethernet (M

AC

) address. W

hen sent in the broadcast mode this com

mand reaches all locally attached E

M100s. O

nly the EM

100 w

hose Current E

thernet Address m

atches that in the ether_ad

dr field of the com

mand w

ill change its IP-

address to ip-ad

dr value (provided that correct Login P

assword has been supplied in the p

asswo

rd field).

This com

mand is never replied to but its result can be verified using E

cho comm

and.

This com

mand is useful w

hen you need to assign a valid IP-address to the uninitialized E

M100. U

sing the S

et comm

and to change the IP-address S

etting of the EM

100 is not possible at this time since executing

this comm

and requires the EM

100 to have a valid IP-address already. H

aving to supply a valid password is

usually not an issue since uninitialized (ex-factory) EM

100 have a NU

LL password.

It is noteworthy that broadcast packets cannot penetrate routers, bridges, etc. and, therefore, are

confined to a local network segm

ent. Consequently, it is im

possible to assign a new IP

-address using this com

mand to the E

M100s outside the local netw

ork segment.

Exam

ple: set the IP-address of the E

M100 w

hose Ethernet address is 0.1.2.3.4.5 and login passw

ord is “pw

d1” to 192.168.100.40

A0.1.2.3.4.5/pwd1/192.168.100.40

6. Availab

le Settin

gs

6.1. L

ist of S

etting

s by g

rou

ps

The follow

ing is a complete list of all available S

ettings. Setting values are set and retrieved using S

et and G

et comm

ands:

Co

de

Descrip

tion

N

etwo

rk-related S

etting

s R

M

Routing m

ode (slave/master)

IP

IP-address of the E

M100

DI

Destination IP

-address. Only relevant in the M

aster Routing M

ode P

N

Data P

ort Num

ber of the EM

100 (0…65534)

DP

D

estination Data P

ort Num

ber (0…65535). O

nly relevant in the Master R

outing Mode

TP

T

ransport Protocol (U

DP

/TC

P)

CT

C

onnection Tim

eout (never/1…255m

in). Only relevant w

ith TC

P T

ransport Protocol

GI

Gatew

ay IP-address. O

nly relevant in the Master R

outing Mode

NM

N

etmask. O

nly relevant in the Master R

outing Mode

PW

Login P

assword for the N

etwork S

etup Session

Serial p

ort-related

Settin

gs

BR

B

audrate (150/300/1200/2400/4800/9600/19200/38400/57600/115200bps) P

R

Parity (none/even/odd)

BB

B

its Per B

yte (7/8) F

C

Flow

Control (none/R

TS

-CT

S)

RC

R

emote C

ontrol of EM

100’s Param

eters via Param

eter Com

mands (enable/disable)

SE

S

oft Entry (by escape sequence) into the S

erial Program

ming M

ode (enable/disable) S

erial !!! !E

thern

et rou

ting

Settin

gs

ML

M

aximum

Data Length (32…

255bytes). Only relevant w

ith UD

P T

ransport Protocol

MD

M

aximum

Intercharacter Delay (disabled/10…

2550ms)

Page 22: EM100 Tech Manual V2_1a (Print)

43

SA

S

tart On A

ny Character (no/yes)

F1, F

2, F3

Start C

haracters, Enable/D

isable. Not relevant w

hen Start O

n Any C

haracter= “yes”

S1, S

2, S3

Start C

haracters, AS

CII code. N

ot relevant when S

tart On A

ny Character=

“yes” U

1, U2, U

3 S

top characters, Enable/D

isable E

1, E2, E

3 S

top characters, AS

CII code

P1, P

2, P3

Stop characters, N

umber O

f Post-characters

System

Settin

gs

EA

C

urrent Ethernet address

FE

F

actory Ethernet address

SI

Serial Interface (full-duplex/half-duplex/auto)

6.2. D

etailed S

etting

descrip

tion

Ro

utin

g M

od

e (RM

)

Selects S

lave or Master R

outing Mode

Set com

mand form

at: “SR

Mx”, w

here x- 0- Slave R

outing Mode, 1- M

aster Routing M

ode

Get com

mand form

at: “GR

M”

Default: 0 (S

lave)

See also: ---

IP-ad

dress (IP

)

Defines ow

n IP-address of the E

M100

Set

comm

and form

at: “S

IPip

_add

r”, w

here ip

_add

r m

ust be

in the

“dot-decimal”

format,

i.e. “192.168.100.40”

Get com

mand form

at: “GIP

44

Default: 127.0.0.1

See also: E

thernet port and network com

munications

Destin

ation

IP-ad

dress (D

I)

Defines the D

estination IP-address. O

nly relevant in the Master R

outing Mode

Set

comm

and form

at: “S

DIip

_add

r”, w

here ip

_add

r m

ust be

in the

dot-decimal

format,

i.e. “192.168.100.40”

Get com

mand form

at: “GD

I”

Default: 127.0.0.2

See also: E

thernet port and network com

munications

Data P

ort N

um

ber

Defines ow

n data port number for the E

M100

Set com

mand form

at: “SP

Np

ort_n

um

”, where p

ort_n

um

must be in the 0…

65534 range

Get com

mand form

at: “GP

N”

Default: 1001

Port num

ber 65535 cannot be used since it is reserved for a comm

and port.

See also: E

thernet port and network com

munications

Destin

ation

Data P

ort N

um

ber

Defines the destination data port num

ber. Only relevant in the M

aster Routing M

ode

Set com

mand form

at: “SD

Pp

ort_n

um

”, where p

ort_n

um

must be in the 0…

65535 range

Page 23: EM100 Tech Manual V2_1a (Print)

45

Get com

mand form

at: “GD

P”

Default: 1001

See also: E

thernet port and network com

munications

Tran

spo

rt Pro

toco

l (TP

)

Selects U

DP

/IP or T

CP

/IP com

munications protocol for data transm

ission

Set com

mand form

at: “ST

Pt”, w

here t- 0- UD

P/IP

protocol, 1- TC

P/IP

protocol

Get com

mand form

at: “GT

P”

Default: 0 (U

DP

/IP)

See also: E

thernet port and network com

munications , S

lave and Master routing m

odes vs. UD

P/IP

and T

CP

/IP transport protocols, B

uffer-related issues

Co

nn

ection

Tim

eou

t (CT

)

Specifies tim

eout (in minutes) for the T

CP

/IP connection in case no data is transm

itted in any direction

Set com

mand form

at: “SC

Tto

ut”, w

here tou

t is the connection timeout in m

inutes (0-255). Value of 0

disables this function (connection never times out)

Get com

mand form

at: “GC

T”

Default: 5 (5 m

inutes)

When no data is exchanged across the T

CP

/IP connection for a specified num

ber of minutes the

EM

100 will abort the connection autom

atically (by sending a RE

SE

T packet). T

his Setting prevents an idle

client (connection) from “holding” the E

M100 indefinitely.

See also: E

thernet port and network com

munications, C

onnections with m

ore than two nodes (m

any clients to one data source under T

CP

/IP T

ransport Protocol)

46

Gatew

ay IP-ad

dress (G

I)

Defines the IP

-address of the default gateway. O

nly relevant in the Master R

outing Mode

Set com

mand form

at: “SIP

gatew

ay_ip”, w

here gatew

ay_ip m

ust be in the “dot-decimal” form

at, i.e. “192.168.100.40”

Get com

mand form

at: “GG

I”

Default: 127.0.0.1

Defines the IP

-address of the default gateway to w

hich the EM

100 sends the data in case the D

estination IP-address is not on the local netw

ork segment. W

hether the Destination IP

-address is local or not is defined by the N

etmask S

etting.

See also: E

thernet port and network com

munications

Netm

ask (NM

)

Defines the IP

-address range for the local network segm

ent. Only relevant in the M

aster Routing M

ode

Set

comm

and form

at: “S

NM

netm

ask”, w

here n

etmask

must

be in

the “dot-decim

al” form

at, i.e.

“255.255.255.0”

Get com

mand form

at: “GN

M”

Default: 0.0.0.0 (any D

estination IP-address is considered to be local)

The N

etmask defines w

hether the Destination IP

-address is considered to be on the local network

segment or foreign netw

ork segment. In the latter case the E

M100 sends the data to the default G

ateway IP

-address rather then to the D

estination IP-address directly.

See also: E

thernet port and network com

munications

Page 24: EM100 Tech Manual V2_1a (Print)

47

Lo

gin

Passw

ord

(PW

)

Defines login passw

ord for the Netw

ork Setup S

ession

Set com

mand form

at: “SP

Wp

asswo

rd”, w

here passw

ord

is the login password (0-6 characters long,

valid characters are those with A

SC

II codes in the 32…127 range).

Get com

mand form

at: “GP

W”

Default: N

ULL

You need to Login even w

hen the password is set to N

ULL (i.e. passw

ord has a zero length).

See also: ---

Bau

drate (B

R)

Sets the baudrate of the E

M100’s serial port. C

an be overridden by the Baudrate P

arameter.

Set

comm

and form

at: “S

BR

b”,

where

b:

0-.1200bps, 1-

2400bps, 2-

4800bps, 3-

9600bps, 4-

19220bps, 5- 38400bps, 6- 57600bps, 7- 115200bps, 8- 150bps, 9- 300bps, 10- 600bps

Get com

mand form

at: “GB

R”

Default: 5 (38400bps)

See also: ---

Parity (P

R)

Selects the parity m

ode of the EM

100’s serial port. Can be overridden by the P

arity Param

eter.

Set com

mand form

at: “SP

Rp

”, where p

: 0-.Disabled, 1- E

ven, 2- Odd

Get com

mand form

at: “GP

R”

Default: 0 (D

isabled)

48

See also: ---

Bits P

er Byte (B

B)

Defines the bits/byte m

ode of the EM

100’s serial port. Can be overridden by the B

its Per B

yte P

arameter.

Set com

mand form

at: “SB

Bb

”, where b

: 0-.7 bits/byte, 1- 8 bits/byte

Get com

mand form

at: “GB

B”

Default: 1 (8 bits/byte)

See also: ---

Flo

w C

on

trol (F

C)

Selects the flow

control mode for the E

M100’s serial port. C

an be overridden by the Flow

Control

Param

eter.

Set com

mand form

at: “SF

Cf”, w

here f: 0-.none, 1- RT

S/C

TS

(hardware)

Get com

mand form

at: “GF

C”

Default: 0 (none)

You are recom

mended to choose the R

TS

/CT

S flow

control whenever possible

See also: B

uffer-related issues

Rem

ote C

on

trol (R

C)

Enables/D

isables EM

100’s Param

eter changing through the Param

eter comm

and

Set com

mand form

at: “SR

Cp

”, where p

: 0-.Disabled, 1- E

nabled

Get com

mand form

at: “GR

C”

Page 25: EM100 Tech Manual V2_1a (Print)

49

Default: 1 (E

nabled)

See also: ---

So

ft En

try (SE

)

Enables/disables entry into the S

erial Program

ming M

ode by escape sequence

Set com

mand form

at: “SS

Es”, w

here s: 0-.Disabled, 1- E

nabled

Get com

mand form

at: “GS

E”

Default: 0 (D

isabled)

See also: ---

Maxim

um

Data L

eng

th (M

L)

Defines the am

ount of data in the serial !E

thernet buffer at which the break condition w

ill be generated and the contents of the buffer w

ill be sent out via the Ethernet port. O

nly relevant when the U

DP

/IP

Transport P

rotocol is selected

Set com

mand form

at: “SM

Llen

”, where len

is the length of data in bytes (32-255)

Get com

mand form

at: “GM

L”

Default: 255

See also: S

erial !E

thernet data routing (Break conditions)

Maxim

um

Interch

aracter Delay (M

D)

Defines the tim

e gap after the arrival of the most recent serial character into the serial port w

hich, when

exceeded, leads to a break condition and makes the E

M100 send out the contents of the serial!

Ethernet

buffer via the Ethernet port

50

Set com

mand form

at: “SM

Dd

el”, where d

el is the maxim

um intercharacter delay (0-255). V

alue of 0 disables this function. A

ctual delay is calculated as del X 10m

s, i.e. it can be in the 10-2550ms range.

Get com

mand form

at: “GM

D”

Default: 1 (10 m

s)

See also: S

erial!E

thernet data routing (Break conditions)

Start O

n A

ny C

haracter (S

A)

Defines if the next serial data block is opened on any character received or only w

hen one of pre-defined S

tart Characters is received

Set com

mand form

at: “SS

As”, w

here s: 0- No (new

serial data block is opened on predefined Start

Characters only), 1- Y

es (new serial data block is opened on any character)

Get com

mand form

at: “GS

A”

Default: 1 (Y

es)

See also: S

erial!E

thernet data routing (Start conditions)

Start C

haracter, E

nab

le/Disab

le (F1, F

2, F3)

Three separate S

ettings to enable/disable start characters 1, 2, and 3 (AS

CII codes of start characters

are defined by Start character, A

SC

II Code S

ettings). Not relevant w

hen Start O

n Any C

haracter is set to “yes” S

et comm

and format: “S

F1e”, “S

F2e”, “S

F3e”, w

here e: 0- Disabled, 1- E

nabled

Get com

mand form

at: “GF

1”, “GF

2”, “GF

3”

Default: 0 (D

isabled)

See also: S

erial !E

thernet data routing (Start conditions)

Page 26: EM100 Tech Manual V2_1a (Print)

51

Start C

haracter, A

SC

II Co

de (S

1, S2, S

3)

Three separate S

ettings to define the AS

CII codes of start characters 1, 2, and 3 (start characters are

enabled/disabled through

Start

Character,

Enable/D

isable S

ettings). N

ot relevant

when

Start

On

Any

Character is set to “yes”

Set com

mand form

at: “SS

1c”, “SS

2c”, “SS

3c”, where c is an A

SC

II code of the start character (0-255)

Get com

mand form

at: “GS

1”, “GS

2”, “GS

3”

Default: 0

See also: S

erial!E

thernet data routing (Start conditions)

Sto

p C

haracter, E

nab

le/Disab

le (U1, U

2, U3)

Three separate S

ettings to enable/disable stop characters 1, 2, and 3 (AS

CII code of stop characters

are defined by Stop character, A

SC

II Code S

ettings)

Set com

mand form

at: “SU

1e”, “SU

2e”, “SU

3e”, where e: 0- D

isabled, 1- Enabled

Get com

mand form

at: “GU

1”, “GU

2”, “GU

3”

Default: 0 (D

isabled)

See also: S

erial !E

thernet data routing (Stop conditions)

Sto

p C

haracter, A

SC

II Co

de (E

1, E2, E

3)

Three separate S

ettings to define the AS

CII codes of stop characters 1, 2, and 3 (stop characters are

enabled/disabled through Stop character, E

nable/Disable S

ettings)

Set com

mand form

at: “SE

1c”, “SE

2c”, “SE

3c”, where c is an A

SC

II code of the stop character (0-255)

Get com

mand form

at: “GE

1”, “GE

2”, “GE

3”

Default: 0

52

See also: S

erial!E

thernet data routing (Stop conditions)

Sto

p C

haracter, N

um

ber o

f Po

st Ch

aracters (P1, P

2, P3)

Three separate S

ettings to define the number of post characters to follow

stop characters 1, 2, and 3 (A

SC

II codes of stop characters are defined by Stop character, A

SC

II Code S

ettings, stop characters are enabled/disabled through S

top character, Enable/D

isable Settings)

Set com

mand form

at: “SP

1n”, “S

P2n

”, “SP

3n”, w

here n in a num

ber of Post-characters (0-255)

Get com

mand form

at: “GP

1”, “GP

2”, “GP

3”

Default: 0

See also: S

erial !E

thernet data routing (Stop conditions)

Cu

rrent E

thern

et Ad

dress (E

A)

Defines current E

thernet (MA

C) address of the E

M100

Set

comm

and form

at: “S

EA

e_add

r”, w

here e_ad

dr

must

be in

the “dot-decim

al” form

at, i.e.

“100.101.102.103.104.105”.

Get com

mand form

at: “GE

A”.

Default: copied from

the Factory E

thernet address Setting

This E

thernet address is used by the EM

100 during operation.

See also: Initialize (I)

Facto

ry Eth

ernet A

dd

ress (FE

)

Keeps default E

thernet address

Set com

mand form

at: “SF

Ee_ad

dr”, w

here e_add

r must be in the “dot-decim

al” format, i.e. “1.2.3.4.5.6”

Page 27: EM100 Tech Manual V2_1a (Print)

53

Get com

mand form

at: “GF

E”

Default: unique num

ber for each EM

100 produced

This S

etting contains a default Ethernet address assigned to a particular E

M100 during production.

Tib

bo

Tech

no

log

y initializes each EM

100 to different Ethernet address num

ber. You are advised to never

change it. If you want to change the E

thernet address of the EM

100 do this by changing the value of the C

urrent Ethernet A

ddress Setting. D

uring the Initialization, the value of this Setting is copied into the C

urrent E

thernet Address thus restoring factory E

thernet address for use.

See also: Initialize

Serial In

terface (SI)

Selects full-duplex or half-duplex m

ode for serial interface

Set com

mand form

at: “SS

Ii”, where i: 0- R

S232, 1- R

S485, 2- A

uto

Get com

mand form

at: “GS

I”

Default: 2 (A

uto)

See also: F

ull-duplex/Half-duplex S

erial Transm

ission Mode selection

7. Availab

le Param

eters

7.1. L

ist of P

arameters

The follow

ing is a complete list of all available P

arameters. P

arameters are set using P

arameter

comm

and:

Nam

e D

escriptio

n

BR

B

audrate (150/300/1200/2400/4800/9600/19200/38400/57600/115200bps) P

R

Parity (none/even/odd)

BB

B

its Per B

yte (7/8) F

C

Flow

Control (none/R

TS

-CT

S)

S0, S

1, S3

Set the status of P

0, P1, and P

3 general-purpose I/O lines

G0, G

1, G2, G

3 G

et the status of P0, P

1, P2, and P

3 general-purpose I/O lines

7.2. D

etailed P

arameter d

escriptio

n

Bau

drate (B

R)

Changes current baudrate of the E

M100’s serial port. T

his Param

eter overrides the Baudrate S

etting

Com

mand form

at: “PB

Rb

”, where b

: 0-.1200bps, 1- 2400bps, 2- 4800bps, 3- 9600bps, 4- 19220bps, 5- 38400bps, 6- 57600bps, 7- 115200bps, 8- 150bps, 9- 300bps, 10- 600bps

See also: ---

Parity (P

R)

Changes current parity m

ode of the EM

100’s serial port. This P

arameter overrides the P

arity Setting

Com

mand form

at: “PP

Rp

”, where p

: 0-.Disabled, 1- E

ven, 2- Odd

See also: ---

Page 28: EM100 Tech Manual V2_1a (Print)

55

Bits P

er Byte (B

B)

Changes current bits/byte m

ode of the EM

100’s serial port. This P

arameter overrides the B

its Per B

yte S

etting

Com

mand form

at: “PB

Bb

”, where b

: 0-.7 bits/byte, 1- 8 bits/byte

See also: ---

Flo

w C

on

trol (F

C)

Changes current flow

control mode of the serial port. T

his Param

eter overrides the Flow

Control S

etting

Com

mand form

at: “PF

Cf”, w

here f: 0-.none, 1- RT

S/C

TS

See also: ---

Pin

Set (S

0, S1, S

3)

Three P

arameter to changes current output level of general-purpose I/O

pins P0, P

1, and P2

Com

mand form

at: “PS

pb

”, where p

: 0- P0, 1- P

1, 3- P3, and b

: 0-.set to low, 1- set to high

Note that pin P

2 is input-only and this comm

and cannot control its output state.

See also: ---

Pin

Get (S

0, S1, S

2, S3)

Four input P

arameters to read the current input level of general-purpose I/O

pins P0, P

1, P2, and P

3

Com

mand form

at: “PG

p”, w

here p: 0- P

0, 1- P1, 2- P

2, 3- P3

Reply: “A

p”, w

here p: 0- pin is low

, 1- pin is high

See also:

8. Firm

ware D

own

load

Mo

de

Internal firmw

are of the EM

100 can be upgraded in the field. We are constantly w

orking on the EM

100 functionality enhancem

ent, so new firm

ware versions are released quite often. N

ew firm

ware versions are

posted at ww

w.tibbo.com

. You are advised to register at our site so w

e can let you know w

hen the new

firmw

are becomes available.

Red

Statu

s LE

D is b

linkin

g after yo

u h

ave do

wn

load

ed n

ew firm

ware an

d th

e EM

100 do

esn’t

seem to

wo

rk? Y

ou

have fo

rgo

tten to

initialize th

e EM

100!

8.1. D

ow

nlo

adin

g n

ew firm

ware file

New

firmw

are file is downloaded into the E

M100 through its R

S232 port. T

he file is downloaded using

the XM

OD

EM

comm

unications protocol. If the EM

100 is used as a standalone device the firmw

are file can be dow

nloaded from the P

C. W

hen the EM

100 is used as a comm

unications coprocessor the main

processor of the host serial device can perform the dow

nload.

Procedure below

shows how

the firmw

are file can be downloaded from

the PC

. The use of the

EM

100SK

Starter K

it is assumed

To dow

nload the firmw

are file you’ll need any PC

software that supports an X

MO

DE

M com

munications

protocol (checksum

version).

Suitable

software

packages are

Term

95 (part

of a

Norton

Com

mander

package), Q

MO

DE

M

(a very

popular D

OS

program

), and

a H

yperTerm

inal. T

he latter

is especially

widespread because it com

es with every W

indows distribution. P

rocedures below assum

e the use of H

yperTerm

inal for Window

s.

The H

yperTerm

inal is normally found in the S

tart! P

rograms!

Accessories!

Com

munications!

H

yperTerm

inal folder. If it is not there, then you must have opted it out w

hen installing Window

s on your PC

. F

ollow the instructions below

to add HyperT

erminal to your system

(be sure to have your Window

s distribution C

D handy!):

Page 29: EM100 Tech Manual V2_1a (Print)

57

• G

o to

the C

ontrol P

anel (S

tart !

Settings!

C

ontrol P

anel) and

double-click on

the A

dd/Rem

ove Program

s icon- the Add/R

emove P

rograms dialog w

ill open

• C

lick on Window

s Setup tab to view

the list of optional installation components

• C

hoose Com

munications in the C

omponents list and click D

etails

• In the C

omm

unications window

, select the HyperT

erminal (it m

ust be “checked”)

• P

ress OK

to close Com

munications w

indow, press O

K again to close A

dd/Rem

ove Program

s

• Y

ou will possibly be asked to insert the W

indows C

D at this point. D

o this and follow the

instructions on the screen.

Once the H

yperTerm

inal is installed, follow the procedures below

to download new

firmw

are file into the E

M100: •

Sw

itch the EM

100SK

off

• C

onnect the EM

100SK

’s Serial port to the P

C using W

AS

-1455 or similar cable

• Launch the H

yperTerm

inal and configure it as follows:

o

When the C

onnection Description dialog opens, type any descriptive string (like

“EM

100”) and press OK

o

When the C

onnect to dialog opens, select an appropriate CO

M port from

the Connect

Using drop-dow

n box (for example, “D

irect to CO

M1”)

o

When

the C

OM

P

roperties dialog

appears, set

comm

unications param

eters as

follows: B

its per second: 38400, Data bits: 8, P

arity: None, S

top bits: 1, Flow

control: N

one. Click O

K w

hen done- the HyperT

erminal’s m

ain window

will appear

o

Now

choose File!

Properties from

the Main m

enu- the Properties dialog w

ill appear

o

Click on the S

ettings tab and press the AS

CII S

etup button- the AS

CII S

etup dialog w

ill open

58

o

Check (enable) three options: E

cho typed characters locally, Send line feeds w

ith line ends, and A

ppend line feeds to incoming line ends

o

Click O

K tw

ice to close both dialogs

o

Optional: you m

ay want to save this H

yperTerm

inal configuration for the future use. T

his way you w

on’t have to go through this elaborate setup again next time. C

hoose F

ile!S

ave from the M

ain menu to save this configuration under the filenam

e you’ve chosen for your connection

• C

hoose Transfer!

Send file from

the Main m

enu- the Send file dialog w

ill appear

• In the S

end file dialog, select the firmw

are file that you want to dow

nload into the EM

100 and choose the X

modem

protocol from the P

rotocol drop-down box. C

lick OK

when finished

• T

he Xm

odem file send for a dialog w

ill be displayed

• P

ress the Setup B

utton on the EM

100SK

’s board and power the E

M100S

K up w

hile keeping the B

utton pressed- the download w

ill start. You m

ay release the Button at this point

• E

M100S

K’s G

reen Status LE

D is blinking during the dow

nload, and the HyperT

erminal show

s the file transfer progress

• W

hen the download is finished, sw

itch the EM

100SK

off and back on again. If the Red S

tatus LE

D starts blinking this m

eans that the EM

100’s Settings need to be initialized. D

o not exit the H

yperTerm

inal and proceed to the next Section for further instructions

8.2. In

itializing

the E

M100

Initialize comm

and is used to initialize the EM

100 after the new firm

ware dow

nload.

• M

ake sure the EM

100SK

is powered up and press the S

etup Button. T

he EM

100 will enter the

Serial P

rogramm

ing Mode

Page 30: EM100 Tech Manual V2_1a (Print)

59

• In the H

yperTerm

inal window

type <C

TR

L+B

> follow

ed by capital “I” and press <E

NT

ER

> key.

Pressing <

CT

RL+

B>

sends an ST

X character (appears on the H

yperTerm

inal’s screen as a “sm

iley face”) while pressing <

EN

TE

R>

sends CR

character (see Serial com

mand and reply

format for m

ore information)

• T

he E

M100

should reply

with

ST

X-“A

”-CR

w

hich m

eans that

comm

and w

as com

pleted successfully. T

he whole dialog should look like this:

#I

#A

• S

witch the E

M100S

K off and back on again- the E

M100 should start norm

al operation.

8.3. P

ossib

le dow

nlo

ad p

rob

lems an

d L

ED

sign

aling

A num

ber of errors can occur when dow

nloading new firm

ware file. A

ll errors are expressed as Red

Status LE

D signals (“blinking patterns”):

One long signal

Tim

eout while w

aiting for the data from P

C

One long +

one short signal C

omm

unications error (XM

OD

EM

error) O

ne long + tw

o short signals F

ile is too big and cannot fit in the EM

100s mem

ory O

ne long + three short signals

EM

100 program m

emory (F

LAS

H) failure

Every tim

e you reset or power the E

M100 up its internal firm

ware is checked for being valid. If the

firmw

are is valid, the EM

100 starts normal operation. If the firm

ware you have dow

nloaded is not valid then one of the follow

ing may occur:

• If you’ve been dow

nloading a correct firmw

are file but the download w

asn’t finished, then the Red

and Green S

tatus LED

s will blink rapidly

• If you’ve dow

nloaded a wrong file, then the E

M100 w

ill not show “any signs of life” on startup.

In both cases, make sure you are trying to dow

nload correct firmw

are file and repeat the downloading

process.

9. EM

100SK

I/O C

on

necto

r pin

assign

men

t & C

able w

iring

9.1. E

M100S

K I/O

con

necto

r pin

assign

men

t

The E

M100S

K has one 10B

aseT (E

thernet) port and one RS

232 (Serial) port. P

in assignment is show

n in the table below

:

To

avoid com

mon

confusion, all

pins are

designated as

inputs and

outputs w

ith respect

to the

EM

100SK

.

RS

232M (S

erial) po

rt 10B

aseT (E

thern

et) po

rt

15

69

1

8

#1 N

o connection #1

TX

+

#2 R

X (Input)

#2 T

X-

#3 T

X (O

utput) #3

RX

+

#4 N

o connection #4

No connection

#5 G

round #5

No connection

#6 N

o connection #6

RX

- #7

RT

S (O

utput) #7

No connection

#8 C

TS

(Input) #8

No connection

#9 N

o connection

9.2. R

S232 cab

le wirin

g

There are tw

o kinds of RS

232 cable suitable for use with the E

M100S

K: E

M100S

K-to-D

evice (WA

S-

1404) and EM

100SK

-to-PC

(WA

S-1455). Y

ou can use your own cable in case the standard one is not

suitable. Cable w

iring is presented in the table below:

Page 31: EM100 Tech Manual V2_1a (Print)

61

EM

100SK

-to-D

evice (WA

S-1404)

EM

100SK

-to-P

C (W

AS

-1455) D

B9M

(Male)

DB

9F (F

emale)

DB

9F (F

emale)

DB

9F (F

emale)

#2 "

! #2

#2 "

! #3

#3 "

! #3

#3 "

! #2

#5 "

! #5

#5 "

! #5

#7 "

! #7

#7 "

! #8

#8 "

! #8

#8 "

! #7

Important note: you need to have an E

M100S

K-to-P

C cable to be able to dow

nload new firm

ware.

9.3. E

thern

et cable w

iring

Most E

thernet installations require cables of substantial and variable length, so you will probably need

to make your ow

n cables. For testing purposes T

ibb

o supplies tw

o kinds of Ethernet cables: device-to-hub

(WA

S-1499)

for connections

through a

standard E

thernet hub,

and device-to-device

(WA

S-1498)

for connections w

ithout a hub (i.e. directly from one E

thernet device to another).

Device-to

-hu

b (W

AS

-1499)

Device-to

-device (W

AS

-1498) S

ide A

S

ide B

Sid

e A

Sid

e B

#1 " (*)

! #1

#1 " (*)

! #3

#2 " (*)

! #2

#2 " (*)

! #6

#3 " (**)

! #3

#3 " (**)

! #1

#4 "

! #4

#4 "

! #4

#5 "

! #5

#5 "

! #5

#6 " (**)

! #6

#6 " (**)

! #2

#7 "

! #7

#7 "

! #7

#8 "

! #8

(*) #1, #2 m

ust share the sam

e tw

isted pair; (**) #3, #6 m

ust share the sam

e tw

isted pair; #8 "

!

#8

10. Sp

ecification

s, packin

g &

ord

ering

Info

rmatio

n

10.1. Sp

ecification

s & p

acking

info

rmatio

n

Ethernet interface: 10BaseT Ethernet

Serial interface: TTL-level, supports RS232 and RS485 communications; RS232 signals: RX, TX, RTS, CTS; RS485 signals: RX, TX, DIR

Network Protocols UDP, TCP, ICMP (ping), ARP

Data buffer size Two independent 255-byte buffers (for LAN

!RS232 and RS232!

LAN data transmission, can be increased upon request)

Power supply: DC 5V+/- 5%

, 70 mA Operation Temperature

0-55 Co

Operating relative humidity 10-90%

Module dimensions (excluding leads)

46mm(L) x 28mm(W) x 13mm(H)

Shipping packing: Tray, 50 x EM100/ tray

10.2. Ord

ering

Info

rmatio

n

EM100-00 Bare Module (gang packing: 50 per tray)

EM100SK-00E EM100 Kit with accessories: ARP-1014 (110V), W

AS-1455, WAS-1404, W

AS-1499, WAS-1498, DSK-T001

EM100SK-00U Same as the above but with the ARP-1015A (220V) power adaptor

ARP-1014 AC 110V/ DC 12V power adaptor

ARP-1015A AC 220V/ DC12V power adaptor

WAS-1455

EM100SK-to-PC RS232 180cm cable (required for firmware downloading!) W

AS-1404 EM100SK-to-Device RS232 140cm cable

WAS-1499

Device-to-hub Ethernet 180cm cable W

AS1498 Device-to-device Ethernet 180cm cable

DSK-T0001 Official CD with all the latest documentation and software