Sie sind auf Seite 1von 47

Reference Manual

SMP Gateway SoftPLC


For use with SMP Gateway software version 6.1 or later.
Cooper Power Systems, SMP and Substation Modernization Platform are valuable trademarks of
Cooper Industries.
All brand and product names appearing in this document are the trademark or registered trademark
of their respective holders.

© 2012 Cooper Power Systems, LLC – All rights reserved.


The information in this document is subject to change without notice.

Cooper Power Systems


Energy Automation Solutions
730 Commerciale Street
Suite 200
Saint-Jean-Chrysostome, Quebec
Canada G6Z 2C5
Phone: +1.418.834.0009
Fax: +1.514.227.5256
Email: PSMO-sales@cooperindustries.com
Web: http://www.cooperpower.com

Technical Support: PSSJ-support@cooperindustries.com

Version 1
Contents
1  Introduction 1 
1.1  Intended Audience .................................................................................................1 
1.2  Overview ...............................................................................................................1 
1.3  Related Documentation .........................................................................................2 
1.4  Getting Assistance .................................................................................................3 
1.5  Typographic Conventions .....................................................................................3 

2  Principles of Operation 5 
2.1  The CoDeSys Environment ...................................................................................5 
2.2  The SMP Gateway as an IEC 61131-3 Device ......................................................5 
2.2.1  The SoftPLC (CoDeSys) Component .....................................................6 
2.2.2  SMP Config and the SMP Gateway Configuration (PAR) File ..............6 
2.2.3  Automatic Symbol Generation in CoDeSys using PLCopenXML .........6 

3  Setup 7 
3.1  Installing the CoDeSys IDE ..................................................................................7 
3.2  Starting CoDeSys for the First Time .....................................................................8 
3.3  Installing the Cooper Device Description Files .....................................................9 
3.4  Installing the SMP Library for CoDeSys...............................................................9 
3.5  Upgrading the SMP Gateway Software.................................................................9 

4  SMP Gateway Configuration 11 


4.1  Defining a CoDeSys (SoftPLC) Instance ............................................................11 
4.2  Defining the SoftPLC Logic Data Points ............................................................12 
4.3  Subscribing to SMP Gateway Physical Data Points ............................................15 
4.4  Using Automation Functions to Enhance the SoftPLC Logic .............................15 
4.5  Publishing Logic Data Points through Slave Protocols .......................................16 
4.6  Allowing CoDeSys Communications though the SMP Gateway Firewall..........16 

5  Project Configuration 19 


5.1  Creating a New CoDeSys Project........................................................................19 
5.2  Importing the Data Points ....................................................................................20 
5.3  PLC Logic and Tasks Definition .........................................................................20 

SMP Gateway SoftPLC Reference Manual ●i


6  Application Deployment 23 
6.1  Connecting CoDeSys to the SMP Gateway.........................................................23 
6.2  Debugging the Application on the SMP Gateway ...............................................25 
6.3  Creating an Embedded Boot Application ............................................................25 
6.4  Uploading the Application on the SMP Gateway ................................................26 
6.5  Revoking CoDeSys Access through the Firewall ................................................27 

7  Appendices 29 

Appendix A -  Tutorial: The Sample Project A-1 


Opening the Sample Project ........................................................................................................... A-1 
The Main_Task Task ...................................................................................................... A-2 
The PLC_MAIN Program .............................................................................................. A-2 
The ST_PRGRAM Program ........................................................................................... A-2 
Running the Sample Application in Debug Mode .......................................................................... A-2 
Testing the Sample Application on the SMP Gateway ................................................................... A-3 

Appendix B -  CoDeSys (SoftPLC) Master Component Reference B-1 


General Settings ............................................................................................................................. B-1 
Logic Point Settings ....................................................................................................................... B-1 
Analog Inputs ................................................................................................................. B-2 
Binary Inputs .................................................................................................................. B-3 
Analog Outputs ............................................................................................................... B-4 
Binary Outputs................................................................................................................ B-5 
Subscribed Point Settings ............................................................................................................... B-6 

ii ● Contents
Tables
Table B-1  General settings ........................................................................................................ B-1 
Table B-2  Logic analog input settings ....................................................................................... B-3 
Table B-3  Logic binary input settings ....................................................................................... B-4 
Table B-4  Logic analog output settings ..................................................................................... B-5 
Table B-5  Logic binary input settings ....................................................................................... B-6 
Table B-6  Subscribed data point settings .................................................................................. B-7 

SMP Gateway SoftPLC Reference Manual ● iii


1 Introduction

The SMP Gateway SoftPLC runtime system allows users to solve operational process issues, such
as circuit breaker control and load-balancing, by creating sophisticated automation scripts.
Configured using the CoDeSys development platform and the SMP Config application, it supports
the following IEC 61131 programming languages:
‰ Instruction List (IL)
‰ Structured Text (ST)
‰ Function Block Diagram (FBD)
‰ Continuous Function Chart (CFC)
‰ Ladder Diagram (LD)
‰ Sequential Function Chart

Note: The Automation Functions optional component is also available on most


SMP Gateway models, and allows the creation of logic data points whose values
are updated using logic expressions. It also provides users with simple
automation capabilities, such as Best-of and Input-Latching functions, and many
others.

For additional information, refer to the SMP Gateway Automation Functions


Reference Manual and the SMP Gateway User Manual.

1.1 Intended Audience


This reference manual is intended for users who need to install and set up the SMP Gateway
SoftPLC runtime system, along with its corresponding configuration tools and software libraries.
The reader must be familiar with the SMP Gateway environment before proceeding with the
remainder of this document. You can acquire this information by reading the SMP Gateway User
Manual, which is provided with the SMP Gateway Software and Tools.
The reader should also be familiar with the CoDeSys IDE. Regarding this topic, refer to the
CoDeSys document entitled User Documentation: CoDeSys V3, Installation and First Start.

1.2 Overview
This manual is divided into the following chapters:
‰ This chapter gives an overview of this document’s contents and purpose.

SMP Gateway SoftPLC Reference Manual •1


‰ Chapter 2 presents the concepts at the core of the SMP Gateway SoftPLC runtime system.
‰ Chapter 3 describes how to install and set up the CoDeSys IDE, the Cooper Power Systems
Target Support Package, and the SMP Library for CoDeSys.
‰ Chapter 4 explains how to use SMP Config to configure the SoftPLC system component on
the SMP Gateway, including the definition of the data points that will be used by your
SoftPLC logic and tasks.
‰ Chapter 5 covers CoDeSys project configuration, including project creation, automatic
symbol definition through data point import, and PLC logic coding and task definition.
‰ Chapter 6 describes how to connect the CoDeSys IDE to the SMP Gateway, debug the
SoftPLC application, create the boot application and upload it to the SMP Gateway.
‰ Reference information, such as the description of all SoftPLC system component settings and
an overview of the sample CoDeSys project provided by default with SMP Config, is
available in the various appendices.

1.3 Related Documentation


For additional information, refer to the following documentation that is provided with the
corresponding products.

For the CoDeSys IDE:


‰ User Documentation: CoDeSys V3, Installation and First Start, Document Version 8.0, Smart
Solutions Software GmbH.

For the SMP Library for CoDeSys:


‰ SMP Library for CoDeSys Reference Manual, Cooper Power Systems, LLC.
This document describes in detail the functions and function blocks implemented by the
SMP Library for CoDeSys.

For the SMP Gateway:


‰ SMP Gateway User Manual, Cooper Power Systems, LLC.
This document describes all the steps required to configure any model of SMP Gateway, and
to test its configuration. It also explains how to connect the SMP Gateway to a master station
and to substation IEDs, and describes the advanced features of the gateway.
‰ Protocol Common Concepts, Cooper Power Systems, LLC.
This document describes the concepts and settings that are common to the protocol
components used by all SMP Gateway models to communicate with most substation IEDs and
control centers.
‰ SMP Gateway Automation Functions Reference Manual, Cooper Power Systems, LLC.
This reference manual provides all the information required to install and set up an instance of
the Automation Functions component in the SMP Gateway.

2● Chapter 1: Introduction
1.4 Getting Assistance
If you have any question regarding the performance, application or testing of any component of
this Cooper Power Systems product, do not hesitate to contact us. Our staff will be pleased to
assist you.
Technical Support
Cooper Power Systems
Energy Automation Solutions
730 Commerciale Street, Suite 200
Saint-Jean-Chrysostome, Quebec
Canada G6Z 2C5

Email: PSSJ-support@cooperindustries.com
Phone: +1.418.834.0009
Fax: +1.514.227.5256

Business hours are from 8 a.m. and 5 p.m. EST, Monday to Friday.

1.5 Typographic Conventions


The following typographic conventions are used throughout this document.

Convention Description
See “Typographic Initial capitals in quotation marks indicate a chapter title or a
Conventions”, above. section heading.

You must read the Italic indicates emphasis or a document title.


SMP Gateway User Manual.

From the File menu, click Bold indicates user interface items, or strong emphasis.
Open.

C:\> Monospace indicates command prompts, console I/O,


pathnames and filenames.

Ctrl-Alt-Del Simultaneous keystrokes are joined by hyphens.

Alt+1+5 Consecutive keystrokes are joined by plus signs.

SMP Gateway SoftPLC Reference Manual •3


2 Principles of Operation

This chapter presents the concept at the core of the SMP Gateway SoftPLC runtime system. You
should read this chapter carefully and make sure you understand these concepts before going
further with the configuration chapters.

2.1 The CoDeSys Environment


CoDeSys (Controller Development System) is a comprehensive software tool for industrial
automation technology. Basically, it consists of two parts: the programming system (the IDE) and
the runtime system (which is implemented in the SMP Gateway as the combination of the
SoftPLC component and the SoftPLC application).
The runtime system turns the SMP Gateway into an IEC 61131-3 controller programmable with
CoDeSys. Integrated compilers make sure that the program code is processed at optimal speed.
Starting with version 6.1, the SMP Gateway software supports version 3.4 of CoDeSys.

Note: Versions 6.0 and earlier of the SMP Gateway Software and Tools support
CoDeSys version 2.3.

2.2 The SMP Gateway as an IEC 61131-3 Device


The main function of an SMP Gateway is to perform data acquisition and reporting based on the
master-and-slave protocols model.
Master protocols retrieve data from RTUs and IEDs, before storing it into a built-in database
called the Real-Time Data eXchange (RTDX).
Data stored in RTDX is used by system components, such as the SoftPLC or the Automation
Functions component, which process the data and re-inject the resulting data in RTDX.
Slave protocols can then subscribe to the RTDX data, and report updates to control centers and
master stations.
From the CoDeSys perspective, the SMP Gateway is considered as two IEC 61131-3 nodes: a
gateway node and a device node. This has no impact while configuring the SoftPLC (CoDeSys)
component and application, but this fact must be understood to properly configure the connection
between the CoDeSys IDE and the SMP Gateway (see “Connecting CoDeSys to the
SMP Gateway”, page 23).

SMP Gateway SoftPLC Reference Manual •5


2.2.1 The SoftPLC (CoDeSys) Component
The SoftPLC (CoDeSys) is the system component that makes the bridge between RTDX and the
SoftPLC application. It initializes and manages the data points created specifically as outputs for
the SoftPLC application, and subscribes to the existing data points that are used as inputs by the
SoftPLC application logic. It also starts the SoftPLC application at system startup.
The SoftPLC component is configured using SMP Config (see “SMP Gateway Configuration”,
page 11).

2.2.2 SMP Config and the SMP Gateway Configuration (PAR) File
The SMP Gateway components, functions and data point settings are defined and specified using
SMP Config, and stored in the SMP Gateway configuration (PAR) file. This is also the case for
the SoftPLC (CoDeSys) component.
To simplify application deployment, a feature is provided to embed the SoftPLC application
designed using the CoDeSys IDE within the SMP Gateway configuration file. As a result, the
SoftPLC application is uploaded to the SMP Gateway when you upload the configuration file on
the SMP Gateway. To make it work properly, all you have to do is to edit the CoDeSys project
(and application) from the SMP Config, as described Chapter 5.
Embedding the SoftPLC application within the SMP Gateway configuration file is the preferred
approach for developing CoDeSys applications on the SMP Gateway; the configuration and
design instructions provided in this manual are based on this scenario. However, it is still possible
to keep the CoDeSys project separated from the configuration file. In such “standalone” scenario,
the SoftPLC (CoDeSys) component still acts as the bridge between the SoftPLC application and
RTDX, but you must upload and start the SoftPLC application separately, through the CoDeSys
IDE.

2.2.3 Automatic Symbol Generation in CoDeSys using


PLCopenXML
To simplify the symbol definition and initialization in the SoftPLC application, SMP Config
generates a PLCopenXML file that contains the settings of all points defined in the SoftPLC
component.
When you open the CoDeSys IDE through SMP Config, the latter notifies the user that it
generated the PLCopenXML file and provides its location. Importing this file in the CoDeSys
project automatically generates (or updates) the corresponding symbol definitions and
initialization code.
This process is explained in details in the “Importing the Data Points” section, page 20.

6● Chapter 2: Principles of Operation


3 Setup

This chapter explains how to install and setup the CoDeSys integrated development environment
(IDE), along with the Cooper Power Systems Target Support Package and the SMP Library for
CoDeSys.

3.1 Installing the CoDeSys IDE


The CoDeSys for the SMP Gateway disc contains the installer for CoDeSys V3.4 SP4 Patch 1.

Note: CoDeSys V3.4 requires the Microsoft .NET Framework 3.5, which is not provided
with the installer. However, the installer can download it from the web and
perform the installation, if the computer is connected to the Internet.

If this is not the case, contact your system administrator to have the .NET
Framework 3.5 installed prior to the CoDeSys installation.

To install version 3.4 of the CoDeSys IDE:


‰ Insert the CoDeSys for the SMP Gateway disc in your computer.
‰ In the left pane of the Welcome window, click Installing.
‰ In the Installing window, click the CoDeSys Workbench link to start the installation
process.
‰ Follow the on-screen instructions, until you reach the Select Features window.

SMP Gateway SoftPLC Reference Manual •7


‰ Clear all check boxes except CoDeSys V3.
‰ If you must convert existing CoDeSys V2.3 project to version 3, also select CoDeSys
Converter.
‰ Click Next and proceed with the remaining installation instructions.

3.2 Starting CoDeSys for the First Time


Some setup operations must be performed when starting CoDeSys for the first time.

Note: This is the only time where you will need to start CoDeSys as a “standalone”
application; when embedding the SoftPLC application into the SMP Gateway
configuration (PAR) file, you must start the CoDeSys IDE from SMP Config.

For additional information, see “Creating a New CoDeSys Project”, page 19.

To start CoDeSys for setup purposes:


‰ On the Windows taskbar, click start.
‰ Point to All Programs, then 3S CoDeSys, then CoDeSys, and then click CoDeSys V3.4 SP4
Patch 1.

CoDeSys starts and initialize the Component Manager.


‰ In the Choose Default Environment Settings window, select the Standard environment
settings and then click Start.

8● Chapter 3: Setup
3.3 Installing the Cooper Device Description Files
A device description file (*.DevDesc.xml) defines a specific hardware object (formerly known
as a “target”) that runs a SoftPLC application. This type of file replaces the Target Support
Package (TSP) format that was used with prior versions of CoDeSys.
Cooper Power Systems provides two device description files on the CoDeSys for the
SMP Gateway disc:
‰ SMP4And16.DevDesc.xml.
This file contains device descriptions for the SMP 4 and SMP 16 gateways.
‰ SMP4DP.DevDesc.xml.
This file contains the device description for the SMP 4/DP.

To install Cooper Power Systems device description files in the CoDeSys IDE:
‰ In CoDeSys, from the Tools menu, choose Install device.
‰ Browse the CoDeSys for the SMP Gateway disc down to the following folder:

.\PC\Gateway\
‰ Select the device description file that corresponds to your SMP Gateway model, and then
click Open.

CoDeSys will confirm the success of the installation process.


‰ Repeat for additional device description files, if required.

3.4 Installing the SMP Library for CoDeSys


The SMP Library for CoDeSys (SmpLib.library) contains all the data types, functions, and
function blocks providing access to the SMP Gateway Real-Time Data eXchange (RTDX).

To install the SMP Library for CoDeSys:


‰ In CoDeSys, from the Tools menu, choose Install library.
‰ Browse the CoDeSys for the SMP Gateway disc down to the following folder:

.\PC\Gateway

The file will not be visible, since only compiled library files are displayed by default.
‰ In the Files of type box, select Library files to reveal the file.
‰ Select the SmpLib.library file, and then click Open.

CoDeSys will confirm the success of the installation process.


‰ Close the CoDeSys IDE.

3.5 Upgrading the SMP Gateway Software


The final configuration step is to ensure that you are using the proper version of the SMP Gateway
Software & Tools.

SMP Gateway SoftPLC Reference Manual •9


To run a CoDeSys V3.4 application on the SMP Gateway, the SMP Gateway must run version 6.1
or later of the SMP Gateway application. The same version of the SMP Tools is required to setup
the SoftPLC component.
To install the latest version of the SMP Tools, refer to the “Installing the SMP Tools” section of
the corresponding installation guide of your SMP Gateway (ex. the SMP 4DP Installation Guide,
for the SMP 4/DP).
To update the SMP Gateway software, refer to the SMP Gateway User Manual.
You are now ready to configure the SoftPLC component, and to create and design your
SMP Gateway SoftPLC application.

Note: Additionally, make sure the SMP Gateway license contains the P-SSMP-0201
SoftPLC Runtime System option.

10 ● Chapter 3: Setup
4 SMP Gateway
Configuration

Before proceeding with the creation of the SoftPLC application within the CoDeSys IDE, some
SMP Gateway configuration operations must be performed using SMP Config:
‰ An instance of the SoftPLC (CoDeSys) component must be created and added to the
SMP Gateway configuration file.
‰ The data points that will be created for and updated specifically by the SoftPLC instance
(called the logic data points) must be defined.
‰ The SoftPLC must subscribe to physical data points produced by other SMP Gateway
components and that will be required by the SoftPLC application logic (either as inputs or
outputs).
‰ You can use the SMP Gateway Automation Functions to enhance the SoftPLC application
logic, if required.
‰ SMP Gateway slave components can subscribe to the SoftPLC logic data points, so they can
make them available to the SCADA, or any other control center or master station.
‰ Finally, you will have to allow the CoDeSys IDE to communicate with the SMP Gateway
through its built-in firewall.
These operations, which are performed using SMP Config are described in details in the following
sections.

Note: It is assumed that the reader has sufficient knowledge of the SMP Config tool
and SMP Gateway protocol components. For additional information on these
topics, refer to the SMP Gateway User Manual.

4.1 Defining a CoDeSys (SoftPLC) Instance


The SMP Gateway configuration (PAR) file must contain an instance of the CoDeSys (SoftPLC)
system component to run a SoftPLC application.

To define a CoDeSys (SoftPLC) instance:


‰ From SMP Manager, select the SMP Gateway that will run the SoftPLC application.
‰ From the Tools menu, choose SMP Config.
‰ In the left pane of SMP Config, under the System branch, click CoDeSys (SoftPLC).

SMP Gateway SoftPLC Reference Manual • 11


‰ In the right pane, assign a name to the new instance, and then press ENTER.

The new instance appears in the left pane.

Note: There can only be one instance of the CoDeSys (SoftPLC) component in a single
SMP Gateway configuration; also, there can only be one SoftPLC application per
SoftPLC component instance.

‰ In the left pane, expand the SoftPLC instance branch and select the General branch.

‰ In the Device Prefix cell, type the prefix that will be added before the name of all logic data
points of this instance.

Note: By default, the Device Prefix is set to plc_. The sample project provided by
Cooper Power Systems uses this prefix. If you want to use the sample project,
you should keep this default value; if you want to change it, you will also need to
update the sample project logic code.

‰ Unless you want to temporarily deactivate the SoftPLC component, make sure the Enabled
option is selected.
‰ By default, the Start Embedded Boot Application setting is selected; this means that the
SoftPLC component expects the SMP Gateway configuration (PAR) file to contain the
SoftPLC application, and will start it upon system startup or restart.

If you want to upload it manually using the CoDeSys IDE, clear the Start Embedded Boot
Application check box; however, take note that this scenario is not in the scope of this
manual.

4.2 Defining the SoftPLC Logic Data Points


The logic data points that will be created by the SoftPLC component and used as part of the
SoftPLC application logic must be defined first in the SMP Gateway configuration (PAR) file.

To define a logic analog input:


‰ Still in SMP Config, under the SoftPLC instance branch, expand the Generated Points
branch, and then select the Analog Inputs branch.

‰ In the right pane, click in the Name cell of the first empty row.

12 ● Chapter 4: SMP Gateway Configuration


‰ Type the name of the logic point.

Note: The full name of the point will be preceded by the SoftPLC instance prefix.

‰ (Optional) In the Symbol cell, type the name of this data point to be used in the corresponding
CoDeSys project.

If this setting is left unspecified, the Name setting will also be used as the symbol in
CoDeSys.
‰ Edit other point settings (ex. Scale, Offset, etc.) as required.

For additional information about these settings, see “Analog Inputs”, page B-2.
‰ (Optional) In the Description cell, type some indications about the purpose of this point or its
use in the SoftPLC application logic.
‰ Repeat for all logic analog inputs.

To define a logic binary input:


‰ Still in SMP Config, under the SoftPLC instance branch, expand the Generated Points
branch, and then select the Binary Inputs branch.

‰ In the right pane, click in the Name cell of the first empty row.
‰ Type the name of the logic point.

Note: The full name of the point will be preceded by the SoftPLC instance prefix.

‰ (Optional) In the Symbol cell, type the name of this data point to be used in the corresponding
CoDeSys project.

If this setting is left unspecified, the Name setting will also be used as the symbol in
CoDeSys.
‰ Edit other point settings (ex. Scale, Offset, etc.) as required.

For additional information about these settings, see “Binary Inputs”, page B-3.
‰ (Optional) In the Description cell, type some indications about the purpose of this point or its
use in the SoftPLC application logic.
‰ Repeat for all logic binary inputs.

To define a logic analog output:


‰ Still in SMP Config, under the SoftPLC instance branch, expand the Generated Points
branch, and then select the Analog Outputs branch.

SMP Gateway SoftPLC Reference Manual • 13


‰ In the right pane, click in the Name cell of the first empty row.
‰ Type the name of the logic point.

Note: The full name of the point will be preceded by the SoftPLC instance prefix.

‰ (Optional) In the Symbol cell, type the name of this data point to be used in the corresponding
CoDeSys project.

If this setting is left unspecified, the Name setting will also be used as the symbol in
CoDeSys.
‰ Edit other point settings (ex. Scale, Offset, etc.) as required.

For additional information about these settings, see “Analog Outputs”, page B-4.
‰ (Optional) In the Description cell, type some indications about the purpose of this point or its
use in the SoftPLC application logic.
‰ Repeat for all logic analog outputs.

To define a logic binary output:


‰ Still in SMP Config, under the SoftPLC instance branch, expand the Generated Points
branch, and then select the Binary Outputs branch.

‰ In the right pane, click in the Name cell of the first empty row.
‰ Type the name of the logic point.

Note: The full name of the point will be preceded by the SoftPLC instance prefix.

‰ (Optional) In the Symbol cell, type the name of this data point to be used in the corresponding
CoDeSys project.

If this setting is left unspecified, the Name setting will also be used as the symbol in
CoDeSys.
‰ Edit other point settings (ex. Allow Open/Close, Allow Pulse, etc.) as required.

For additional information about these settings, see “Binary Outputs”, page B-5.
‰ (Optional) In the Description cell, type some indications about the purpose of this point or its
use in the SoftPLC application logic.
‰ Repeat for all logic binary outputs.

14 ● Chapter 4: SMP Gateway Configuration


4.3 Subscribing to SMP Gateway Physical Data
Points
Some physical data points, which are mostly provided by master protocol components, may be
required as “inputs” of your SoftPLC application. To receive data updates for these points through
RTDX, the SoftPLC component must subscribe to them.

Note: SoftPLC application “inputs” are not to be confused with “input data points”. The
SoftPLC component can also subscribe to output data points, whose values will
be used as inputs of the application. Similarly, logic data points are considered as
“outputs” of the SoftPLC application, although most of the times they will be
defined as input data points.

To subscribe the SoftPLC component to a physical data point:


‰ Still in SMP Config, under the SoftPLC instance branch, expand the Subscribed Points
branch, and then select the branch corresponding to the type of point to subscribe to.

For example, to subscribe to a physical analog input, select the Analog Inputs branch.

‰ In the right pane, click in the Name cell of the first empty row.
‰ Type the name of the logic point, including its own device prefix.
‰ (Optional) In the Symbol cell, type the name of this data point to be used in the corresponding
CoDeSys project.

If this setting is left unspecified, the Name setting will also be used as the symbol in
CoDeSys.
‰ Repeat for all subscribed data points.

4.4 Using Automation Functions to Enhance the


SoftPLC Logic
The Automation Functions component is a software component that was developed for the
SMP Gateway product line. It provides basic hard-coded automation capabilities that are simpler
to implement than a SoftPLC application, but which can also enhance SoftPLC functionalities,
without typing additional lines of code.
The Automation Functions component is configured using SMP Config and works exclusively
with RTDX data points: it is not an additional library for the CoDeSys environment.
To use the Automation Functions component with your SoftPLC application, create an
Automation Functions instance and define the functions you want the SMP Gateway to perform
on existing data points or new logic data points created by this component; then, subscribe the
SoftPLC component to these “automated” data points.
For additional information on the Automation Functions component, refer to the SMP Gateway
Automation Functions Reference Manual.

SMP Gateway SoftPLC Reference Manual • 15


4.5 Publishing Logic Data Points through Slave
Protocols
You can make the logic data points available to any master station or control center that is
connected to the SMP Gateway via a slave protocol component, by subscribing this slave protocol
component to the logic data points.
A slave protocol instance must be created and configured in the SMP Gateway configuration
(PAR) file for each control center or master station.
To configure a slave protocol instance, the following operations must be performed:
‰ Create the slave protocol instance and configure its general settings. General settings are
parameters that are shared by most slave protocol components.
‰ Configure the protocol-specific settings of the slave.
‰ Subscribe the slave to the logic data points and any other data point of the RTDX database.
‰ Provide protocol-specific settings for the subscribed data points.
‰ Configure a communication link and assign it to the slave protocol.

Note: This procedure is presented in details in Chapter 10 of the SMP Gateway User
Manual.

4.6 Allowing CoDeSys Communications though


the SMP Gateway Firewall
By default, the SMP Gateway is protected by a built-in firewall, which allows communications
with specific users, computers and programs, including those with the SMP Tools.
During the SoftPLC application development and testing process, the CoDeSys IDE must
communicate with the SMP Gateway; for that matter, you must allow it access through the
firewall.

Note: It will be important to revoke CoDeSys access to the SMP Gateway when you will
be ready to deploy the SMP Gateway in the field, to prevent unauthorized users
from accessing the SMP Gateway internal components and services through this
open port.

To allow CoDeSys communications through the SMP Gateway firewall:


‰ In SMP Config, expand the Firewall branch, and then the Rules branch.
‰ In the CoDeSys row, select Allow.

16 ● Chapter 4: SMP Gateway Configuration


‰ (Optional) You can restrict access to specific computers that run the CoDeSys IDE by
selecting Specific Computer or Subnet in the Accessible From cell, and then typing the IP
addresses in the Specific Computer or Subnet cell.

SMP Gateway SoftPLC Reference Manual • 17


5 Project Configuration

The SoftPLC component provides the RTDX data points required by the SoftPLC application, but
not the application itself; the latter must be designed in a CoDeSys project using the CoDeSys
IDE.
In this chapter, the reader will learn how to perform the following operations:
‰ Create a new CoDeSys project and attach it to an SMP Gateway configuration file.
‰ Import the SoftPLC data points in the CoDeSys project, to simplify the definition and
initialization of the corresponding symbols in the application.
Finally, the reader will also get guidelines and tips on how to design and code the SoftPLC
application.

Note: Cooper Power Systems recommends the insertion of the SoftPLC application into
the SMP Gateway configuration file, and this chapter provides the information
and instructions corresponding to this scenario.

If you want to manage the SoftPLC application (and the related CoDeSys project)
separately from the SMP Gateway configuration file, the process will differ and is
not in the scope of this document.

5.1 Creating a New CoDeSys Project


As described previously, the SoftPLC component is configured by default to start the SoftPLC
application; for that matter, the application must be embedded into the SMP Gateway
configuration file.
SMP Config allows users to attach a CoDeSys project to an SMP Gateway configuration file to
facilitate the insertion of the application into the file.

To create a CoDeSys project and attach it to the SMP Gateway configuration file:
‰ In SMP Config, select the SoftPLC instance branch.
‰ From the Tools menu, choose Edit CoDeSys Project.

SMP Gateway SoftPLC Reference Manual • 19


Note: If you defined SoftPLC logic data points or subscribed the SoftPLC to existing
data points, an information message is displayed to notify the user that it should
imports these points to its CoDeSys project, using the PLCopenXML file
automatically generated by SMP Config; instructions on how to perform such
import are provided in section 5.2, below.

Take note of the name and location of the file, and then click OK.

‰ CoDeSys prompts you for a profile. Simply click Continue to select the proposed profile.

The CoDeSys IDE opens the sample project provided by Cooper Power Systems.

Note: If you want to use the sample project provided by Cooper Power Systems, before
developing your own application, refer to “Appendix A - Tutorial: The Sample
Project”, page A-1. Otherwise, the following sections assume that you will replace
most of the sample project code with your own application code.

5.2 Importing the Data Points


When you start the CoDeSys IDE from SMP Config, the latter automatically generates a
PLCopenXML file that contains all the information required by the CoDeSys IDE to generate the
symbol definition and initialization code for the logic and subscribed data points of the SoftPLC
component.
By importing the content of this PLCopenXML file in the CoDeSys project, you skip the tedious
and error-prone task of having to define and initialize these symbols manually.

To import data points in the CoDeSys project:


‰ Still in the CoDeSys IDE, select the Application branch.
‰ From the Project menu, choose Import PLCopenXML.
‰ Select the file mentioned by SMP Config when you opened the CoDeSys project from it, and
then click Open.
‰ In the Import PLCopenXML window, make sure the SMP_global_symbols_declaration
and SMP_MAP_SYMBOLS items are selected, and then click OK.
‰ If CoDeSys indicates that any of the imported items already exists in the project, select
Replace the existing object. Do the same for all subsequent conflicts, and then click OK.

The existing versions of these items will be replaced in the CoDeSys sample project by new
ones that contain all the declarations and symbols of your own logic and subscribed data
points.

5.3 PLC Logic and Tasks Definition


Once the project is created and the data points are imported, the final and more important step is to
define the SoftPLC logic and tasks.
By default, all new projects created through SMP Config are based on the sample project
described in “Appendix A”, which contains one task (Main_Task) and two programs
(PLC_MAIN and ST_PROGRAM).

20 ● Chapter 5: Project Configuration


Unless you need more tasks and/or programs, we recommend that you keep the existing
task/program structure and replace the sample code by your own.
Essentially, the logic that is performed on a regular basis is found in the ST_PROGRAM program;
the entire content of this program can be erased and replaced by your own.
For additional information, refer to the description of the default sample project, in “Appendix A -
Tutorial: The Sample Project”, page A-1.

SMP Gateway SoftPLC Reference Manual • 21


6 Application Deployment

Once the SoftPLC component and application are properly configured, they can be deployed on
the SMP Gateway.
This chapter explains how to perform the following deployment-related operations:
‰ Connect the CoDeSys IDE to the SMP Gateway.
‰ Debug the SoftPLC application on the SMP Gateway through the CoDeSys IDE.
‰ Create a boot application and embeds it in the SMP Gateway configuration to allow the
SoftPLC component to automatically start the SoftPLC application at the SMP Gateway
startup or restart.
‰ Upload the SMP Gateway configuration file, which also includes the SoftPLC settings,
application and boot code, on the SMP Gateway.

6.1 Connecting CoDeSys to the SMP Gateway


To connect the CoDeSys IDE to the SMP Gateway, you must define the communication channel
between them, known in CoDeSys as the network path. Only one network path is active at a time.

Note: Typically, devices running IEC 61131-3 applications (controllers) are accessible
through a network gateway. When defining the network path to an SMP Gateway
running a SoftPLC application, the SMP Gateway is considered as both the
network gateway and the PLC device.

To connect the CoDeSys IDE to the SMP Gateway:


‰ Start CoDeSys from SMP Config (from the Tools menu, choose Edit CoDeSys Project).
‰ In the Devices pane on the left, expand the CoDeSysProj branch, and then double-click the
branch of SMP Gateway to connect (ex. Device (SMP 4/SMP 16)).

All settings for the selected device are displayed in the right pane, in a specific Device
window/tab.
‰ Click in the Communication Settings tab.

SMP Gateway SoftPLC Reference Manual • 23


‰ Click Add gateway.

‰ In the Name box, type a name for the SMP Gateway. You can use the same name that you
specified for this gateway in SMP Manager, or simply type SMP Gateway.
‰ Under Settings, double click in the Value cell of the IP-Address parameter, and then type the
IP address of the SMP Gateway; press ENTER.
‰ Click OK.
‰ Back in the Communication Settings tab, click Scan network.

The SMP Gateway will appear under the gateway branch, represented by its serial number
(ex. SMP2000766), a node address between brackets, and the (active) label.

24 ● Chapter 6: Application Deployment


‰ If the (active) label is not present, select the SMP Gateway branch, and then click Set active
path.
CoDeSys is now ready to communicate with the SMP Gateway SoftPLC runtime.

6.2 Debugging the Application on the


SMP Gateway
Once the CoDeSys IDE is properly connected to the SMP Gateway, you can test and troubleshoot
the SoftPLC application.

To debug the application on the SMP Gateway:


‰ In SMP Config, from the Tools menu, choose Edit CoDeSys Project.
‰ In CoDeSys, from the Online menu, choose Login.

If asked to download the application on the SMP Gateway, click Yes.


You can now use the Debug menu commands to insert breakpoints and debug the application.

6.3 Creating an Embedded Boot Application


For the SoftPLC component to be able to start the application on SMP Gateway startup, the
application must not only be included in the SMP Gateway configuration file; boot code must also
be added to the application. From the CoDeSys perspective, this operation is called creating a
boot application.

Note: Before proceeding with the boot application creation, make sure you selected the
Start Embedded Boot Application setting in the SoftPLC component settings.

To create a boot application embedded in the SMP Gateway configuration file:


‰ Start CoDeSys from SMP Config (from the Tools menu, choose Edit CoDeSys Project).
‰ Make sure that you are not currently connected to the SMP Gateway.

You will know that you are connected if the Login command is not available from the Online
menu, and both Device and Application branches are highlighted in green in the Devices
pane, as shown in the following picture:

SMP Gateway SoftPLC Reference Manual • 25


‰ If you are currently connected to the SMP Gateway, choose Logout from the Online menu.
‰ Make sure any change made to the CoDeSys project prior to the boot application creation
was properly saved; if in doubt, save it by choosing the Save Project command from the File
menu.

This verification is important, because SMP Config compares the timestamps of the CoDeSys
project and the boot application, to ensure that the boot application contains the latest code
changes.
‰ From the Online menu in CoDeSys, choose Create boot application.

CoDeSys builds the project application.


‰ In the Save As window, make sure the File Name is Application; this is the default file
name and it must not be changed to ensure the proper embedding of the boot application in
the SMP Gateway configuration file.
‰ Click Save.
‰ Do not save the CoDeSys project. As stated previously, SMP Config compares the
timestamps of the CoDeSys project and the boot application; if you save the project after you
create the application, SMP Config will believe that the application is not up-to-date and will
display a warning message.
‰ Close CoDeSys.
‰ Back in SMP Config, save the configuration file (from the File menu, choose Save).

The SMP Gateway configuration (PAR) file now contains the boot application, and is ready to
be uploaded to the SMP Gateway.

6.4 Uploading the Application on the


SMP Gateway
Once the SoftPLC application is properly embedded in the SMP Gateway configuration file with
the boot code, all you need to do is to upload the SMP Gateway configuration file on the
SMP Gateway.

Note: As stated several times throughout this document, this approach only works if
you embed the application (and the accompanying boot code) in the
SMP Gateway configuration file. Otherwise, use the Download command
provided in CoDeSys to deploy the application on the SMP Gateway.

To upload the PLC application to the SMP Gateway:


‰ In SMP Manager, select the SMP Gateway.
‰ From the Update menu, choose Send Configuration File.
‰ Select the SMP Gateway configuration file that contains the boot application, and then click
Open; click Yes to confirm the file upload.

26 ● Chapter 6: Application Deployment


‰ Once the file is transferred, restart the SMP Gateway.

The PLC application will be started by the SMP Gateway application.

6.5 Revoking CoDeSys Access through the


Firewall
As stated in section 4.6, page 16, CoDeSys access to the SMP Gateway through the built-in
firewall should be revoked once application development and debugging is complete, to prevent
unauthorized users from accessing the open communication port.

To revoke CoDeSys access through the built-in firewall:


‰ Open the SMP Gateway configuration file in SMP Config.
‰ In SMP Config, expand the Firewall branch, and then the Rules branch.
‰ In the CoDeSys row, clear the Allow check box.
‰ Save the configuration file and upload it to the SMP Gateway for the change to be effective.

SMP Gateway SoftPLC Reference Manual • 27


7 Appendices

SMP Gateway SoftPLC Reference Manual • 29


Appendix A - Tutorial: The Sample Project

This appendix presents the sample CoDeSys project that SMP Config provides by default in the
SMP Gateway configuration file. It also explains how to debug and test it on an SMP Gateway.

Opening the Sample Project


The sample project is included in all new project created by opening CoDeSys from SMP Config.

To open the sample project:


‰ From SMP Manager, select the SMP Gateway that will host the sample application.
‰ From the Tools menu, choose SMP Config.
‰ In the left pane of SMP Config, under the System branch, click CoDeSys (SoftPLC).
‰ In the right pane, assign a name to the new instance (ex. Tutorial), and then press ENTER.

The new instance appears in the left pane.


‰ The provided default settings are compatible with the sample project, and you do not need to
define any data point in the SoftPLC component: the sample project contains all required
symbol definitions and initialization code.

However, if you want to debug or run the sample application on the SMP Gateway, you must
allow CoDeSys access through the SMP Gateway firewall, as described in section 4.6,
page 16.
‰ In the left pane, select the Tutorial instance branch.
‰ From the Tools menu, choose Edit CoDeSys Project.

Note: Do not use the PLCopenXML file provided by SMP Config, even if SMP Config
suggests you to do so. The symbols used in the sample project are already
properly initialized and are not present in the SMP Gateway configuration file.

If you import the PLCopenXML file, these symbols will be deleted and the sample
project will no longer work.

‰ CoDeSys prompts you for a profile. Simply click Continue to select the proposed profile.

The CoDeSys IDE opens the sample project provided by Cooper Power Systems.
The sample project contains one task (Main_Task) and two programs (PLC_MAIN and
ST_PROGRAM). These elements are presented in the sections that follow.

SMP Gateway SoftPLC Reference Manual • A-1


The Main_Task Task
Main_Task is a cyclic task that calls the PLC_MAIN program twice a second (every 500
milliseconds).

The PLC_MAIN Program


The PLC_MAIN program is divided into three parts:
‰ The first part is the initialization code, where RTDX data points are mapped to CoDeSys
symbols; it is executed first and only once.
‰ The second part contains startup code; it will be executed once, once the SMP Gateway
startup is completed. At this point, all data points are properly mapped to CoDeSys symbols,
and all system and protocol components are started and running.
‰ The last part is the one that will be executed forever after: it only calls the ST_PROGRAM.

The ST_PRGRAM Program


The ST_PROGRAM contains the sample application logic code. It essentially performs the
following operations:
‰ Calculate the current second within the hour, and stores it in the AI_OUT_SEC_OF_HOUR
logic analog input.
‰ Invert the state of the BI_OUT_INVERT_CONTROL logic binary input.
‰ Once every minute, deactivate local control operations on the SMP Gateway, by performing a
control operation on the _smp___localControl system data point; the sample
application is subscribed to this point.
‰ Change the value of the AI_OUT_CONTROL_COUNT logic analog input when a control
operation is performed on the BO_OUT_COUNTER_UPD logic binary output; an open
operation decreases the value, a close operation increases the value, and a pulse operation
resets it to 0.
‰ Once every minute, perform a control operation on the AO_OUT logic analog output.
‰ Update various logic counters and statistic entries, and publishes messages through log
entries.

Running the Sample Application in Debug Mode


You can run the sample project on the SMP Gateway that runs the SoftPLC component, which
means that it must use an SMP Gateway configuration file that contains such a component
instance.
You should note that to debug the application, you do not need to embed the application in the
configuration file: the application will be uploaded by CoDeSys when it will connect to the
SMP Gateway.

To run the sample application in Debug mode:


‰ Close CoDeSys for now, if it is currently open.
‰ Back in SMP Config, choose Save from the File menu.

If you have not generated the boot application yet, or if it is not up-to-date with the CoDeSys

A-2 Appendix A - Tutorial: The Sample Project


project, some warnings will still be pending. Nevertheless, you can proceed with the save
operation.
‰ Using SMP Manager, upload the configuration file on the SMP Gateway.
‰ Re-open CoDeSys from SMP Config.
‰ From the Online menu, choose Login.

If the login operation fails, make sure the SMP Gateway is running properly; verify, using
SMP Log, that the SoftPLC component was properly started.
‰ When asked to download the sample application on the SMP Gateway, click Yes.
‰ From the Debug menu, choose Start.

You can now use the Debug menu commands to insert breakpoints and debug the application.

Testing the Sample Application on the SMP Gateway


To test the sample application on the SMP Gateway, you must add boot code to the application,
and embed the resulting package in the SMP Gateway configuration file; you will then only have
to upload the updated configuration file to the SMP Gateway and restart it to let the SMP Gateway
start and run the sample application.

To test the sample application on the SMP Gateway:


‰ In CoDeSys, choose Save Project from the File menu.
‰ If you are currently connected to the SMP Gateway, choose Logout from the Online menu.
‰ From the Online menu, choose Create boot application.

CoDeSys builds the project application.


‰ In the Save As window, make sure the File Name is Application; this is the default file
name and it must not be changed to ensure the proper embedding of the boot application in
the SMP Gateway configuration file.
‰ Click Save.
‰ Do not re-save the CoDeSys project.
‰ Close CoDeSys.
‰ Back in SMP Config, make sure you selected the Start Embedded Boot Application general
setting in the SoftPLC component settings.
‰ Save the configuration file (from the File menu, choose Save).
‰ Upload the configuration file on the SMP Gateway, and restart it.

The sample application will be started as soon as the SMP Gateway will complete its own
startup.

SMP Gateway SoftPLC Reference Manual • A-3


Appendix B - CoDeSys (SoftPLC) Master
Component Reference

This appendix provides, as reference, a description of all settings that must be specified for the
SoftPLC, using SMP Config.

General Settings
General settings specify the general behavior of the SoftPLC component instance.

Setting Description
Device Prefix A string used as a prefix for all logic data points created by the SoftPLC
component instance. This prefix must be unique, along all components that
also create data points, to ensure that all point names in the system are
unique.
Range: 1 to 19 ASCII characters.

Enabled Indicates if this SoftPLC component instance is currently enabled. Clear this
checkmark to temporarily deactivate the execution of SoftPLC component
application.
Range: checkmark / no checkmark
Default value: checkmark (enabled)

Start Embedded Boot A checkmark indicates that the SoftPLC application will be embedded
Application within the SMP Gateway configuration (PAR) file, along with its
corresponding boot code, allowing the SoftPLC application to run
automatically at the SMP Gateway startup.
Range: checkmark / no checkmark
Default value: no checkmark

Table B-1 General settings

Logic Point Settings


Logic data points are created by the SoftPLC component, to be used and updated by the SoftPLC
application. When they are defined using SMP Config, the settings of these points are exported to
a PLCopenXML file that can then be imported in the CoDeSys project.
This section presents the settings that must be specified for logic data points of all types.

SMP Gateway SoftPLC Reference Manual • B-1


Analog Inputs
The following table presents the settings that are specific to logic analog inputs of the SoftPLC
component.

Setting Description
Name The name of the logic analog input point, which must be unique within the
SoftPLC component. This name is preceded by the Device Prefix, as
specified in the general settings. The device prefix, coupled with the name,
ensures that every point managed by the system has a unique name.
The following characters cannot be used as part of the name: the comma (,),
the quotation mark ("), the semicolon (;) and the grave accent (`).
Range: 1 to 39 ASCII characters (including the prefix).

Symbol The name of the logic analog input point, as it will be used in the CoDeSys
application code.
If no Symbol is specified, the Name setting will be used instead, unless it
contains invalid characters per CoDeSys syntax rules: if this is the case, the
Symbol setting becomes mandatory.
Only the following characters are allowed as part of the symbol: A-Z, a-z,
0-9, and the underscore (‘_’); however, consecutive underscores are not
allowed.
Range: 0 to 31 ASCII characters.

Disabled A checkmark indicates that this point is ignored by the SoftPLC component.
Range: checkmark / no checkmark
Default value: no checkmark

Scale Scaling factor used to convert 32-bit values (raw) to significant engineering
units (floating point) and vice versa. The conversion depends on the format
of the value, as provided by the parent function. The following equation is
used:
Floating-point value = (raw value * scale) + offset
Range: –3.4E38 to 3.4E38, not 0.0
Default value: 1.0

Offset Offset value used to convert 32-bit values (raw) to significant engineering
units (floating point) and vice versa. See the Scale setting above.
Range: –3.4E38 to 3.4E38
Default value: 0.0

SMP Deadband Only floating-point value changes greater than the deadband value are
reported, unless the value itself is smaller than the deadband. This ensures
that small variations around 0 are reported so that, for example, reported
values do not remain fixed at .01 when they are, in fact, 0. A value of 0 for
this setting implies that all variations, no matter how small, are reported.
Range: 0.0 to 3.4E38
Default value: 0.0

B-2 Appendix B - CoDeSys (SoftPLC) Master Component Reference


Setting Description
Units Units that are displayed with this point’s values in the various SMP Tools,
or through the SMP Gateway web server.
Allowed values: As shown in the drop-down list
Default value: ** Undefined **

Description An optional point description, which is displayed in the various SMP Tools,
or through the SMP Gateway web server, to provide additional information
about this point at runtime.
Range: 1 to 63 ASCII characters.

Table B-2 Logic analog input settings

Binary Inputs
The following table presents the settings that are specific to logic binary inputs of the SoftPLC
component.

Setting Description
Name The name of the logic binary input point, which must be unique within the
SoftPLC component. This name is preceded by the Device Prefix, as
specified in the general settings. The device prefix, coupled with the name,
ensures that every point managed by the system has a unique name.
The following characters cannot be used as part of the name: the comma (,),
the quotation mark ("), the semicolon (;) and the grave accent (`).
Range: 1 to 39 ASCII characters (including the prefix).

Symbol The name of the logic binary input point, as it will be used in the CoDeSys
application code.
If no Symbol is specified, the Name setting will be used instead, unless it
contains invalid characters per CoDeSys syntax rules: if this is the case, the
Symbol setting becomes mandatory.
Only the following characters are allowed as part of the symbol: A-Z, a-z,
0-9, and the underscore (‘_’); however, consecutive underscores are not
allowed.
Range: 0 to 31 ASCII characters.

Disabled A checkmark indicates that this point is ignored by the SoftPLC component.
Range: checkmark / no checkmark
Default value: no checkmark

On-Delay. Specify how long, in milliseconds, the point must keep its “on” state,
following a low-to-high transition, for the corresponding transition to be
considered valid.
Default value: 0 (low-to-high transitions reported immediately)

Off-Delay Specify how long, in milliseconds, the point must keep its “off” state,
following a high-to-low transition, for the corresponding transition to be
considered valid.
Default value: 0 (high-to-low transitions reported immediately)

SMP Gateway SoftPLC Reference Manual • B-3


Setting Description
Description An optional point description, which is displayed in the various SMP Tools,
or through the SMP Gateway web server, to provide additional information
about this point at runtime.
Range: 1 to 63 ASCII characters.

Table B-3 Logic binary input settings

Analog Outputs
The following table presents the settings that are specific to logic analog outputs of the SoftPLC
component.

Setting Description
Name The name of the logic analog output point, which must be unique within the
SoftPLC component. This name is preceded by the Device Prefix, as
specified in the general settings. The device prefix, coupled with the name,
ensures that every point managed by the system has a unique name.
The following characters cannot be used as part of the name: the comma (,),
the quotation mark ("), the semicolon (;) and the grave accent (`).
Range: 1 to 39 ASCII characters (including the prefix).

Symbol The name of the logic analog output point, as it will be used in the CoDeSys
application code.
If no Symbol is specified, the Name setting will be used instead, unless it
contains invalid characters per CoDeSys syntax rules: if this is the case, the
Symbol setting becomes mandatory.
Only the following characters are allowed as part of the symbol: A-Z, a-z,
0-9, and the underscore (‘_’); however, consecutive underscores are not
allowed.
Range: 0 to 31 ASCII characters.

Disabled A checkmark indicates that the point is ignored by the SoftPLC component.
Range: checkmark / no checkmark
Default value: no checkmark

Scale Scaling factor used to convert 32-bit values (raw) to significant engineering
units (floating point) and vice versa. The conversion depends on the format
of the value, as provided by the parent function. The following equation is
used:
Floating-point value = (raw value * scale) + offset
Range: –3.4E38 to 3.4E38, not 0.0
Default value: 1.0

Offset Offset value used to convert 32-bit values (raw) to significant engineering
units (floating point) and vice versa. See the Scale setting above.
Range: –3.4E38 to 3.4E38
Default value: 0.0

B-4 Appendix B - CoDeSys (SoftPLC) Master Component Reference


Setting Description
SMP Deadband Only floating-point value changes greater than the deadband value are
reported, unless the value itself is smaller than the deadband. This ensures
that small variations around 0 are reported so that, for example, reported
values do not remain fixed at .01 when they are, in fact, 0. A value of 0 for
this setting implies that all variations, no matter how small, are reported.
Range: 0.0 to 3.4E38
Default value: 0.0

Units Units that are displayed with this point’s values in the various SMP Tools, or
through the SMP Gateway web server.
Allowed values: As shown in the drop-down list
Default value: ** Undefined **

Description An optional point description, which is displayed in the various SMP Tools,
or through the SMP Gateway web server, to provide additional information
about this point at runtime.
Range: 1 to 63 ASCII characters.

Table B-4 Logic analog output settings

Binary Outputs
The following table presents the settings that are specific to logic binary inputs of the SoftPLC
component.

Setting Description
Name The name of the logic binary output point, which must be unique within the
SoftPLC component. This name is preceded by the Device Prefix, as
specified in the general settings. The device prefix, coupled with the name,
ensures that every point managed by the system has a unique name.
The following characters cannot be used as part of the name: the comma (,),
the quotation mark ("), the semicolon (;) and the grave accent (`).
Range: 1 to 39 ASCII characters (including the prefix).

Symbol The name of the logic binary output point, as it will be used in the CoDeSys
application code.
If no Symbol is specified, the Name setting will be used instead, unless it
contains invalid characters per CoDeSys syntax rules: if this is the case, the
Symbol setting becomes mandatory.
Only the following characters are allowed as part of the symbol: A-Z, a-z,
0-9, and the underscore (‘_’); however, consecutive underscores are not
allowed.
Range: 0 to 31 ASCII characters.

Disabled A checkmark indicates that this point is ignored by the SoftPLC component.
Range: checkmark / no checkmark
Default value: no checkmark

SMP Gateway SoftPLC Reference Manual • B-5


Setting Description
Open/Close Allowed A checkmark indicates that open/close control operations can be performed
on this point.
Range: checkmark / no checkmark
Default value: no checkmark

Pulse Allowed A checkmark indicates that pulse control operations can be performed on this
point.
Range: checkmark / no checkmark
Default value: no checkmark

Repeat Count Allowed A checkmark indicates that open/close control operations can be performed
on this point.
Range: checkmark / no checkmark
Default value: no checkmark

On-Delay. Specify how long, in milliseconds, the point must keep its “on” state,
following a low-to-high transition, for the corresponding transition to be
considered valid.
Default value: 0 (low-to-high transitions reported immediately)

Off-Delay Specify how long, in milliseconds, the point must keep its “off” state,
following a high-to-low transition, for the corresponding transition to be
considered valid.
Default value: 0 (high-to-low transitions reported immediately)

Description An optional point description, which is displayed in the various SMP Tools,
or through the SMP Gateway web server, to provide additional information
about this point at runtime.
Range: 1 to 63 ASCII characters.

Table B-5 Logic binary input settings

Subscribed Point Settings


Subscribed data points are existing physical points created by other SMP Gateway components
and that are used by the SoftPLC application.
You subscribe the SoftPLC component to these data points by defining them in the Subscribed
Point sub-branches; subscription settings are exported in the same PLCopenXML file as for logic
data points.
Although subscribed data points are defined by point type, the settings are the same for all points,
are presented in the following table:

Setting Description
Name The name of the subscribed data point, including its corresponding Device
Prefix. This point must either be an SMP Gateway system data points, or a
physical data points produced by a master or system component.
Range: 1 to 39 ASCII characters (including the prefix).

B-6 Appendix B - CoDeSys (SoftPLC) Master Component Reference


Setting Description
Symbol The name of the subscribed data point, as it will be used in the CoDeSys
application code.
If no Symbol is specified, the Name setting will be used instead, unless it
contains invalid characters per CoDeSys syntax rules: if this is the case, the
Symbol setting becomes mandatory.
Only the following characters are allowed as part of the symbol: A-Z, a-z,
0-9, and the underscore (‘_’); however, consecutive underscores are not
allowed.
Range: 0 to 31 ASCII characters.

Disabled A checkmark indicates that this point is ignored by the SoftPLC component.
Range: checkmark / no checkmark
Default value: no checkmark

Table B-6 Subscribed data point settings

SMP Gateway SoftPLC Reference Manual • B-7

Das könnte Ihnen auch gefallen