Application example 03/2017 SIMATIC PDM - Central access to MODBUS RTU devices Customer benefits and a step-by-step description in Engineering https://support.industry.siemens.com/cs/ww/en/view/109740107
Warranty and liability Warranty and liability Disclaimer The Application Examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The Application Examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are used correctly. These Application Examples do not relieve you of the responsibility to use safe practices in application, installation, operation and maintenance. WHEN USING THESE APPLICATION EXAMPLES, YOU RECOGNIZE THAT WE CANNOT ACCEPT ANY LIABILITY FOR THE INFORMATION CONTAINED IN THIS DOCUMENT OR THE SOFTWARE EVCOM OFFERED BY EWON. ANY CLAIMS AGAINST US BASED ON WHATEVER LEGAL REASON RESULTING FROM THE USE OF THE EXAMPLES, INFORMATION, PROGRAMS, ENGINEERING AND PERFORMANCE DATA, THE SOFTWARE ETC., DESCRIBED IN THIS APPLICATION EXAMPLE SHALL BE EXCLUDED. SUCH EXCLUSION SHALL NOT APPLY IN THE CASE OF MANDATORY LIABILITY, IN CASE OF INTENT, GROSS NEGLIGENCE, OR INJURY OF LIFE, BODY OR HEALTH OR FRAUDULENT CONCEALMENT OF A DEFICIENCY. THE ABOVE PROVISIONS DO NOT IMPLY A CHANGE OF THE BURDEN OF PROOF TO YOUR DETRIMENT. We reserve the right to make changes to these Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications e.g. catalogs the contents of the other documents have priority. Any form of duplication or distribution of these Application Examples or excerpts hereof is prohibited without the expressed consent of the Siemens AG.. Entry-ID: 109740107, V1.1, 03/2017 2
Warranty and liability Security information Siemens provides products and solutions with industrial security functions that support the secure operation of plants, systems, machines and networks. In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement and continuously maintain a holistic, state-of-the-art industrial security concept. Siemens products and solutions only form one element of such a concept. Customer is responsible to prevent unauthorized access to its plants, systems, machines and networks. Systems, machines and components should only be connected to the enterprise network or the internet if and to the extent necessary and with appropriate security measures (e.g. use of firewalls and network segmentation) in place. Additionally, Siemens guidance on appropriate security measures should be taken into account. For more information about industrial security, please visit http://www.siemens.com/industrialsecurity. Siemens products and solutions undergo continuous development to make them more secure. Siemens strongly recommends to apply product updates as soon as available and to always use the latest product versions. Use of product versions that are no longer supported, and failure to apply latest updates may increase customer s exposure to cyber threats. To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed under http://www.siemens.com/industrialsecurity. Entry-ID: 109740107, V1.1, 03/2017 3
Table of contents Table of contents Warranty and liability... 2 1 Task... 5 1.1 General objectives... 5 1.2 Integration of Modbus RTU devices... 5 1.3 Central parameterization of Modbus RTU devices... 6 2 Gain central access to Modbus RTU devices... 7 2.1 General solution... 7 2.2 How to get the software... 8 2.3 How to setup the evcom... 9 2.3.1 Step 1 Add COM port #1 (COM10)... 9 2.3.2 Step 2 Definition of protocol, IP address and Gateway port #1... 10 2.3.3 Step 3 Add COM port #2 (COM11)... 10 2.3.4 Step 4 Definition of protocol, IP address and Gateway port #2... 12 2.4 How to create MODBUS networks in SIMATIC Manager... 13 2.4.1 Step 1 Create new network for MODBUS Network #1... 13 2.4.2 Step 2 Create a MODBUS type network #1... 14 2.4.3 Step 3 Assign name for MODBUS Network #1... 15 2.4.4 Step 4 Repeat steps 1 3 for Modbus Network #2... 16 2.4.5 Step 5 Create a PC interface for MODBUS Network #1... 17 2.4.6 Step 6 Assign type COM port for MODBUS Network #1... 18 2.4.7 Step 7 Assign a name to PC interface #1... 19 2.4.8 Step 8 Assign MODBUS network 1 to PC interface #1... 20 2.4.9 Step 9 Repeat steps 1-6 and assign a name to PC interface #2... 21 2.4.10 Step 10 Assign MODBUS network 2 to PC interface #2... 22 2.5 How to add a MODBUS device in SIMATIC Manager... 23 2.5.1 Step 1 Add a device in MODBUS network #1... 23 2.5.2 Step 2 Assign a device type... 24 2.5.3 Step 3 Assign a MODBUS address to the device... 25 2.5.4 Step 4 Open SIMATIC PDM with the device... 26 2.5.5 Step 5 Start parameterization of device... 27 2.6 Software requirements... 28 2.7 Hardware requirements... 28 3 Trouble shooting... 29 4 Related literature and downloads... 30 5 History... 30 Entry-ID: 109740107, V1.1, 03/2017 4
1 Task 1.1 General objectives 1 Task 1.1 General objectives State-of-the art integration of Modbus RTU devices Field devices with HART, Profibus, or FF interface can be reached from a central Engineering Station (ES) or Maintenance Station (MS) in a SIMATIC PCS 7 based automation solution. Simatic PDM can also communicate to the field level in 3 rd party system, based on the right communication infrastructure. This is now also valid for devices with a Modbus RTU interface. 1.2 Integration of Modbus RTU devices Modbus integration in control strategy FC410 Modbus- RTU EDD SIMATIC PDM COM x USB today S7-400 Single controller CM101 Modbus TCP Modbus RTU S7-400H redundant Controller CM101 Modbus RTU Modbus-RTU Modbus-TCP Figure 1 - Modbus RTU device has to be disconnected during parameterization The Modbus TCP libraries (TCP/IP communication) and the CM101 communication module (MODBUS RTU) with integrated block library (serial communication) allows you to link devices/systems with Modbus interface to automation systems (controllers) of the SIMATIC PCS 7 process control system. Data can easily and quickly be exchanged between SIMATIC PCS 7 automation systems of the S7-400 series (single or redundant station) and Modbus slaves using the communication blocks of the Modbus TCP libraries. You will be able to connect the Modbus RTU slaves to SIMATIC PCS 7 automation systems of the S7-400 series (single or redundant station) with the CM 101 communication module and the block library included in the product package. More details can be found in catalogue ST PCS 7 AO (see below in Table 4-1, \3\) Entry-ID: 109740107, V1.1, 03/2017 5
1 Task 1.3 Central parameterization of Modbus RTU devices Parameterization of Modbus RTU devices with SIMATIC PDM without CM101 SIMATIC PDM supports Modbus RTU communication via a Modbus converter. Example for such a converter is Model USOPTL4 from B&B Electronics. Without CM101 a Modbus RTU device had to be disconnected from the system and connected to the converter on-site to be ready for parameterization with SIMATIC PDM. After finishing parameterization the device has to be reconnected to the system. During operation of the device with SIMATIC PDM the process values from the Modbus RTU device or devices are not available in the control system. 1.3 Central parameterization of Modbus RTU devices Objective In times of digitalization and IIoT, field devices must be accessible from central maintenance stations and remotely by using the cloud and internet. Work-around As Modbus RTU is a single master system per definition it is not possible to connect a second master to a Modbus RTU bus. However, Modbus TCP is a multi-master system which gives us a significant benefit. The communication module CM101 described above uses Modbus TCP to communicate with the SIMATIC PCS 7 controller. The engineering system and maintenance stations, where SIMATIC PDM is used to gain central access to the devices at field level, are normally connected to the bus where the communication between the controller and CM101 takes place. This application example describes how to enable SIMATIC PDM to gain access to Modbus RTU devices behind CM101 or other comparable communication modules which links Modbus RTU with Modbus TCP. Entry-ID: 109740107, V1.1, 03/2017 6
2.1 General solution 2 Gain central access to Modbus RTU devices 2.1 General solution After connecting a Modbus converter with an USB interface as described in chapter 1.2, results to the creation of a virtual COM port in Windows which is used by SIMATIC PDM to write and read data to the Modbus RTU device. Now a small driver is used, which creates also a Virtual COM port, but instead of sending the data to USB it changes the data structure from Modbus RTU to a Modbus TCP frame. This driver allows assigning both to the virtual COM port: IP address (e.g. 192.168.2.35) IP port (typically 502). The situation from a software point of view is shown in Figure 2. FC410 Modbus- RTU EDD SIMATIC PDM COM y Software driver Converts MB RTU MB TCP Defined IP address & port number Communicates over LAN / WLAN Modbus RTU Modbus TCP LAN S7-400 Single controller CM101 Modbus TCP Modbus RTU S7-400H redundant Controller CM101 Modbus RTU Figure 2 - Parametrization and diagnosis without disconnection Entry-ID: 109740107, V1.1, 03/2017 7
2.2 How to get the software 2.2 How to get the software The software can be downloaded from this webpage: https://ewon.biz/support/companion/evcom/evcom-0 SIEMENS is able to offer this EWON link to our customers for professional use. Please be aware about Warranty and liability conditions as described above. Entry-ID: 109740107, V1.1, 03/2017 8
2.3 How to setup the evcom 2.3 How to setup the evcom In this chapter you learn how to create two COM ports in evcom for two CM101 to connect two MODBUS RTU networks to LAN. After downloading proceed as follows: 2.3.1 Step 1 Add COM port #1 (COM10) Start evcom Click on Add Port Define a free virtual COM port number (here COM10) Figure 3 - Setup of port COM10 in evcom Entry-ID: 109740107, V1.1, 03/2017 9
2.3 How to setup the evcom 2.3.2 Step 2 Definition of protocol, IP address and Gateway port #1 Select Port Type: Modbus TCP Select Auto create at startup Enter Gateway address (here: 192.168.2.35) Enter Gateway port (in most cases port 502 is used) In some cases you have to click on (here invisible) button Update Enable port 2.3.3 Figure 4 - Finish COM10 settings Entry-ID: 109740107, V1.1, 03/2017 10
2.3 How to setup the evcom Step 3 Add COM port #2 (COM11) Click on Add Port Define a free virtual COM port number (here COM11) Select Port Type: Modbus TCP Define Gateway port (in most cases port 502 is used) Figure 5 - Setup of port COM11 in evcom Entry-ID: 109740107, V1.1, 03/2017 11
2.3 How to setup the evcom 2.3.4 Step 4 Definition of protocol, IP address and Gateway port #2 Select Port Type: Modbus TCP Select Auto create at startup Enter Gateway address (here: 192.168.2.78) Enter Gateway port (in most cases port 502 is used) Click on (here visible) button Update Click on Enable Port Figure 6 - evcom will create two COM ports after Enable Port REMARK It is recommended to save configuration file of evcom in SIMATIC Manager project folder. Entry-ID: 109740107, V1.1, 03/2017 12
2.4 How to create MODBUS networks in SIMATIC Manager 2.4 How to create MODBUS networks in SIMATIC Manager In this chapter there are two Modbus networks defined in SIMATIC Manager to use two CM101. 2.4.1 Step 1 Create new network for MODBUS Network #1 Start SIMATIC Manager Create / open project View Process Device Network View Create a new network Figure 7 - SIMATIC Manager - Create a new communication network Entry-ID: 109740107, V1.1, 03/2017 13
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.2 Step 2 Create a MODBUS type network #1 Select MODBUS network Figure 9 - SIMATIC Manager Select MODBUS network Entry-ID: 109740107, V1.1, 03/2017 14
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.3 Step 3 Assign name for MODBUS Network #1 Change Object name accordingly (here : MODBUS network 1) Figure 10 - SIMATIC Manager define a name for network #1 Entry-ID: 109740107, V1.1, 03/2017 15
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.4 Step 4 Repeat steps 1 3 for Modbus Network #2 Repeat steps 1 3 for second network Change Object name accordingly (here : MODBUS network 2) Figure 11 - SIMATIC Manager define a name for network #2 Entry-ID: 109740107, V1.1, 03/2017 16
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.5 Step 5 Create a PC interface for MODBUS Network #1 Select PC object in SIMATIC Manager Add an interface for a COM port in the PC object Figure 12 - SIMATIC Manager create first interface for first COM port Entry-ID: 109740107, V1.1, 03/2017 17
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.6 Step 6 Assign type COM port for MODBUS Network #1 Define a COM Port Interface Figure 13 - SIMATIC Manager define a COM port Interface Entry-ID: 109740107, V1.1, 03/2017 18
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.7 Step 7 Assign a name to PC interface #1 Define Object name (here: COM Port Interface MB 1) Figure 14 - SIMATIC Manager set name of interface Entry-ID: 109740107, V1.1, 03/2017 19
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.8 Step 8 Assign MODBUS network 1 to PC interface #1 Change COM Port from 1 to 10 Assign a network #1 to the interface #1 (here: MODBUS network 1) 10 Figure 15 - SIMATIC Manager assign network #1 to interface #1 Entry-ID: 109740107, V1.1, 03/2017 20
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.9 Step 9 Repeat steps 5-8 and assign a name to PC interface #2 Repeat steps 5 8 for the second MODBUS network Define Object name (here: COM Port Interface MB 2) Figure 16 - SIMATIC Manager set name of interface Entry-ID: 109740107, V1.1, 03/2017 21
2.4 How to create MODBUS networks in SIMATIC Manager 2.4.10 Step 10 Assign MODBUS network 2 to PC interface #2 Change COM Port from 1 to 11 Assign a network to the Interface #2 (here: MODBUS network 2) 11 Figure 17 - SIMATIC Manager assign network #2 to interface #2 Entry-ID: 109740107, V1.1, 03/2017 22
2.5 How to add a MODBUS device in SIMATIC Manager 2.5 How to add a MODBUS device in SIMATIC Manager In this chapter one SITRANS FC410 will be added in SIMATIC Manager in MODBUS Network 1 2.5.1 Step 1 Add a device in MODBUS network #1 Add an object in MODBUS Network 1 Figure 18 - SIMATIC Manager add an object Entry-ID: 109740107, V1.1, 03/2017 23
2.5 How to add a MODBUS device in SIMATIC Manager 2.5.2 Step 2 Assign a device type Browse for SITRANS FC410 Figure 19 - SIMATIC Manager add an object Entry-ID: 109740107, V1.1, 03/2017 24
2.5 How to add a MODBUS device in SIMATIC Manager 2.5.3 Step 3 Assign a MODBUS address to the device Setup MODBUS address (here: 5) Figure 20 - SIMATIC Manager define MODBUS RTU address Entry-ID: 109740107, V1.1, 03/2017 25
2.5 How to add a MODBUS device in SIMATIC Manager 2.5.4 Step 4 Open SIMATIC PDM with the device Open SITRANS FC410 in SIMATIC PDM Figure 21 - SIMATIC Manager open SITRANS FC410 Entry-ID: 109740107, V1.1, 03/2017 26
2.5 How to add a MODBUS device in SIMATIC Manager 2.5.5 Step 5 Start parameterization of device Start parameterization of SITRANS FC410 Figure 22 - SIMATIC PDM parameterization of SITRANS FC410 Entry-ID: 109740107, V1.1, 03/2017 27
2.6 Software requirements 2.6 Software requirements Windows operating systems We used evcom with the following Windows operating systems: Windows 7 professional 64-bit SP1 Windows 7 Enterprise 64-bit SP1 Simatic PDM We used evcom with following versions of SIMATIC PDM SIMATIC PDM V8.2 SIMATIC PDM V9.0 SIMATIC PDM V9.0 SP1 2.7 Hardware requirements Communication module We used a CM101. evcom should support all such modules which converts Modbus TPC into Modbus RTU and vice versa. Entry-ID: 109740107, V1.1, 03/2017 28
3 Trouble shooting 2.7 Hardware requirements 3 Trouble shooting Trouble shooting Electrical connectivity If the settings of a MODBUS device are unknown you should use a corresponding device specific tool. We describe electrical connectivity for a SITRANS FC410. The following table shows electrical connectivity when using a CM101 a MODBUS converter of type TRP-C08 a MODBUS converter B&B Electronics USOPTL4. 1 Settings in Modbus converter 2 Electrical connectivity with Siemens cable 3a Electrical connectivity Modbus Converter TRP-C08 3b Electrical connectivity Modbus Converter B&B Electronics USOPTL4 Remark: ALL Pins on converter right position 4 Electrical connectivity CM101 None. Parity bit, stop bit is evaluated Automatically Terminal number Description Wire color (Siemens cable) 1 24 V DC Orange 2 0 V DC Yellow 3 MODBUS B White 4 MODBUS A Blue Connecting MODBUS A MODBUS B modem to (Blue wire) (White wire) SITRANS FC410 Modem TX+ / D+: X Modem TX- / D -: X Connecting modem to SITRANS FC410 Modem TDA(+) / RDA (+) Modem TDA(-) / RDA (-) Connecting CM101 to SITRANS FC410 CM101 A (Pin 14) CM101 B (Pin 13) MODBUS A (Blue wire) X MODBUS A (Blue wire) X MODBUS B (White wire) X MODBUS B (White wire) X Default settings of a SITRANS FC410 1 Baud rate 19.200 2 Parity bit Even 3 Stop bits 1 4 Modbus address 1 Entry-ID: 109740107, V1.1, 03/2017 29
4 Related literature and downloads 4 Related literature and downloads Table 4-1 Topic \1\ Siemens Industry Online Support https://support.industry.siemens.com \2\ Download page of this entry https://support.industry.siemens.com/cs/ww/de/view/beitragsid \3\ Siemens ST PCS 7 AO 2015, page 4-4 Order number: E86060-K4678-A121-B2-7600 https://www.automation.siemens.com/w2/efiles/pcs7/pdf/76/stpcs7ao_complete _English_2015_Web.pdf \4\ evcom Software download https://ewon.biz/support/companion/evcom/evcom-0 5 History Table 5-1 Version Date Modifications V1.0 08/2016 First version V1.1 03/2017 Updated version with detailed step by step description Entry-ID: 109740107, V1.1, 03/2017 30