01 Modicon m218 Logic Controller Programming Guide
01 Modicon m218 Logic Controller Programming Guide
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or
technical characteristics of the performance of the products contained herein. This
documentation is not intended as a substitute for and is not to be used for
determining suitability or reliability of these products for specific user applications. It
is the duty of any such user or integrator to perform the appropriate and complete
risk analysis, evaluation and testing of the products with respect to the relevant
specific application or use thereof. Neither Schneider Electric nor any of its affiliates
or subsidiaries shall be responsible or liable for misuse of the information contained
herein. If you have any suggestions for improvements or amendments or have found
errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic
or mechanical, including photocopying, without express written permission of
Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when
installing and using this product. For reasons of safety and to help ensure
compliance with documented system data, only the manufacturer should perform
repairs to components.
When devices are used for applications with technical safety requirements, the
relevant instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware
products may result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2010 Schneider Electric. All rights reserved.
2 EIO0000000827 11/2010
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 About the Modicon M218 Logic Controller . . . . . . . . . . 13
Modicon M218 Logic Controller Devices Overview. . . . . . . . . . . . . . . . . . 13
Chapter 2 How to Configure the Controller . . . . . . . . . . . . . . . . . . . 15
How to Configure the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 3 Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 4 Supported Standard Data Types . . . . . . . . . . . . . . . . . . . 21
Supported Standard Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 5 Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
RAM Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Relocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Chapter 6 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Maximum Number of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Task Configuration Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Task Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
System and Task Watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Task Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Default Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 7 Controller States and Behaviors . . . . . . . . . . . . . . . . . . . 45
7.1 Controller State Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Controller State Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2 Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Controller States Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.3 State Transitions and System Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Controller States and Output Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Commanding State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Error Detection, Types, and Management . . . . . . . . . . . . . . . . . . . . . . . . 63
Remanent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
EIO0000000827 11/2010 3
Chapter 8 Controller Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Controller Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Managing the M218 Controller Applications . . . . . . . . . . . . . . . . . . . . . . 69
M218 Controller Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
M218 Controller Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Chapter 9 M218 Embedded Functions . . . . . . . . . . . . . . . . . . . . . . . 73
I/O Embedded Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
HSC Embedded Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
PTO_PWM Embedded Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Analog I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Chapter 10 Expansion Modules Configuration. . . . . . . . . . . . . . . . . . 89
Adding Expansion Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
TM2DMM16DRTN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Chapter 11 Modicon M218 Logic Controller Serial Line
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Serial Lines Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
M218 Serial Line Protocol Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
ASCII Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
SoMachine Network Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Modbus Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Chapter 12 M218 Ethernet Configuration . . . . . . . . . . . . . . . . . . . . . . 111
Ethernet Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
IP Address Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Modbus TCP Server/Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Chapter 13 Connecting the Modicon M218 Logic Controller to a PC 123
Connecting the Controller to a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Chapter 14 Upgrading an M218 Firmware . . . . . . . . . . . . . . . . . . . . . 125
Upgrading Through USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Launching the Exec Loader Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Step 1 - Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Step 2 - Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Step 3 - File and Device Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Step 4 - Transfer Progress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Chapter 15 Modicon M218 Logic Controller - Troubleshooting and
FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Appendix A Function and Function Block Representation . . . . . . . . 147
Differences Between a Function and a Function Block . . . . . . . . . . . . . . 148
How to Use a Function or a Function Block in IL Language . . . . . . . . . . 149
How to Use a Function or a Function Block in ST Language . . . . . . . . . 152
4 EIO0000000827 11/2010
Appendix B Functions to get/set serial line configuration in user
program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
GetSerialConf: Get the Serial Line Configuration . . . . . . . . . . . . . . . . . . . 156
SetSerialConf: Change the Serial Line Configuration . . . . . . . . . . . . . . . . 157
SERIAL_CONF: Structure of the Serial Line Configuration Data Type. . . 159
Appendix C Controller Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Processing Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
EIO0000000827 11/2010 5
6 EIO0000000827 11/2010
Safety Information
§
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with
the device before trying to install, operate, or maintain it. The following special
messages may appear throughout this documentation or on the equipment to warn
of potential hazards or to call attention to information that clarifies or simplifies a
procedure.
EIO0000000827 11/2010 7
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by
qualified personnel. No responsibility is assumed by Schneider Electric for any
consequences arising out of the use of this material.
A qualified person is one who has skills and knowledge related to the construction
and operation of electrical equipment and the installation, and has received safety
training to recognize and avoid the hazards involved.
8 EIO0000000827 11/2010
About the Book
At a Glance
Document Scope
The purpose of this document is to help you to configure your Modicon M218 Logic
Controller.
NOTE: Read and understand this document and all related documents (see page 9)
before installing, operating, or maintaining your Modicon M218 Logic Controller.
The Modicon M218 Logic Controller users should read through the entire document
to understand all features.
Validity Note
This document has been updated with the release of SoMachine V2.0.
Related Documents
EIO0000000827 11/2010 9
Modicon M218 Logic Controller Pulse Train Output, Pulse Width EIO0000000839
Modulation M218 PTOPWM Library Guide (ENG);
EIO0000000840 (CHS)
PLCCommunication Library Guide EIO0000000361(ENG)
;
EIO0000000746(CHS)
You can download these technical publications and other technical information from
our website at www.schneider-electric.com.
WARNING
LOSS OF CONTROL
The designer of any control scheme must consider the potential failure modes
of control paths and, for certain critical control functions, provide a means to
achieve a safe state during and after a path failure. Examples of critical control
functions are emergency stop and overtravel stop, power outage and restart.
Separate or redundant control paths must be provided for critical control
functions.
System control paths may include communication links. Consideration must be
given to the implications of unanticipated transmission delays or failures of the
link.
Observe all accident prevention regulations and local safety guidelines.1
Each implementation of this equipment must be individually and thoroughly
tested for proper operation before being placed into service.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
1 For additional information, refer to NEMA ICS 1.1 (latest edition), "Safety
Guidelines for the Application, Installation, and Maintenance of Solid State Control"
and to NEMA ICS 7.1 (latest edition), "Safety Standards for Construction and Guide
for Selection, Installation and Operation of Adjustable-Speed Drive Systems" or their
equivalent governing your particular location.
10 EIO0000000827 11/2010
WARNING
UNINTENDED EQUIPMENT OPERATION
Only use software approved by Schneider Electric for use with this equipment.
Update your application program every time you change the physical hardware
configuration.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
User Comments
We welcome your comments about this document. You can reach us by e-mail at
techcomm@schneider-electric.com.
EIO0000000827 11/2010 11
12 EIO0000000827 11/2010
M218 - About the Modicon M218 Logic Controller
EIO0000000827 11/2010
Overview
The Schneider Electric Modicon M218 Logic Controller has a variety of powerful
features. This Controller can service a wide range of applications.
Key Features
The Modicon M218 Logic Controller is supported and programmed with the
SoMachine Programming Software, which provides the following IEC61131-3
programming languages:
IL: Instruction List
ST: Structured Text
FBD: Function Block Diagram
SFC: Sequential Function Chart
LD: Ladder Diagram
CFC: Continuous Function Chart
The Modicon M218 Logic Controller can manage up to 7 tasks (1 MAST task and up
to 6 other tasks).
The power supply of Modicon M218 Logic Controller is 100...240 Vac.
The Modicon M218 Logic Controller is integrated with 2 Serial Links:
SL1:
RJ45 connector
Non-isolated RS485
Protocol: Mater/Slave Modbus ASCII/RTU, ASCII, or SoMachine Protocol
SL2:
Screw terminal block connector
Non-isolated RS485
Protocol: Mater/Slave Modbus ASCII/RTU, or ASCII
EIO0000000827 11/2010 13
M218 - About the Modicon M218 Logic Controller
Reference Digital Input Digital Output Analog Input Analog Output Ethernet port
TM218LDA24DRN 14 digital inputs 10 relay outputs No No No
including
2 reduced fast
inputs(1)
TM218LDA24DRHN 14 digital inputs, 10 relay outputs No No No
including 4 fast
inputs(2)
TM218LDAE24DRHN 14 digital inputs, 10 relay outputs No No 1 Ethernet
including 4 fast port
inputs(2)
TM218LDA40DRPHN 24 digital inputs, 12 relay outputs No No No
including 4 fast and 4 transistor
inputs(2) fast outputs(3)
TM218LDAE40DRPHN 24 digital inputs, 12 relay outputs No No 1 Ethernet
including 4 fast and 4 transistor port
inputs(2) fast outputs(3)
TM218LDA40DR2HN 24 digital inputs, 16 relay outputs No 2 analog No
including 4 fast outputs
inputs(2)
TM218LDA40DR4PHN 24 digital inputs, 12 relay outputs 2 analog 2 analog No
including 4 fast and 4 transistor inputs outputs
inputs(2) fast outputs(3)
(1) The reduced fast inputs have maximum frequency of 10KHz. They can be used
either as regular inputs or as reduced fast inputs for counting or event functions
(2) The fast inputs can be used either as regular inputs or as fast inputs for counting
or event functions.
(3) The fast outputs can be used either as regular outputs or as fast outputs for PTO,
PWM, Frequency Generator functions, or reflex output for HSC.
14 EIO0000000827 11/2010
How to Configure the Controller
EIO0000000827 11/2010
2
How to Configure the Controller
Introduction
Before configuring the controller, you must first create a new machine in the
SoMachine software (see SoMachine, Programming Guide).
EIO0000000827 11/2010 15
How to Configure the Controller
Element Description
1 Serial Line 1 port manager (SoMachine_Network_Manager by default)
2 Ethernet port manager
NOTE: Only available on TM218LDAE24DRHN and TM218LDAE40DRPHN.
3 Expansion modules
4 Serial Line 2 port manager (Modbus_Manager by default)
5 Access to the controller configuration screen (double click the controller)
Step Action
1 Select the Configuration tab.
2 Double click the controller.
In the left hand side, entries and sub-entries let you access the different item
configuration windows:
16 EIO0000000827 11/2010
How to Configure the Controller
Device Tree
Many functions of the Configuration tab are also accessible from the Program tab.
In the Program tab, the device tree describes the hardware configuration (for
example, the following device tree is the default one when the controller is added):
EIO0000000827 11/2010 17
How to Configure the Controller
Item Description
PLC Logic This part shows everything related to the application:
Tasks configuration
Programming
Library manager
POUs
Relocation Table
Embedded Functions This representation shows the Embedded Functions of the M218.
NOTE: PTO_PWM only available on TM218LDA40DRPHN,
TM218LDAE40DRPHN and TM218LDA40DR4PHN.
Serial Line 1 These are the embedded communications.
Serial Line 2 NOTE: Ethernet is available only on TM218LDAE24DRHN and
Ethernet TM218LDAE40DRPHN.
18 EIO0000000827 11/2010
Libraries
EIO0000000827 11/2010
Libraries
3
Libraries
Introduction
Libraries provide functions, function blocks, data types and global variables that can
be used to develop your project.
The Library Manager of SoMachine provides information about the libraries
included in your project and allows you to install new ones. Refer to CoDeSys online
help for more information on the Library Manager.
EIO0000000827 11/2010 19
Libraries
20 EIO0000000827 11/2010
Supported Standard Data Types
EIO0000000827 11/2010
4
Supported Standard Data Types
EIO0000000827 11/2010 21
Supported Standard Data Types
22 EIO0000000827 11/2010
Memory Mapping
EIO0000000827 11/2010
Memory Mapping
5
Introduction
This chapter describes the memory maps and sizes of the different memory areas
in the Modicon M218 Logic Controller. These memory areas are used to store user
program logic, data and the programming libraries.
EIO0000000827 11/2010 23
Memory Mapping
Introduction
This section describes the RAM (Random Access Memory) size for different areas
of the Modicon M218 Logic Controller.
Memory Mapping
The RAM size is 2 Mbytes composed of 2 areas:
1024 kbytes System Area for Operating System memory
1024 kbytes Customer Area for dedicated application and configuration data.
Memory containing Persistent and Retain variables is preserved and protected. The
Persistent and Retain variables will be retained when the controller is powered off.
This table shows the different types of memory areas with their sizes in the Modicon
M218 Logic Controller memory:
24 EIO0000000827 11/2010
Memory Mapping
NOTE:
(1) The memory size for variables, application,libraries and symbols are
customized depending on the usage. It is recommonded that variables,
application and libraries take up to 80% of customer area, and symbols takes
20% of the customer area.
(2) Not all the 744 bytes are available for the customer application because some
libraries may use Retain Variables.
System Variables
For more information on System Variables, refer to the M218 PLCSystem Library
Guide.
Library Sizes
EIO0000000827 11/2010 25
Memory Mapping
Relocation Table
Introduction
The Relocation Table allows you to organize data to optimize communication
between the controller and other equipment by regrouping non-contiguous data into
a contiguous table of registers.
NOTE: A Relocation Table is considered as an object. Only one Relocation Table
object can be added to a controller.
Register Description
60200...61999 Dynamic Memory Area: Read Relocation Table
62200...63999 Dynamic Memory Area: Write Relocation Table
Step Action
1 Select the Program tab:
26 EIO0000000827 11/2010
Memory Mapping
Step Action
2 In the Device tree of the Devices window, right-click the Application node and
click Add Object... in the contextual menu:
3 Select Relocation Table in the list and click the Open button:
EIO0000000827 11/2010 27
Memory Mapping
28 EIO0000000827 11/2010
Memory Mapping
Erase Empty Removes all the elements of the list for which the "Variable"
Item column is empty.
- ID Automatic incremental integer (not editable)
- Variable The name or the full path of a variable (editable)
- Address The address of the system area where the variable is stored (not
editable).
- Length Variable length in word
- Validity Indicates if the entered variable is valid (not editable).
NOTE: If the entered variable is undefined, then the content of the cell is displayed
in red, the related Validity cell is False, and Address is set to -1.
EIO0000000827 11/2010 29
Memory Mapping
30 EIO0000000827 11/2010
Tasks
EIO0000000827 11/2010
Tasks
6
Introduction
The Task Configuration node in the SoMachine device tree allows you to define one
or several tasks to control the execution of your application program.
The task types available are:
Cyclic
Freewheeling
Event
External Event
This chapter begins with an explanation of these task types and provides information
regarding the maximum number of tasks, the default task configuration, and task
prioritization. In addition, this chapter introduces the system and task watchdog
functions and explains their relationship to task execution.
EIO0000000827 11/2010 31
Tasks
NOTE: The total number of Freewheeling task, Cyclic task and Event task should
not be greater than 3.
32 EIO0000000827 11/2010
Tasks
Step Action
1 Click on the Program menu:
2 Double click on the task that you want to configure in the device tree of the
Device window:
NOTE: For more information of adding a task, refer to the online help SoMachine
Tutorials.
EIO0000000827 11/2010 33
Tasks
34 EIO0000000827 11/2010
Tasks
The following table describes the fields of the Task Configuration screen:
NOTE: Do not assign tasks with the same priority. If there are yet other tasks that attempt
to preempt tasks with the same priority, the result could be indeterminate and
unpredictable. For more information, refer to Task Priorities (see page 41).
Type 4 types of task are available:
Cyclic (see page 37)
Freewheeling (see page 38)
Event (see page 38)
External event (see page 39)
EIO0000000827 11/2010 35
Tasks
POUs are executed in the order shown in the list below. To rearrange the POUs in the list,
click on Move Up or Move Down:
36 EIO0000000827 11/2010
Tasks
Task Types
Introduction
The following section describes the various task types available for your program,
along with a description of the task type characteristics.
Cyclic Task
A Cyclic task is assigned a fixed duration using the Interval setting in the Type
section of Configuration sub-tab for that task. Each Cyclic task type executes as
follows:
1. Read Inputs: The input states are written to the %I input memory variable and
other system operations are executed.
2. Task Processing: The user code (POU, etc.) defined in the task is processed.
The %Q output memory variable is updated according to your application
program instructions but not written to the physical outputs during this operation.
3. Write Outputs: The %Q output memory variable is modified with any output
forcing that has been defined, however, the writing of the physical outputs
depends upon the type of output and instructions used.
For more information on defining the Bus cycle task refer to Modicon M218 Logic
Controller Settings (see page 70) and CoDeSys online help.
For more information on I/O behavior, refer to Controller States Detailed
Description (see page 51).
NOTE: Expansion I/Os are always physically updated by the MAST
(see page 175)task.
4. Remaining Interval time: The controller OS carries out system processing and
any other lower priority tasks.
NOTE: If you define too short a period for a cyclic task, it will repeat immediately
after the write of the outputs and without executing other lower priority tasks or any
system processing. This will affect the execution of all tasks and cause the controller
to exceed the system watchdog limits, generating a system watchdog exception.
EIO0000000827 11/2010 37
Tasks
Freewheeling Task
A Freewheeling task does not have a fixed duration. In Freewheeling mode, each
task scan begins when the previous scan has been completed and after a short
period of system processing. Each Freewheeling task type executes as follows:
1. Read Inputs: The input states are written to the %I input memory variable and
other system operations are executed.
2. Task Processing: The user code (POU, etc.) defined in the task is processed.
The %Q output memory variable is updated according to your application
program instructions but not written to the physical outputs during this operation.
3. Write Outputs: The %Q output memory variable is modified with any output
forcing that has been defined, however, the writing of the physical outputs
depends upon the type of output and instructions used.
For more information on defining the Bus cycle task refer to Settings
(see page 70) and CoDeSys online help.
For more information on I/O behavior, refer to Controller States Detailed
Description (see page 51).
4. System Processing: The controller OS carries out system processing and any
other lower priority tasks. The length of the system processing period is set to
30 % of the total duration of the 3 previous operations ( 4 = 30 % x (1 + 2 + 3)).
In any case, the system processing period won't be lower than 3 ms.
Event Task
This type of task is event-driven and is initiated by a program variable. It starts at the
rising edge of the boolean variable associated to the trigger event unless preempted
by a higher priority task. In that case, the Event task will start as dictated by the task
priority assignments.
For example, if you have defined a variable called my_Var and would like to assign
it to an Event, select the Event type on the Configuration sub-tab and click on the
Input Assistant button to the right of the Event name field. This will cause
the Input Assistant dialog box to appear. In the Input Assistant dialog box, you
navigate the tree to find and assign the my_Var variable.
38 EIO0000000827 11/2010
Tasks
EIO0000000827 11/2010 39
Tasks
Introduction
Two types of watchdog functionality are implemented for the Modicon M218 Logic
Controller. These are:
System Watchdogs: These watchdogs are defined in and managed by the
controller OS (firmware). These are not configurable by the user.
Task Watchdogs: Optional watchdogs that can be defined for each task. These
are managed by your application program and are configurable in SoMachine.
System Watchdogs
Two system watchdogs are defined for the Modicon M218 Logic Controller. They are
managed by the controller OS (firmware) and are therefore sometimes referred to
as hardware watchdogs in the SoMachine online help. When one of the system
watchdogs exceeds its threshold conditions, an error is detected.
The threshold conditions for the 2 system watchdogs are defined as follows:
If all of the tasks require more than 80 % of the processor resources for more than
3 seconds, a system error is detected. The controller enters the EMPTY state.
If the lowest priority task of the system is not executed during an interval of 20
seconds, a system error is detected. The controller responds with an automatic
reboot into the EMPTY state.
NOTE: System watchdogs are not configurable by the user.
Task Watchdogs
SoMachine allows you to configure an optional task watchdog for every task defined
in your application program. (Task watchdogs are sometimes also referred to as
software watchdogs or control timers in the SoMachine online help). When one of
your defined task watchdogs reaches its threshold condition, an application error is
detected and the controller enters the HALT state.
When defining a task watchdog, the following options are available:
Time: This defines the allowable maximum execution time for a task. When a
task takes longer than this the controller will report a task watchdog exception.
Sensitivity: The sensitivity field defines the number of task watchdog exceptions
that must occur before the controller detects an application error.
A task watchdog is configured on the Configuration sub-tab of the Task
Configuration tab for the individual task. To access this tab, double-click on the task
in the device tree.
NOTE: For more details on watchdogs, refer to the CoDeSys online help.
40 EIO0000000827 11/2010
Tasks
Task Priorities
Introduction
You can configure the priority of each task between 0 and 31 (0 is the highest
priority, 31 is the lowest). Each task must have a unique priority. If you assign the
same priority to more than one task, execution for those tasks is indeterminate and
unpredictable, which may lead to unintended consequences.
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not assign the same priority to different tasks.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
EIO0000000827 11/2010 41
Tasks
NOTE: If the same input is used in different tasks the input image may change
during the task cycle of the lower priority task.
To improve the likelihood of proper output behavior during multitasking, an error is
detected if outputs in the same byte are used in different tasks.
WARNING
UNINTENDED EQUIPMENT OPERATION
Map your inputs so that tasks do not alter the input images in an unexpected
manner.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
42 EIO0000000827 11/2010
Tasks
EIO0000000827 11/2010 43
Tasks
44 EIO0000000827 11/2010
Controller States and Behaviors
EIO0000000827 11/2010
7
Introduction
This chapter provides you with information on controller states, state transitions, and
behaviors in response to system events. It begins with a detailed controller state
diagram and a description of each state. It then defines the relationship of output
states to controller states before explaining the commands and events that result in
state transitions. It concludes with information about Remanent variables and the
effect of SoMachine task programming options on the behavior of your system.
EIO0000000827 11/2010 45
Controller States and Behaviors
46 EIO0000000827 11/2010
Controller States and Behaviors
EIO0000000827 11/2010 47
Controller States and Behaviors
Legend:
Controller states are indicated in ALL-CAPS BOLD
User and application commands are indicated in Bold
System events are indicated in Italics
Decisions, decision results and general information are indicated in normal text
(1)
For details on STOPPED to RUNNING state transition, refer to Run Command
(see page 58).
(2)
For details on RUNNING to STOPPED state transition, refer to Stop Command
(see page 58).
Note 1
The Power Cycle (Power Interruption followed by a Power ON) deletes all output
forcing settings. Refer to Controller State and Output Behavior (see page 56) for
further details.
Note 2
The boot process can take up to 10 seconds under normal conditions. The outputs
will assume their initialization states.
Note 3
In some cases, when a system error is detected, it will cause the controller to
automatically reboot into the EMPTY state as if no Boot application were present in
the Flash memory. However, the Boot application is not actually deleted from the
Flash memory.
Note 4
The application is loaded into RAM after verification of a valid Boot application.
Note 5
When a power interruption occurs, the controller continues in the RUNNING state
for at least 4 ms before shutting down. If you have configured and provide power to
the Run/Stop input from the same source as the controller, the loss of power to this
input will be detected immediately, and the controller will behave as if a STOP
command was received. Therefore, if you provide power to the controller and the
Run/Stop input from the same source, your controller will normally reboot into the
STOPPED state after a power interruption.
48 EIO0000000827 11/2010
Controller States and Behaviors
Note 6
During a successful application download the following events occur:
The application is loaded directly into RAM.
By default, the Boot application is created and saved into the Flash memory.
Note 7
The default behavior after downloading an application program is for the controller
to enter the STOPPED state irrespective of the Run/Stop input setting or the last
controller state before the download.
However, there are two important considerations in this regard:
Online Change: An online change (partial download) initiated while the controller
is in the RUNNING state returns the controller to the RUNNING state if successful
and provided the Run/Stop input is configured and set to Run. Before using the
Login with online change option, test the changes to your application program
in a virtual or non-production environment and confirm that the controller and
attached equipment assume their expected conditions in the RUNNING state.
WARNING
UNINTENDED EQUIPMENT OPERATION
Always verify that online changes to a RUNNING application program operate
as expected before downloading them to controllers.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
NOTE: Online changes to your program are not automatically written to the Boot
application, and will be overwritten by the existing Boot application at the next
reboot. If you wish your changes to persist through a reboot, manually update the
Boot application by selecting Create boot application in the Online menu (the
controller must be in the STOPPED state to achieve this operation).
Note 8
The SoMachine software platform allows many powerful options for managing task
execution and output conditions while the controller is in the STOPPED or HALT
states. Refer to Controller States Description (see page 51) for further details.
Note 9
To exit the HALT state it is necessary to issue one of the Reset commands (Reset
Warm, Reset Cold, Reset Origin), download an application or cycle power.
EIO0000000827 11/2010 49
Controller States and Behaviors
Note 10
The RUNNING state has two exceptional conditions.
They are:
RUNNING with External Error: This exceptional condition is indicated by the MS
Status LED, which displays solid green with 1 red flash. You may exit this state
by clearing the external error. No controller commands are required.
RUNNING with Breakpoint: This exceptional condition is indicated by the MS
Status LED, which displays 3 green flashes. Refer to Controller States
Description (see page 51) for further details.
Note 11
The controller has a Run/Stop Switch to toggle the PLC status from RUN to STOP
or from STOP to RUN. If the switch is set to Stop, the controller will be stopped
irrespective of the Run/Stop input setting.
50 EIO0000000827 11/2010
Controller States and Behaviors
Introduction
This section provides a detailed description of the controller states.
WARNING
UNINTENDED EQUIPMENT OPERATION
Never assume that your controller is in a certain controller state before
commanding a change of state, configuring your controller options, uploading a
program, or modifying the physical configuration of the controller and its
connected equipment.
Before performing any of these operations, consider the effect on all connected
equipment.
Before acting on a controller, always positively confirm the controller state by
viewing its LEDs, confirming the condition of the Run/Stop input, checking for
the presence of output forcing, and reviewing the controller status information
via SoMachine (1).
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
(1) Note: The controller states can be read in the PLC_R.i_wStatus system variable
of the M218 PLCSystem library (see Modicon M218 Logic Controller, System
Functions and Variables, M218 PLCSystem Library Guide)
EIO0000000827 11/2010 51
Controller States and Behaviors
52 EIO0000000827 11/2010
Controller States and Behaviors
WARNING
UNINTENDED EQUIPMENT OPERATION
Design and program your system so that controlled equipment assumes a
safe state when the controller enters fallback mode if you use outputs Q0,
Q1, Q2, or Q3 for PTO, PWM, FG, or HSC operation.
Failure to follow these instructions can result in death, serious injury,
or equipment damage.
EIO0000000827 11/2010 53
Controller States and Behaviors
Task and I/O Behavior When Update IO While In Stop Is Not Selected
When the Update IO while in stop setting is not selected, the controller sets the
I/O to either the Keep current values or Set all outputs to default condition (as
adjusted for output forcing if used). After this, the following becomes true:
The Read Inputs operation ceases. The %I input memory variable is frozen at
its last values.
The Task Processing operation is not executed.
The Write Outputs operation ceases. The %Q output memory variables can be
updated via the Ethernet, Serial, and USB connections. However, the physical
outputs are unaffected and retain the state specified by the configuration
options.
NOTE: if Q0, Q1, Q2 or Q3 outputs are configured for PTO, PWM, FG, or HSC
operation, they fallback to a value of 0 irrespective of the configured fallback setting.
For PTO operation, outputs Q0, Q1, Q2, and Q3 execute a fast stop deceleration.
Outputs configured for PWM, FG, and HSC go immediately to 0.
WARNING
UNINTENDED EQUIPMENT OPERATION
Design and program your system so that controlled equipment assumes a
safe state when the controller enters fallback mode if you use outputs Q0,
Q1, Q2, or Q3 for PTO, PWM, FG, or HSC operation.
Failure to follow these instructions can result in death, serious injury,
or equipment damage.
54 EIO0000000827 11/2010
Controller States and Behaviors
Overview
This section begins with an explanation of the output states possible for the
controller. It then presents the system commands used to transition between
controller states and the system events that can also affect these states. It
concludes with an explanation of the Remanent variables, and the circumstances
under which different variables and data types are retained through state transitions.
EIO0000000827 11/2010 55
Controller States and Behaviors
Introduction
The Modicon M218 Logic Controller defines output behavior in response to
commands and system events in a way that allows for greater flexibility. An
understanding of this behavior is necessary before discussing the commands and
events that affect controller states. For example, typical controllers define only two
options for output behavior in stop: fallback to default value or keep current value.
The possible output behaviors and the controller states to which they apply are:
Managed by Application Program
Keep Current Values
Set All Outputs to Default
Initialization Values
Output Forcing
56 EIO0000000827 11/2010
Controller States and Behaviors
This output behavior applies in the STOPPED and HALT controller states. Outputs
are set to and maintained in their current state, although the details of the output
behavior varies greatly depending on the setting of the Update IO while in stop
option and the actions commanded via configured fieldbuses. Refer to Controller
States Description (see page 51) for more details on these variations.
Initialization Values
This output state applies in the BOOTING, EMPTY (following power cycle with no
boot application or after the detection of a system error), and INVALID_OS states.
In the initialization state, analog, transistor and relay outputs assume the following
values:
For an analog output : Z (High Impedance)
For a fast transistor output: Z (High Impedance)
For a regular transistor output: 0 Vdc
For a relay output: Open
Output Forcing
The controller allows you to force the state of selected outputs to a defined value for
the purposes of system testing and commissioning. Output forcing overrides all
other commands to an output irrespective of task programming. You are only able
to force the value of an output while your controller is connected to SoMachine. To
do so you use the Force Values command in the Debug/Watch menu. When you
logout of SoMachine when output forcing has been defined, you are presented with
the option to retain output forcing settings. If you select this option, the output forcing
continues to control the state of the selected outputs until you download an
application or use one of the Reset commands.
EIO0000000827 11/2010 57
Controller States and Behaviors
Run Command
Effect: Commands a transition to the RUNNING controller state.
Starting Conditions: BOOTING or STOPPED state.
Methods for Issuing a Run Command:
Run/Stop Input: If configured, command a rising edge to the Run/Stop input. The
Run/Stop input must be 1 for all of the subsequent options to be effective. Refer
to Run/Stop Input (see page 77) for more information.
Run/Stop Switch: manually set the switch to RUN.
With SoMachine software:
Click on the menu Online →Start
Click on the start icon which is symbolized by an arrow in the icon bar
Stop Command
Effect: Commands a transition to the STOPPED controller state.
Starting Conditions: BOOTING, EMPTY or RUNNING state.
Methods for Issuing a Stop Command:
Run/Stop Input: If configured, command a value of 0 to the Run/Stop input. Refer
to Run/Stop Input (see page 77) for more information.
Run/Stop Switch: manually set the switch to STOP.
With SoMachine software:
Click on the menu Online →Stop
Click on the stop icon which is symbolized by an square in the icon bar
58 EIO0000000827 11/2010
Controller States and Behaviors
Login with online change option: An online change (partial download) initiated
while the controller is in the STOPPED state returns the controller to the
STOPPED state if successful.
Download Command: implicitly sets the controller into the STOPPED state.
The controller is restarted into the STOPPED state automatically under certain
conditions.
Refer to Controller State Diagram (see page 47) for further details.
Reset Warm
Effect: Resets all variables, except for the remanent variables, to their default
values. Places the controller into the STOPPED state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Warm Command:
SoMachine Online Menu: Select the Reset warm command.
By an internal call by the application or an external call via Modbus request using
the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system
variables of the M218 PLCSystem Library (see Modicon M218 Logic Controller,
System Functions and Variables, M218 PLCSystem Library Guide).
Effects of the Reset Warm Command:
1. The application stops.
2. Forcing is erased.
3. Diagnostic indications for detected errors are reset.
4. The values of the retain variables are maintained.
5. The values of the retain-persistent variables are maintained.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 500 %MW registers are maintained.
8. The values of %MW500 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and then restarted after the reset is
complete.
10.All I/O are briefly reset to their initialization values and then to their user-
configured default values.
For details on variables, refer to Remanent Variables (see page 65).
Reset Cold
Effect: Resets all variables, except for the retain-persistent type of remanent
variables, to their initialization values. Places the controller into the STOPPED state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
EIO0000000827 11/2010 59
Controller States and Behaviors
Reset Origin
Effect: Resets all variables, including the remanent variables, to their initialization
values. Erases all user files on the controller. Places the controller into the EMPTY
state.
Starting Conditions: RUNNING, STOPPED, or HALT states.
Methods for Issuing a Reset Origin Command:
SoMachine Online Menu: Select the Reset origin command.
Effects of the Reset Origin Command:
1. The application stops.
2. Forcing is erased.
3. The Boot application file is erased.
4. Diagnostic indications for detected errors are reset.
5. The values of the retain variables are reset.
6. The values of the retain-persistent variables are reset.
7. All non-located and non-remanent variables are reset.
8. The values of the first 500 %MW registers are reset to 0.
9. The values of %MW500 to %MW59999 registers are reset to 0.
10.All fieldbus communications are stopped.
11.All I/O are reset to their initialization values.
For details on variables, refer to Remanent Variables (see page 65).
60 EIO0000000827 11/2010
Controller States and Behaviors
Reboot
Effect: Commands a reboot of the controller.
Starting Conditions: Any state.
Methods for Issuing the Reboot Command:
Power cycle.
Effects of the Reboot:
1. The state of the controller depends on a number of conditions:
a. The controller state will be RUNNING if:
- The Reboot was provoked by a power cycle, and
- If configured, the Run/Stop input is set to RUN, and
- Controller state was RUNNING prior to the power cycle.
b. The controller state will be STOPPED if:
- The boot application is different than the application loaded prior to the
reboot, or
- If configured, the Run/Stop input is set to STOP, or
- Controller state was STOPPED prior to a power cycle, or
- The previously saved context is invalid.
c. The controller state will be EMPTY if:
- There is no boot application or the boot application is invalid, or
- The reboot was provoked by a detected System Error.
d. The controller state will be INVALID_OS if there is no valid OS.
2. Forcing is erased.
3. Diagnostic indications for detected errors are reset.
4. The values of the retain variables are restored if saved context is valid.
5. The values of the retain-persistent variables are restored if saved context is valid.
6. All non-located and non-remanent variables are reset to their initialization values.
7. The values of the first 500 %MW registers are restored if saved context is valid.
8. The values of %MW500 to %MW59999 registers are reset to 0.
9. All fieldbus communications are stopped and restarted after the boot application
is loaded successfully.
10.All I/O are reset to their initialization values and then to their user-configured
default values if the controller assumes a STOPPED state after the reboot.
For details on variables, refer to Remanent Variables (see page 65).
NOTE: The Check context test concludes that the context is valid when the
application and the remanent variables are the same as defined in the Boot
application.
NOTE: If you provide power to the Run/Stop input from the same source as the
controller, the loss of power to this input will be detected immediately, and the
controller will behave as if a STOP command was received. Therefore, if you provide
power to the controller and the Run/Stop input from the same source, your controller
will normally reboot into the STOPPED state after a power interruption.
EIO0000000827 11/2010 61
Controller States and Behaviors
NOTE: If you make an online change to your application program while your
controller is in the RUNNING or STOPPED state but do not manually update your
Boot application, the controller will detect a difference in context at the next reboot,
the remanent variables will be reset as per a Reset cold command, and the
controller will enter the STOPPED state.
Download Application
Effect: Loads your application executable into the RAM memory. Optionally, creates
a Boot application in the Flash memory.
Starting Conditions: RUNNING, STOPPED, HALT, and EMPTY states.
Methods for Issuing the Download Application Command:
SoMachine Online Menu: select Download command.
62 EIO0000000827 11/2010
Controller States and Behaviors
The following table describes the types of errors that may be detected:
EIO0000000827 11/2010 63
Controller States and Behaviors
System A system error is detected when the controller enters a condition BOOTING →
Error that cannot be managed during runtime. Most such conditions EMPTY
Detected result from firmware or hardware exceptions, but there are some
cases when incorrect programming can result in the detection of
a system error, for example, when attempting to write to memory
that was reserved during runtime.
Examples:
System (hardware) watchdog overflow
exceeding the defined size of an array
etc.
NOTE: refer to the M218 PLCSystem Library Guide (see Modicon M218 Logic
Controller, System Functions and Variables, M218 PLCSystem Library Guide) for
more detailed information on diagnostics.
64 EIO0000000827 11/2010
Controller States and Behaviors
Remanent Variables
Remanent Variables
Remanent variables can retain their values in the event of power outages, reboots,
resets, and application program downloads. There are multiple types of remanent
variables, declared individually as "retain" or "persistent", or in combination as
"retain-persistent".
NOTE: For this controller, variables declared as persistent have the same behavior
as variables declared as retain-persistent.
The following table describes the behavior of remanent variables in each case:
NOTE: The first 500 %MW are automatically retained and persistent if no variable
is associated to them (their values are kept after a reboot / Reset warm / Reset cold).
The other %MW are managed as VAR.
For example if you have in your program:
VAR myVariable AT %MW0 : WORD; END_VAR
%MW0 will behave like myVariable (not retained and not persistent).
EIO0000000827 11/2010 65
Controller States and Behaviors
66 EIO0000000827 11/2010
Controller Configuration
EIO0000000827 11/2010
Controller Configuration
8
Introduction
This chapter describes how to configure the Modicon M218 Logic Controller.
EIO0000000827 11/2010 67
Controller Configuration
Controller Configuration
The table below describes the tabs of the Controller Configuration Editor screen:
Services Allows configuring on-line services of the controller (RTC, device identification).
Status Displays device-specific status and diagnostic messages.
Information Displays general information on the device (name, description, provider, version,
image).
68 EIO0000000827 11/2010
Controller Configuration
Overview
The figure below show the Applications tab:
This dialog box serves to scan and to remove applications on the Controller.
Element Description
Applications on the Controller List of the names of applications which have been found
on the Controller during the last scan.
Buttons Refresh List The Controller will be scanned for applications, the list
will be updated.
Remove The application currently selected in the list will be
removed from the Controller.
Remove all All applications will be removed from the Controller.
EIO0000000827 11/2010 69
Controller Configuration
Overview
The figure below show the PLC Settings tab:
The following table describes the elements of the PLC Settings Tab:
Element Description
Application for I/O handling By default, set to Application because there is only one application in the
controller.
PLC settings Update IO while in If this option is activated (default), the values of the input channels will be
stop updated when the Controller is stopped.
Behavior for From the selection list choose one of the following options to configure how the
outputs in Stop values at the output channels should be handled in case of Controller stop:
Keep current values: The current values will not be modified.
Set all outputs to default: The default (fallback) values resulting from the
mapping will be assigned.
NOTE: This option is not taken into account for the outputs used by the HSC,
PTO, PWM or Frequency Generator.
Update all If this option is activated, then for all devices of the current Controller
variables in all configuration all I/O variables will get updated in each cycle of the bus cycle
devices task. This corresponds to the option Always update variables, which can be set
separately for each device in the I/O Mapping dialog.
Bus cycle Bus cycle task This configuration setting is the parent for all Bus cycle task parameters used in
options the application device tree.
The selection list offers all tasks currently defined in the Task Configuration of
the active application. The default setting is the MAST task.
NOTE: The selection <unspecified> signifies that the slowest cyclic task
possible is used.
70 EIO0000000827 11/2010
Controller Configuration
Services Tab
The tab Services is divided in two parts:
RTC Configuration
Device Identification
NOTE: To have controller information in this tab, you need to be connected with the
controller.
The following table describes the elements of the Services Tab:
Element Description
RTC PLC time Displays the date/time read from the controller. This read-only
Configuration field is initially empty. To read and display the date/time in the
controller, click on the Read button.
Local time Allows defining a date and a time which are sent to the
controller by a click on the Write button. A message box
informs the user on the success of the command. Local time
fields are initialized with the current settings of the PC.
Synchronize Allows sending directly the current time and date settings of
with local’s the PC. A message box informs the user of the success of the
date/time command.
Device Identification Displays the Firmware version, the Boot Version and the
Coprocessor Version of the selected device if connected.
EIO0000000827 11/2010 71
Controller Configuration
72 EIO0000000827 11/2010
M218 Embedded Functions
EIO0000000827 11/2010
9
Overview
This chapter describes the embedded functions of the Modicon M218 Logic
Controller.
The number of inputs and outputs dedicated to the embedded function depends on
the controller reference (see page 13).
EIO0000000827 11/2010 73
M218 Embedded Functions
Overview
The embedded I/O selection allows configuring the controller inputs.
The following table shows the IO feature of Modicon M218 Logic Controller
Step Description
1 Click on the Configuration menu:
74 EIO0000000827 11/2010
M218 Embedded Functions
Step Description
3 In the Task Pane click on Embedded Functions →IO:
EIO0000000827 11/2010 75
M218 Embedded Functions
NOTE: For more information on the I/O Mapping tab, refer to the CoDeSys online
help .
76 EIO0000000827 11/2010
M218 Embedded Functions
When you click on the IO Summarize button, the IO summary window appears. It
allows to check your configuration I/O mapping:
Configuration Parameters
For each input, you can define:
EIO0000000827 11/2010 77
M218 Embedded Functions
78 EIO0000000827 11/2010
M218 Embedded Functions
Overview
The HSC function can execute fast counts of pulses from sensors, encoders,
switches, etc... that are connected to the dedicated fast inputs
There are 2 types of HSC:
Simple type: a single input counter (see Modicon M218 Logic Controller, High
Speed Counting, M218 HSC Library Guide).
Main type: a counter that uses up to 4 fast inputs and 4 reflex outputs.
(see Modicon M218 Logic Controller, High Speed Counting, M218 HSC Library
Guide)
Step Description
1 Click on the Configuration menu:
EIO0000000827 11/2010 79
M218 Embedded Functions
The following table describes the fields of the HSC configuration window:
Mark Action
1 Select the HSC tab to access each of the HSC Configuration window.
2 Select one of these tabs according to the HSC channel you need to configure.
3 After choosing the type of HSC (Simple or Main) you want, use the field Variable to
change the instance.
4 If the parameters are collapsed, you can expand them by clicking the plus signs.
You then have access to the settings of each parameter.
5 Configuration window where the HSC parameters are determined depending on the
mode used.
6 When you click on the IO Summarize button, the IO summary window appears. It
allows to check your configuration I/O mapping.
For detail information on configuration parameters, refer to M218 HSC choice matrix
(see Modicon M218 Logic Controller, High Speed Counting, M218 HSC Library
Guide).
80 EIO0000000827 11/2010
M218 Embedded Functions
Overview
The PTO embedded function can provide 3 different functions:
PTO The PTO (Pulse Train Output) implements digital technology (see Modicon
M218 Logic Controller, Pulse Train Output, Pulse Width Modulation, M218
PTOPWM Library Guide) that provides precise positioning for open loop control
of motor drives.
PWM The PWM (Pulse Width Modulation) function generates a programmable
square wave signal on a dedicated output (see Modicon M218 Logic Controller,
Pulse Train Output, Pulse Width Modulation, M218 PTOPWM Library Guide) with
adjustable duty cycle and frequency.
FG The FG (Frequency Generator) function generates a square wave signal on
dedicated output (see Modicon M218 Logic Controller, Pulse Train Output, Pulse
Width Modulation, M218 PTOPWM Library Guide) channels with a fixed duty
cycle (50%).
Step Description
1 Click on the Configuration menu:
EIO0000000827 11/2010 81
M218 Embedded Functions
The following table describes the fields of the PTO_PWM configuration window:
Mark Action
1 Select the PTO tab to access each of the PTO_PWM Configuration window.
2 Select one of these tabs according to the PTO_PWM channel you need to
configure.
3 After choosing the type of PTO_PWM (PTO, PWM or Frequency Generator) you
want, use the field Variable to change the instance name.
4 If the parameters are collapsed, you can expand them by clicking the plus signs.
You then have access to the settings of each parameter.
82 EIO0000000827 11/2010
M218 Embedded Functions
Mark Action
5 Configuration window where the embedded function is used for:
a PTO (see Modicon M218 Logic Controller, Pulse Train Output, Pulse Width
Modulation, M218 PTOPWM Library Guide)
a PWM (see Modicon M218 Logic Controller, Pulse Train Output, Pulse Width
Modulation, M218 PTOPWM Library Guide)
a Frequency Generator (see Modicon M218 Logic Controller, Pulse Train
Output, Pulse Width Modulation, M218 PTOPWM Library Guide)
6 When you click on the IO Summarize button, the IO summary window appears. It
allows to check your configuration I/O mapping.
EIO0000000827 11/2010 83
M218 Embedded Functions
Analog I/O
Overview
The following Modicon M218 Logic Controller have embedded analog I/O.
TM218LDA40DR2HN: 2 analog outputs.
TM218LDA40DR4PHN: 2 analog inputs and 2 analog outputs.
Step Action
1 Click on the Program menu.
2 Click on the controller you want, and expand the device tree.
3 Double click on the node Analog to open the configuration window.
84 EIO0000000827 11/2010
M218 Embedded Functions
NOTE: For more information on the Analog I/O Mapping tab, refer to the online
help CoDeSys part.
EIO0000000827 11/2010 85
M218 Embedded Functions
Parameters Configuration
You can define the parameters as the following table:
86 EIO0000000827 11/2010
M218 Embedded Functions
EIO0000000827 11/2010 87
M218 Embedded Functions
88 EIO0000000827 11/2010
Expansion Modules Configuration
EIO0000000827 11/2010
10
Overview
This chapter describes the way to add expansion modules with SoMachine.
EIO0000000827 11/2010 89
Expansion Modules Configuration
Introduction
In your project, you can add analog, digital, and high-speed counting expansion
modules to a controller.
Use the GetRightBusStatus (see Modicon M218 Logic Controller,
System Functions and Variables, M218 PLCSystem Library Guide)
function regularly to monitor the expansion bus status.
90 EIO0000000827 11/2010
Expansion Modules Configuration
Limitation
The following table identities the maximum quantity of expansion modules for each
controller.
EIO0000000827 11/2010 91
Expansion Modules Configuration
TM2DMM16DRTN
Introduction
This expansion module is a 8-point input /8-point output module with a terminal
block.
For further hardware information, refer to TM2DMM16DRTN (see Modicon M218
Logic Controller, Hardware Guide).
92 EIO0000000827 11/2010
Expansion Modules Configuration
For further generic descriptions, refer to Expansion Bus I/O Mapping Tab
Description (see Modicon TM2, Expansion Modules Configuration, Programming
Guide).
EIO0000000827 11/2010 93
Expansion Modules Configuration
94 EIO0000000827 11/2010
Modicon M218 Logic Controller Serial Line Configuration
EIO0000000827 11/2010
EIO0000000827 11/2010 95
Modicon M218 Logic Controller Serial Line Configuration
Introduction
The Serial Line configuration window allows to configure the physical parameters of
serial line (baud rate, parity, etc.).
Step Action
1 Select the Configuration tab and double click on the controller.
2 Click the Communication →Serial Line 1 or Serial Line 2 entry on the left hand
side.
96 EIO0000000827 11/2010
Modicon M218 Logic Controller Serial Line Configuration
Step Action
3 Click the Physical Settings entry.
The configuration window is displayed.
NOTE: You can also select the Program tab and double click on the Serial Line 1
or Serial Line 2 in the device tree to access the configuration window.
The following parameters must be identical for each serial device connected to the
port:
Element Description
Baud rate Transmission speed
Parity Used for error detection
Data bits Number of bits for transmitting data
Stop bits Number of stop bits
Physical Medium Specify the medium to use: RS485 using polarization resistor or not.
NOTE: Two line polarization resistors are integrated in the controller,
they are switched on or off by this parameter.
EIO0000000827 11/2010 97
Modicon M218 Logic Controller Serial Line Configuration
Overview
Modicon M218 Logic Controller is integrated with 2 serial lines.
98 EIO0000000827 11/2010
Modicon M218 Logic Controller Serial Line Configuration
Step Action
1 Select Configuration tab and double click on the controller.
EIO0000000827 11/2010 99
Modicon M218 Logic Controller Serial Line Configuration
Step Action
4 Click on the Remove/Change Protocol, and the Add device window is
displayed.
NOTE: You also can access this window by selecting Configuration tab and
clicking the SL port of the controller in graphical configuration editor
5 Select the manager and click Add and close.
The Serial Line 1 is configured for SoMachine protocol by default when you add a
new controller or when you update the controller firmware. The SoMachine protocol
is incompatible with that of other protocols such as Modbus Serial Line.Connecting
a new controller to, or updating the firmware of a controller connected to, an active
Modbus configured serial line can cause the other devices on the serial line to stop
commmunication. Make sure that the controller’s Serial Line 1 port is not connected
to an active Modbus serial line network before first downloading a valid application
having the port propertly configured for the intended protocol.
ASCII Manager
Introduction
The ASCII Manager is used to transmit and/or receive data with a simple device.
Step Action
1 Select the Configuration tab and double-click on the controller.
2 Click the Communication →Serial Line 1 or Serial Line 2 entry on the left hand side.
Step Action
3 Click the Protocol Settings entry.
Result: The ASCII_Manager configuration window is displayed.
NOTE: The above configuration window only occurred when ASCII_Manager is selected for this serial
link port. If not, Click on Remove/Change Protocol button in the bottom of the screen to change the
protocol to ASCII_Manager.
Parameter Description
Start Character If 0, no start character is used in the frame. Otherwise, in Receiving
Mode the corresponding character in ASCII is used to detect the
beginning of a frame. In Sending Mode, this character is added at the
beginning of the frame.
First End If 0, no first end character is used in the frame. Otherwise, in Receiving
Character Mode the corresponding character in ASCII is used to detect the end of a
frame. In Sending Mode, this character is added at the end of the frame.
Second End If 0, no second end character is used in the frame. Otherwise, in
Character Receiving Mode the corresponding character in ASCII is used to detect
the end of a frame. In Sending Mode, this character is added at the end
of the frame.
Parameter Description
Frame Length If 0, this parameter is not used. This parameter allows the system to
Received conclude an end of frame at reception, when the controller received the
specified number of characters.
NOTE: This parameter cannot be used simultaneously with Frame
Received Timeout (ms).
Frame Received If 0, this parameter is not used. This parameter allows the system to
Timeout (ms) conclude the end of frame at reception after a silence of the specified
number of ms.
Serial Line Parameters specified in the Serial Line configuration window
Settings (see page 96).
NOTE: In the case of using several frame termination conditions, the first condition
to be TRUE will terminate the exchange.
Introduction
The SoMachine Network Manager must be used if you want to exchange variables
with a XBTGT/XBTGK device with SoMachine software protocol.
NOTE: The parameters of Physical Setting can only be kept as default values
under SoMachine Network Manager. They are not modifiable.
Modbus Manager
Introduction
The Modbus Manager is used for Modbus RTU or ASCII protocol in master or slave
mode.
It is recommended to use the Relocation Table (see page 26) to optimize the
communication between the controller and other equipment.
Step Action
1 Select the Configuration tab and double-click on the controller.
2 Click the Communication →Serial Line 1 or Serial Line 2 entry on the left hand side.
Step Action
3 Click the Protocol Settings entry.
Result: The Modbus_Manager configuration window will be displayed.
NOTE: The above configuration window only occurred when Modbus_Manager is selected for this
serial link port. If not, Click on Remove/Change Protocol button in the bottom of the screen to change
the protocol to Modbus_Manager.
Element Description
Transmission Specify the transmission mode to use:
Mode RTU: uses binary coding and CRC error-checking (8 data bits).
ASCII: messages are in a ASCII format, LRC error-checking (7 data
bits).
This parameter must be identical for each Modbus device on the link.
Addressing Specify if the M218 device is master or slave.
Address Modbus address of the device.
Time between Time to avoid bus-collision.
frames (ms) This parameter must be identical for each Modbus device on the link.
Serial Line Parameters specified in the Serial Line configuration window.
Settings
Modbus Master
When the controller is configured as a Modbus Master, the following Function Block
are supported from the PLCCommunication Library:
ADDM
READ_VAR
SEND_RECV_MSG
SINGLE_WRITE
WRITE_READ_VAR
WRITE_VAR
For further information, see Function Block Descriptions (see SoMachine, Modbus
and ASCII Read/Write Functions, PLCCommunication Library Guide) of the
PLCCommunication Library (see SoMachine, Modbus and ASCII Read/Write
Functions, PLCCommunication Library Guide).
Modbus Slave
When the controller is configured as Modbus Slave, the following Modbus requests
are supported:
NOTE: Only located variables of the controller application can be accessed via
Modbus.
The following table contains the Sub-function codes supported by the diagnostic
Modbus request 08:
The table below list the objects that can be read with a read device identification
request (basic identification level):
The following section describes the differences between the Modbus memory
mapping of the controller and HMI Modbus mapping. If you do not program your
application to recognize these differences in mapping, your controller and HMI will
not communicate correctly and it will be possible for incorrect values to be written to
memory areas responsible for output operations.
WARNING
UNINTENDED EQUIPMENT OPERATION
Program your application to translate between the Modbus memory mapping used
by the controller and that used by attached HMI devices.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
When the controller and the HMI are connected via Modbus (HMI is master of
Modbus requests), the data exchange uses simple word requests.
There is an overlap on simple words of the HMI memory while using double words
but not for the controller memory (see following diagram). In order to have a match
between the HMI memory area and the controller memory area, the ratio between
double words of HMI memory and the double words of controller memory has to be
2.
The following gives examples of memory match for the double words:
%MD2 memory area of the HMI corresponds to %MD1 memory area of the
controller because the same simple words are used by the modbus request.
%MD20 memory area of the HMI corresponds to %MD10 memory area of the
controller because the same simple words are used by the modbus request.
The following gives examples of memory match for the bits:
%MW0:X9 memory area of the HMI corresponds to %MX1.1 memory area of the
controller because the simple words are split in 2 distinct bytes in the controller
memory.
NOTE: If %MD is used for data exchange between PLC and HMI, the word order
should be consistent between PLC and HMI. For Modicon M218 Logic Controller,
the order of double word variable is low word first.
12
Indroduction
This Chapter describes how to configure the Ethernet network interface of the
Modicon M218 Logic Controller
Ethernet Services
Ethernet Services
The controller supports the following services:
Modbus TCP Server (see page 118)
Modbus TCP Client (see page 118)
Ethernet Protocol
The controller supports the following protocols:
IP (Internet Protocol)
TCP (Transmission Control Protocol)
ARP (Address Resolution Protocol)
ICMP (Internet Control Messaging Protocol), only support Ping function.
IP Address Configuration
Introduction
There are four different ways to assign the IP address of the controller:
address assignment by DHCP server
address assignment by BOOTP server
fixed IP address
NOTE: If the attempted addressing method is unsuccessful, the controller will start
using a default IP address (see page 116) derived from the MAC address.
You must carefully manage the IP addresses because each device on the network
requires a unique address. Having multiple devices with the same IP address can
cause unpredictable operation of your network and associated equipment.
WARNING
UNINTENTED EQUIPMENT OPERATION
Be sure that there is only one master controller configured on the network or
remote link.
Be sure that all slave devices have unique addresses. Be sure that all slave
devices have unique addresses. You cannot have duplicated addresses.
Obtain your IP address from your system administrator.
Confirm that the device’s IP address is unique before placing the system into
service.
Do not assign the same IP address to any other equipment on the network.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
Address Management
The different types of address systems for the controller are shown in the following
diagram:
IP IP
Valid IP ?
acquired ? acquired ?
NO
YES YES YES
NO NO
YES
Use default IP
NO NO
Ethernet Configuration
In the Devices tree, double click on the Ethernet item:
Element Description
Interface Name Name of the network interface, maximum 16 characters
Network Name Used as device name to retrieve IP address through DHCP,
maximum 16 characters
IP Address by DHCP IP address is obtained via DHCP.
IP Address by BOOTP IP address is obtained via BOOTP.
Fixed IP Address IP address, Subnet Mask and Gateway Address are defined by
the user.
Transfer Rate Transfer rate and direction on the bus are automatically
configured.
Ethernet Protocol Protocol type used, only support Ethernet 2)
Default IP Address
The default IP address is based on the device’s MAC address. The first two bytes
are 10 and 10. The last two bytes are the last two bytes of the device’s MAC
address.
The default subnet mask is 255.0.0.0.
NOTE: A MAC address is always written in hexadecimal format, and an IP address
in decimal format. You must convert the MAC address to decimal format.
Example: If the MAC address is 00.80.F4.01.80.F2, the default IP address is
10.10.128.242.
Address Classes
The IP address is linked:
to a device (known as the host)
to the network to which the device is connected
Subnet Mask
The subnet mask is used to address several physical networks with a single network
address. The mask is used to separate the sub-network and the device address in
the host ID.
The subnet address is obtained by retaining the bits of the IP address which
correspond to the positions of the mask containing 1, and replacing the others with
0.
Conversely, the subnet address of the host device is obtained by retaining the bits
of the IP address which correspond to the positions of the mask containing 0, and
replacing the others with 1.
NOTE: The device does not communicate on its sub-network when there is no
gateway.
Gateway
The gateway allows a message to be routed to a device which is not on the current
network.
If there is no gateway, the gateway address is 0.0.0.0.
Introduction
The Modbus protocol is widely used in industry. Unlike Modbus serial link, Modbus
TCP/IP is not based on a hierarchical structure, but on a client / server model.
The transfer of information between a Modbus client and server is initiated when the
client sends a request to the server to transfer information, to execute a command,
or to perform one of many other possible functions.
After the server receives the request, it executes the command or retrieves the
required data from its memory. The server then responds to the client by either
acknowledging that the command is complete or by providing the requested data.
The Modicon M218 Logic Controller implements both client and server services so
that it can initiate communications to other controllers and I/O devices, and to
respond to requests from other controllers, SCADA, HMIs and other devices.
Without any configuration, the embedded Ethernet port of the controller supports
Modbus Server.
The Modbus Server/Client is included in the firmware, and does not require any
programming action from the user. Due to this feature, it is accessible in RUNNING,
STOPPED and EMPTY states.
For further information, see Function Block Descriptions (see SoMachine, Modbus
and ASCII Read/Write Functions, PLCCommunication Library Guide) of the
PLCCommunication Library.
Diagnostic Request
The following table contains the Data Selection Code list:
Overview
To transfer, run and monitor the applications, connect the controller to a computer,
that has SoMachine installed. Use one of the following USB cables:
TCS XCNA MUM3P : This USB cable is suitable for short duration connection like
quick updates or retrieving data values.
BMX XCA USBH045 : Grounded and shielded, this USB cable is suitable for long
duration connection.
NOTE: You can only connect 1 controller to the PC at the same time.
The USB Mini-B Port is the programming port you can use to connect a PC with a
USB host port using SoMachine software. Using a typical USB cable, this
connection is suitable for quick updates of the program or short duration connections
to perform maintenance and inspect data values. It is not suitable for long term
connections such as commissioning or monitoring without the use of specially
adapted cables to help minimize electromagnetic interference.
WARNING
INOPERABLE EQUIPMENT OR UNINTENDED EQUIPMENT OPERATION
You must use a shielded USB cable such as a BMX XCAUSBH0•• secured to
the functional ground (FE) of the system for any long term connection.
Do not connect more than one controller at a time using USB connections.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
CAUTION
INOPERABLE EQUIPMENT
Always connect the communication cable to the PC before connecting it to the
controller.
Failure to follow these instructions can result in equipment damage.
Step Action
1 1a If making a long term connection using the cable BMX XCA USBH045, or
other cable with a ground shield connection, be sure to securely connect the
shield connector to the functional ground (FE) or protective ground (PE) of
your system before connecting the cable to your controller and your PC.
1b If making a short term connection using the cable TCS XCNA MUM3P or
other non-grounded USB cable, proceed to step 2.
2 Connect your USB cable to the computer.
3 Open the hinged access cover.
4 Connect the Mini connector of your USB cable to the controller USB connector.
14
Overview
Detailed instructions are provided for using the M218 Windows ExecLoader to
update the Firmware of your controller.
Introduction
Performing a firmware update will delete the current application program in the
device, including the Boot Application in Flash memory.
CAUTION
LOSS OF APPLICATION DATA
Perform a backup of the application program to the hard disk of the PC before
attempting a firmware update.
Restore the application program to the device after a successful firmware
update.
Failure to follow these instructions can result in injury or equipment damage.
CAUTION
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware update
once the transfer has begun.
Do not place the device into service until the transfer is completed successfully.
Failure to follow these instructions can result in equipment damage.
The Serial Line port 1 of your controller is configured for the SoMachine protocol by
default when new or when you update the controller firmware. The SoMachine
protocol is incompatible with that of other protocols such as Modbus Serial Line.
Connecting a new controller to, or updating the firmware of a controller connected
to, an active Modbus configured serial line can cause the other devices on the serial
line to stop communicating. Make sure that the controller is not connected to an
active Modbus serial line network before first downloading a valid application that
has the concerned port or ports properly configured for the intended protocol.
CAUTION
UNINTENDED EQUIPMENT OPERATION
Be sure your application has the Serial Line port(s) properly configured for Modbus
before physically connecting the controller to an operational Modbus Serial Line
network.
Failure to follow these instructions can result in equipment damage.
Installing Cables
Follow these steps to install the cables properly:
Step Action
1 Plug the TCS XCNA MUM3P cable to an USB Port of your PC.
2 Plug the second end of the cable to the USB port of the controller.
3 Launch the Exec Loader Wizard USB (see page 128)
Introduction
The M218 Exec Loader Wizard is a Windows-based wizard that guides you through
the steps necessary to update the firmware in your Schneider Electric controller.
Step Action
1 Close all your windows applications, including virtual machines.
2 If the gateway is running, right-click the CoDeSys Gateway SysTray (running)
icon in the task bar and select Stop Gateway.
When the gateway is stopped, the CoDeSys Gateway SysTray (stopped) icon
appears in the task bar:
Step 1 - Welcome
Step 1 - Welcome
The wizard provides a screen for each step. The welcome screen is an introduction
to the Exec Loader Wizard.
To continue:
Select Next to continue the procedure and display the next screen, Step#2
Settings (see page 130).
Select Close to close the screen without changing the firmware on your
controller.
Step 2 - Settings
Selecting Settings
Use these steps to select the appropriate firmware:
Step Action
1 In Settings, click on the Browse button and select the correct file for your controller
model.
Example: C:\Program
Files\Schneider Electric\SoMachine\Firmware\M238\TM238LFDC24DT.mfw
2 Power off the Controller, as indicated on the screen.
3 Select Next.
During the progress bar, turn on the power of the controller.
When the Exec Loader Wizard has successfully opened a connection with the
controller, it goes automatically to step 3 (see page 131).
Overview
At this step, the following information is checked by the Exec Loader Wizard for both
the firmware file and your controller before the procedure can continue:
Hardware ID - the selected firmware file is correct for the target controller.
Exec Version Number - the selected firmware file is newer than the currently
installed firmware.
Hardware ID
The Hardware ID is a unique identifier for each controller reference:
Green check mark: OK
Red cross: incorrect firmware file. Select a firmware file corresponding to your
controller reference (go back to step 2 (see page 130))
Overview
In this screen you can monitor the transfer progress.
The remaining time information is available after a while.
If Transfer is Successful
If the transfer is successful, a message box is displayed to allow for another transfer.
Two options are available:
Yes - the wizard returns to Step 2 - Settings (see page 130) and you can set up
another transfer.
No - click on the Close button to exit the wizard. This completes the update
procedure.
CAUTION
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware update
once the transfer has begun.
Do not place the device into service until the transfer is completed successfully.
Failure to follow these instructions can result in equipment damage.
Troubleshooting
Introduction
This section describes the procedures to troubleshoot your Modicon M218 Logic
Controller.
Resolution:
Refer to the part below (Communication Between SoMachine and the Modicon
M218 Logic Controller (see page 136)).
Your application program must be valid. Refer to the debugging part of the
CoDeSys help.
The CoDeSys gateway must be running:
a. click the CoDeSys Gateway SysTray(stopped) icon in the task bar,
b. select Start Gateway.
Communication Between SoMachine on a Computer and the Modicon M218 Logic Controller is not
Possible.
Possible causes:
Incorrect cable usage.
PLC not detected by the PC.
Communication settings are not correct.
The controller is not correctly operating.
Resolution:
Check Action
1 Check that:
the cable is correctly linked to the controller and to the PC and not damaged,
you use the specific cable depending on the connection type:
TCS XCNA MUM3P cable for an USB connection.
2 Check that the Modicon M218 Logic Controller has been detected by your PC:
1. click Start →Control Panel →System, select the Hardware tab and click Device Manager,
2. check that the Modicon M218 Logic Controller node appears in the list: .
3. If the Modicon M218 Logic Controller node does not appear or if there is an icon in front of the
node, unplug/plug the cable on the controller side.
3 Check that the active path is correct:
1. double click the Controller node in the Devices window,
2. check that the Modicon M218 Logic Controller node appears in bold and not in italic.
If not:
a. stop the CoDeSys Gateway: right click the CoDeSys Gateway SysTray(running) icon
Possible causes:
Application does not go to RUN state.
One input is configured in RUN/STOP mode.
Run/Stop Switch is switched to Stop position.
Resolution:
Use the input configured in RUN/STOP mode to run the application.
Turn Run/Stop Switch to the Run position.
CoDeSys Gateway does not start (CoDeSys Gateway SysTray icon is black)
Possible cause:
Connection during a long time.
Resolution:
If the CoDeSys Gateway SysTray icon is black (stopped):
1. Open the task Manager,
2. stop the Gatewayservice.exe, and start it again:
Reset your computer or,
in Control Panel, open Administrative Tools and Computer Management,
in Service, double click CoDeSys Gateway,
Click Start Service button.
Resolution:
Check that:
protocol communication settings (baud rate, parity...) are identical for all serial
line devices.
The correct communication manager is added on the Serial Line object:
Modbus manager if the line is used for Modbus protocol,
SoMachine-Network Manager if the line is used for communication to access
IEC variable.
the controller operates correctly. Refer to the System Diagnostic using LED
Display part (see Modicon M218 Logic Controller, Hardware Guide).
How can I Determine the Firmware, Boot and Coprocessor Version of the Controller?
In online mode, double click the Controller node in the Devices window. In the
Controller window, select the Services tab. The device identification area gives
information about versions:
Device Identification
Firmware Version:
Boot Version:
Coprocessor Version:
Can I connect the PC (SoMachine) and the Controller through 499TWD01100 Ethernet Gateway?
No, because Ethernet Gateway only supports Modbus protocol.
Why the communication between the HMI and the controller is interrupted when making online
changes?
When online changes are made to a M218 application, the Symbol Configuration is
downloaded. This results in a temporary interruption of the communication. It occurs
when the protocol used between the controller and the HMI is the SoMachine
network protocol.
Can I simulate the real PLC behavior with the Simulation mode?
No. The simulation mode is only used to simulate the user application, not the PLC
behavior.
Appendices
Overview
This appendix lists the documents necessary for technical understanding of the
M218 Programming Guide.
This chapter provides functions and function blocks representation examples and
explains how to use them for IL and ST languages.
Function
A function:
is a POU (Program Organization Unit) that returns one immediate result
is directly called with its name (not through an Instance)
has no persistent state from one call to the other
can be used as an operand in other expressions
Function Block
A function block:
is a POU (Program Organization Unit) that returns one or more outputs
is always called through an Instance (function block copy with dedicated name
and variables)
each Instance has a persistent state (outputs and internal variables) from one
call to the other
Examples: timers, counters
In the example below, Timer_ON is an instance of the Function Block TON:
General Information
This part explains how to implement a Function and a Function Block in IL language.
Functions IsFirstMastCycle and SetRTCDrift and Function Block TON are
used as examples to show implementations.
Step Action
1 Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to the SoMachine
global help.
2 Create the variables that the function requires.
3 If the function has 1 or more inputs, start loading the first input using LD instruction.
4 Insert a new line below and:
type the name of the function in the operator column (left field), or
use the Input Assistant to select the function (select Insert Box in context menu).
5 If the function has more than 1 input and when Input Assistant is used, the necessary number of lines is
automatically created with ??? in the fields on the right. Replace the ??? with the appropriate value or
variable that corresponds to the order of inputs.
6 Insert a new line to store the result of the function into the appropriate variable: type ST instruction in the
operator column (left field) and the variable name in the field on the right.
IL example of a function
with input parameters:
SetRTCDrift
Step Action
1 Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to the SoMachine
global help.
2 Create the variables that the function block requires, including the instance name.
Step Action
3 Function Blocks are called using a CAL instruction:
Use the Input Assistant to select the FB (right-click and select Insert Box in context menu).
Automatically, the CAL instruction and the necessary I/O are created.
4 In the CAL right-side field, replace ??? with the instance name.
5 Replace other ??? with an appropriate variable or immediate value.
To illustrate the procedure, consider this example with the TON Function Block
graphically presented below:
In IL language, the function block name is used directly in the Operator Column:
General Information
This part explains how to implement a Function and a Function Block in ST
language.
Function SetRTCDrift and Function Block TON are used as examples to show
implementations.
Step Action
1 Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to the SoMachine
global help.
2 Create the variables that the function requires.
3 Use the general syntax in the POU ST Editor for the ST language of a function. The general syntax is:
FunctionResult:= FunctionName(VarInput1, VarInput2,.. VarInputx);
Step Action
1 Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to the SoMachine
global help.
2 Create the input and output variables and the instance required for the function block:
Input variables are the input parameters required by the function block
Output variables receive the value returned by the function block
3 Use the general syntax in the POU ST Editor for the ST language of a Function Block. The general syntax
is:
FunctionBlock_InstanceName(Input1:=VarInput1, Input2:=VarInput2,...
Ouput1=>VarOutput1, Ouput2=>VarOutput2,...);
To illustrate the procedure, consider this example with the TON function block
graphically presented below:
Function Description
GetSerialConf returns the configuration parameters for a specific serial line
communication port.
Graphical Representation
Parameter Description
Example
Refer to the SetSerialConf (see page 158) example.
Function Description
SetSerialConf is used to change the serial line configuration.
Graphical Representation
NOTE: Changing the configuration of the Serial Line(s) port(s) during programming
execution can interrupt ongoing communications with other connected devices.
WARNING
LOSS OF CONTROL DUE TO UNEXPECTED CONFIGURATION CHANGE
Be sure to validate and test all the parameters of the SetSerialConf function
before putting your program into service.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
Parameter Description
Example
VAR
MySerialConf: SERIAL_CONF
result: WORD;
END_VAR
Structure Description
The SERIAL_CONF structure contains configuration information about the serial line
port. It contains these variables:
Controller Performance
C
Processing Performance
Introduction
This chapter provides information about the processing performance.
Logic Processing
The following table shows logic processing performance for various logical
instructions:
Glossary
0-9
%I
According to the IEC standard, %I represents an input bit (for example a language
object of type digital IN).
%IW
According to the IEC standard, %IW represents an input word register (for example
a language object of type analog IN).
%MW
According to the IEC standard, %MW represents a memory word register (for
example a language object of type memory word).
%Q
According to the IEC standard, %Q represents an output bit (for example a language
object of type digital OUT).
%QW
According to the IEC standard, %QW represents an output word register (for
example a language object of type analog OUT).
analog input
An analog input module contains circuits that convert an analog DC input signal to
a digital value that can be manipulated by the processor. By implication, the analog
input is usually direct. That means a data table value directly reflects the analog
signal value.
analog output
An analog output module contains circuits that transmit an analog DC signal
proportional to a digital value input to the module from the processor. By implication,
these analog outputs are usually direct. That means a data table value directly
controls the analog signal value.
application source
The application source file can be uploaded to the PC to reopen a SoMachine
project. This source file can support a full SoMachine project (for example, one that
includes HMI application).
ARP
The address resolution protocol is the IP network layer protocol for Ethernet that
maps an IP address to a MAC (hardware) address.
ARRAY
An ARRAY is a table containing elements of a single type. The syntax is as follows:
ARRAY [<limits>] OF <Type>
Example 1: ARRAY [1..2] OF BOOL is a 1-dimensional table with 2 elements of
type BOOL.
Example 2: ARRAY [1..10, 1..20] OF INT is a 2-dimensional table with 10x20
elements of type INT.
ASCII
The american standard code for information interchange is a communication
protocol for representing alphanumeric characters (letters, numbers, and certain
graphic and control characters).
assigned variable
A variable is "assigned" if its location in controller memory can be known. For
example, the Water_pressure variable is said to be assigned through its
association with memory location %MW102.Water_pressure.
AWG
The american wire gauge standard specifies wire gauges in North America.
BCD
The binary coded decimal format represents decimal numbers between 0 and 9 with
a set of 4 bits (a nybble/nibble, also titled as Halfbyte). In this format, the 4 bits used
to encode decimal numbers have an unused range of combinations. For example,
the number 2,450 is encoded as 0010 0100 0101 0000
BOOL
A Boolean type is the basic data type in computing. A BOOL variable can have one
of these values: 0 (FALSE), 1 (TRUE). A bit that is extracted from a word is of type
BOOL, for example: %MW10.4 is a fifth bit a memory word number 10.
Boot application
Files that contain machine dependent parameters:
machine name
device name or IP address
Modbus Serial Line address
Routing table
BOOTP
The bootstrap protocol is a UDP network protocol that can be used by a network
client to automatically obtain an IP address (and possibly other data) from a server.
The client identifies itself to the server using the client’s MAC address. The server—
which maintains a pre-configured table of client device MAC addresses and
associated IP addresses—sends the client its pre-configured IP address. BOOTP
was originally used as a method that enabled diskless hosts to be remotely booted
over a network. The BOOTP process assigns an infinite lease of an IP address. The
BOOTP service utilizes UDP ports 67 and 68.
bps
bit per second as a definition of transmission rate, also given in conjunction with
multiplicator kilo (kbps) and mega (mbps).
BYTE
When 8 bits are grouped together, they are called a BYTE. You can enter a BYTE
either in binary mode or in base 8. The BYTE type is encoded in an 8-bit format that
ranges from 16#00 to 16#FF (in hexadecimal format).
CFC
The continuous function chart (an extension of the IEC61131-3 standard) is a
graphical programming language that works like a flowchart. By adding simple
logicals blocks (AND, OR, etc.), each function or function block in the program is
represented in this graphical format. For each block, the inputs are on the left and
the outputs on the right. Block outputs can be linked to inputs of other blocks in order
to create complex expressions.
controller
A controller (or “programmable logic controller,” or “programmable controller”) is
used to automate industrial processes.
CRC
A network message's cyclic redundancy check field contains a small number of bits
that produce a checksum. The message is calculated by the transmitter according
to the message’s content. Receiving nodes then recalculate the field. Any
discrepancy in the two CRC fields indicates that the transmitted message and the
received message are different.
CTS
Clear to send is a data transmission signal and acknowledges the RDS signal from
the transmitting station.
cyclic task
The cyclic scan time has a fixed duration (interval) specified by the user. If the
current scan time is shorter than the cyclic scan time, the controller waits until the
cyclic scan time has elapsed before starting a new scan.
data log
The controller logs events relative to the user application in a data log.
DHCP
The dynamic host configuration protocol is an advanced extension of BOOTP.
DHCP is a more advanced, but both DHCP and BOOTP are common. (DHCP can
handle BOOTP client requests.)
digital I/O
A digital input or output has an individual circuit connection at the electronic module
that corresponds directly to a data table bit that holds the value of the signal at that
I/O circuit. It gives the control logic digital access to I/O values.
DIN
Deutsches Institut für Normung is a German institution that sets engineering and
dimensional standards.
DINT
A double integer type is encoded in a 32-bit format.
DNS
The domain name system is the naming system for computers and devices
connected to a LAN or the Internet.
drop cable
A drop cable is the unterminated derivation cord used to connect a TAP to a device.
DSR
Data set ready is a data transmission signal.
DTM
With device type managers representing the field device in SoMachine, direct
communications are possible to every single field device via SoMachine, the
controller and the field bus, thus avoiding the need for individual cable connections.
DWORD
A double word type is encoded in a 32-bit format.
EDS
Electronic data sheet contains for example the properties of a device e.g.
parameters and settings of a drive.
EEPROM
Electrically erasable programmable read-only memory is a type of non-volatile
memory used to store data that must be saved when power is removed.
EIA
The electronic industries alliance is the trade organization for establishing
electrical/electronic and data communication standards (including RS-232 and RS-
485) in the United States.
EIA rack
An electronic industries alliance rack is a standardized (EIA 310-D, IEC 60297 and
DIN 41494 SC48D) system for mounting various electronic modules in a stack or
rack that is 19 inches (482.6 mm) wide.
electronic module
In a programmable controller system, most electronic modules directly interface to
the sensors, actuators, and external devices of the machine/process. This electronic
module is the component that mounts in a bus base and provides electrical
connections between the controller and the field devices. Electronic modules are
offered in a variety of signal levels and capacities. (Some electronic modules are not
I/O interfaces, including power distribution modules and transmitter/receiver
modules.)
EN
EN identifies one of many European standards maintained by CEN (European
Committee for Standardization), CENELEC (European Committee for
Electrotechnical Standardization), or ETSI (European Telecommunications
Standards Institute).
encoder
An encoder is a device for length or angular measurement (linear or rotary
encoders).
Ethernet
Ethernet is a physical and data link layer technology for LANs, also known as
IEE 802.3.
EtherNet/IP
The ethernet industrial protocol is an open communications protocol for
manufacturing automation solutions in industrial systems. EtherNet/IP is in a family
of networks that implements Common Industrial Protocol at its upper layers. The
supporting organization (ODVA) specifies EtherNet/IP to accomplish global
adaptability and media independence.
FAST I/O
FAST I/Os are specific I/Os with some electrical features (response time, for
example) but the treatment of these channels is done by the Controller CPU.
FAST task
The FAST task is a periodic, high-priority task of a short duration that is run on a
processor through its programming software. The task’s fast speed keeps it from
interfering with the execution of lower priority master (MAST) tasks. A FAST task is
useful when fast periodic changes in discrete inputs need to be monitored.
FB
A function block performs a specific automation function, such as speed control,
interval control, or counting. A function block comprises configuration data and a set
of operating parameters.
FBD
A function block diagram is a graphically oriented programming language, compliant
with IEC 61131-3. It works with a list of networks whereby each network contains a
graphical structure of boxes and connection lines which represents either a logical
or arithmetic expression, the call of a function block, a jump, or a return instruction.
FDT
Field device tool for standardized communications between field devices and
SoMachine.
FE
Functional ground is the point of a system or device that must be grounded to help
prevent equipment damage.
FG
frequency generator
firmware
The firmware represents the operating system on a controller.
Flash memory
Flash memory is nonvolatile memory that can be overwritten. It is stored on a special
EEPROM that can be erased and reprogrammed.
FTP
File transfer protocol is a standard network protocol (built on a client-server
architecture), to exchange and manipulate files over TCP/IP based networks.
function
A function:
is a POU that returns 1 immediate result
is directly called with its name (as opposed to through an instance)
has no persistent state from one call to the next
can be used as an operand in expressions
GVL
The global variable list manages global variables that are available in every
application POU.
HE10
Rectangular connector for electrical signals with frequencies below 3MHz,
complying with IEC60807-2.
HMI
A human-machine interface is an operator interface (usually graphical) for industrial
equipment.
HSC
high-speed counter
HVAC
Heating ventilation and air conditioning applications monitor and control indoor
environments.
I/O
input/output
I/O scan
An input/output scan continuously polls I/O modules to collect data bits and status,
error, and diagnostics information. This process monitors inputs and controls
outputs.
I/O terminal
An input/output terminal on the front of an expansion I/O module connects input and
output signals.
ICMP
The internet control message protocol reports errors and provides information
related to datagram processing.
IEC
The international electrotechnical commission is a non-profit and non-governmental
international standards organization that prepares and publishes international
standards for all electrical, electronic, and related technologies.
IEC 61131-3
The IEC 61131-3 is an international electrotechnical commission standard for
industrial automation equipment (like controllers). IEC 61131-3 deals with controller
programming languages and defines 2 graphical and 2 textual programming
language standards:
graphical: ladder diagram, function block diagram
textual: structured text, instruction list
IEEE
The institute of electrical and electronics engineers is a non-profit international
standards and conformity assessment body for advances in all fields of
electrotechnology.
IEEE 802.3
IEEE 802.3 is a collection of IEEE standards defining the physical layer, and the
media access control (MAC) sublayer of the data link layer, of wired Ethernet.
IL
A program written in the instruction list language is composed of a series of
instructions executed sequentially by the controller. Each instruction includes a line
number, an instruction code, and an operand. (IL is IEC 61131-3 compliant.)
immediate addressing
The direct method of addressing memory objects, including physical inputs and
outputs, used in programming instructions as operands and parameters by using
their direct address (for example, %Iwx or %QWx).
The use of immediate addressing in your program may avoid the need to create
symbols for these objects, but there are also disadvantages. For example, if you
change the program’s configuration by adding or deleting devices or I/O modules or
slices, the immediate addresses used as programming instruction operands and/or
parameters are not updated and must be corrected manually, which may cause
extensive program modifications and lead to incorrect programming instructions.
(See symbolic addressing.)
input filter
An input filter is a special function that rejects input noises. It is useful for eliminating
input noises and chatter in limit switches. All inputs provide a level of input filtering
using the hardware. Additional filtering with software is also configurable through the
programing or the configuration software.
input terminal
An input terminal on the front of an expansion I/O module connects input signals
from input devices (such as sensors, push buttons, and limit switches). For some
modules, input terminals accept both sink and source DC input signals.
INT
A single integer is encoded in 16 bits.
IP
The internet protocol is part of the TCP/IP protocol family that tracks the Internet
addresses of devices, routes outgoing messages, and recognizes incoming
messages.
IP 20
Ingress protection rating according to IEC 60529. IP20 modules are protected
against ingress and contact of objects larger than 12.5 mm. The module is not
protected against harmful ingress of water.
IP 67
Ingress protection rating according to IEC 60529. IP67 modules are completely
protected against ingress of dust and contact. Ingress of water in harmful quantity is
not possible when the enclosure is immersed in water up to 1 m.
Kd
derivative gain
Ki
integral gain
Kp
proportional gain
LAN
A local area network local area network is a short-distance communications network
that is implemented in a home, office, or institutional environment.
latching input
A latching input module interfaces with devices that transmit messages in short
pulses. Incoming pulses are captured and recorded for later examination by the
application.
LD
A program in the ladder diagram language includes a graphical representation of
instructions of a controller program with symbols for contacts, coils, and blocks in a
series of rungs executed sequentially by a controller. IEC 61131-3 compliant.
LED
A light emitting diode is an indicator that lights up when electricity passes through it.
LINT
Long integer is a 64-bit variable (4 times INT or two times DINT).
located variable
A located variable has an address. (See unlocated variable.)
LRC
longitudinal redundancy checking
LREAL
Long real is a 64-bit variable.
LSB
The least significant bit (or least significant byte) is the part of a number, address, or
field that is written as the right-most single value in conventional hexadecimal or
binary notation.
LWORD
A long word type is encoded in a 64-bit format.
MAC address
The media access control address is a unique 48-bit number associated with a
specific piece of hardware. The MAC address is programmed into each network
card or device when it is manufactured.
Magelis
Magelis is the commercial name for Schneider Electric's range of HMI terminals.
MAST
A master (MAST) task is a processor task that is run through its programming
software. The MAST task has two sections:
IN: Inputs are copied to the IN section before execution of the MAST task.
OUT: Outputs are copied to the OUT section after execution of the MAST task.
master/slave
The single direction of control in a network that implements the master/slave model
is always from a master device or process to one or more slave devices.
MIB
The management information base is an object database that is monitored by a
network management system like SNMP. SNMP monitors devices that are defined
by their MIBs. Schneider has obtained a private MIB, groupeschneider (3833).
Modbus
The Modbus communication protocol allows communications between many
devices connected to the same network.
Modbus SL
Modbus serial line
MSB
The most significant bit (or most significant byte) is the part of a number, address,
or field that is written as the left-most single value in conventional hexadecimal or
binary notation.
NAK
negative acknowledge
NC
A normally closed contact is a contact pair that is closed when the actuor is de-
energized (no power is applied) and open when the actuor is energized (power is
applied).
NEC
The national electric code standard dictates the safe installation of electrical wiring
and equipment.
NEMA
The national electrical manufacturers association publishes standards for the
performance of various classes of electrical enclosures. The NEMA standards cover
corrosion resistance, ability to protect from rain and submersion, etc. For IEC
member countries, the IEC 60529 standard classifies the ingress protection rating
for enclosures.
network
A network includes interconnected devices that share a common data path and
protocol for communications.
NMT
Network management protocols provide services for network initialization, error
control, and device status control.
NO
A normally open contact is a contact pair that is open when the actuor is de-
energized (no power is applied) and closed when the actuor is energized (power is
applied).
node
A node is an addressable device on a communication network.
ODVA
The open deviceNet vendors association supports the family of network
technologies that are built on CIP (EtherNet/IP, DeviceNet, and CompoNet).
OS
Operating system. Can be used for Firmware that can be uploaded/downloaded by
the user.
OSI
The open system interconnection reference model is a 7-layer model that describes
network protocol communications. Each abstract layer receives services from the
layer below it and provides services to the layer above.
output terminal
An output terminal connects output signals to output devices (such as electrome-
chanical relays and solenoid valves).
PCI
A peripheral component interconnect is an industry-standard bus for attaching
peripherals.
PDU
protocol data unit
PE
Protective ground is a return line across the bus for fault currents generated at a
sensor or actuator device in the control system.
periodic execution
The master task is executed either cyclically or periodically. In periodic mode, you
determine a specific time (period) in which the master task must be executed. If it is
executed under this time, a waiting time is generated before the next cycle. If it is
executed over this time, a control system indicates the overrun. If the overrun is too
high, the controller is stopped.
persistent data
Value of persistent data that will be used at next application change or cold start.
Only get re-initialized at a reboot of the controller or reset origin. Especially they
maintain their values after a download.
PI
proportional integral
PID
proportional, integral and derivative control
PLC
The programmable logic controller is the “brain” of an industrial manufacturing
process. It automates a process, used instead of relay control systems. PLCs are
computers suited to survive the harsh conditions of the industrial environment.
PLCopen
The PLCopen standard brings efficiency, flexibility, and manufacturer independence
to the automation and control industry through the standardization of tools, libraries,
and modular approaches to software programming.
PLI
pulse latch input
POU
A program organization unit includes a variable declaration in source code and the
corresponding instruction set. POUs facilitate the modular reuse of software
programs, functions, and function blocks. Once declared, POUs are available to one
another. SoMachine programming requires the utilization of POUs.
POU FB
Program organization unit function block types are user programs that can be
defined by the user in the ST, IL, LD, or FBD languages. You can use POU FB types
in an application to:
simplify the design and entry of the program
make the program easier to read
simplify debugging
reduce the amount of generated code
protocol
A protocol is a convention or standard that controls or enables the connection,
communication, and data transfer between two computing endpoints.
PTO
Pulse train outputs are used to control for instance stepper motors in open loop.
PWM
Pulse width modulation is used for regulation processes (e.g. actuators for
temperature control) where a pulse signal is modulated in its length. For these kind
of signals, transistor outputs are used.
RAM
random access memory
REAL
Real is a numeric data type. The REAL type is encoded in a 32-bit format.
reflex output
In a counting mode, the high speed counter’s current value is measured against its
configured thresholds to determine the state of these dedicated outputs.
retained data
A retained data value is used in the next power-on or warm start. The value is
retained even after an uncontrolled shutdown of the controller or a normal switch-off
of the controller.
RJ-45
This registered jack is a modular connector that is commonly implemented in
communication networks.
RPM
revolutions per minute
RPS
revolutions per second
RS-232
RS-232 (also known as EIA RS-232C or V.24) is a standard type of serial
communication bus, based on three wires.
RS-485
RS-485 (also known as EIA RS-485) is a standard type of serial communication bus,
based on two wires.
RTC
The real-time clock option keeps the time for a limited amount of time even when the
controller is not powered.
RTS
Request to send is a data transmission signal and will be acknowledged by the CTS
signal from the destination node.
RTU
A remote terminal unit is a device that interfaces with objects in the physical world
to a distributed control system or SCADA system by transmitting telemetry data to
the system and/or altering the state of connected objects based on control
messages received from the system.
RxD
receiving data (data transmission signal)
SCADA
A supervisory control and data acquisition system monitors, manages, and controls
industrial applications or processes.
scan
A controller’s scanning program performs 3 basic functions: [1] It reads inputs and
places these values in memory; [2] it executes the application program 1 instruction
at a time and stores results in memory; [3] It uses the results to update outputs.
SEL-V
A system that follows IEC 61140 guidelines for safety extra low voltage is protected
in such a way that voltage between any 2 accessible parts (or between 1 accessible
part and the PE terminal for Class 1 equipment) does not exceed a specified value
under normal conditions or under single-fault conditions.
SFC
A program written in the sequential function chart language can be used for
processes that can be split into steps. SFC is composed of steps with associated
actions, transitions with associated logic condition, and directed links between steps
and transitions. (The SFC standard is defined in IEC 848. It is IEC 61131-3
compliant.)
sink input
A sink input is a wiring arrangement in which the device provides current to the input
electronic module. A sink input is referenced to 0 Vdc.
SINT
Signed integer is a 16-bit value.
SL
serial line
SNMP
The simple network management protocol can control a network remotely by polling
the devices for their status, performing security tests, and viewing information
relating to data transmission. It can also be used to manage software and databases
remotely. The protocol also permits active management tasks, such as modifying
and applying a new configuration
source output
A source output is a wiring arrangement in which the output electronic module
provides current to the device. A source output is referenced to +24 Vdc.
SSI
Serial synchronous interface is a common interface for relative and absolute
measurement systems like encoders.
ST
See structured text.
STRING
A STRING variable is a series of ASCII characters.
Structured Text
A program written in the structured text (ST) language includes complex statements
and nested instructions (such as iteration loops, conditional executions, or
functions). ST is compliant with IEC 61131-3.
symbol
A symbol is a string of a maximum of 32 alphanumeric characters, of which the first
character is alphabetic. It allows you to personalize a controller object to facilitate
the maintainability of the application.
symbolic addressing
The indirect method of addressing memory objects, including physical inputs and
outputs, used in programming instructions as operands and parameters by first
defining symbols for them using these symbols in association with the programming
instructions.
In contrast to immediate addressing, this is the recommended method because if the
program’s configuration changes, symbols are automatically updated with their new
immediate address associations, whereas any immediate addresses used as
operands or parameters are not. (See immediate addressing.)
system time
An internal clock provides a device with the system time.
system variable
A system variable structure provides controller data and diagnostic information and
allows sending commands to the controller.
TAP
A terminal access point is a junction box connected to the trunk cable that allows you
to plug in drop cables.
task
A group of sections and subroutines, executed cyclically or periodically for the MAST
task, or periodically for the FAST task.
A task possesses a level of priority and is linked to inputs and outputs of the
controller. These I/O are refreshed in consequence.
A controller can have several tasks.
TCP
A transmission control protocol is a connection-based transport layer protocol that
provides a reliable simultaneous bi-directional transmission of data. TCP is part of
the TCP/IP protocol suite.
terminal block
The terminal block is the component that mounts in an electronic module and
provides electrical connections between the controller and the field devices.
threshold output
Threshold outputs are controlled directly by the HSC according to the settings
established during configuration.
trunk cable
A trunk cable is the main cable that is terminated at both physical ends with line
termination resistors.
TVDA
tested validated documented architectures
TxD
TxD represents a transmit signal.
UDINT
An unsigned double integer is encoded in 32 bits.
UDP
The user datagram protocol is a connectionless mode protocol (defined by
IETF RFC 768) in which messages are delivered in a datagram (data telegram) to a
destination computer on an IP network. The UDP protocol is typically bundled with
the Internet Protocol. UDP/IP messages do not expect a response, and are
therefore ideal for applications in which dropped packets do not require
retransmission (such as streaming video and networks that demand real-time
performance).
UINT
An unsigned integer is encoded in 16 bits.
UL
Underwriters laboratories, US organization for product testing and safety
certification.
unlocated variable
An unlocated variable does not have an address. (See located variable.)
UTC
coordinated universal time
VSD
variable speed drive
WORD
The WORD type is encoded in a 16-bit format.
Index
B
AC
C Firmware Update
ExecLoader Introduction, 128
Controller Configuration
File and Device Properties, 131
Access Controller Configuration, 68
Settings, 130
Applications, 69
Transfer Progress, 133
PLC Settings, 70
Update Through USB, 126
Services, 71
Welcome, 129
Functions
D Differences Between a Function and a
Function Block, 148
Download application, 62 How to Use a Function or a Function
Block in IL Language, 149
How to Use a Function or a Function
E Block in ST Language, 152
Embedded Functions Configuration
Embedded HSC Configuration, 79
Embedded I/O Configuration, 74 G
Embedded PTO_PWM Configuration, 81 GetSerialConf, 156
Expansion Module
Adding Expansion Module, 90
Configure Expansion Module, 90 L
libraries, 19
F
FAQ, 142 M
features
main features, 13
key features, 13
O
overview, 13
P
programming languages
IL, ST, FBD, SFC, LD, CFC, 13
R
Reboot, 61
Remanent variables, 65
Reset cold, 59
Reset origin, 60
Reset warm, 59
Run command, 58
S
Serial Line
Serial Line Configuration, 96
SERIAL_CONF, 159
SetSerialConf, 157
State diagram, 47
Stop command, 58
T
Task
Cyclic task, 37
Event task, 38
External Event Task, 39
Freewheeling task, 38
Types, 37
Watchdogs, 40
Troubleshooting, 136