Beckhoff TF6360 User Manual

Manual | EN
TF6360
TwinCAT 3 | Virtual Serial COM
10/14/2020 | Version: 1.2

Table of Contents

Table of Contents
1 Foreword ....................................................................................................................................................5
2 Overview.....................................................................................................................................................7
3 Installation................................................................................................................................................10
3.1 System Requirements .....................................................................................................................10
3.2 Installation .......................................................................................................................................10
3.3 Installation Windows CE..................................................................................................................13
3.4 Licensing .........................................................................................................................................14
4 Configuration in TwinCAT 3 ...................................................................................................................17
5 Appendix ..................................................................................................................................................20
5.1 Differences to COM .........................................................................................................................20
5.2 Troubleshooting...............................................................................................................................20
TF6360 3Version: 1.2
Table of Contents
TF63604 Version: 1.2
Foreword

1 Foreword

1.1 Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with applicable national standards. It is essential that the documentation and the following notes and explanations are followed when installing and commissioning the components. It is the duty of the technical personnel to use the documentation published at the respective time of each installation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under development. We reserve the right to revise and change the documentation at any time and without prior announcement. No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation GmbH. Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and patents: EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702 with corresponding applications or registrations in various other countries.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany
Copyright
© Beckhoff Automation GmbH & Co. KG, Germany. The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are 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.
TF6360 5Version: 1.2
Foreword

1.2 Safety instructions

Safety regulations
Please note the following safety instructions and explanations! Product-specific safety instructions can be found on following pages or in the areas mounting, wiring, commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the application. Modifications to hardware or software configurations other than those described in the documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are familiar with the applicable national standards.
Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. The safety instructions must be read carefully and followed without fail!
DANGER
Serious risk of injury!
Failure to follow the safety instructions associated with this symbol directly endangers the life and health of persons.
WARNING
Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and health of per­sons.
CAUTION
Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to persons.
NOTE
Damage to the environment or devices
Failure to follow the instructions associated with this symbol can lead to damage to the environment or equipment.
Tip or pointer
This symbol indicates information that contributes to better understanding.
TF63606 Version: 1.2
Overview

2 Overview

2.1 Product description

The TwinCAT Virtual Serial COM enables to access serial EtherCAT terminals from a Windows application. This allows to communicate with your serial devices from your own written application (e.g .NET, C/C++). The access to a virtual serial com port is provided by the standard Windows API for serial communication.
Option 1:
The TwinCAT Virtual Serial COM can be used on a local TwinCAT system, where the EtherCAT bus is connected. Therefore you can easily enlarge the limited distance of serial communication upto several hundred meters.
Option 2:
Alternatively, the TwinCAT Function can be installed on a remote system, which is connected to the local network. The TwinCAT Virtual COM communicates via ADS over TCP/IP to the target system.
MSDN C++ sample
http://msdn.microsoft.com/en-us/library/ff802693.aspx
MSDN C# sample
http://msdn.microsoft.com/en-US/library/c8zc5kah(v=VS.80).aspx
TF6360 7Version: 1.2
Overview

2.2 Architecture

Considering a conventional serial port the driver communicates with the UART chip through an internal hardware bus. In case of the TwinCAT-Virtual-Serial-COM-Driver this communication is implemented using ADS and EtherCAT protocol.
When the driver is installed on a computer, it instantiates an ADS server with fixed port number, the so­called TcEL60xx-AdsServer. This ADS server provides an ADS interface to create serial COM ports. Within the TcIO driver EtherCAT slave objects are the clients of the TcEL60xx-AdsServer. TcIo has a special class of EtherCAT slave objects that are created for each EL60xx bus terminal on TwinCAT start. They have the capability to transmit data packets from the TwinCAT-Virtual-Serial-COM-Driver to the bus terminal, and to receive data from the bus terminal which is in turn forwarded to the driver. The driver will forward it to a Windows application which has a pending read on the respective serial port.
The following image illustrates the architecture for the Windows driver variant.
TF63608 Version: 1.2
Overview
NOTE
Data loss
If an EL60xx bus terminal is utilized from PLC and also as virtual COM port, then access to the bus terminal must be coordinated by a superior mechanism. On opening the respective virtual COM port, accesses by PLC are blocked as long as the virtual COM port is open. When the virtual COM port is closed, PLC can ac­cess the bus terminal again. However, the driver will not regard any running transfers. It will also not restore the bus terminal configuration like baud rate, or stop bit settings, even if it has been modified by an applica­tion which used it through a virtual COM port.
Requirements
Development environment Target system type
TwinCAT v3.0.0 PC or CX (x86)
TF6360 9Version: 1.2
Installation

3 Installation

3.1 System Requirements

Technical Data TF6360 TC3 Virtual Serial COM
Target System Windows XP/7/8/10 (32/64-Bit)
Windows CE6/CE7
Min. TwinCAT-Version 3.0.0
Min. TwinCAT-Level (local) TC1100 TC3 | IO (local)
Min. TwinCAT-Level (remote) TC1000 TC3 | ADS (remote) *
*TwinCAT3 Virtual Serial COM needs TC3| TC1000 ADS if it communicates with a remote TwinCAT system, where the serial EtherCAT terminal is connected. The minimum TwinCAT-Level for the remote system is TwinCAT 3 IO.
Requirements
Development environment Target system type
TwinCAT v3.0.0 PC or CX (x86)

3.2 Installation

The following section describes how to install the TwinCAT3Function for Windows-based operating systems.
ü The TwinCAT3Function setup file was downloaded from the Beckhoff website.
1. Run the setup file as administrator. To do this, select the command Run as administrator in the context menu of the file.
ð The installation dialog opens.
TF636010 Version: 1.2
2. Accept the end user licensing agreement and click Next.
Installation
3. Enter your user data.
TF6360 11Version: 1.2
Installation
4. If you want to install the full version of the TwinCAT3Function, select Complete as installation type. If you want to install the TwinCAT3Function components separately, select Custom.
5. Select Next, then Install to start the installation.
ð A dialog box informs you that the TwinCAT system must be stopped to proceed with the installation.
TF636012 Version: 1.2
6. Confirm the dialog with Yes.
7. Select Finish to exit the setup.
Installation
ð The TwinCAT3Function has been successfully installed and can be licensed (see Licensing [}14]).

3.3 Installation Windows CE

This part of the documentation describes, how you can install the TwinCAT 3 Function TF6360 Virtual Serial COM on a Beckhoff Embedded PC Controller based on Windows CE.
The setup process consists of four steps:
• Downloading the setup file
• Installation on a host computer
• Transfering the executable to the Windows CE device
• Software installation
• Software upgrade
Downloading the setup file
The CAB installation files for Windows CE are part of the TF6360 Virtual Serial COM setup. Therefore you only need to download one setup file from www.beckhoff.com.
TF6360 13Version: 1.2
Installation
The installation procedure of the TF6360 Virtual Serial COM setup is described in the regular installation article.
Installation on a host computer
After installation, the install folder (e.g. C:\TwinCAT\Functions\TF6360-Virtual-Serial-COM) contains three directories - each one for a different hardware platform:
CE-ARM: ARM-based Embedded Controllers running Windows CE, e.g. CX8090, CX9020
CE-X86: X86-based Embedded Controllers running Windows CE, e.g. CX50xx. CX20x0
The CE-ARM and CE-X86 folders contain the TF6360 CAB-File for Windows CE - corresponding to the hardware platform of your Windows CE device. This file needs to be transfered to the Windows CE device, see next chapter.
Transfering the executable file to the Windows CE device
Transfer the corresponding CAB-File to you Windows CE device. This can be done via one of the following ways:
• via a Shared Folder
• via the integrated FTP-Server
• via a USB Stick, CF card or SD-Card
Software installation
After the file has been transfered via one of the above methods, you need to execute the file and acknowledge the following dialog with "Ok". Restart your Windows CE device after the installation has finished.
After the restart has been completed, the TF6360 Virtual Serial COM and configuration will be automatically started in background and is now available to use.
The software will be installed in the following directory on the CE device: \Hard Disk\TwinCAT\Functions
\TF6360-Virtual-Serial-COM
Software upgrade
If you already have a version of TF6360 installed on your Windows CE device, you can execute the new version of the CAB-File.
After the installation a restart is needed.

3.4 Licensing

The TwinCAT3function can be activated as a full version or as a 7-day test version. Both license types can be activated via the TwinCAT 3 development environment (XAE).
Licensing the full version of a TwinCAT3Function
A description of the procedure to license a full version can be found in the Beckhoff Information System in the documentation "TwinCAT3Licensing".
Licensing the 7-day test version of a TwinCAT3Function
A 7-day test version cannot be enabled for a TwinCAT 3 license dongle.
1. Start the TwinCAT 3 development environment (XAE).
2. Open an existing TwinCAT 3 project or create a new project.
TF636014 Version: 1.2
Installation
3. If you want to activate the license for a remote device, set the desired target system. To do this, select the target system from the Choose Target System drop-down list in the toolbar.
ð The licensing settings always refer to the selected target system. When the project is activated on
the target system, the corresponding TwinCAT 3 licenses are automatically copied to this system.
4. In the Solution Explorer, double-click License in the SYSTEM subtree.
ð The TwinCAT 3 license manager opens.
5. Open the Manage Licenses tab. In the AddLicense column, check the check box for the license you want to add to your project (e.g."TF6420:TC3DatabaseServer").
6. Open the Order Information (Runtime) tab.
ð In the tabular overview of licenses, the previously selected license is displayed with the status
“missing”.
TF6360 15Version: 1.2
Installation
7. Click7-DayTrialLicense... to activate the 7-day trial license.
ð A dialog box opens, prompting you to enter the security code displayed in the dialog.
8. Enter the code exactly as it is displayed and confirm the entry.
9. Confirm the subsequent dialog, which indicates the successful activation.
ð In the tabular overview of licenses, the license status now indicates the expiry date of the license.
10. Restart the TwinCAT system.
ð The 7-day trial version is enabled.
TF636016 Version: 1.2
Configuration in TwinCAT 3

4 Configuration in TwinCAT 3

Activate Virtual Com Port
TwinCAT 3 provides the EL60xx configuration tab for bus terminals of type EL60xx. For EL60xx terminals with checked "Virtual Com Port" check box TwinCAT creates on configuration activation a virtual serial COM port.
The number of the COM port is defined in edit field "Com Port". Note, that a com port number must be unique within a computer. The computer on which the virtual com port should be created must not have a com port with this number. TwinCAT starts with com port number 6. The com port number must be less than
65536.
Local or Remote
Edit field "Host Ams NetId" determines the computer on which the virtual com port should be created. By default the local computer is used, which is the one where the configuration is activated and with which the bus terminal is connected. It is also possible to create the virtual com port on a remote computer just by changing the "Host Ams NetId" respectively. Note, that the TwinCAT-Virtual-Serial-COM-Driver has to be installed on this computer.
COM Port Settings
Within "Com Port Settings" panel one can change the common parameters of a com port, i.e. baud rate, parity, data bits, stop bits, and also flow control settings as RTS/CTS, Tx XON/XOFF, and Rx XON/XOFF. The bus terminal is initialized with the configured parameters on TwinCAT activation. However, usually applications that open a com port will also reconfigure it with their own particular default settings overriding the settings from system manager.
Not all possible combinations of parity, data bit count and stop bit count are valid. The following table lists the allowed combinations:
TF6360 17Version: 1.2
Configuration in TwinCAT 3
7 data bits, even parity, 1 stop bit
7 data bits, even parity, 2 stop bits
7 data bits, odd parity, 1 stop bit
7 data bits, odd parity, 2 stop bits
8 data bits, no parity, 1 stop bit
8 data bits, no parity, 2 stop bits
8 data bits, even parity, 1 stop bit
8 data bits, even parity, 2 stop bits
8 data bits, odd parity, 1 stop bit
8 data bits, odd parity, 2 stop bits
In addition to common parameters there are some proprietary settings for an EL60xx bus terminal, i.e. "Transfer Rate Optimization" and "Fifo threshold". With enabled "Transfer Rate Optimization" the bus terminal first collects enough data to fill the available space in the process image before it is sent to the TcIo driver. With disabled "Transfer Rate Optimization" the data is sent as soon as possible to the TcIo driver. The "Fifo Threshold" setting determines when the bus terminal indicates "Fifo Full" state.
Parameters of the EL6021 bus terminal are somewhat different. Therefore the configuration dialog differs:
The EL6021 does not support RTS/CTS handshake. It does support a half duplex mode and it can be configured for point to point connections.
For more details on the special settings refer to bus terminal documentation of EL6001 and EL6021.
TF636018 Version: 1.2
Configuration in TwinCAT 3
Add IO-Task
The TwinCAT IO driver only processes data from bus terminals, if at least one input variable is linked to a Task variable. Otherwise, the data is ignored. Therefore, a dummy Task with one variable for each bus terminal that is used as virtual com port is needed. Create a Dummy Task with IO-Image.
Insert a Input Variable of UINT-Typ and link the input status word of the bus terminal to a respective Task variable as shown in the screen shot below.
Make sure to configure the task with "Auto start" enabled. The "Cycle Ticks" settings controls the update frequency for the variables. In order to get the full data transfer rate through a virtual COM port, the cycle time should be about 1ms.
Requirements
Development environment Target system type
TwinCAT v3.0.0 PC or CX (x86)
TF6360 19Version: 1.2
Appendix

5 Appendix

5.1 Differences to COM

• Interval Timeout The virtual COM port for an EL60xx bus terminal does not support interval timeouts, because the driver has no access to the required information
• DSR/DTR Handshake EL6001 and EL6021 do not have DSR/DTR lines
• Explicit Setting of RTS/CTS lines The explicit setting of RTS and CTS lines is not supported.
• XON/XOFF char cannot be changed The EL6001/EL6021 has fixed values for XON and XOFF characters, i.e. 0x11 and 0x13, respectively. These cannot be changed.
On TwinCAT stop all virtual COM ports created by the TcEL60xx driver on this computer are removed. A TwinCAT start creates the virtual COM port defined by the current configuration. So an application, which had opened a COM port, has to open it again, after a TwinCAT re-start. An application, which uses one of the virtual COM ports, must close this port before the TwinCAT stop, because in general it is undefined how an application will handle the removal of an open COM port.
Virtual COM Port on Remote Computer
Suppose that an EL60xx bus terminal is connected to computer A, while the associated virtual COM port is created on computer B. The driver handles TwinCAT start and stop as follows:
TwinCAT stop on computer A breaks the connection to the bus terminal while the virtual COM port on computer B persists. Read and write request for the virtual COM port on computer B would fail. A successive TwinCAT start on computer A again creates the virtual COM on computer B. Using the AMS address the EL60xx driver on computer B checks, if a virtual COM port for this address exists and removes it respectively. Then the virtual COM port is created, possibly with another number, which could be changed within System Manager.
TwinCAT Stop on computer B removes all virtual COM ports on this computer. After TwinCAT start on computer B virtual COM ports can be created again. However, the virtual COM port, which was created from computer A, will not be available. Not until the TwinCAT on computer A has been restarted the virtual COM port on computer B is created again.
As the TwinCAT on computer B will not be notified when the TwinCAT on computer A is stopped, it is not possible to remove the virtual COM port. If the configuration on computer A is changed, e.g. such that no virtual COM port is created, then an orphaned virtual COM port on computer B persists until the next TwinCAT stop on this computer.
Requirements
Development environment Target system type
TwinCAT v3.0.0 PC or CX (x86)

5.2 Troubleshooting

In case of any problem related to the TwinCAT Virtual Serial COM under Windows, check the following steps:
1. Check if the Virtual Com Driver is installed in the Device Manager of Windows
2. Check if the Virtual Com Driver "TcEL60xxStartSync.exe" is started with TwinCAT (Config-Mode)
3. Check the Windows Application log for entries about the TcEL60xxXPAdsServer
TF636020 Version: 1.2
4. Try to connect to the virtual com via Putty
5. Try to communicate between a virtual com and a pc com port via Putty
Requirements
Development environment Target system type
TwinCAT v3.0.0 PC or CX (x86)
Appendix
TF6360 21Version: 1.2
More Information:
www.beckhoff.com/tf6360
Beckhoff Automation GmbH & Co. KG Hülshorstweg 20 33415 Verl Germany Phone: +49 5246 9630 info@beckhoff.com www.beckhoff.com
Loading...