Recently I've been involved into a PLC development environment not equipped to physical memory storage area such as Merker, DB, %T,... In that project, I had to acquire a 32 bit single precision floating point variable from remote I/O located not directly as REAL but as 2 WORDS: respectively  LSW ( Least Significant Word) and MSW (Most Significant Word). Then, starting from the floating definition (Wikipedia):

 IEEE753 32Single Wiki

     31------------------------MSW-------------------16 + 15----------------------LSW------------------------0

In this article I'll describe how to use an ANY data type as pointer input in a simple subroutine in Simatic Step 7 v.5.5. ANY parameter type, according to Simatic on-line help, is a 10 byte length with the following structure:

ANY Definition

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)


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)

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

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