Application note AN020: Connecting modules with RS485 interface Preliminary

Similar documents
HARDWARE MANUAL TMCM-6110 V TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany. MODULES FOR STEPPER MOTORS

HARDWARE MANUAL TMCM-6110 V TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany. MODULES FOR STEPPER MOTORS

MECHATRONIC DRIVES WITH STEPPER MOTOR

HARDWARE MANUAL TMCM Hardware Version V1.2 UNIQUE FEATURES: TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

TMCM Hardware Version V1.2 HARDWARE MANUAL. TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

MECHATRONIC DRIVES WITH STEPPER MOTOR

HARDWARE MANUAL TMCM-1613 TMCM-1613-REC. Hardware Version V TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

BB-303 Manual Baseboard for TMCM-303

HARDWARE MANUAL TMCM Hardware Version V1.4 UNIQUE FEATURES: TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

HARDWARE MANUAL TMCM Hardware Version 1.0 MODULES FOR BLDC MOTORS

HARDWARE MANUAL TMCM Hardware Version V1.0 UNIQUE FEATURES: TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

HARDWARE MANUAL TMCM-1613 TMCM-1613-REC. Hardware Version V TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

PD42-x-1370 Hardware Manual

TMCM-1240 Hardware Manual

HARDWARE MANUAL TMCM Hardware Version V1.3 UNIQUE FEATURES. TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

HARDWARE MANUAL V 1.04 TMCM-1110 V1.1 UNIQUE FEATURES: TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

TMCM-142-IF. Hardware Manual

MECHATRONIC DRIVE WITH STEPPER MOTOR

TMCM-1260 Hardware Manual

RS-422/485 PCIe Card

RS-422/485 PCI Card User Manual Ver All brand names and trademarks are properties of their respective owners.

MECHATRONIC DRIVE WITH STEPPER MOTOR

TMCM-1111 Hardware Manual

PD57/60-x-1260 Hardware Manual

MECHATRONIC DRIVES WITH STEPPER MOTOR

PLC2 Board Communication Manual CANopen Slave

MECHATRONIC DRIVE WITH STEPPER MOTOR

HARDWARE MANUAL TMCM-1640 V 1.04 MODULES FOR BLDC MOTORS

MECHATRONIC DRIVES WITH STEPPER MOTOR

W&T Manual Interface modules W&T

TMCM Axis Encoder Interface Module. Manual. Version: 1.12 November 29 th, 2006

SMART RELAY SRW 01 V4.0X

Manual Industry Interfaces

HARDWARE MANUAL TMCM Hardware Version V1.1. TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany. MODULES FOR STEPPER MOTORS

Product Manual. 2 Port USB to RS-422 /485 Optical Isolated Adapter. Coolgear, Inc. Version 1.1 March 2018 Model Number: USB-2COMi-Si-M

Motors Automation Energy Transmission & Distribution Coatings. Profibus DP SRW 01. User s Manual

Product Manual. USB to Optical Adapter Industrial Isolated RS- 232/422/485. Coolgear, Inc. Version 2.1 December 2018 Model Number: USB-COMi-Si-M

ABB Drives. User s Manual RS-485 Adapter Board FRSA-00

PCI Express 4-Port Industrial Serial I/O Cards

This 4-port RS-422/485 Adapter is provided with an external switching power adapter in the package.

motioncookie SYSTEM IN A PACKAGE

Addendum for 125B Bushealth Measurements

Installation Guide of Hi-Speed USB to Industrial I/O Adapter

HARDWARE MANUAL TMCM Hardware Version V1.2. TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany. MODULE FOR STEPPER MOTORS

Manual Fiber Optic Interfaces

USB-COMi-TB USB to Industrial Single RS-422 / 485 Adapter Manual. Specifications and Features

Introduction & Specifications of Hi-Speed USB to Serial Adapters

Serial to RS422/485 Converter SER 485(ISO) User Manual

TMCM-1110 TMCL Firmware Manual

USB-16COMi-M 16-Port RS-422/485 USB Serial Adapter User Manual. Features and Specifications. Power Supply

RS-485 Products. ICP Electronics Australia Pty Ltd Communication Cards for PC/IPC P 2-1

USB to RS-485/RS-422 Interface Converter. User Manual

Installation Guide of Hi-Speed USB to Industrial Single RS-422/485 Adapter

Technical Documentation

CS485. User s Manual. Version ZYPEX, Inc.

Installation Guide of Hi-Speed USB-to-Optically Isolated RS-422/485 Adapter

USB-COM Plus ISO (USB-COMi SI-M)

8 Port USB to RS- 232/422/485 Octal Adapter. Product Manual. Coolgear, Inc. Version 1.1 April 2018 Model Number: USB-8COMi-RM.

ABB Drives. User s Manual Modbus Adapter Module FMBA-01

Introduction & Specifications of Hi-Speed USB to Industrial Dual Ports RS-422/485 Adapter

Media Converters. Media Converters. Product Selection Guides

AN-727 APPLICATION NOTE One Technology Way P.O. Box 9106 Norwood, MA Tel: 781/ Fax: 781/

USER S MANUAL SI-700 SI EIA-232/ EIA-485 INTERFACE JUL / 05 SI-700 VERSION 1 FOUNDATION

Commercial-grade Interface Converter User Manual

Overview. The DIN-RS232 has three primary functions: Isolated parallel RS-232 interface Fused power distribution Animatics peripheral expansion bus

User manual Compact Web PLC WP240 series IEC-line. update:

USB RS485 High Isolated Industry Converter Box for DIN Rail - product #248

USB TO RS-232 OR RS-422/485 CONVERTER

PD TMCL Firmware Manual

EZL-200F Application Notes (003) Serial Interface (RS232/RS422/RS485)

Serial to RS422/485 Converter SER 485 PRO( SI) User Manual

i-7550 PROFIBUS to RS-232/422/485 Converter User's Manual High Quality, Industrial Data Acquisition, and Control Products

TMCM-090. Version JAN-27. Trinamic Motion Control GmbH & Co. KG Waterloohain 5 D Hamburg, Germany

TMCL FIRMWARE MANUAL

RS-485 module. Data sheet. for electricity meters

Accessories IC690ACC900

PD TMCL Firmware Manual

Korenix JetCard Series Multiport Serial Card/Ethernet Switch Card User s Manual

MODEL USB-FLEXCOM4. USB to Four RS-232/422/485 Serial Ports and MODEL USB-COM232-4A USB to Four RS-232 Serial Ports USER MANUAL

TMCM-3230 Hardware Manual

Universal Serial/PROFIBUS DP Gateway GT200-DP-RS User Manual V6.1 SST Automation

MECHATRONIC DRIVES WITH STEPPER MOTOR

TMCL FIRMWARE MANUAL

EY-CM 721: Communication module with EIA-232 and EIA-485 interfaces, modu721

Gateway 1400 Reference Manual

TMCM-1111 TMCL Firmware Manual

SCB-C08 USB to RS232/422/485 Converter

BV4531U. I2C or Serial 6 Way Relay

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Firmware TMCL MCST Instruction Manual W E CREATE MOTION

ELAN DIGITAL SYSTEMS LTD. CF428 COMPACT FLASH CF+ CARD USER S GUIDE

PCAN-LIN Interface for LIN, CAN, and RS-232. User Manual. Document version ( )

SBPC-21-PB FifeNet to Profibus Gateway

Chapter 1 Introduction Features Getting Help Chapter 2 ICB Architecture Layout and Components...

Hardware MCST Technical Manual W E CREATE MOTION

Serial Communication Converters & Adapters Instruction Manual

Chapter 2 ICB Architecture Chapter 3 Board Components GPIO Interface RS-232 Interface RS-485 Interface...

Anybus-CC CFW-11. User s Manual. Phone: Fax: Web: -

EVAL BOARD MANUAL. TMC429+TMC24x-EVAL V TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany.

TMCM-1270 Hardware Manual

Transcription:

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 1 Application note AN020: Connecting modules with RS485 interface Preliminary TRINAMIC Motion Control GmbH & Co. KG GERMANY www.trinamic.com This application note is meant to be a practical guideline for TRINAMIC modules that offer an RS485 interface. It describes how to setup a communication link between module and (as example) a PC via an appropriate 485 interface adapter. This application note applies to all Trinamic modules currently offering an RS485 interface. 1 Table of contents 1 TABLE OF CONTENTS... 1 2 INTRODUCTION... 2 3 GENERAL GUIDELINES FOR RS485 BUS INSTALLATION... 2 4 EXAMPLES OF RS485 CONVERTERS FOR PCS... 4 4.1 RS232 TO RS485 CONVERTERS... 4 4.2 USB TO RS485 CONVERTER USB-2-485 FROM TRINAMIC... 5 4.3 USB TO RS485 CONVERTER USB-RS485-WE FROM FTDI... 5 4.4 PCI EXPRESS TO 4X RS485 (ISOLATED) ADAPTER CARD CP-114EL-I FROM MOXA... 6 5 TEST OF CONNECTION... 7 6 REVISION HISTORY... 8 6.1 DOCUMENTATION REVISION... 8

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 2 2 Introduction RS485 is a popular fieldbus interface standard which allows connections of several s to a single bus. The EIA-485 standard defines the electrical characteristics of drivers and receivers. The actual protocol implementation and other parts e.g. connectors and connector pin assignment is not part of this standard. Therefore, several different communication protocols exist and have been standardized on top of RS485. In contrast to e.g. RS232 RS485 uses differential signaling which gives superior performance especially in noisy environments or over longer distances. Widely used for RS485 is half-duplex operation using two wires for data transfer. This is also the configuration most common for Trinamic modules which offer an RS485 interface. For communication over RS485 usually a master-slave arrangement is used. According to EIA-485 a maximum of 32 s per bus is allowed. Nevertheless, with availability of RS485 bus transceivers with reduced bus load 64, 128 or even 256 s per bus are possible. It has to be noted that the maximum feasible number of s per network is often less and highly dependent on bus length and communication speed. 3 General guidelines for RS485 bus installation For proper operation the following items should be taken into account when setting up an RS485 network: 1. BUS STRUCTURE: The network topology should follow a bus structure as closely as possible. That is, the connection between each and the bus itself should be as short as possible. Basically, it should be short compared to the length of the bus. Master c:> Slave 1 Slave n RS485+ RS485- RS485+ RS485- RS485+ RS485- RS485+ } RS485+ RS485- RS485- Bus termination RS485 keep distance as short as possible Bus termination 2. CONNECTION OF DATA SIGNALS: the non-inverted bus signals (RS485+) of one / master should be always connected to the non-inverted bus signals of the other s. The same is true for the inverted bus signals (always connect RS485- signals with other RS485- signals within one bus structure). There should be no cross-over of data signals etc. as known e.g. from RS232. 3. PROPER GROUND CONNECTION OF ALL NODES: Even though RS485 data transmission uses differential signaling the differential signals are interpreted with respect to ground by all commonly available transceiver ICs on the market also the ones used on Trinamic modules. That is, in addition to the two differential data wires RS485+ and RS485- it is necessary to ensure a common signal ground connection between all s e.g. using a third ground wire. With most Trinamic modules there is no galvanic isolation between the RS485 interface and the module power supply. That is, signal ground connection is the same as system / power supply ground. Therefore, a solid ground connection between all s attached to one bus is recommended for reliable communication.

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 3 4. SELECTION OF CABLE AND BUS TERMINATION: Especially for longer busses and/or multiple s connected to the bus and/or high communication speeds, appropriate cable with well defined impedance (e.g. twisted pair) should be used in order to avoid / reduce reflection and distortion of signals. Furthermore it is essential to terminate the bus at both ends properly. Within RS485 networks usually 120R resistors are used for proper termination at both ends of the bus structure. 5. NUMBER OF NODES: The RS-485 electrical interface standard (EIA-485) allows up to 32 s to be connected to a single bus. Different bus transceivers used on Trinamic modules offer a bus load substantially lower (1/2, ¼ or even 1/8) than defined in the standard and therefore allow a maximum of currently up-to 256 s to be connected to a single RS485 bus. 6. NO FLOATING BUS LINES: Avoid floating bus lines while neither the host / master nor one of the slaves along the bus line is transmitting data (all bus s switched to receive mode). Floating bus lines may lead to communication errors. In order to ensure valid signals on the bus it is recommended to use a resistor (bias) network connected to both bus lines. Certain RS485 interface converters available for PCs already include these additional resistors (e.g. USB-2-485). Communication errors due to floating bus lines are especially an issue when different transceiver types with different electrical characteristics and bus loads are used within the same network. There seems to be no official standard for an appropriate and universal resistor network. Two different configurations will be mentioned here which seem to be commonly used. a) Single pull-up and pull-down resistors. A 1k pull-up resistor between RS485+ (non-inverted signal) and +5V and a 1k pull-down resistor between RS485- (inverted signal) and GND should be attached at one position within the network. Slave n - 1 Slave n +5V pull-up (1k) RS485+ / RS485A RS485- / RS485B termination resistor (120R) pull-down (1k) GND Bus termination This kind of bias-resistor network might be integrated together with the termination resistor inside a RS485 converter at one end of the cable (see figure above). The RS485 to USB converter USB-2-485 available from Trinamic already includes this type of resistor network.

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 4 b) Active termination at both ends of the network. This kind of termination is commonly used for PROFIBUS-DP installations. It expects the same resistor network at both ends of the network. The values of the resistors have been selected in order to provide a line termination of the bus for AC signals of approximately 150R taking the pull-up and pulldown resistor values into account, also. Pull-up and pull-down resistors are here 390R each while the termination resistor value is 220R. +5V Master c:> Slave Slave Slave 1 n - 1 n +5V 390R RS485+ RS485+ 390R C 220R RS485- RS485-220R C 390R RS485 390R GND active termination GND active termination 4 Examples of RS485 converters for PCs As standard PCs and PC mainboards usually do not provide an RS485 interface an appropriate converter is normally necessary for connecting the PC to an RS485 network. There are numerous converters on the market. A number of converters will be listed here including test results and recommended bus configuration for setting up a network with modules / baseboards / PANdrives from Trinamic. The list is by no way comprehensive. Also, it should not be seen as a recommendation. The selection of converters is simply based on availability on the market and sometimes customer choice / feedback. It is intended to extend the list from time to time in order to include additional new / widely used / interesting converters on the market. 4.1 RS232 to RS485 converters These are still a number of (mainly) legacy RS232 to RS485 signal converter on the market. As RS232 supports full duplex communication and 2-wire RS485 as discussed here not, it is necessary to switch between transmission and reception of data. This is either done automatically with additional integrated hardware that will switch back from transmit to receive mode after a certain period of time without any data transmission or sometimes done using one of the additional status / handshake signals (typically RTS) of the RS232 interface. This status signal is usually under control of the operating system toggled in software. With legacy Windows systems Windows 95, 98 and Me this is not supported with more recent it is supported but, might have to be activated / selected explicitly. For both mechanisms there is typically a significant delay between end of transmission and switching from transmission mode back to receive mode either due to the time-out mechanism in hardware or delays in a non-real-time operating system. The TMCL protocol available for most modules / PANdrives from Trinamic relies on a command -> reply handshake mechanism. That is, for each command sent from the PC / host to the slave / module there will be a reply from module back to host. Therefore, it is important that the host after sending the next command switches back to receive mode fast enough in order to be able to receive the reply of the module / PANdrive completely and not to overwrite it. Typically, when switching is not fast enough the module will accept commands correctly but, no reply will be received by the host. E.g. issuing a command to rotate the motor (ROR) will result in a movement but, there will be no / no valid response.

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 5 In order to adapt to switching delays the TMCL firmware offers the global parameter 75 (see TMCL firmware manual) which allows specifying a telegram pause time in ms until the reply is sent back to the host. Example: SGP 75, 0, 20 // will add 20ms of delay before a command reply will be sent out This delay can be set also, using the TMCL-IDE selecting Setup -> Configure a module: (A telegram pause time of 20ms has been set in this example) As the module usually is still able to receive commands this communication parameter change can be done using the RS485 interface and it is not necessary to move to an alternate interface. 4.2 USB to RS485 converter USB-2-485 from Trinamic This converter uses a USB to serial converter IC from FTDI together with an RS485 transceiver and a termination and bias resistor network as described in chapter 3 / 6a of this application note. For more details please refer to the USB-2-485 manual on the Trinamic web site (www.trinamic.com). As it already integrates the necessary resistor termination and bias network it should be placed at one end of the bus. In order to terminate the bus correctly it is necessary and sufficient to place one additional 120R resistor at the other end of the bus. 4.3 USB to RS485 converter USB-RS485-WE from FTDI This converter is a USB to RS485 converter from FTDI (www.ftdichip.com) using one of their ICs together with an RS485 transceiver. It is available through their web shop with different cable lengths

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 6 and also e.g. via the catalog distributor Farnell (www.farnell.com, 1740357). It offers a cable loom at the RS485 interface site. This way different / application dependent connectors might be attached (as already mentioned there is no common connector standard for RS485). With a 9-pin D-SUB male connector the resulting interface cable may look like this: This converter does not integrate any termination or bias resistor network. Therefore, it is possible to attach this converter also somewhere in the middle of the bus. When testing this converter with Trinamic modules and PANdrives we achieved good results using the Profibus-DP standard active termination as described in chapter 3 / 6b. As the cable loom also provides access to the +5V supply of the USB interface one termination / bias resistor network might be easily integrated in the RS485 bus connector. 4.4 PCI Express to 4x RS485 (isolated) adapter card CP-114EL-I from MOXA This low profile PCI Express adapter card from MOXA (www.moxa.com) offers four RS485 interfaces with optical isolation (2kV max.). All four RS485 interfaces are available via one high-density DB44 female connector. In the figure below the card is shown with a customized cable loom making all four RS485 interfaces available via 4 separated 9pin D-SUB connectors. The card offers programmable on-board termination resistors. When testing this card with Trinamic modules and PANdrives we achieved good results using the Profibus-DP standard active termination as described in chapter 3 / 6b at both end of the cable. The programmable on-board termination resistors should be switched off then.

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 7 5 Test of connection Some hints and tips for testing and trouble-shooting RS485 communication: 1. Start with direct mode (send single command). In case there is no valid response it might be just the response that gets lost during transmission. Therefore, test communication using a command (e.g. ROR will rotate the motor) that generates a visible response on the module. If there is a visible response but, the reply data packet gets lost, try to increase telegram pause time 2. If direct mode seems to work reliable continue with tests that generate more bus traffic. Good examples are: a) download and execute TMCL program or download and upload it again for code verification / comparison b) Write a simple TMCL program that does some arithmetic operation - e.g. increment accumulator: LOOP: CALC ADD, 2 JA LOOP // add 2 to accumulator contents // infinite loop Then, execute this program on the board using the animate function of the debugger of the TMCL-IDE. You should be able to watch the accumulator contents being steadily incremented in the status bar of the TMC-IDE. This will generate permanent traffic on the bus as long as the program is executed. In case some tests are passed (the first ones) and others (which generate more traffic) are not, it is recommended to further improve the network in order to ensure stable and reliable communication.

Application note AN020: connecting modules with RS485 interface (V1.10 / 2018-JUL-05) 8 6 Revision history 6.1 Documentation revision Version Date Author Description 1.00 2012-MAR-09 GE Preliminary version 1.10 2018-JUL-05 GE Converter Y-1081 removed Table 1: Documentation revisions