As I think a lot of people involved into the automation world  know , Siemens always shown a kind of "adversity" to equip its products with not-native Siemens protocols. One of these, born on far 1979 but still common, is the Modbus protocol for networks TCP/IP. Anyway, available from few years, Siemens release its on licensed-library in order to use Modbus TCP communication into the PN type CPU (300, 400, 400H), into the CP (343, 443) or into the CPU-PN equipped ET200S. Recently I had the possibility to test this library developing an application (S7-317 2PN/DP)  who needs to run as Modbus Master (Client) reading / writings data to some relay controller (Areva) in order to control an hydroelectric power plant. Then I though to wrote this tutorial as a memo for some future similar jobs. Wish it'll be useful you too.

Into this article I'll explain hot to implement to modbus TCP Client (Master) functionality into a CPU S7-315 2PN/DP firmware 3.2. Here follow hardware and software needed coponents:

  • Software S7 Open Modbus TCP CPU PN Single License cod.2XV9450-1MB02 v.1.3 (for details take a look at)
  • Software Simatic Step 7 v.5.5 service pack 3
  • CPU S7 315 2PN/DP cod 6ES7315-2EH14-0AB0 + MMC (512kb is enough)

Reading some forum and blog about  some Modbus implementation for Arduino I feel my curiosity grow up about that..then I decided to test it on my on Arduino Mega 2560 board. I have to admit I've been successfully surprised! In few steps I saw a full running system that could represent a good source point to practice with Modbus Scada (as Proview). Following I wrote the steps I've done:

HW used:

  1. Arduino Mega 2560 
  2. Arduino Ethernet Shield R3

Software used:

  1. Arduino IDE 1.5.5 (free download  from Arduino main website)
  2. Arduino Modbus TCP server (Mudbus.h v.1.0)

 

This tutorial want to be a suggestion to the Codesys and Simatic Step 7 developers: download the OSCAT library! It's a free open source community that share library for some specific PLC IDE.  Over the library itself, a pdf user manual is available. it contains all need info to use the library

I tested it and found it very good, especially in Codesys where the standard lib contains few blocks/samples and people often need to create some small routines from your own.

Proview...It's from pretty long time I get the existence of this particular open source project created and maintained from SSAB Oxelösund .  But moreover support and contacts are managed from a smart Sweden developer named Claes (tack Claes !). Proview is a SCADA developing environment for Linux operating system including a SoftPLC. It's completely free and editable according to the GNU/GPL license. Info and details about this great project are available at its main website http://www.proview.se

I lost long days..but at the end I opted for download and install it. Just to understand what it really is, test its functionality and so on. Into this article and into the next ones I0ll dedicate to Proview (I wish I'll can give my best continuity to it..depending from my free time..) I'll tale a series of technical notes