EM1500 User’s Manual 019-0124 • 070720-E The latest revision of this manual is available on the Rabbit Semiconductor Web site, www.rabbit.com, for free, unregistered download.
EM1500 User’s Manual Part Number 019-0124 • 070720–E • Printed in U.S.A. ©2006 Rabbit Semiconductor Inc. • All rights reserved. No part of the contents of this manual may be reproduced or transmitted in any form or by any means without the express written permission of Rabbit Semiconductor. Permission is granted to make one or more copies as long as the copyright page contained therein is included.
Table of Contents Chapter 1 Introduction 1 1.1 Overview of the EM1500 ................................................................................................................................... 1 1.2 Summary of Features .......................................................................................................................................... 2 1.2.1 Hardware Highlights ...................................................................................................................
5.1.6 Modem Tab ...............................................................................................................................................48 5.1.7 Polling Tab ................................................................................................................................................54 5.1.8 Opening Tab ..............................................................................................................................................59 5.1.9 Closing Tab ....
1. INTRODUCTION This manual is intended for anyone configuring Rabbit’s EM1500, an industrial grade serial-to-Ethernet converter and modem. Many of the terms you will find in this manual are defined in C., “Glossary of Terms.” In the electronic versions of this manual, the first occurrence of the term will have a link to its meaning in the alphabetized list in the appendix. 1.
1.2 Summary of Features Physically and functionally the EM1500 is a black box. As any good black box should be, the EM1500 is simple to use. No programming is needed. The tight integration of hardware and software offers unparalleled reliability. Quick configuration over Ethernet, using a web browser or the stand-alone configuration program, is easy and convenient.
1.2.1 Hardware Highlights • Low-EMI Rabbit 3000 microprocessor, running at 44.
1.2.2 Software Highlights • Serial-to-Ethernet protocol converter • on all serial ports • Serial port geometry: • 75 to 230400 bps • none, even, odd, mark, space parity • 7 or 8 data bits • 1 stop bit only, or 2 stop bits may be emulated using “mark” parity. • Flow control: • None • XON/XOFF • Hardware: CTS/RTS, DTR/DSR if these signals available to the port.
• Ethernet network interface: • IP address assignment via DHCP, directed ping, or statically assigned. • Supports DNS (name server) queries • Configuration: • via web browser. • via standalone configuration program running on: • Win95/98/2000/XP/NT • 80x86-based Linux • based on open source GUI toolkit (FOX). • relatively easy for OEMs to customize • EM1500 may be configured to require encrypted configuration updates. These are supported by the stand-alone program. Subject to U.S. export restrictions.
1.2.3 EM1500 Factory Defaults Every EM1500 is shipped with default values for some of the configuration parameters already set. Some parameters have been left blank where it makes no sense to have a default, such as the IP address and netmask for the unit. The following table gives all of the factory defaults. To reset your unit to these defaults, press down the reset switch for 10 seconds. Parameters that have been left blank or are zero, are not included in this table. Table 1-3.
Table 1-3.
1.4 The EM1500 and its Tool Kit The EM1500 is packaged in a small, heavy duty metal enclosure. Included with the EM1500 unit is a small plastic bag labeled 151-0124 that contains: • One 9 pin positive latch crimp housing • One 3 pin positive latch crimp housing • 20 pieces of crimp terminals The EM1500 ships without cables, power or documentation. All cables, etc., for use with the unit are packaged in the EM1500 Tool Kit, which may be purchased separately.
The other EM1500 Tool Kit items are: • 24V power supply (Tool kits sold outside North America do not include a power supply. The power • • • • requirements are 9 V to 36 V DC, 1.5 W typical.) Wire kit 22 AWG (Rabbit Part # 805-0038) Rabbit Engineering Demo Board EM1500 User’s Manual CD containing the Window and Linux versions of the stand-alone configuration program, a binary version of the EM1500 firmware, and the RFU (and support files: flash.ini, coldload.bin, pilot.bin) to download the firmware.
10 www.rabbit.
2. GETTING STARTED This chapter describes the hardware connections necessary for configuring the EM1500. This is followed by an example of telneting to a unit and a quick introduction to the Rabbit Engineering Demo Board. 2.1 Hardware Connections An Ethernet connection is required for configuration. You may use a browser or the stand-alone configuration program that is included on the CD in the EM1500 Tool Kit. 2.1.
2.1.1.3 Using a Hub and Two Straight-Through Cables The Ethernet connection does not have to be direct. The EM1500 and the host PC may be connected to the same LAN through a hub. This way has the benefit of allowing more than one EM1500 unit to be configured in the same configuration session. Of course, the hub can also be connected to a larger LAN, e.g., your company network or a test network. Always check with your network administrator before physically connecting to an existing network. 2.1.
2.2 Up and Running A simple block diagram of the example is shown below. Figure 2.1 Host PC connected to an EM1500 Hub Ethernet Ethernet EM1500 EM1500 SER2 SER2 Serial Cable Serial Cable Direct connection using an Ethernet cross-over cable Connection using a hub and Ethernet straight-through cables (as described in Section 2.1.1.1) (as described in Section 2.1.1.2) There are two software programs that run on the host PC for this example: • a terminal emulator • emconf.
Figure 2.2 Screen Capture of the Stand-Alone Configuration Program, Showing an EM1500 with Factory Defaults A factory-default EM1500 will have SER2 set to 19200 bps for speed and 8N1 for serial port geometry. The screen shot shows the Serial tab selected for SER2. You may access this information by clicking on the Serial tab and then on the SER2 tab. (Please see Chapter 5. “EM1500 Configuration,” for more information about the stand-alone program.
2.2.2 Making the Connection From the command prompt or a DOS box on the host PC, telnet to the IP address of the EM1500. Substitute the IP address of your unit in the telnet command shown below. Use the default port number for SER2: 8889. telnet 10.10.6.44 8889 Assuming the host PC is running a Telnet client, you will see a connect message similar to: At this point, everything you type from the keyboard of the host PC while connected via telnet will travel over Ethernet to the EM1500.
In the status/debug area of the program window, there is a grouping of controls for the auxiliary I/O that looks like this: Figure 2.3 AUX Tray Detailed information about the status/debug area of the configuration program is in Section 5.1.11. 2.3.2 Wiring the Demo Board to the Selected EM1500 You must follow these steps before you can use the Demo Board to test the relay and digital I/O: 1. Use a single wire to connect +K from the Demo Board to Vinput (screw terminal) on the EM1500. 2.
2.3.4 Digital Input and Relay To test the relay and the digital input, follow these steps: 1. Move the jumper at H2 on the Demo Board to position 3-5 and 4-6. 2. Using the 9-wire assembly, wire IN0 to Relay NC. 3. Using the 9-wire assembly, wire IN1 to Relay NO. 4. Connect Relay Common from the 9-wire assembly to SW1 on the Demo Board. 5. Toggle the relay button in the AUX tray. When the relay is on the button is orange, when off, the color changes to gray. Press down SW1 on the Demo Board.
18 www.rabbit.
3. ASSIGNING AN IP ADDRESS TO THE EM1500 To talk to the EM1500 over its Ethernet interface requires an IP address. 3.1 How to Obtain an IP Address There are two ways to obtain a valid IP address for the EM1500. One is through dynamic assignment using DHCP/BOOTP. The EM1500 is a DHCP client by default. If a DHCP server resides on the same LAN as the EM1500, an IP address will be assigned to the EM1500 when it is powered on.
3.2.1 Directed Ping To use this method you must already have an IP address and the MAC address of the EM1500. The IP address has presumably been assigned by your network administrator. The MAC address is assigned at the factory. The first six digits are 00:90:C2. The first six digits are the same for every network device manufactured by Rabbit. The last six digits of the EM1500’s MAC address are printed on a label affixed to the front panel of the unit.
4. EM1500 SPECIFICS This chapter describes the front and back panels of the EM1500 and in particular the pin-outs for the serial ports and the jumpers for changing their default behavior. 4.1 Front Panel of EM1500 On the front panel are connectors for Ethernet, RS-485 and power. There is also a reset button, LEDs, and a label containing the last six digits of the unit’s MAC address. The first six digits of the MAC address are: 00:90:C2.
Table 4.1 Front Panel Description Connector Description of Use Reset button The unit is reset whenever the reset button is pressed. The operating mode is usually determined by how long the reset button is held down: • 0 to 4 sec - Normal run • 4 to 10 sec - Run in local configuration mode • over 10 sec - Reset to factory defaults, run in local config mode. 4.1.1 User LED Patterns The User LED on the front panel is a bi-color LED.
4.2 Back Panel of EM1500 The connectors on the back panel are shown in the following figure. Please note that pin 1 is PF2 on the 2x5 IDC header. Figure 4.2 Back Panel of EM1500 SER 2 / RS-232 DE9 F RLY OUT IN 1x9 IDC header DE9 M COM NO NC OUT1 OUT0 GND IN2 IN1 IN0 Rx3 Tx4 PF1 PF3 Rx4 2x5 IDC header PF4 SER 1 / RS-232 PF2 PF0 Tx3 GND SER 3 / SER 4 The connectors on the back panel are described in the following table. Table 4.
4.3 Connector Pin-Outs This section describes the pin-outs for the serial ports and the 9- and 10-pin connectors. 4.3.1 Serial Port 1 (SER1) The serial port known as SER1 is wired as a DTE with a DE9 male connector. It is located at the lower right on the rear of the unit. The figure below shows the pin-out. The black circles (Tx, DTR and RTS) denote outputs. The white circles denote inputs. Figure 4.3 Pin-Out for SER1 Tx Rx DCD DTR 5 1 DSR 6 RI 9 RTS GND CTS 4.3.
4.3.3 Serial Port 3 and 4 (SER3 & SER4) Serial ports SER3 and SER4 are available on the 2x5 IDC header (aka, the 10-pin header) on the back panel of the EM1500. By default, they are both 3-wire ports at RS-232 levels. Both can be jumpered for TTL level signals. SER3 is also configurable as a 5-wire RS-232 or TTL level port or a 9-wire port at TTL levels. Both the 5- and 9-wire options for SER3 preclude the use of SER4 since its Tx and Rx pins will be used as modem control lines for SER3. Figure 4.
9-Wire Option (SER3 only) The 9-wire option is only available at TTL levels. To configure SER3 as a 9-wire DTE go to the AUX I/O tab in the configuration program. Check the checkbox, “SER3 uses PF0-3.” (This option is also available on the Modem/SER3 tab.) JP2 and JP3 must be jumpered for TTL levels if you want to configure SER3 as a 9-wire DTE. NOTE: It is possible to use SER3 in 9-wire mode with “pseudo-RS232” signal levels. See Modem/SER3 panel, check “RS232 levels.
Usually, the master has ultimate control of who speaks, and when. The master can transmit whenever it knows that a slave is not currently transmitting. A slave can only transmit when the master has given it express permission to do so. The EM1500 should be used as the master. All other nodes should be configured as slaves in the sense that they only transmit when specifically addressed by the EM1500 that is acting as master. Messages are generally limited to a fixed maximum size.
4.3.4.1 Modbus RTU Modbus RTU (and, incidentally, Modbus ASCII) is a good fit for the half-duplex RS485 port. It has a master and multiple slaves. The master issues a query, then listens for a response from the selected slave. The RS485 port is set up for 8 data bits with even, odd or mark parity, and one stop bit. A Modbus RTU message starts with an idle time of at least 3.5 character times, i.e., the RS485 cable must be in steady 'idle' state for this amount of time.
The Modbus RTU timing value is increased to 4, which is the next higher integer above 3.5. There are two instances where this number is used, both in the Protocol tab: 1. The Rx idle time is used to time the end of an incoming packet. After four character times, the packet is considered complete, and may be sent to the network. 2. The Tx idle time is the minimum amount of time which the transmitter must be idle before sending a new packet.
4.3.5 9-Pin Connector The 9-pin connector has various I/O connections plus relay contacts. In0-2 are TTL level inputs which may be jumpered for all pull-up or all pull-down. Factory default is pull-up. Pull-down requires moving the zero ohm resistor on JP1. Out0 and Out1 are open collector outputs with diode clamps to ground and the input supply, capable of sinking up to 750 mA with voltage up to input voltage ± 0.5 V. Figure 4.7 9-Pin Connector GND In2 Out0 In1 Out1 In0 1 9 Relay N.C.
5. EM1500 CONFIGURATION This chapter explains all of the available configuration parameters. The stand-alone program (named emconf for Linux users and emcomf.exe for Windows) will be used for this purpose. Both versions of the configuration utility are on the CD that comes with the EM1500 Tool Kit.
• Polling - This dialog displays advanced options. Choose View | Advanced from the main menu if you can not see this tab when you run emconf. All polling parameters are set here. • Opening - The TCP port number for the EM1500’s serial port is set here. Like the IP address for the unit, a port number must be assigned for any serial port that will be used. If a network connection is initiated by a serial port, then the remote port and IP address must also be set here.
Area #1. Select EM1500 for Configuration The listbox in the upper left corner is where you select EM1500s or configuration databases for viewing and manipulation. File editing operations may be performed on any selected entry. For example, double click on the configuration database default.emc, then single click one of its configurations.
5.1.1 General Tab This area contains information common to all serial ports on an EM1500. Figure 5.2 General Tab of emconf Unit name The unit name is a text string chosen by the user to uniquely identify the unit. It may be left blank if the unit is unnamed. A unit’s name will be displayed in the listbox on the left side of the program window if the EM1500 responded during discovery. Domain name This is the DNS name of the unit.
Routers This is where you specify the IP addresses of the routers that the EM1500 will use when packets need to be forwarded outside of the LAN. For most cases enter just the IP address of the router in dotted decimal form and leave the mask and network entries zero. They are for the special case of two routers on the same LAN. When there are two routers to choose from, the correct netmask values in these fields allow for more efficient routing.
Windows (Secure config) On MS Windows operating systems, the key file is stored in the installation directory, under the EM1500RC subdirectory. The name of the file is \EM1500RC\UNITKEYS.EMK Even if you re-install the configuration program in another directory, it will always try to access the same file (since the full name of the file is stored in the Windows registry). This is convenient since you do not want to lose the configuration keys just because of a new configuration program version).
Change the path name to the desired file locations. The path name must be absolute (i.e., start with a slash). If more than one user needs to configure EM1500s, then they may share the same key file, or have different key files. If the key file is shared (e.g., if everyone uses the default key files in /etc/em1500rc) then only one user will be able to use the configuration program at any time. This is because the same lock file considerations apply to Linux as they do to Windows (see above).
5.1.2 Aux I/O Tab This tab reveals a screen of advanced options. The visibility of this tab is toggled by clicking on View | Advanced. Figure 5.3 Settings for Auxiliary I/O and SPDT Relay Initial state: Direction/State This shows the initial data direction and output state of PF0-4 I/Os on boot-up. If “SER3 uses PF0-3” is checked then only PF4 is available as an extra I/O line. State These parameters control the initial state of the 2 open-collector outputs of the EM1500 on boot-up.
LED shows Tx/Rx state in run mode Each serial port has a checkbox here. Check each one that you want to have effect the user LED. When a serial port is checked here and the unit is in normal run mode, the user LED blinks red when data is transmitted and blinks green when data is received. Please note that there is only one bicolor LED for all of the serial ports; i.e., the user LED will light up whenever one or more of the serial ports checked here is receiving or transmitting.
5.1.3 Network Tab This screen has information about the Ethernet interface. Most importantly, this is where you may assign a known IP address to the EM1500. If you are using DHCP, an IP address entered here will be used as a backup if the DHCP attempt fails. Figure 5.4 Network Tab IP address To assign a static IP address to the EM1500 enter it in this text box. Make sure “Use DHCP” is unchecked. If “Use DHCP” is checked, any IP address entered here will be used as a fallback if DHCP is not available.
Use DHCP Use DHCP to obtain IP address and other network parameters. DHCP provides dynamic allocation of network addresses. A DHCP server must be on the same LAN segment as the EM1500 for the unit to succeed as a DHCP client. This option is enabled by default. If your EM1500 will act as a server out in the field, clients will need a known IP address to contact. DHCP may still be used if the DHCP server is configured to recognize the EM1500, and (for example) always assign it the same IP address.
5.1.4 Serial Tab (for SER1 - SER4) Each serial port is configured independently. The tabs along the top select one of the five serial ports, while the seven tabs lined up vertically under the Network tab correspond to the different parts of the serial port configuration. Figure 5.5 Serial Tab of Stand-Alone Configuration Program Except for flow control, the parameters shown on this screen apply equally to all of the serial ports. Speed (BPS) This is the serial port speed in bits per second.
Character size This is the number of bits per character, not counting start, parity or stop bits. The only valid entries for this field are 7 and 8. Parity Parity is the simplest way to check that transmitted data was received without errors. The options are: • • • • • None: no parity check is done. Space: the parity bit is always zero. Mark: the parity bit is always one.
Flow control Tx Flow control can be set independently for both Tx and Rx directions, though in most cases, the setting will be the same for both directions. Flow control ensures that no data is lost during transmission. The flow control options for the transmit line of SER1 are: • None - no flow control on the transmit line. The receiver must be able to accept data at the maximum rate. • CTS (hardware) - CTS is an input to the serial port.
Flow control Rx The EM1500 can buffer up to 1020 characters. After that the network throughput must be high enough to avoid dropped data. The flow control options to control reception on SER1 are: • None - No flow control on the receive line. • RTS (hardware) - an output that tells the attached device when to start and stop data transmission. • XON/XOFF (software) • DTR (hardware) - output to indicate that SER1 is ready.
Relay action on open When a connection is opened to this port from the network, one of the following actions may be taken on the SPDT relay: • • • • • None Latch on Latch off Momentary on Momentary off Relay action on close When a connection is closed, one of the following actions may be taken on the SPDT relay: • • • • • None Latch on Latch off Momentary on Momentary off Relay timer (ms) Relay timer for momentary actions.
5.1.5 Serial Tab for RS485 The RS485 serial port does not have hardware handshaking lines, so can not use any of the flow control methods. However, since it is half-duplex, a transmitter enable discipline is defined. Figure 5.6 Serial Tab for RS485 Tx Enable Transmitter enable control used for half-duplex RS485.
5.1.6 Modem Tab Any of the serial ports may be configured to look like a Hayes-compatible modem to an external device, except for SER4. Since many existing devices expect to be able to talk to modems, this allows the device be configured to “dial out” to hosts on the network. The following screen capture shows configuration parameters for SER2. The parameters for SER1 and RS485 are (mostly) a subset of these. Figure 5.
such as the ones that are specific to modem control signals that are not actually available. Rather than telephone numbers, the EM1500 uses IP addresses or host names to identify the “called party.” The ATDT command is used to set up a network connection to another EM1500 or host, in much the same way as the ATDT command tells a standard modem to dial out on the POTS (Plain Old Telephone Service).
Table 5.1 Supported Command Set Command 50 Action H Disconnect from remote host (“hang up”). Note that on standard modems, this controls the hook switch. There is no concept of a hook switch on the EM1500, so this always disconnects the current connection if one is established: H0 and H1 have the same effect. I Modem identification. This returns the string “EM1500 0.0” with the appropriate firmware version and release number substituted for the “0.0”. O Return “on-line” from AT command mode.
Table 5.1 Supported Command Set Command Action &Kn Other flow control: n is a number which has two fields: The low 3 bits of n select the transmit flow control as follows: 0 = none 1 = CTS (or RTS for SER2) 2 = XON/XOFF 3 = DSR (or DTR for SER2) 4 = DCD (SER1, SER3 only) The next higher 3 bits of n select the receive flow control as follows: 1 = none 2 = RTS (or CTS for SER2) 3 = XON/XOFF 4 = DTR (or DSR for SER2) 5 = DCD (SER2 only) Any values that are not listed here default to “none.
• When connected • Inactive - never asserted • When not in Hayes-modem command mode NOTE: for SER2, this is DSR control.1 RTS Control1 Specify how to use the RTS modem control line. This is only applicable if the line is not being used for hardware flow control, and the serial port has modem control lines. The choices are: • Active - always asserted • When connected • Inactive - never asserted NOTE: for SER2 this is CTS control.1 DCD Control (for SER2 only) Specify how to use the DCD modem control line.
Figure 5.8 Modem Tab Configuration Parameters for SER3 The following table will clarify the different permutations of SER3 and SER4 and show how to achieve them. Table 5.
Table 5.2 Modem Tab Configuration Options for SER3 and SER4 SER3 uses 9-wire control1 SER4 is internal modem 1 1 1 RS232 levels1 1 JP32 C JP23 D Comment4 SER3 9-wire RS232, true 3-wire (RTS, CTS, DSR, DTR, DCD, RI are 0-3V, Tx, Rx are +/-5V) SER4 is internal modem 1 1 0 C E SER3 9-wire TTL SER4 is internal modem 1. “x” means don’t care; “0” means the configuration parameter is unchecked; “1” means the configuration parameter is checked. 2.
Figure 5.9 Polling Tab The polling facility allows a device attached to an EM1500 serial port to be regularly queried. Polling can be used to periodically • collect data from the device and/or • check the state of health of the device and/or • tell the device that it is still connected to something. Polling options are entered under the “Polling” tab for each serial port. It is necessary to check the “Enable poll” option to enable any polling. When checked, a number of other options become enabled.
Poll pass-through Pass polling responses through to network connection. If checked, the results from the polling sequence (generated by the serial device) are passed over the network to the peer. Thus, the peer gets to see the polling results, but not the queries which generated them. If not checked, neither the queries nor the results are sent to the peer, thus polling happens transparently to the peer. Checking this option is only useful if “Poll when connected” is also checked.
Poll timeout (ms) Poll sequence must complete within this timeout. “Poll timeout (ms)” specifies the allowable time interval for the device to completely respond to the poll sequence. If it does not respond, then the poll sequence has failed. When it fails, the next poll sequence is not affected, but the EM1500 can be configured to close a connection if this happens. Poll script Poll script specifies the polling sequence in send/expect script format.
Special Characters in a Token If an expect token starts with an “&” character, this has special meaning: the “&” is stripped off the expect token, and no timeout is applied. This is useful for “auto answer” scripts where there is an indefinite wait time. If a send token is prefixed with “#” then the CRLF that is normally appended to the token, when sent, is suppressed. To send just a CRLF, specify “#\r\n” as the send token.
5.1.8 Opening Tab Where and when a serial port is open for communication is decided here. The following screen is for SER1, but the rest of the serial ports have basically the same parameters to set. In fact, SER3 configured as a 9-wire port has exactly the same parameters as SER1. The rest differ in the choices for “Incoming connections” and “Active open.” Figure 5.10 Opening Tab for SER1 Local TCP port This is the local TCP port number for incoming connections from the network.
Remote TCP port Remote TCP port number for outgoing connections to the network. This is a default which may be overridden by ATDT commands. Remote host Host name or IP address of default remote peer to connect to when an outgoing connection is initiated. May be overridden by ATDT commands. Ephemeral port When checked, outgoing connections use a local ephemeral TCP port number. Otherwise “Local TCP port” is used. Check this option if the EM1500 is acting as a client on this serial port.
Active open When to actively open a connection to another unit over the network. The choices are: Always Always open, or “nail up.” This is only available if incoming connections are never accepted (see above). Available on all serial ports. When DSR Open when DSR/DTR line becomes active. This is not applicable if incoming connections are accepted when the same DSR/DTR line is active (see above). This is available on SER1 or SER3 as 9-wire port. “When DTR” is available on SER2.
5.1.9 Closing Tab A serial port can close for a variety of reasons. The “Closing” tab dialog box is where you may control the parameters that affect this action. All of the serial ports have “Close delay” and “Reopen delay” in common. The differences lie in the “Close when” choices. Figure 5.11 Closing Tab Close when When to close a connection. The choices are: DSR dropped Close when DSR line is dropped. Available with SER1 and SER3 configured as a 9-wire port. “DTR dropped” is available on SER2.
Poll timeout The serial port connection will close if the polling sequence did not complete within the specified amount of time. Checking this option will automatically check the “Close if poll timeout” option on the “Polling” tab and vice-versa. If you check this option you must also fill in the poll timeout value on the “Polling” tab. Available on all serial ports. Network timeout Close the serial port connection if the network peer fails to respond.
5.1.10 Protocol Tab This is an advanced setting that is only visible when View | Advanced is checked. This is where you enable a serial port to be compatible with PC COM port redirectors. This is also where you specify packetization options. Figure 5.12 Protocol Tab (all 5 serial ports have the same options) Modem Server When checked, incoming connections will see this as an RFC2217 modem server. Otherwise, a raw data link is established.
Packetizing This is where you specify when to send data packets to the network. Since packetization options are an extension to the standard protocol (RFC2217), it is necessary to check the 'Rabbit extensions' option. The available modes are: • None. No packetizing is required, e.g., for a purely stream-based application. • Idle. Uses idle time (i.e., no data being sent or received for a specified time interval) to delimit one packet from the next.
String String which defines end of packet. It may be of any length between 1 and 8 characters, however, it will typically be 1 or 2 characters (e.g., carriage return or line feed). If “String - send” is selected, then the string is transmitted over the network with the packet. If “String - cut” is selected, then the string is not transmitted. Max buffer Maximum number of bytes to buffer before sending packet. The upper limit is 1,020 bytes.
When you click on the EM1500 icon to select it, the GUI sends a message over the network to the selected unit, telling it to send status updates on a regular basis, or when anything changes. After that, the EM1500 is responsible for sending messages to the GUI so that it can update the display in “real time.” This works best for local LAN connections, but can also work over the Internet with, usually, a reduction in response times. The listbox and status/debug area are pictured below.
5.1.11.1 Auxiliary I/O and Relay Tray The first tray applies to the auxiliary I/Os and the relay. This is labelled as “AUX.” All of the controls are buttons. The button color indicates whether the control is currently an input or output, and its state on bootup. Green indicates an input, and orange indicates an output. For the relay, a bright color indicates the it is closed, a dark color indicates it is open. For In0-2, a bright color indicates the state on bootup is high, a dark color indicates it is low.
The manual controls are: • M/C: this forces the EM1500 into or out of Hayes modem emulation mode. You should not do this if a connection is currently open, since it may confuse the device attached to the serial port. • Poll: pressing this button initiates a polling sequence. • Conn: pressing this forces a network connection to be opened (if not already open) or closed (if currently open). If opening a connection, the default destination parameters from the 'Opening' tab of the serial port are used.
Table 5.5 Connection state to the network State Meaning Failed Detected error in connection wAbort Starting to abort connection wInit Starting to re-initialize wOpen In waiting period prior to reopening wClose In waiting period prior to starting to close To the right of the text field, there are 4 bar graph displays arranged in a 2x2 matrix. These displays give an indication of how much the various internal buffers are being utilized.
5.2 Differences between Configuration Methods There are four significant differences between using the web browser for configuration and using the stand-alone program. 1. A web browser requires you to know a valid IP address for the EM1500 before it can be contacted. The stand-alone program can make contact with an EM1500 on its same LAN prior to an IP address being assigned to the unit. 2.
72 www.rabbit.
6. EM1500 EXAMPLES This chapter walks through two basic examples. 6.1 Example 1: Test Data Flow This is an example of using two EM1500s connected serially to a PC to exercise the serial-to-Ethernetand-back-to-serial activity of the units. You will need: • Two EM1500s • Two free COM ports on a PC running terminal emulation software. • Ethernet cross-over cable to connect the Ethernet ports of the two EM1500s • Two serial cables to connect the PC COM ports to the EM1500s.
6.2 Example 2: Remote Data Acquisition This example describes using an EM1500 to transfer data received on a serial line to a remote host, where the data is automatically entered into an Excel spreadsheet. This simulates gathering data from a serial device, such as a bar code reader, and sending it to a remote destination for processing. You will need: • One EM1500, configured as described in the next section. • One PC with a free COM port, running terminal emulation software.
The Opening tab for SER1 or SER2 is set to: • Local TCP port: 8889 (the default will do) • Remote TCP port: set this to the port number where TCP-Wedge is listening.
Next open TCP-Wedge. Select “Mode” from the menu bar, then select “Send Keystrokes To . . .” A dialog will appear with 2 text fields. This is where you choose the application that will receive the data coming in from the EM1500. The application defaults to Notepad. You can use this if you want, or you can try a more sophisticated program such as Excel. You must manually open the application program you will be using unless you give TCP-Wedge the file’s full path. Now select “Port” from the main menu.
A. EM1500 SPECIFICATIONS Appendix A provides the following information: • • • • • Mechanical dimensions Electrical and environmental specifications EMI / EMC information Jumper locations for changing default behavior Battery life and replacement A.1 Mechanical Characteristics The following figure shows the mechanical dimensions for the EM1500. Figure A-1 Black Box Dimensions MAC ID: ETHERNET Â ACT + - 1.718 (44 mm) LINK PWR USER 4.180 (106 mm) RESET + GND - POWER C 9-36 VD RS-485 3.
A.1.1 Base Plate The following figure shows the dimensions of the base plate and the locations of the mounting holes. The base plate is made from 0.050" aluminum. Figure A-2 Base Plate Dimensions Side of Unit Chamfer .10 x .10, 4 places 4.28 3.78 (96 mm) (108.8 mm) .187D, 4 places 6-32 clear, 4x 0.25 (6.4 mm) 0.25 (6.4 mm) 4.10 (104 mm) 4.60 (116.8 mm) 78 www.rabbit.
A.2 Specification Table Table A.1 lists the electrical, mechanical, and environmental specifications for theEM1500. Table A.1 EM1500 Specifications Parameter Specification Microprocessor Low-EMI Rabbit 3000 at 44.2 MHz Ethernet Port 10/100Base-T Backup Battery 3 V lithium coin-type, 950 mA·h, supports RTC and SRAM LEDS 4 total: PWR (red), ACT (yellow), LINK (green), USER (red and green) Digital Inputs 3, protected to ±36 V DC, can handle short spikes ±40.
A.3 EM1500 EMI / EMC Information This section describes the immunity and emissions standards met by the EM1500. Design guidelines are given to help developers incorporate the EM1500 into an application while staying CE compliant. Equipment is generally divided into two classes.
Emissions The EM1500 meets the following emission standards using the enhanced-EMC PCB (part # 175-0234 rev. C) and the Rabbit 3000. This PCB is used in all EM1500 boards that carry the CE mark. • EN55022:1998 Class B • FCC Part 15 Class B Your results may vary, depending on your application, so additional shielding or filtering may be needed to maintain the Class B emission qualification.
A.3.2 EM1500 FCC Compliance Units that do not have a CE mark can be made FCC compliant. Place a ferrite on the ethernet cable as close as possible to the EM1500’s ethernet jack. Loop the cable so that it passes twice through the ferrite. The characteristic should have a maximum attenuation in the 100-350 MHz range, or universal wideband. The ferrite we used is the Ferrishield SS28B2032.
A.4 EM1500 Jumpers Some hardware features on the EM1500 may be reconfigured with onboard jumpers. A.4.1 How to Access the Jumpers To access the jumpers remove the 4 screws that are in each corner on the back panel of the EM1500. The PC board (or main board) and back panel are attached to one another and will slide forward away from the black box housing. The following figure shows the jumper header locations. The dashed line represents the location of the Rabbit Core Module.
A.4.2 How to Move the Jumpers Zero ohm surface-mount resistors are used for JP1; this requires soldering to change position. Standard pluggable jumpers are used for the remaining headers. The table below lists the configuration options. Table A.
A.5 The Backup Battery A replaceable 950 mA·h lithium battery provides power to the real-time clock and SRAM when external power falls below 2.93 V or is removed from the circuit board. The drain on the battery is less than 10 µA when there is no external power applied to the EM1500, and so the expected shelf life of the battery is more than 950 mA·h ------------------------ = 10.8 years.
86 www.rabbit.
B. SERIAL AND TCP PROTOCOLS To realize the full potential of the EM1500, it is necessary to have some knowledge of serial and TCP protocols. This appendix discusses both topics. There is a detailed description of the difference between a straight-through serial cable and a null-modem serial cable. B.1 Serial Protocols RS232 asynchronous serial is a well established standard for computer communication.
like Tx and Rx. RTS is an output for a DTE, and tells the DCE whether or not it is willing to accept data. CTS is an output for DCE, and tells the DTE whether it is able to accept data. Thus: DTE Tx DCE Tx Rx RTS CTS Rx RTS CTS GND GND 5-Wire Straight-Through In the null-modem cable, RTS and CTS are also swapped over: DTE Tx DTE Tx Rx RTS CTS Rx RTS CTS GND GND 5-Wire Null-Modem Two additional modem control lines were defined to signal the overall readiness state of the attached devices.
The final pair of signals that are commonly used are rather specific to modem technology. DCD (Data Carrier Detect, or sometimes RLSD) and RI (Ring Indicator) are respectively meant to indicate the presence of a data 'carrier' and an incoming telephone ring cadence. These signals are both outputs from a DCE as shown below in the diagram labeled “9-wire straight-through.
cable connector. Using a 10-conductor, 50 mil pitch ribbon cable, you can crimp a 10-pin IDC (2x5) socket on one end of this cable. To the other end, you can crimp a DE9 M if you remove the 10th conductor at the crimping position. Now, you now have a normal DTE connector. Using SER3 as a 5- or 9-wire port, precludes the use of SER4. If you use SER3 and SER4 as two 3-wire ports, you will have to customize a cable to connect the appropriate pins to two separate serial devices.
bit time. This is known as the “stop bit” and is required so that the receiver can reliably synchronize on the next start bit. Synchronization is always required on the start bit, since there is no separate clock signal: the clock must be reset at each start bit. The resetting of the receiver clock at each start bit allows sender and receiver to have slightly mismatched bit rates. A difference of up to about 2% can be handled.
where an application sends short messages out then waits for an equally short response. In this case, the flow control happens automatically by nature of the short messages and query/response protocol. End-to-end flow control usually relies to some extent on the lower level flow controls: serial port and network. Network flow control is handled by TCP. TCP has a high performance flow control mechanism built in, which is always enabled, so it does not have to be considered most of the time.
If hardware flow control is not available, for example, because the serial connection is 3-wire only, then the usual alternative is to use software flow control. Software flow control is often called “XON/XOFF” after the ASCII characters that are used. When the receiver is no longer able to accept data from the sender, it sends an XOFF character to the sender. When the sender gets this character, it stops sending data until it receives an XON character from the receiver.
It is possible to use XON/XOFF flow control without any involvement by the EM1500. This mode is known as end-to-end XON/XOFF. For example, if a pair of EM1500s are being used as a serial extender, the EM1500s are configured for a flow control of “None,” i.e., they do not do any local flow control of their respective serial ports. In this case, XON/XOFF characters are transmitted between the EM1500s as normal data characters.
the appropriate network protocol. Such a device driver is usually called a “COM port redirector,” after the DOS naming convention for serial ports, i.e., COM1, COM2 etc. When the redirector is installed, a large number of virtual serial ports is made available, e.g., COM5, COM6 up to COM256 or more. The last protocol that the EM1500 supports is intended for inter-EM1500 communication.
The EM1500 has several packetizing modes that allow it to support a fairly wide range of serial protocols. The basic mode is selected by the Packetizing field in the Protocol tab of the stand-alone configuration program. The available modes are: • None. This means that no packetizing is required, e.g. for a purely stream-based application. • Idle. This uses idle time (i.e., no data being sent or received for a specified time interval) to delimit one packet from the next. • String.
The “Rx idle time” field specifies how long the serial port receiver must be idle for in order to declare endof-packet. The “Tx idle time” is the minimum amount of time that the serial port transmitter must be idle between packets. Both of these values would normally be the same; however, they can be set independently to support asymmetric timeouts. Note that the Rx idle time value is rounded up to the nearest multiple of 1/32768 seconds (i.e., about 30 µs).
B.2.1.3 Protocol Conversions Note that the above applies directly only when both ends of the network connection are set up with exactly the same packetization settings. If the two peers have different settings, then some useful protocol conversion is possible. For example, suppose both peers are set to “String - cut.” One of the peers has a terminating string of “\r\n” (carriage return, line feed = CRLF), and the other has a different string, just “\n” (line feed = LF).
B.2.1.5 Other Packetization Controls The “Max buffer” field in the Protocol dialog allows some control over the maximum amount of packet data to accumulate. In the above description of the idle timing mode, it was mentioned that a maximum of 1020 characters can be buffered. If desired, this limit can be reduced by setting this field to a value less than 1020.
100 www.rabbit.
C. GLOSSARY OF TERMS Access Server A network device that accepts telnet sessions, passing data received by a telnet client to a serial port, and passing data received from the serial port to the telnet client. This is a more general term, replacing the older term “modem server.” AES Advanced Encryption Standard is a symmetric (same key used to encrypt and decrypt) encryption method. It is becoming the de facto standard, replacing the Data Encryption Standard (DES).
DCD Data Carrier Detect indicates that a good carrier is being received from the remote modem. This is asserted by a DCE (e.g. a modem) when it detects the data carrier signal on the telephone line. DNS Domain Name Service is the distributed database of alphanumeric name and IP address pairs. DSR Data Set Ready, a handshaking signal driven by a DCE device to tell the DTE device that it is ready. This signal is sometimes used for flow control, but is more usually a unit readiness indicator.
Flow Control Flow control is a useful way of ensuring that connected devices are not overrun with more data than they can handle. Software flow control may be employed with a 3-wire serial port. Hardware flow control requires extra wires. Both ways require the 2 sides of the connection be in agreement about which method to use. Whether implemented in software or hardware, flow control means that signals are passed between 2 ends of the serial connection to say when to start and stop data transmission.
RS-232 Full-duplex, electrically single-ended serial interface standard. The electrical and some mechanical and protocol characteristics of the connection are defined including handshaking lines and a communications protocol. RS-485 Half-duplex, differential mode, single driver, multiple receivers serial interface standard. RTS Request to Send, a hardware flow control signal driven by a DTE device to tell a DCE device when to start or stop.
D. EM1500 FAQ This section is included to answer questions and help you trouble-shoot problems that may occur. If you have a question or experience any difficulties working with the EM1500, please look here before calling technical support. If you have not already done so, please try the telnet example in the “Getting Started” chapter.
• Can I monitor the data that is sent/received by a serial port? • I want the EM1500 to send a prompt to the device on a regular basis, but without expecting any particular response. Stand-alone configuration program • Why is the status/debug area of the program window blank? • Is there a permanent place to save the configuration settings of an EM1500 apart from on the unit itself? • These flyover (tooltips) are annoying! How can I get rid of them? • I changed the font using Edit | Fonts...
Q: Why don’t I get cables and documentation when I buy an EM1500? A: To save you money! By packaging these items separately in the EM1500 Tool Kit, you only buy as many as you need. Q: Why are there 2 types of serial cables in the EM1500 Tool Kit? A: The EM1500 is a DTE on serial port 1 (SER1) and a DCE on serial port 2 (SER2). If you want to connect 2 DTE devices to the EM1500, the straight-through cable would be needed for SER2 and the null-modem cable would be needed for SER1.
Q: Why was the connection refused when I tried to telnet to my EM1500? A: This could happen for various reasons. Here are some things to check: Did you use a valid IP address? Did you include the correct TCP port number? If the answer to both of those questions is yes, do you have DHCP checked? If you do, the IP address may have changed. Uncheck “Use DHCP” and try again.
Q: I am restarting a telnet connection. Why is it now refusing a connection? A: If you cancelled a previous telnet connection to the EM1500, the EM1500 may not know that the other end terminated, at least not straight away. Normally, you will be able to reconnect within a few seconds if the previous connection is terminated normally. If the connection is terminated abnormally by the PC side, then the EM1500 may not know about it until it tests the connection status again.
Q: How do I set 2 stop bits? A: You cannot have arbitrary settings with 2 stop bits. The hardware only supports a single stop bit. You can simulate 2 stop bits by setting "mark" parity, however you can obviously not use normal even or odd parity. Mark parity is equivalent to no parity, with 2 stop bits. Q: I have an old device that receives at 1200 bps, but sends at only 75 bps.
Stand-alone configuration program Q: Why is the status/debug area of the program window blank? A: You must select an EM1500 from the listbox (above the status/debug area) to view and/or manipulate its information in the status/debug area. If another instance of the stand-alone configuration program is running and the entry you select has already been selected by the second instance of the program, the status/debug area will also be blank. The EM1500 can only send updates to one display at a time.
Q: I can't see all of the configuration options mentioned in the manual. Where are they? A: You may need to enable advanced settings via View | Advanced. Advanced view enables the Aux I/O, Polling and Protocol tabs. Q: In the Aux I/Os panel, I changed the settings and saved them to the unit, but the status panel shows the outputs in the old state. Why did they not change? A: The Aux/IO settings are one of the few configuration items that are not changed until the unit is rebooted.
Q: I set web browser userid and password, but now the browser can't log in even though I am supplying the correct userid and password. What has gone wrong? A: See if you checked “Digest auth” in the General tab. Older browsers do not support this more secure method of logging in. In particular, Netscape 4.x does not support it. Either don't use digest authentication, or, if security is important, use a more recent browser (IE6, Mozilla, Netscape 6, Opera 5). If this doesn't work, try resetting the unit.
114 www.rabbit.
INDEX A hub ..............................................12 active open ................................. 61 advanced settings ....................... 38 I B battery ........................................ 85 baud rate ..................................... 42 broadcast .............................. 20, 41 buffer .................................... 28, 70 buffering .................................... 66 burst rate ...................................... 2 C cables ...................................
router .......................................... 35 RS-485 ................................. 26–29 RTS ................................ 44, 52, 88 S secure configuration ................... 35 send/expect ........................... 57–58 straight-through cable 8, 12, 87–89 T technical support ..........................9 throughput .................................... 2 transmit buffer ............................ 96 U User LED ................................... 22 V voltage ..........................