Page 1
TwinCAT
Application Note DK9322-0411-0041
IP 67
Keywords
Virtual
TwinCAT
supplement
serial
EtherCAT
EtherCAT Box
EP6002
RS232
RS422
RS485
IP67
interface
COM
Port
Driver
Virtual Serial COM Driver | IP 67-rated solutions
This application example describes how an EP6002 EtherCAT Box can act as a serial interface in a harsh
industrial environment (IP 65/67) using the TwinCAT Virtual Serial COM Driver supplement. This facilitates
the positioning of a serial terminal device much further away from the controller than with a cable-based
physical layer (RS232/RS422/RS485). The EP6002 EtherCAT Box from Beckhoff enables integration of external
devices with a serial interface, such as barcode or RFID readers, directly in the field without a control
cabinet.
The IP 67 I/O system from Beckhoff
The Beckhoff EtherCAT Box line delivers EtherCAT I/O technology without requiring a control cabinet. All modules from the IP
67 series have an integrated direct EtherCAT interface, so that the protocol’s high performance is retained right down to each
module. This opens up new options in the IP-67 world: fast process data communication with eXtreme Fast Control (XFC), high-
precision measurement technology and drive functions integrated into I/O solutions directly in the field. With dimensions of
only 126 x 30/60 x 26.5 mm (H x W x D) the modules are exceptionally small and are therefore particularly suitable for
applications where available space is limited.
For application notes see disclaimer on the last page
New Automation TechnologyBECKHOFF
1
Page 2
TwinCAT
Panel PC
COM8
COM9
COM10
EtherCAT Box modules
EP6002-0002
Channel 1:
COM8
Channel 2:
COM9
Channel 1:
COM10
EP6002-0002
Application Note DK9322-0411-0041
IP 67
Basic principles
The TwinCAT Virtual Serial COM Driver supplement, in combination with an EP6002 serial interface box module for the IP 65/67
EtherCAT Box system, enables the creation of virtual COM interfaces that can be used by Windows applications just like normal
serial interfaces. The actual connection point for devices with a serial interface can be anywhere in the field (Fig. 1). In order to
use such third-party devices with a serial connection in the field, in the past a PC with a suitable interface had to be installed
in the field or a connection between the interface and the central controller had to be established using a suitably long cable. A
PC generates additional costs for the data acquisition and system integration. The cable length is limited by the corresponding
physical layer. A Windows-compliant serial interface can be set up in the PC by using the EP6002 EtherCAT Box and the
TwinCAT Virtual Serial COM Driver.
Fig. 1 Serial interfaces in the field
Advantages
The advantage of combining the TwinCAT supplement and serial terminal is that Windows applications can access one or
several terminals that are linked via EtherCAT and can, therefore, be distributed at different points in the field. No separate
wiring of the individual serial interfaces is required. In theory, up to 255 COM ports can be integrated, although this is rarely
used in practice. Another advantage is system conformity: the integration costs are reduced since no additional computer
has to be installed for operating a device in the field. The virtual interfaces can be configured conveniently (name, baud rate,
handshake) via the TwinCAT in the System Manager. If several networked PCs and interface modules are distributed in the
system, TwinCAT System Manager can be used to specify which interface is available on which PC.
For application notes see disclaimer on the last page
Beckhoff
New Automation Technology
2
Page 3
TwinCAT
Application Note DK9322-0411-0041
IP 67
Configuration
TwinCAT System Manager is used to specify whether and with which number a virtual COM port should be created for both
channels of the EP6002 EtherCAT Box.
Fig. 2 Numbering of the virtual COM port in TwinCAT System Manager
After activation of the configuration in TwinCAT, the virtual COM port is available for applications that use the serial
RS232/RS422/RS485 protocols for data exchange and require a COM port.
For application notes see disclaimer on the last page
Beckhoff
New Automation Technology
3
Page 4
Application Note DK9322-0411-0041
IP 67
TwinCAT
Fig. 3 Access to the virtual COM port through applications/programs (e.g. HyperTerminal)
Practical example: Virtual Serial COM Driver with EP6002 | Handheld bar code scanner
integrated in the field
The software for the third-party device, for example a handheld bar code scanner, is installed on the central control system,
where data are to be processed. Here the software interface is a standard Windows COM interface. However, the handheld
scanner is used at a remote I/O station in the field. The software for the hand scanner cannot be implemented in TwinCAT, and
the scanner data are not processed with TwinCAT. In addition, the software for the third-party device does not know about
EtherCAT and need not be Ethernet- or EtherCAT-capable. The TwinCAT Virtual Serial COM Driver supplement enables the use
of EtherCAT as a transmission medium for the scanner data (Fig. 4).
For application notes see disclaimer on the last page
Beckhoff
New Automation Technology
4
Page 5
Application Note DK9322-0411-0041
Windows XP or
Windows CE
TwinCAT
Industrial PC
Software form the
scanner manufacturer
COM
up to 100 m
Hardwaremanagement
PC
COM
existing solution
based on separate
line – max. cable
length depending
on physical layer
EP6002-0002
COM 1 COM 3 COM 2
RS232
EtherCAT adapter
virtual
COM
TwinCAT
Supplement
Virtual Serial
COM Driver
up to 100 m
In some cases the barcode scanner may need an external power supply.
IP 67
TwinCAT
Fig. 4 Connecting a scanner
In this way the scanner data are made available at a virtual interface from the field via the EtherCAT network through TwinCAT.
This virtual interface is generated through TwinCAT and displayed in the operating system of the central controller (Windows
XP or CE). The software associated with the handheld scanner can access this virtual interface as standard under Windows to
obtain the scanner data.
– 2-channel serial interface, RS232, RS422/RS485 www.beckhoff.com/EP6002
– EtherCAT Extends its Reach into the IP 67 World www.beckhoff.com/EtherCAT-Box
– Feldbus Box | The compact IP 67 modules www.beckhoff.com/IP67
– EtherCAT | Ultra high-speed communication www.beckhoff.com/EtherCAT
– PLC and Motion Control on the PC www.beckhoff.com/TwinCAT
– TwinCAT Supplements www.beckhoff.com/supplements
For application notes see disclaimer on the last page
New Automation TechnologyBeckhoff
5
Page 6
Application Note DK9322-0411-0041
IP 67
TwinCAT
This publication contains statements about the suitability of our products for certain areas of application. These statements are based on typical features of our products. The examples shown in this publication are for demonstration purposes only. The information provided herein should not be regarded as specific operation characteristics. It is incumbent on the
customer to check and decide whether a product is suit-able for use in a particular application. We do not give any warranty that the source code which is made available with this
publication is complete or accurate. This publication may be changed at any time with-out prior notice. No liability is assumed for errors and/or omissions. Our products are described
in detail in our data sheets and documentations. Product-specific warnings and cautions must be observed. For the latest version of our data sheets and documentations please visit
our website (www.beckhoff.com).
© Beckhoff Automation GmbH, April 2011
The reproduction, distribution and utilisation of this document as well as the communication of its contents to others without express authorisation is prohibited. Offenders will be
held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.
Beckhoff
New Automation Technology
6