SoMachine Basic - Operating Guide
SoMachine Basic - Operating Guide
EIO0000001354 07/2014
SoMachine Basic
Operating Guide
EIO0000001354.02
07/2014
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.
2014 Schneider Electric. All rights reserved.
EIO0000001354 07/2014
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About the Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 4 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1 Overview of the Properties Window . . . . . . . . . . . . . . . . . . . . . . . . . .
The Properties Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Project Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EIO0000001354 07/2014
7
9
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
34
35
36
37
39
40
41
43
45
47
48
49
50
Chapter 5 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1 Overview of the Configuration Window . . . . . . . . . . . . . . . . . . . . . . . .
Overview of the Configuration Window . . . . . . . . . . . . . . . . . . . . . . . .
Building a Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 6 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1 Overview of the Programming Workspace. . . . . . . . . . . . . . . . . . . . . .
Overview of the Programming Workspace. . . . . . . . . . . . . . . . . . . . . .
6.2 Special Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Symbolic Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ladder/List Reversibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Use the Source Code Examples . . . . . . . . . . . . . . . . . . . . . . .
6.3 Configuring Program Behavior and Tasks . . . . . . . . . . . . . . . . . . . . . .
Application Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tasks and Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Managing POUs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
POUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing POUs with Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing Rungs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Free POUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.5 Master Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Master Task Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Master Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.6 Periodic Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Periodic Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Periodic Task Scan Duration . . . . . . . . . . . . . . . . . . . . . .
6.7 Event Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of Event Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Event Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Event Priorities and Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Event Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.8 Using Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Animation Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I/O Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
53
54
55
56
57
58
58
59
60
61
64
65
67
69
70
73
76
77
78
80
83
85
86
87
89
90
92
93
94
95
96
97
100
101
102
105
108
109
EIO0000001354 07/2014
6.9
6.10
6.11
6.12
Software Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PTO Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Search and Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Symbol List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rung Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ladder Language Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction to Ladder Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Principles for Ladder Diagrams. . . . . . . . . . . . . . . . . . .
Ladder Diagram Graphic Elements . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operation Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Instruction List Programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of Instruction List Programs. . . . . . . . . . . . . . . . . . . . . . . . .
Operation of List Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List Language Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Parentheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Grafcet (List) Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description of Grafcet (List) Programming . . . . . . . . . . . . . . . . . . . . .
Grafcet Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Use Grafcet Instructions in a SoMachine Basic Program . . . .
Debugging in Online Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Forcing Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 7 Commissioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1 Overview of the Commissioning Window . . . . . . . . . . . . . . . . . . . . . .
Overview of the Commissioning Window . . . . . . . . . . . . . . . . . . . . . .
7.2 Managing the Connection to a Logic Controller . . . . . . . . . . . . . . . . .
Connecting to a Logic Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controller Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing the RTC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.3 SoMachine Basic Simulator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of the SoMachine Basic Simulator. . . . . . . . . . . . . . . . . . . .
SoMachine Basic Simulator I/O Manager Window . . . . . . . . . . . . . . .
SoMachine Basic Simulator Time Management Window . . . . . . . . .
Modifying Values Using SoMachine Basic Simulator . . . . . . . . . . . . .
How to Use the SoMachine Basic Simulator . . . . . . . . . . . . . . . . . . . .
EIO0000001354 07/2014
110
111
112
114
116
118
119
121
122
129
130
131
132
135
136
138
139
143
146
147
148
151
153
154
155
157
158
158
159
160
162
163
164
165
167
169
172
177
5
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix A SoMachine Basic Keyboard Shortcuts . . . . . . . . . . . .
SoMachine Basic Keyboard Shortcuts. . . . . . . . . . . . . . . . . . . . . . . . .
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
178
178
180
181
183
185
186
187
188
189
191
191
197
201
EIO0000001354 07/2014
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.
EIO0000001354 07/2014
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 its installation, and has received safety training to recognize and avoid
the hazards involved.
EIO0000001354 07/2014
Action
In the Search box type the reference of a product or the name of a product range.
Do not include blank spaces in the model number/product range.
To get information on grouping similar modules, use asterisks (*).
If you entered a reference, go to the Product Datasheets search results and click on the
reference that interests you.
If you entered the name of a product range, go to the Product Ranges search results and click
on the product range that interests you.
If more than one reference appears in the Products search results, click on the reference that
interests you.
Depending on the size of your screen, you may need to scroll down to see the data sheet.
To save or print a data sheet as a .pdf file, click Download XXX product datasheet.
The characteristics that are presented in this manual should be the same as those characteristics
that appear online. In line with our policy of constant improvement, we may revise content over time
to improve clarity and accuracy. If you see a difference between the manual and online information,
use the online information as your reference.
EIO0000001354 07/2014
Related Documents
Title of Documentation
Reference Number
EIO0000001474 (ENG)
EIO0000001475 (FRA)
EIO0000001476(GER)
EIO0000001477 (SPA)
EIO0000001478 (ITA)
EIO0000001479 (CHS)
EIO0000001480 (POR)
EIO0000001481 (TUR)
Modicon M221 Logic Controller Advanced Functions - Library Guide EIO0000002007 (ENG)
EIO0000002008 (FRE)
EIO0000002009(GER)
EIO0000002010 (SPA)
EIO0000002011 (ITA)
EIO0000002012 (CHS)
EIO0000002013 (TUR)
EIO0000002014 (POR)
10
EIO0000001360 (ENG)
EIO0000001361 (FRE)
EIO0000001362 (GER)
EIO0000001363 (SPA)
EIO0000001364 (ITA)
EIO0000001365 (CHS)
EIO0000001369 (TUR)
EIO0000001368 (POR)
EIO0000001384 (ENG)
EIO0000001385 (FRA)
EIO0000001386 (GER)
EIO0000001387 (SPA)
EIO0000001388 (ITA)
EIO0000001389 (CHS)
EIO0000001370 (POR)
EIO0000001371 (TUR)
EIO0000001782 (ENG)
EIO0000001783 (FRA)
EIO0000001784 (GER)
EIO0000001785 (SPA)
EIO0000001786 (ITA)
EIO0000001787 (CHS)
EIO0000001788 (POR)
EIO0000001789 (TUR)
EIO0000001354 07/2014
Title of Documentation
Reference Number
EIO0000001768 (ENG)
EIO0000001769 (FRE)
EIO0000001770 (GER)
EIO0000001771 (SPA)
EIO0000001772 (ITA)
EIO0000001773 (CHS)
EIO0000001775 (TUR)
EIO0000001774 (POR)
EIO0000001396 (ENG)
EIO0000001397 (FRA)
EIO0000001398 (GER)
EIO0000001399 (SPA)
EIO0000001400 (ITA)
EIO0000001401 (CHS)
EIO0000001374 (POR)
EIO0000001375 (TUR)
EIO0000001408 (ENG)
EIO0000001409 (FRA)
EIO0000001410 (GER)
EIO0000001411 (SPA)
EIO0000001412 (ITA)
EIO0000001413 (CHS)
EIO0000001376 (POR)
EIO0000001377 (TUR)
EIO0000001414 (ENG)
EIO0000001415 (FRA)
EIO0000001416 (GER)
EIO0000001417 (SPA)
EIO0000001418 (ITA)
EIO0000001419 (CHS)
EIO0000001378 (POR)
EIO0000001379 (TUR)
EIO0000001420 (ENG)
EIO0000001421 (FRA)
EIO0000001422 (GER)
EIO0000001423 (SPA)
EIO0000001424 (ITA)
EIO0000001425 (CHS)
EIO0000001380 (POR)
EIO0000001381 (TUR)
EIO0000001354 07/2014
11
Title of Documentation
Reference Number
EIO0000001831 (ENG)
EIO0000001832 (FRA)
EIO0000001833 (GER)
EIO0000001834 (SPA)
EIO0000001835 (ITA)
EIO0000001836 (CHS)
EIO0000001837 (POR)
EIO0000001838 (TUR)
EIO0000001426 (ENG)
EIO0000001427 (FRA)
EIO0000001428 (GER)
EIO0000001429 (SPA)
EIO0000001430 (ITA)
EIO0000001431 (CHS)
EIO0000001382 (POR)
EIO0000001383 (TUR)
EIO0000000396 (ENG)
EIO0000000397 (FRE)
EIO0000000398 (GER)
EIO0000000399 (SPA)
EIO0000000400 (ITA)
EIO0000000401 (CHS)
EIO0000000028 (ENG)
EIO0000000029 (FRA)
EIO0000000030 (GER)
EIO0000000031 (SPA)
EIO0000000032 (ITA)
EIO0000000033 (CHS)
EIO0000000034 (ENG)
EIO0000000035 (FRA)
EIO0000000036 (GER)
EIO0000000037 (SPA)
EIO0000000038 (ITA)
EIO0000000039 (CHS)
You can download these technical publications and other technical information from our website
at www.schneider-electric.com.
12
EIO0000001354 07/2014
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.
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.
EIO0000001354 07/2014
13
14
EIO0000001354 07/2014
SoMachine Basic
Getting Started with SoMachine Basic
EIO0000001354 07/2014
Part I
Getting Started with SoMachine Basic
Chapter Name
Page
17
27
EIO0000001354 07/2014
15
16
EIO0000001354 07/2014
SoMachine Basic
Introduction to SoMachine Basic
EIO0000001354 07/2014
Chapter 1
Introduction to SoMachine Basic
Topic
Page
1.1
18
1.2
22
EIO0000001354 07/2014
17
Section 1.1
System Requirements and Supported Devices
18
Page
System Requirements
19
Supported Devices
20
21
EIO0000001354 07/2014
System Requirements
Overview
The minimum system requirements for SoMachine Basic are:
Intel Core 2 Duo processor or greater
1 GB RAM
The 32- or 64-bit version of one of the following operating systems:
Microsoft Windows XP Service Pack 3
Microsoft Windows 7
EIO0000001354 07/2014
19
Supported Devices
M221 Logic Controllers
For more information about module configuration, refer to the following programming and
hardware guides:
Logic Controller Type
Hardware Guide
Programming Guide
TMC2 Cartridges
For more information about cartridge configuration, refer to the following programming and
hardware guides:
Cartridge Type
Hardware Guide
Programming Guide
TMC2 Cartridges
Hardware Guide
TM3 Digital I/O Expansion Modules TM3 Digital I/O Expansion Modules
Hardware Guide
TM3 Analog I/O Expansion
Modules
Programming Guide
TM3 Expansion Modules Programming
Guide
TM3 Expert I/O Expansion Modules TM3 Expert I/O Modules Hardware
Guide
TM3 Safety Modules
Hardware Guide
Programming Guide
20
EIO0000001354 07/2014
EIO0000001354 07/2014
21
Section 1.2
SoMachine Basic User Interface Basics
22
Page
23
24
25
Operating Modes
26
EIO0000001354 07/2014
EIO0000001354 07/2014
23
24
EIO0000001354 07/2014
EIO0000001354 07/2014
25
Operating Modes
Introduction
The operating modes provide control to develop, debug, monitor, and modify the application when
the controller is connected or not connected to SoMachine Basic.
SoMachine Basic can operate in the following modes.
Offline mode
Online mode
Simulator mode
Offline Mode
SoMachine Basic operates in offline mode when no physical connection to a logic controller has
been established.
In offline mode, you configure SoMachine Basic to match the hardware components you are
targeting, then develop your application.
Online Mode
SoMachine Basic operates in online mode if:
a logic controller is physically connected to the PC.
SoMachine Basic is simulating a virtual logic controller (known as simulator mode).
In online mode, you can proceed to download your application to the logic controller (downloading
and uploading application is not possible in the simulator mode because the application is directly
saved in the simulated logic controller). SoMachine Basic then synchronizes the application in the
PC memory with the version stored in the logic controller, allowing you to debug, monitor, and
modify the application.
You cannot modify a program in online mode.
NOTE: Online program modifications are subjected to the predefined configuration. See Memory
Management (see page 36). In addition, refer to Debugging in Online Mode (see page 153) for
more information.
Simulator Mode
SoMachine Basic operates in simulator mode when a connection has been established with a
simulated logic controller. In simulator mode, no physical connection to a logic controller is
established; instead SoMachine Basic simulates a connection to a logic controller and the
expansion modules to run and test the program.
For more information, refer to SoMachine Basic Simulator (see page 164).
26
EIO0000001354 07/2014
SoMachine Basic
Starting with SoMachine Basic
EIO0000001354 07/2014
Chapter 2
Starting with SoMachine Basic
EIO0000001354 07/2014
27
Section 2.1
The Start Page
28
Page
29
30
Projects Window
31
Connect Window
32
34
35
Memory Management
36
EIO0000001354 07/2014
EIO0000001354 07/2014
29
Action
Click the Register now button at the top of the Start Page window.
Follow the instructions on the Registration Wizard. Click the Help button for more details.
To view details on the license key installed on your PC, click About on the Start Page window.
30
EIO0000001354 07/2014
Projects Window
Overview
Use the Projects window to create a new SoMachine Basic project or to open an existing
SoMachine Basic, TwidoSoft, or TwidoSuite project to work with.
The right-hand area of the Projects window contains links to additional useful information.
Opening a SoMachine Basic Project File
Follow these steps to open a project file:
Step
Action
Action
Click Open an existing project, select any of the following in the Files of type list, and then
browse and select an existing project with respective extension:
TwidoSuite Project Files (*.xpr)
Twido Archive Project Files (*.xar)
TwidoSoft Project Files (*.twd)
Result: The selected project file opens and the Configuration tab is displayed.
EIO0000001354 07/2014
31
Connect Window
Connected Devices
The Connect window shows 2 lists of logic controllers:
1. Local Devices
Displays all logic controllers directly connected to the PC with the physical COM ports of the PC
(COM1, for example), with USB cables, or through virtualized COM ports (by USB-to-serial
converters or Bluetooth dongles).
2. Ethernet Devices
Displays all logic controllers that are accessible on the same Ethernet subnet as the PC running
SoMachine Basic. Devices behind a router or any device that blocks UDP broadcasts are not
listed.
The list includes logic controllers that are automatically detected by SoMachine Basic as well as
any controllers that you choose to add manually.
Manually Adding Controllers
Follow these steps to add a logic controller to the Ethernet Devices list:
Step
Action
1 In the Remote Lookup field, type the IP address of the logic controller to add, for example,
12.123.134.21
2 Click Add to add the device to the Ethernet Devices list.
32
EIO0000001354 07/2014
Connecting to a Controller
Follow these steps to connect a controller to SoMachine Basic:
Step
Action
1
Click
2 Select one of the logic controllers in the Local Devices or Ethernet Devices lists.
If a controller is connected by Ethernet on the same network cable than your PC, the IP address of
the controller appears in the list. Selecting the IP address in the list enables
(IP Address
Configuration button). Click this button to change the IP address of the controller.
3
If required, click
(Start Fashing LEDs button) to flash the LEDs of the selected controller to
identify the controller physically by its flashing LEDs. Click this button again to stop flashing the LEDs.
4 Click Login button to log in to the selected controller.
If the logic controller is password protected, you are prompted to provide the password. Type the
password and click OK to connect.
Result: A status bar appears showing the connection progress.
5 When the connection is successfully established, details about the logic controller appear in the
Selected Controller area of the window and the following buttons are available:
Download application to controller: To download an application to the logic controller without
opening it in SoMachine Basic. Refer to Directly Downloading an Application (see page 35).
Memory Management: To Back up (see page 178) or restore (see page 179) the logic controller
memory to or from a PC. Refer to Memory Management (see page 36).
Upload application from controller: To create a new SoMachine Basic project file by uploading
an application from the connected logic controller. Refer to Uploading an Application
(see page 182).
6 Click Logout button to log out from the connected controller.
EIO0000001354 07/2014
33
Action
Select a project template file (*.smbe) in the Projects list and click Open Template.
Result: A new project is created as a copy of the selected template.
NOTE: SoMachine Basic also provides a Vijeo-Designer application file and a System User
Guide for some example projects. Read the description of the selected project in the Description
area to know whether these files are provided with your project or not. If these files are provided,
Open associated folder option gets activated on selection of such projects. Select the project
and click Open associated folder to browse through the project template files (*.smbe) and
Vijeo-Designer application files (*.vdz) in the Windows Explorer.
34
EIO0000001354 07/2014
Action
Physically connect the PC running SoMachine Basic to the logic controller using a serial, USB,
or Ethernet cable.
Select the logic controller in the Local Devices or Ethernet Devices list and click Login.
Result: SoMachine Basic establishes the connection to the logic controller.
In the Project File field, click the browse button, select the SoMachine Basic project file (*.smbp)
to download, and click Open.
Information about the selected project file appears in the Information area of the window:
Whether the project file is protected with a password and, if so, whether View and Download
are both allowed, or Download only.
Information about the configuration contained in the project file, for example, whether the
detected configuration of the logic controller system is compatible with the configuration
contained in the selected project.
SoMachine Basic compiles the application in the selected project file. Any errors detected during
compilation are listed under Compilation errors. SoMachine Basic does not allow the
application to be downloaded if compilation errors have been detected; open the project in
SoMachine Basic, correct the errors, then try again.
Before downloading, you can click the following buttons to control the current logic controller
state:
Stop Controller
Start Controller
Initialize Controller
EIO0000001354 07/2014
35
Memory Management
Overview
Click the Memory Management button on the Connect window to back up or restore the logic
controller memory.
Select the action to perform:
Backing up to a PC (see page 178)
Restore from a PC (see page 179)
36
EIO0000001354 07/2014
SoMachine Basic
Developing SoMachine Basic Applications
EIO0000001354 07/2014
Part II
Developing SoMachine Basic Applications
Chapter Name
Page
39
Properties
47
Configuration
53
Programming
57
Commissioning
157
185
EIO0000001354 07/2014
37
38
EIO0000001354 07/2014
SoMachine Basic
SoMachine Basic
EIO0000001354 07/2014
Chapter 3
The SoMachine Basic Window
EIO0000001354 07/2014
39
SoMachine Basic
Section 3.1
Overview of the SoMachine Basic Window
40
Page
Toolbar Buttons
41
Status Area
43
System Settings
45
EIO0000001354 07/2014
SoMachine Basic
Toolbar Buttons
Introduction
The toolbar appears at the top of the SoMachine Basic window to provide easy access to
commonly used functions.
Toolbar
SoMachine Basic has the following toolbars:
Icon
Description
Create a new project
Save the current project. Use the down arrow to display a menu with Save and Save as options.
Cut
Copy
Paste
EIO0000001354 07/2014
41
SoMachine Basic
Icon
Description
Reinitialize the logic controller (only available in online mode)
42
EIO0000001354 07/2014
SoMachine Basic
Status Area
Overview
The status area at the top of the main window displays status and information messages on the
current system status.
This graphic shows the status area in SoMachine Basic:
Possible Message
Description
Program status
[No errors]
[Program advisory(ies)
detected]
Program is incomplete.
[Not connected]
[Online]
Connection status
EIO0000001354 07/2014
43
SoMachine Basic
Message Type
Possible Message
[Not Connected]
Controller status
(appears only if
[Halted]
SoMachine Basic is
in online mode)
[Stop]
[Run]
[Powerless]
[Firmware download]
[Firmware Error]
[No Application]
[Power Up]
[Scan Time 0 s]
Scan time
(appears only if
SoMachine Basic is
in online mode)
Controller last
detected error
(appears only if
SoMachine Basic is
in online mode)
Description
No errors detected.
[Run/Stop input]
[Stop command]
[Stop due to hardware fault] Controller is stopped due to detected error in the hardware.
[Power outage]
[Controller is configured in
Start in Stop mode]
[Init command]
Unidentified reason.
Refer to the programming guide of the logic controller for a complete list of the system bits and
system words.
44
EIO0000001354 07/2014
SoMachine Basic
System Settings
Overview
This window allows you to set the language of the SoMachine Basic software, customize the
Ladder editor, and choose the default logic controller that appears on the Configuration tab when
you create a new project.
Changing the User Interface Language
Follow these steps to change the user interface language:
Step
Action
Close and restart SoMachine Basic to view the user interface in the new language.
Action
Set the Number of columns (11...30) for the cells in the Ladder editor.
The default value of number of cells is 11.
For more information, refer to Programming Principles for Ladder Diagrams (see page 121).
Reset to pointer: After selecting and placing a contact or a coil in a rung, the pointer tool
is automatically selected.To insert the same contact or coil element again, select it in the
toolbar.
EIO0000001354 07/2014
45
SoMachine Basic
Step
5
Action
Choose the Shortcuts and toolbar style setting for the Ladder Editor:
SoMachine Basic set (default)
Asian set 1
Asian set 2
European set
American set
For the selected style, the table displays a list of keyboard shortcuts for each of the toolbar
buttons displayed.
Click Apply and close the System Settings window to view the changes in the Ladder editor.
46
Action
Click Preferred controller and choose a default logic controller from the list.
Close and restart SoMachine Basic to view the new default logic controller in the Configuration
tab when a new project is created.
EIO0000001354 07/2014
SoMachine Basic
Properties
EIO0000001354 07/2014
Chapter 4
Properties
Properties
EIO0000001354 07/2014
47
Properties
Section 4.1
Overview of the Properties Window
48
Page
49
Project Properties
50
EIO0000001354 07/2014
Properties
1
2
Details about the developer and the company developing the project.
Information about the project itself.
If the project is to be password protected, the password that must be entered correctly to open
the project in SoMachine Basic.
If the application stored in the logic controller controller is to be password protected, the
password that must be entered correctly to upload the application into a SoMachine Basic
project.
EIO0000001354 07/2014
49
Properties
Project Properties
Overview
Use the Properties window to provide details about the user of SoMachine Basic, the company
developing the application, and the project. In this window, you can also password protect the
project file and the application when stored in the logic controller.
Specifying Application Developer Properties
To specify the application developer properties:
Step
Action
Display the Properties tab and click Project Properties Front Page.
Click Apply.
NOTE: This information appears in the Windows Explorer properties window when you right-click
on a SoMachine Basic project file.
Specifying Company Properties
To specify the company properties:
Step
Action
Click Apply.
50
Action
Display the Properties tab and click Project Properties Project Information.
Click Apply.
EIO0000001354 07/2014
Properties
Action
Display the Properties tab and click Project Properties Project Protection.
Select the Active option. Required items of information are marked with an asterisk (*).
Type the password to use in the Password field then type it again in the Confirmation field.
Click Apply.
Action
Display the Properties tab and click Project Properties Project Protection.
Click Apply.
NOTE: If prompted to provide the current password before the Inactive option applies
successfully, type the password and click Apply.
EIO0000001354 07/2014
51
Properties
Action
Display the Properties tab and click Project Properties Application Protection.
Click Apply.
Action
Display the Properties tab and click Project Properties Application Protection.
Click Apply.
NOTE: If prompted to provide the current password before the Inactive option applies
successfully, type the password and click Apply.
52
EIO0000001354 07/2014
SoMachine Basic
Configuration
EIO0000001354 07/2014
Chapter 5
Configuration
Configuration
EIO0000001354 07/2014
53
Configuration
Section 5.1
Overview of the Configuration Window
54
Page
55
Building a Configuration
56
EIO0000001354 07/2014
Configuration
1
2
3
4
EIO0000001354 07/2014
55
Configuration
Building a Configuration
Replacing the Default Logic Controller
When you create a new SoMachine Basic project, a logic controller reference appears in the
central area of the Configuration window.
Step
1
Action
Click the Configuration tab.
Expand the logic controller category in the catalog area on the right, if it is not already displayed.
Select a logic controller reference. A short description of the physical properties of the logic
controller appear in the Device description area.
Drag the logic controller reference over the image of the existing logic controller in the central
area of the window and drop it.
Click Yes when prompted to confirm replacing the logic controller reference.
NOTE: The default controller reference is specified in the System Settings window (see page 45).
Configuring the Logic Controller
Use the Configuration window to configure the logic controller.
Refer to the Programming Guide of the logic controller used in the configuration for details.
Configuring Expansion Modules
Use the Configuration window to add and configure expansion modules.
Refer to the Programming Guide of the expansion module used in the configuration for details.
56
EIO0000001354 07/2014
SoMachine Basic
Programming
EIO0000001354 07/2014
Chapter 6
Programming
Programming
What Is in This Chapter?
This chapter contains the following sections:
Section
Topic
Page
6.1
58
6.2
Special Functions
59
6.3
69
6.4
Managing POUs
76
6.5
Master Task
85
6.6
Periodic Task
89
6.7
Event Task
93
6.8
Using Tools
100
6.9
118
135
6.11
146
6.12
153
6.10
EIO0000001354 07/2014
57
Programming
Section 6.1
Overview of the Programming Workspace
1
2
3
58
The Programming Tree allows you to configure the properties of the program and its objects, and functions,
as well as a number of tools you can use to monitor and debug the program.
The upper central area is the programming workspace where you enter the source code of your program.
The lower central area allows you to view and configure the properties of the item currently selected in the
program or the Programming Tree.
EIO0000001354 07/2014
Programming
Section 6.2
Special Functions
Special Functions
What Is in This Section?
This section contains the following topics:
Topic
Page
Objects
60
Symbolic Addressing
61
Memory Allocation
64
Ladder/List Reversibility
65
67
EIO0000001354 07/2014
59
Programming
Objects
Overview
In SoMachine Basic, the term object is used to represent an area of logic controller memory
reserved for use by an application. Objects can be:
Simple software variables, such as memory bits and words
Addresses of digital or analog inputs and outputs
Controller-internal variables, such as system words and system bits
Predefined system functions or function blocks, such as timers and counters.
Controller memory is either pre-allocated for certain object types, or automatically allocated when
an application is downloaded to the logic controller.
Objects can only be addressed by a program once memory has been allocated. Objects are
addressed using the prefix %. For example, %MW12 is the address of a memory word, %Q0.3 is the
address of an embedded digital output, and %TM0 is the address of a Timer function block.
60
EIO0000001354 07/2014
Programming
Symbolic Addressing
Introduction
SoMachine Basic supports the symbolic addressing of language objects; that is, the indirect
addressing of objects by name. Using symbols allows for quick examination and analysis of
program logic, and greatly simplifies the development and testing of an application.
Example
For example, WASH_END is a symbol that could be used to identify an instance of a Timer function
block representing the end of a wash cycle. Recalling the purpose of this name is easier than trying
to remember the role of a program address such as %TM3.
To Define a Symbol in the Properties Window
To define a symbol in the properties window:
Step
Action
Select the Tools tab in the left-hand area of the Programming window.
Select the type of object with which to define a symbol, for example I/O objects Digital
inputs, to display the properties of digital inputs.
The properties window of the object type appears in the lower central area of the Programming
window.
Double-click in the Symbol column of the properties table and type the symbol to define for a
particular item, for example Input_1 for the input %I0.2
Click Apply.
EIO0000001354 07/2014
61
Programming
Action
In the Ladder editor, click the Symbol line of a graphic element, for example a latch or function
block. A cursor appears:
Type the symbol to use, for example Input_1 and press Enter. The following rules apply to
symbols:
A maximum of 32 characters.
Letters (A-Z), numbers (0-9), or underscores (_).
First character must be a letter. You cannot use the percentage sign (%).
Symbols are not case-sensitive. For example, Pump1 and PUMP1 are the same symbol and
can only be used uniquely for any given object; that is, you cannot assign the same symbol
to different objects.
If the graphic element is not yet associated with an object, the Remark window appears. Select
an object to associate with the symbol and click OK.
Otherwise, click Yes when prompted to associate the symbol with the object.
Double-click either the symbol or object of the graphic element to display the symbol in the
Symbol column of the properties window:
62
EIO0000001354 07/2014
Programming
Storing Symbols
Symbols are stored in the logic controller as part of a SoMachine Basic application.
EIO0000001354 07/2014
63
Programming
Memory Allocation
Introduction
SoMachine Basic allows you to pre-allocate (reserve) blocks of logic controller memory for use by
certain object types used in a program, including simple objects (memory words, constant words)
and software objects (function blocks).
Allocation Modes
In offline mode, you can specify the memory allocation mode for each object type. When
configuring these objects (Programming Tools), the following window then appears above the
list of configurable objects:
SoMachine Basic displays the total number of Allocated memory objects and the Maximum
number of memory objects available in the logic controller.
64
EIO0000001354 07/2014
Programming
Ladder/List Reversibility
Introduction
SoMachine Basic supports conversion of rungs from Ladder Diagram to Instruction List and from
Instruction List back to Ladder Diagram. This is called program reversibility.
In SoMachine Basic, you can toggle rungs between programming languages at any time as
required. You can therefore display a program with some rungs in Ladder Diagram and other rungs
in Instruction List.
Understanding Reversibility
A key to understanding program reversibility is examining the relationship between a Ladder
Diagram rung and the associated Instruction List rung:
Ladder Diagram rung: A collection of Ladder Diagram instructions that constitute a logical
expression.
List sequence: A collection of Instruction List programming instructions that correspond to the
Ladder Diagram instructions and represents the same logical expression.
The following illustration displays a common Ladder Diagram rung and its equivalent program logic
expressed as a sequence of Instruction List instructions.
65
Programming
66
EIO0000001354 07/2014
Programming
Action
In this rung, click the LD > IL button to display Instruction List source code.
Select and copy (Ctrl+C) the source code for the first rung of the sample program.
Right-click on the line number 0000 of the first instruction and choose Paste Instructions to
paste the source code into the rung:
NOTE: Remember to delete the LD instruction from the last line of the rung if you have pasted
the instructions by inserting the line(s) before the default LD operator.
5
Click the IL > LD button to display the Ladder Diagram source code.
6
Repeat the previous steps for any additional rungs in the sample program. Click
the toolbar to add new rungs.
EIO0000001354 07/2014
on
67
Programming
Example
Instruction List program:
Rung
Source Code
BLK %R0
LD
%M1
I
LD
%I0.3
ANDN %R2.E
O
END_BLK
LD
%I0.3
[%MW20:=%R2.O]
LD
%I0.2
ANDN %R2.F
[%R2.I:=%MW34]
ST
%M1
68
EIO0000001354 07/2014
Programming
Section 6.3
Configuring Program Behavior and Tasks
Page
Application Behavior
70
73
EIO0000001354 07/2014
69
Programming
Application Behavior
Overview
You can configure the following aspects of how the application interacts with the logic controller:
Functional levels (see page 70)
Startup (see page 71)
Watchdog (see page 71)
Fallback behavior (see page 72)
Action
Select the Tasks tab in the left-hand area of the Programming window.
Functional Levels
Your system could include logic controllers with different firmware versions, and therefore with
different capability levels. SoMachine Basic supports functional level management to allow you to
control the functional level of your application.
Select a level from the Functional levels list:
Level 1.0: First release of the combination of the SoMachine Basic software and the compatible
firmware version(s).
Level 2.0: Contains any enhancements and corrections over the previous level software and
firmware. For example, for Pulse Train Output (PTO) support, it would be necessary to select
this functional level or greater.
The functional level management allows you to maintain the original functional level of an
application when it is necessary to transfer that application to a newer controller which could, from
stock, have a higher functional level firmware installed. In this case, you can choose the lower
functional level with SoMachine Basic, load the appropriate version of the firmware to the controller
and then transfer the application and thereby maintaining compatibility.
70
EIO0000001354 07/2014
Programming
Startup
Specify how the program behaves following a restart of the logic controller:
Start In Previous State: The program starts in the execution mode that it was in before the
restart.
Start In Stop: The logic controller does not start in automatic application execution mode.
Start In Run (default): The logic controller starts in automatic application execution mode.
When using Automatic Start in Run, the controller will start executing program logic when power is
applied to the equipment. It is essential to know in advance how automatic reactivation of the
outputs will affect the process or machine being controlled. Configure the Run/Stop input to help
control the Automatic Start in Run feature. In addition, the Run/Stop input is designed to give local
control over remote RUN commands. If the possibility of a remote RUN command after the
controller had been stopped locally by SoMachine would have unintended consequences, you
must configure and wire the Run/Stop input to help control this situation.
WARNING
UNINTENDED MACHINE START-UP
Confirm that the automatic reactivation of the outputs does not produce unintended
consequences before using the Automatic Start in Run setting.
Use the Run/Stop input to help avoid an unwanted restart in Run mode and to help prevent
the unintentional start-up from a remote location.
Verify the state of security of your machine or process environment before applying power to
the Run/Stop input or before issuing a Run command from a remote location.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
WARNING
UNINTENDED MACHINE OR PROCESS START-UP
Verify the state of security of your machine or process environment before applying power to
the Run/Stop input.
Use the Run/Stop input to help prevent the unintentional start-up from a remote location.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
Watchdog
A watchdog is a special timer used to ensure that programs do not overrun their allocated scan
time.
The watchdog timer has a default value of 250 ms. Specify the duration of the watchdog scan task.
The possible range is 10...500 ms.
EIO0000001354 07/2014
71
Programming
Fallback Behavior
Specify the fallback mode to use when the logic controller enters the STOPPED or an exception
state for any reason.
Two fallback modes exist:
By default, all outputs are set to the fallback values set in the configuration properties of
embedded logic controller and expansion module outputs.
Refer to the Programming Guide of the logic controller or expansion module for information on
configuring fallback values for outputs.
Select Maintain values to keep each output in its current state when the logic controller enters
the STOPPED or an exception state. In this mode, any fallback values configured for logic
controller and expansion module outputs are ignored.
72
EIO0000001354 07/2014
Programming
Periodic tasks and events are configured in periodic scan mode. Master task can be configured in
either normal scan mode or periodic scan mode.
Tasks Priorities
This table summarizes the task types and their priorities:
Task Type
Scan Mode
Triggering Condition
Configurable
Range
Maximum
Number of
Tasks
Priority
Master
Normal
Normal
Not applicable
Lowest
Periodic
Software timer
2...150 ms
Periodic
Periodic
Software timer
5...255 ms
Event
Periodic
Physical inputs
%I0.2...%I0.5
Highest
2 events per
%HSC object
Events Priorities
Refer to Event Priorities and Queues (see page 96).
EIO0000001354 07/2014
73
Programming
74
EIO0000001354 07/2014
Programming
The event tasks are triggered by a hardware interruption that sends a task event to the event task.
EIO0000001354 07/2014
75
Programming
Section 6.4
Managing POUs
Managing POUs
What Is in This Section?
This section contains the following topics:
Topic
76
Page
POUs
77
78
Managing Rungs
80
Free POUs
83
EIO0000001354 07/2014
Programming
POUs
Overview
A Program Organization Unit (POU) is a reusable object used in a program. Each POU consists of
a variable declaration and a set of instructions in the source code of a supported programming
language.
One POU always exists and is linked to the master task of the program. This POU is then called
automatically whenever the program starts.
You can create additional POUs containing other objects, for example, functions or function blocks.
When first created, a POU can be either:
associated with a task (see page 78), or
a Free POU (see page 83). A Free POU is not associated with a specific task or event. A Free
POU can, for example, contain library functions that are maintained independently of the main
program. Free POUs are called from within programs as either subroutines or jumps. A periodic
task (see page 90) is a subroutine that is implemented as a Free POU.
EIO0000001354 07/2014
77
Programming
Action
Select the Tasks tab in the left-hand area of the Programming window.
Tasks tab.
Result: A new POU is added to the program structure immediately below the default/last POU
in the Master Task. The default name is n - New POU, where n is an integer incremented each
time a POU is created.
3
If required to reposition a POU in the Master Task, select a POU and click the UP or DOWN
button on the toolbar at the top of the Tasks tab to move the selected POU up or down in the
program structure.
Action
Select the Tasks tab in the left-hand area of the Programming window.
Right-click on an existing POU in the Master Task and choose Copy POU from the contextual
menu that appears.
Right-click on the Master Task and choose Paste POU from the contextual menu that appears.
Result: A new POU is added to the program structure immediately below the default/last POU
in the Master Task with the same name as the copied POU.
Renaming a POU
Step
78
Action
Select the Tasks tab in the left-hand area of the Programming window.
Type the new name for the POU and press ENTER.
EIO0000001354 07/2014
Programming
Removing a POU
Step
Action
Select the Tasks tab in the left-hand area of the Programming window.
Right-click on a POU in the Master Task and choose Delete POU from the contextual menu that
appears.
EIO0000001354 07/2014
79
Programming
Managing Rungs
Creating a Rung
Step
Action
Select the Tasks tab in the left-hand area of the Programming window.
tab.
Select a POU and click
If required to reposition a rung in a POU, select a rung and click the UP or DOWN button on the
toolbar at the top of the Tasks tab to move the selected rung up or down in the program structure.
The rung is given sequence identifier, such as Rung0. You may additionally add a rung comment
to identify the rung by clicking the rung header.
If this rung is to be called with a JUMP instruction, assign a label to the rung by clicking the dropdown button below the rung sequence identifier Rungx, where x is the rung number in a POU,
and choose %L from the list.
Result: The rung is labled as %Ly, where y is the label number. %L appears on the button and
the label number y appears in suffix with the button.
NOTE: The label number is incremented by 1 as you define the next label.
To modify the label number, double-click the label number in a rung and enter the new number
and then press ENTER.
80
EIO0000001354 07/2014
Programming
Action
Select the Tasks tab in the left-hand area of the Programming window.
3
Click
(Insert a new Rung button) on the toolbar at the top of the programming
workspace.
Result: A new rung appears above the selected rung.
4
The rung is given sequence identifier, such as Rung0. You may additionally add a rung comment
to identify the rung by clicking the rung header.
If this rung is to be called with a JUMP instruction, assign a label to the rung by clicking the dropdown button below the rung sequence identifier Rungx, where x is the rung number in a POU,
and choose %L from the list.
Result: The rung is labled as %Ly, where y is the label number. %L appears on the button and
the label number y appears in suffix with the button.
NOTE: The label number is incremented by 1 as you define the next label.
To modify the label number, double-click the label number in a rung and enter the new number
and then press ENTER.
Copying a Rung
Step
Action
Select the Tasks tab in the left-hand area of the Programming window.
Right-click on the rung to copy and choose Copy selected rung from the contextual menu that
appears.
Right-click on a POU and choose Paste Rung from the contextual menu that appears.
Result: A copy of the rung is inserted with no label.
NOTE: Label of the rung is not copied when you copy a rung.
NOTE: You can also copy and paste rungs in the Programming window:
Step
Action
EIO0000001354 07/2014
81
Programming
Renaming a Rung
Step
Action
Select the Tasks tab in the left-hand area of the Programming window.
Type the new name for the rung and press ENTER.
Deleting a Rung
Step
Action
Select the Tasks tab in the left-hand area of the Programming window.
tab.
82
If the rung is not empty, you are prompted to confirm deleting the rung. Click Yes to confirm
deletion, or click No to cancel the operation.
EIO0000001354 07/2014
Programming
Free POUs
Introduction
In SoMachine Basic, a Free POU is a special type of POU that is not explicitly associated with a
task:
Each Free POU is implemented as a subroutine made up of 1 or more rungs written in any of the
programming languages supported by SoMachine Basic.
Free POUs are consumed when:
Called using a subroutine call (SRi) from within a program rung
Configured as the periodic task
Configured as an event task, for example, the subroutine for threshold 0 of a High Speed
Counter (HSC) function block (%HSCi.TH0)
When consumed as periodic or event tasks, the Free POU subroutine is automatically moved from
the Free POUs area of the Tasks window to the Periodic Task or Events area of the window,
respectively.
When no longer consumed as a periodic task of event task, the subroutine moves back to the Free
POUs area and available to be consumed by other tasks or events.
EIO0000001354 07/2014
83
Programming
Action
Select the Tasks tab in the left-hand area of the Programming window.
Right-click on Free POUs and choose Add Free POU from the contextual menu that appears.
Result: A new POU with the default name Free POU_0 and default subroutine number SR0
appears below the Free POUs branch and a new rung appears in the Programming workspace.
Optionally, right-click on the new POU and choose Rename POU, then type a new name for the
POU and press Enter.
The name of the Free POU is also updated in the rung that appears in the Programming
workspace.
Optionally, type a comment (see page 131) to associate with the Free POU.
Select Subroutine number to the right of the comment box and choose a subroutine number
from the list.
Result: The POU description in the Free POUs list is updated with the subroutine number
chosen, for example SR11.
Create the rungs and source code for the Free POU in the programming language of your choice.
Action
Select the Tasks tab in the left-hand area of the Programming window.
84
EIO0000001354 07/2014
Programming
Section 6.5
Master Task
Master Task
What Is in This Section?
This section contains the following topics:
Topic
Page
86
87
EIO0000001354 07/2014
85
Programming
86
For
Refer To
EIO0000001354 07/2014
Programming
Action
Select the Tasks tab in the left-hand area of the Programming window.
EIO0000001354 07/2014
87
Programming
Description
%S11
Watchdog overflow
%S19
Description
%SW0
%SW27
Time spent (in ms) in the system during the last master task
scan cycle
%SW30
Last scan time. Show the execution time (in ms) of the last
controller scan cycle, that is, the time elapsed between the
start (acquisition of inputs) and the end (update of outputs) of
a master task scan cycle
%SW31
Maximum scan time. Show the execution time (in ms) of the
longest controller scan time since the last cold start of the
logic controller.
%SW32
Refer to the Programming Guide for your hardware platform for a complete list of system bits and
words and their meaning.
88
EIO0000001354 07/2014
Programming
Section 6.6
Periodic Task
Periodic Task
What Is in This Section?
This section contains the following topics:
Topic
Page
90
92
EIO0000001354 07/2014
89
Programming
Action
Create a new Free POU (see page 84) containing the periodic task subroutine.
Select the Tasks tab in the left-hand area of the Programming window.
(Assign Free POU button) on the toolbar at the top of the Tasks
tab.
Right-click the Periodic Task and choose Assign Free POU from the contextual menu that appears.
Result: The Select a Free POU window is displayed:
NOTE: You can directly add a Free POU to the periodic task. Right-click the Periodic Task and choose Add
Free POU from the contextual menu that appears. In this case, a Free POU is created and assigned to the
periodic task.
90
EIO0000001354 07/2014
Programming
Step
4
Action
Select a Free POU to assign to the periodic task and click OK.
Result: The selected subroutine is assigned to the Periodic Task and no longer avaialble in the Free POU
branch of the Tasks tab.
For example, if the Free POU Free POU_0 containing the subroutine SR4 is assigned to the periodic task,
the Free POU_0 (%SR4) subroutine moves from the Free POU branch to the Periodic Task branch of the
Tasks tab.
Action
Click the Tasks tab in the left-hand area of the Programming window.
Remove the subroutine from the Periodic Task by one of the following methods:
Select the Periodic Task and click
EIO0000001354 07/2014
91
Programming
Action
Select the Tasks tab in the left-hand area of the Programming window.
92
EIO0000001354 07/2014
Programming
Section 6.7
Event Task
Event Task
What Is in This Section?
This section contains the following topics:
Topic
Page
94
Event Sources
95
96
97
EIO0000001354 07/2014
93
Programming
Description of an Event
An event is composed of:
94
An event source: a software or hardware condition that interrupts the program when the event
is triggered
A POU: an independent program entity (subroutine) associated with an event
An event queue: used to store a list of events until they are executed
A priority level: a priority assigned to events to determine the order in which they are executed.
EIO0000001354 07/2014
Programming
Event Sources
Overview
9 event sources are available:
An event source is always attached to a single event. When an event is triggered it is immediately
detected by the controller, which then executes the subroutine associated with the event.
Physical Input Events of a Logic Controller
The embedded digital inputs %I0.2, %I0.3, %I0.4 and %I0.5 of a logic controller can be configured
as event sources.
These event sources can be configured to:
Trigger events on detection of a rising edge, falling edge, or both rising and falling edges
Assign a priority to the event
Identify the subroutine associated with the event.
For further details on configuring input events, refer to the Programming Guide of the logic
controller.
Output Event of an %HSC Function Block
The threshold outputs TH0 and TH1 of the %HSC function block can be used as event sources.
Outputs TH0 and TH1 are respectively set to:
EIO0000001354 07/2014
95
Programming
WARNING
UNINTENDED EQUIPMENT OPERATION
Thoroughly test and validate all tasks (Master, Periodic and any Event tasks) and the interactive
affect they have on one another before putting your application into service.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
For configuring the event task priorities, refer to Programming Guide of your controller.
Event Queue Management
Each time an interrupt linked to an event source appears, the following sequence is launched:
Step
Description
Interrupt management:
recognition of the physical interrupt,
store the event in the suitable event queue,
verification that no event of the same priority is pending (if so, the event stays pending in the
queue).
Execution of the programming section (subroutine labeled SRi:) linked to the event.
Before the context is re-established, all the events in the queue must be executed.
96
EIO0000001354 07/2014
Programming
Action
Select the Tasks tab in the left-hand area of the Programming window.
Select Events:
NOTE: Configured event sources that have not yet been assigned a subroutine appear in red.
EIO0000001354 07/2014
97
Programming
Action
Create a new Free POU (see page 84) containing the subroutine to use for the event.
Select the Tasks tab in the left-hand area of the Programming window.
NOTE: You can directly add a Free POU to the event source. Right-click the event source in the
Events list and choose Add Free POU from the contextual menu that appears. In this case, a
Free POU is created and assigned to the event source.
4
98
Select a Free POU to assign to the event source and click OK.
Result: The selected subroutine is assigned to the event source and no longer avaialble in the
Free POU branch of the Tasks tab.
For example, if the Free POU Free POU_0 containing the subroutine SR1 is assigned to the
event source, the Free POU_0 (%SR1) subroutine moves from the Free POU branch to the
event source branch of the Tasks tab.
EIO0000001354 07/2014
Programming
Action
Click the Tasks tab in the left-hand area of the Programming window.
Remove the subroutine from the event source by one of the following methods:
Select the event source in the Events list and click
Description
%S31
%S38
%S39
Description
%SW48
The number of events that have been executed since the last cold start of the
logic controller (counts all events except periodic events).
The values of %S39 and %SW48 are reset to 0 and the values of system bits %S31 and %S38 are
set to their initial state 1 following a cold restart or after an application is loaded. Their values
remain unchanged after a warm restart. In all cases, the event queue is reset.
EIO0000001354 07/2014
99
Programming
Section 6.8
Using Tools
Using Tools
What Is in This Section?
This section contains the following topics:
Topic
100
Page
Program Messages
101
Animation Tables
102
Memory Objects
105
System Objects
108
I/O Objects
109
Software Objects
110
PTO Objects
111
112
Symbol List
114
Rung Templates
116
EIO0000001354 07/2014
Programming
Program Messages
Overview
SoMachine Basic continuously compiles the source code displayed in the Programming tab into
a program ready to be downloaded to the logic controller. If compilation is not possible, appropriate
messages are displayed.
Compilation Status
If a rung compiles successfully and there are no messages to display, a green tick symbol appears:
An alert triangle appears if SoMachine Basic cannot compile the program because the rung is
incomplete, for example, it does not contain a final instruction such as an END, CALL, or Jump:
A red cross appears if SoMachine Basic detects errors that prevent successful compilation of the
rung:
Action
EIO0000001354 07/2014
101
Programming
Animation Tables
Overview
Animation tables enables you to monitor value of objects.
You can manually add objects to an animation table and view the symbols that may be associated
with these objects. Animation tables also enable you to view and modify the real-time values of
certain object types when SoMachine Basic is connected to the logic controller and the program is
running (online mode).
Animation tables are a component of a SoMachine Basic application, and so are uploaded to the
logic controller together with the program. This allows the objects and values stored in animation
tables to be retrieved when an application is later downloaded from the logic controller.
102
Action
Select the Tools tab in the left-hand area of the Programming window.
Right-click on Animation tables and choose Add new animation table from the contextual
menu that appears.
Result: A new animation table item appears below the Animation Tables area of the Tools
window, and a properties window appears in the lower central area of the window.
EIO0000001354 07/2014
Programming
Action
Select the Tools tab in the left-hand area of the Programming window.
Select the animation table to configure in the Animation tables area of the Tools window.
Result: The properties window appears in the lower central area of the window.
To add a new item to the bottom of the animation table, type the object name into the text box
and press Enter, or click Add.
The following objects can be added to an animation table:
I/O objects
Bit strings (example: %Mx:L where L is the bit count, multiple of 8)
Word tables (example: %MWx:L where L is the word count)
Bits of words (example: %MWx:X where X is the offset of the bit)
To add a new object immediately above an existing object, select a row in the animation table,
type the name of the object to add into the text box, and click Insert.
Editable
Value
Description
Used
No
True/False
Address
No
Object address
Symbol
No
A valid symbol
Value
Yes (1)
Current value
Force
Yes (1)
Force to 0
Force to 1
Not Forced
Only appears for digital inputs and digital outputs. Only editable
when in online mode (see page 26). Allows you to force the
value of the input or output to 0 or 1 as required.
Choose Not Forced to remove any forcing currently applied to
the address.
Comment
No
A valid comment
(1) Depending on the object type and whether you are in online mode.
EIO0000001354 07/2014
103
Programming
Action
Right-click on the animation table to rename in the Animation tables area of the Tools window
and click Rename animation table.
Type the new name of the animation table and press Enter.
104
Action
Right-click on the animation table to delete in the Animation tables area of the Tools window
and click Delete animation table.
EIO0000001354 07/2014
Programming
Memory Objects
Overview
Memory objects include:
Memory bits
Memory words
Constant words
Editable
Value
Default Value
Description
Used
No
True/False
False
Address
No
Refer to Bit
Objects
N/A
Symbol
Yes
A valid symbol
None
Value
Yes
Refer to Bit
Objects.
Comment
Yes
A valid comment
None
EIO0000001354 07/2014
105
Programming
Editable
Value
Default Value
Description
Used
No
True/False
False
Equ Used
No
True/False
False
Address
No
Refer to Word
Objects
N/A
Symbol
Yes
A valid symbol
None
Value
Yes
Refer to Word
Objects.
Comment
Yes
A valid comment
None
106
EIO0000001354 07/2014
Programming
Editable
Value
Default Value
Description
Used
No
True/False
False
Equ Used
No
True/False
False
Address
No
Refer to Word
Objects
N/A
Symbol
Yes
A valid symbol
None
Value
Yes
Refer to Word
Objects
Comment
Yes
A valid comment
None
EIO0000001354 07/2014
107
Programming
System Objects
Overview
System bits and words are specific to the logic controller. For details, refer to the Programming
Guide of your logic controller.
108
EIO0000001354 07/2014
Programming
I/O Objects
Overview
The following object types are hardware-specific and depend on the logic controller being used:
Digital inputs and outputs
Analog inputs and outputs
Advanced function blocks such as fast counters, high-speed counters, and pulse generators.
For more details, refer to the Programming Guide and Advanced Functions Library Guide of your
logic controller.
EIO0000001354 07/2014
109
Programming
Software Objects
Overview
SoMachine Basic supports the following generic software objects:
Object
Description
Timers
Counters
Messages
LIFO/FIFO Registers
Drum Registers
Step Counters
Schedule Blocks
PID
These function blocks are described in the SoMachine Basic Generic Functions Library Guide.
Selecting the Memory Allocation Mode
Before viewing or updating the properties of software objects, choose the memory allocation mode
(see page 64) to use.
110
EIO0000001354 07/2014
Programming
PTO Objects
Overview
The PTO objects provide the function blocks used for programming the PTO functions. The PTO
function blocks are categorized as:
Motion
These function blocks control motions of the axis. For example, power to axis, movement of the
axis, and so on.
Administrative
These function blocks control the status and diagnostics of the axis movement. For example,
status and value of actual velocity, actual position, axis control detected errors, and so on.
For more details on the PTO function blocks, refer to the Advanced Function Library Guide of your
controller.
EIO0000001354 07/2014
111
Programming
Action
Select the Tools tab in the left-hand area of the Programming window.
It is also possible to invoke the search and replace function from various other locations in
SoMachine Basic, for example, by right-clicking on an entry in an animation table (see page 102)
and selecting Search & Replace.
You can use any of the following methods to display the Search and Replace window:
Click Search and Replace in the Tools tab of the Programming window.
Right-click on a rung or a selected item in the rung and click Search and Replace in the
112
In the Find box type the object or symbol name to find. The Find field is pre-filled if the search
was started by right-clicking on a selected item in a rung or an item in a properties window of an
object.)
You can use the following wildcard characters:
Asterisk (*). Replaces 0 or more characters in the search term. For example, %MW1* would
find both %MW1 and %MW101.
Question mark (?). Replaces exactly 1 character in the search term. For example, typing
COIL?2 would find COIL12 but not COIL012
Select Program to search for the item within the source code of the current program.
Select Comments to search for the item within program comments.
EIO0000001354 07/2014
Programming
Step
Action
Click Search or Replace. You can also press ENTER to start the search.
Replace button is enabled only when the replacement object or symbol name is given in the
Replace box.
All items found are listed in the Results list:
Optionally, select Show symbols to display instead any symbols defined for objects:
Click on any of the listed results to jump directly to the line of code in the program.
EIO0000001354 07/2014
113
Programming
Symbol List
Overview
You can display a list of all the symbols that have been associated with objects in your program.
All objects with symbols are displayed, with the exception of system bits (%S) and system words
(%SW).
Defining and Using Symbols (see page 61) describes how to create symbols and use them in your
programs.
Displaying the Symbol List
Step
Action
Select the Tools tab in the left-hand area of the Programming window.
Importing Symbols
Step
114
Action
Either click the Import button or right-click anywhere in the symbols list and choose Import
symbols.
Result: The Import Symbols window is displayed.
Browse and select the File path of the Comma Separated Values (CSV) file containing the
symbols to import.
Optionally, click Import options and configure formatting options for the imported symbols:
EIO0000001354 07/2014
Programming
Step
Action
Click Import.
Result: All symbols in the selected CSV file are created and displayed in the Symbol List
window with the specified formatting options.
If errors are detected during import, a report is displayed listing them:
Click Save to write the contents of the report to a plain text (.txt) file.
Action
Either click the Export button or right-click anywhere in the symbols list and choose Export
symbols You are prompted to save changes.
The Export Symbols window is displayed.
Browse and select the File path and File name of the Comma Separated Values (CSV) file to
be created.
Optionally, click Export options and configure formatting options for the exported values:
Click Export.
Result: A CSV file is created with the specified formatting options.
EIO0000001354 07/2014
115
Programming
Rung Templates
Overview
A rung template is a pre-configured portion of source code that you can insert into your programs
to make programming quicker while reducing coding errors. SoMachine Basic maintains separate
lists of Ladder Diagram and Instruction List rung templates.
Inserting a Rung Template into a Program
Follow these steps to insert a rung template into a program:
Step
Action
Select the Tools tab in the left-hand area of the Programming window.
Inserting a rung template into a program is possible by any of the following methods:
Select a rung in your program in the programming workspace and then double-click a rung
template.
Right-click on a rung template and click Copy rung in the context menu and then right-click
in the programming workspace and click Paste Rung in the context menu.
Result: The rung template is always inserted after the last rung in a POU. Use UP and DOWN
arrow button on the toolbar at the top of the Tasks tab to reposition the rungs in your program.
116
EIO0000001354 07/2014
Programming
EIO0000001354 07/2014
117
Programming
Section 6.9
Ladder Language Programming
118
Page
119
121
122
Comparison Blocks
129
Operation Blocks
130
Adding Comments
131
132
EIO0000001354 07/2014
Programming
All inputs and binary logic bits are represented by contact symbols (
All outputs and binary logic bits are represented by coil symbols (
).
Numerical operations are included in the graphical Ladder instruction set.
).
In the above illustration, all inputs associated with a switching device in the relay logic diagram are
shown as contacts in the Ladder Diagram. The M1 output coil in the relay logic diagram is
represented with an output coil symbol in the Ladder Diagram. The address numbers appearing
above each contact/coil symbol in the Ladder Diagram are references to the locations of the
external input/output connections to the logic controller.
EIO0000001354 07/2014
119
Programming
Inputs/outputs of the controller (push buttons, sensors, relays, pilot lights, and so on)
Functions of the controller (timers, counters, and so on)
Math and logic operations (addition, division, AND, XOR, and so on)
Comparison operators and other numerical operations (A<B, A=B, shift, rotate, and so on)
Internal variables in the controller (bits, words, and so on)
These graphical instructions are arranged with vertical and horizontal connections leading
eventually to one or several outputs and/or actions. A rung cannot support more than one group of
linked instructions.
Example of Ladder Diagram Rungs
The following diagram is an example of a Ladder Diagram program composed of 2 rungs.
120
EIO0000001354 07/2014
Programming
Test zone
Contains the conditions that are tested in order to perform actions. Consists of columns 1 to n1, where n is the number of configured columns and contains contacts, function blocks, and
comparison blocks.
Action zone
Contains the output or operation that will be performed according to the results of the tests of
the conditions in the Test zone. Consists of columns n-1 to n, where n is the number of
configured columns and contains coils and operation blocks.
EIO0000001354 07/2014
121
Programming
Action
Click the graphic element on the toolbar to insert. If the graphic element is a menu, the graphic
items in the menu appear; click the menu item to insert.
Move the mouse to the position in the rung to insert the graphic element and click.
Note: Some elements have to be inserted in the test or action zones of the rung; refer to the
description of individual graphic elements for details.
3
If necessary, click the [Selection mode] graphic element
selection.
Rungs
Use the following graphic elements to manage the rungs in a program:
Graphic
Element
122
Name
Function
Create a rung
(see page 80)
Inserts a new empty rung below the last rung in the program
workspace.
Insert a rung
(see page 81)
Removes the currently selected rung from the program. If the rung
is not empty, you are asked to confirm that you want to delete the
contents of the rung.
EIO0000001354 07/2014
Programming
Branching Modes
Use the following graphic elements to manage the branch in Ladder diagram:
Graphic
Element
Name
Function
Normal mode
Branching mode
Name
Function
Selection mode
Selection mode.
Draw line
Erase line
Contacts
Use the following graphic elements to insert contacts (one row high by one column wide).
Graphic
Element
EIO0000001354 07/2014
Name
Instruction
List
Function
LD
Normally closed
contact
LDN
LDR
LDF
123
Programming
Comparison Block
Comparison blocks are placed in the test zone of the programming grid. The block may appear in
any row or column in the test zone as long as the entire length of the instruction resides in the test
zone.
The graphic element for comparison blocks takes up 2 cells (1 row high by 2 columns wide).
Graphic
Element
Name
Instruction
List
Function
Comparison block
Any valid
comparison
expression
Boolean Operations
The graphic element for boolean operations takes up 1 cell (1 row high by 1 column wide).
Graphic
Element
124
Name
Operator
Function
XOR instructions
XOR,
XORN,
XORR,
XORF
EIO0000001354 07/2014
Programming
Functions
Function blocks always appear in the first row of the Ladder Diagram programming grid; no Ladder
instructions or lines of continuity may appear above or below the function block. Ladder test
instructions lead to the left side of the function block, and test instructions and action instructions
lead from the right side of the function.
The graphic elements of function blocks can only be placed in the test zone and require 2, 3, or 4
rows by 2 columns of cells.
Graphic
Element
Name
Function
Timers, counters,
registers, and so on.
Each of the function blocks uses inputs and outputs that enable
links to the other graphic elements.
NOTE: Outputs of function blocks cannot be connected to each
other (vertical shorts).
Coils
The coil graphic elements can only be placed in the action zone and take up 1 cell (1 row high and
1 column wide).
Graphic
Element
EIO0000001354 07/2014
Name
Operator
Function
Direct coil
ST
Inverse coil
STN
Set coil
Reset coil
125
Programming
Grafcet Instructions
Use the following graphic elements to manage the branch in Ladder diagram:
Graphic
Element
Name
Operator
Function
#D
Operation Blocks
The operation block element placed in the action zone and occupy 2 columns by 1 row:
Graphic
Element
126
Name
Operator
Function
Operation block
Any valid
operator or
assignment
instruction
EIO0000001354 07/2014
Programming
Other Items
The Other Items menu
The OPEN and SHORT instructions provide a convenient method for debugging and troubleshooting
Ladder programs. These special instructions alter the logic of a rung by either shorting or opening
the continuity of a rung as explained in the following table.
The END/JUMP graphic elements are placed in the action zone and take up 1 cell (1 row high and
1 column wide).
Graphic
Element
Name
Operator
Function
Logical NOT
OPEN
LD 0
AND 0
SHORT
LD 1
OR 1
Stop program
END
Conditional stop
program
ENDCN
Jump or subroutine
call
JMP
Conditional jump or
subroutine call
JMPCN
EIO0000001354 07/2014
127
Programming
128
Legend
Item
Description
User comment
Symbol
Click to type the name of a symbol (see page 61) to associate with
the object contained in the cell.
Address
Graphic element
Real-time value
Link zone
Click in this area to draw lines and junctions to connect this cell
with adjacent cells:
EIO0000001354 07/2014
Programming
Comparison Blocks
Inserting IL Comparison Expressions in Ladder Diagrams
You can use the Comparison Block graphical symbol to insert Instruction List comparison
expressions into Ladder Diagram rungs:
Proceed as follows:
Step
Action
1
Click the Comparison Block
EIO0000001354 07/2014
129
Programming
Operation Blocks
Inserting IL Operations and Assignment Instructions in Ladder Diagrams
You can use the Operation Block graphical symbol to insert Instruction List operations and
assignment instructions into Ladder Diagram rungs:
Action
1
Click the Operation Block
Click in the Action zone (last 2 columns) of the rung to insert the Operation Block.
Type a valid Instruction List operation or assignment instruction and press ENTER.
130
EIO0000001354 07/2014
Programming
Adding Comments
To Add Comments to Ladder Diagrams
To add comments to a Ladder Diagram program, follow these steps:
Step
Action
Type the comment for the graphic element and press ENTER.
EIO0000001354 07/2014
131
Programming
WARNING
UNINTENDED EQUIPMENT OPERATION
Do not use the equipment configured and programmed by this software in safety-critical machine
functions.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
Time and Schedule Block Management
The state of system bit %S51, which indicates any detected RTC errors should be verified.
Syntax Validation
As you are programming, SoMachine Basic validates the syntax of the instructions, the operands,
and their associations.
132
EIO0000001354 07/2014
Programming
In order to perform the same function, program the instructions in the following manner:
EIO0000001354 07/2014
133
Programming
134
EIO0000001354 07/2014
Programming
Section 6.10
Instruction List Programming
Page
136
138
139
Using Parentheses
143
EIO0000001354 07/2014
135
Programming
Line number
Current value (in online mode only)
Instruction operator
Operand(s)
Optional comment
Line Numbers
Four-digit line numbers are generated when you create a new program line and managed
automatically by SoMachine Basic.
Current Values
WhenSoMachine Basic is in online mode (see page 26) (connected to a logic controller and the
program is running), SoMachine Basic displays the current value of object types in the IL editor
window.
The displayed values of these objects are updated.
136
EIO0000001354 07/2014
Programming
Instruction Operators
The instruction operator is a mnemonic symbol, called an operator, that identifies the operation to
be performed using the operands. Typical operators specify Boolean and numerical operations.
For example, in the sample program above, LD is the mnemonic for the LOAD operator. The LOAD
instruction places (loads) the value of the operand %M1 into an internal register called the boolean
accumulator.
There are basically 2 types of operators:
Test operators
These set up or test for the conditions necessary to perform an action. For example, LOAD (LD)
and AND.
Action operators
These perform actions as a result of preceding logic. For example, assignment operators such
as STORE (ST) and RESET (R).
Controller inputs and outputs such as sensors, push buttons, and relays.
Predefined system functions such as timers and counters.
Arithmetic, logical, comparison, and numerical operations.
Controller internal variables such as system bits and words.
Comments
To add comments to an Instruction List program
Step
Action
Optionally, click the comment box that appears at the top of the rung above the first line 0000
and type a comment for the rung.
EIO0000001354 07/2014
137
Programming
138
Type of Instruction
Example
Function
Boolean instruction
LD %M10
Block instruction
IN %TM0
Word instruction
[%MW10 := %MW50+100]
Addition operation
Program instruction
SR5
Calls subroutine #5
EIO0000001354 07/2014
Programming
Test Instructions
Action instructions
Function blocks
This section identifies and describes the instructions for List programming.
Test Instructions
This table describes test instructions in List language.
Mnemonic
Name
LD
Load
LDN
Load Not
LDR
Load Rising
LDF
Load Falling
AND
And
ANDN
And Not
EIO0000001354 07/2014
Equivalent Graphic
Element
Function
139
Programming
Mnemonic
Name
ANDR
And Rising
ANDF
And Falling
OR
Or
AND(
And With
OR(
Or With
XOR
XORN
XORR
XORF
Ex Or
Ex Or Not
Ex Or Rising
Ex Or Falling
Exclusive OR
140
Equivalent Graphic
Element
Function
EIO0000001354 07/2014
Programming
Mnemonic
Name
Equivalent Graphic
Element
MPS
MRD
MPP
Function
Branch operators for output actions.
[
N
Not
Action Instructions
This table describes action instructions in List language.
Mnemonic
Name
ST
Store
STN
Store Not
Set
Reset
JMP
Jump
SRn
Subroutine
END
End
End of program.
ENDCN
End Conditional
EIO0000001354 07/2014
Equivalent
Graphic Element
Function
141
Programming
Function Blocks
This table describes function blocks in List language.
Name
Timers, counters,
registers, and so on.
142
Equivalent
Graphic Element
Function
For each of the function blocks, there are instructions for
controlling the block.
A structured form is used to connect the block inputs and
outputs.
Note: Outputs of function blocks cannot be connected to each
other (vertical shorts).
For more information, refer to Sotfware Objects
(see SoMachine Basic, Generic Functions Library Guide).
EIO0000001354 07/2014
Programming
Using Parentheses
Introduction
With AND and OR logical operators, parentheses are used to nest logical instructions. In so doing,
they specify divergences (branches) in the Ladder editor. Parentheses are associated with
instructions as follows:
Opening the parentheses is associated with the AND or OR operator.
Closing the parentheses is an instruction (an operator with no operand) which is required for
each open parenthesis.
Example Using an AND Instruction
The following examples show how to use parentheses with an AND instruction:
Rung
Instruction
LD
AND
OR
ST
%I0.0
%I0.1
%I0.2
%Q0.0
LD
AND(
OR
)
ST
%I0.0
%I0.1
%I0.2
%Q0.1
NOTE: Refer to the reversibility procedure (see page 67) to obtain the equivalent Ladder Diagram.
Example Using an OR Instruction
The following example shows how to use parentheses with an OR instruction:
Rung
Instruction
LD
AND
OR(
AND
)
ST
%I0.0
%I0.1
%I0.2
%I0.3
%Q0.0
NOTE: Refer to the reversibility procedure (see page 67) to obtain the equivalent Ladder Diagram.
EIO0000001354 07/2014
143
Programming
Modifiers
This table lists modifiers that can be assigned to parentheses.
Modifier
Function
Example
Negation
AND(N or OR(N
Falling edge
AND(F or OR(F
Rising edge
AND(R or OR(R
Comparison
NOTE: The [ modifier can also be used in conjunction with other instructions serving as an
operator. For more uses of the [ in other instructions, refer to the Introduction to Numerical
Operations.
Nesting Parenthesis
It is possible to nest up to 32 levels of parentheses.
Observe the following rules when nesting parentheses:
Each open parenthesis must have a corresponding closed parenthesis.
Labels (%Li:), subroutines (SRi:), JMP instructions (JMP), and function block instructions must
not be placed in expressions between parentheses.
Store instructions (ST, STN, S, and R) must not be programmed between parentheses.
Stack instructions (MPS, MRD, and MPP) cannot be used between parentheses.
144
EIO0000001354 07/2014
Programming
Instruction
LD
AND(
OR(N
AND
)
)
ST
LD
AND(
OR(
AND
)
AND
OR(
AND
)
)
ST
%I0.0
%I0.1
%I0.2
%M3
%Q0.0
%I0.1
%I0.2
%I0.5
%I0.6
%I0.4
%I0.7
%I0.8
%Q0.0
NOTE: Refer to the reversibility procedure (see page 67) to obtain the equivalent Ladder Diagram.
EIO0000001354 07/2014
145
Programming
Section 6.11
Grafcet (List) Programming
146
Page
147
148
151
EIO0000001354 07/2014
Programming
Operand
IL Instruction
Instruction Name
Graphic
Equivalent
Description
=*=
=*= x
INITIAL STEP
=*= POST
Not
applicable
=*= POST
POST
PROCESSING
(implicit operand)
-*-
-*- x
STEP
Not
applicable
DEACTIVATE
CURRENT STEP
(implicit operand)
#x
DEACTIVATE
CURRENT STEP
and ACTIVATE
STEPx
#D
#D x
DEACTIVATE
CURRENT STEP
and STEPx
EIO0000001354 07/2014
147
Programming
Preprocessing
Sequential processing
Post-Processing
Preprocessing
Preprocessing consists of the following:
Power returns
Error management
Changes of operating mode
Pre-positioning Grafcet steps
Input logic
In this example, the system bit %S21 to 1 with the rising edge of input %I0.6. This disables the
active steps and enables the initial steps:
Preprocessing begins with the first line of the program and ends with the first occurrence of a =*=
or -*- instruction.
148
EIO0000001354 07/2014
Programming
System bits %S21, %S22, and %S23 are dedicated to Grafcet control. Each of these system bits is
set to 1 (if needed) by the application, normally in preprocessing. The associated function is
performed by the system at the end of preprocessing and the system bit is then reset to 0 by the
system.
System Bit
Name
Description
%S21
Grafcet initialization
All active steps are deactivated and the initial steps are activated.
%S22
Grafcet re-initialization
%S23
Grafcet pre-positioning
This bit must be set to 1 if %Xi objects are explicitly written by the
application in preprocessing. If this bit is maintained to 1 by the
preprocessing without any explicit change of the %Xi objects,
Grafcet is frozen (no updates are taken into account).
Sequential Processing
Sequential processing takes place in the chart (instructions representing the chart):
Steps
Actions associated with steps
Transitions
Transition conditions
Example:
Sequential processing ends with the execution of the POST instruction or with the end of the
program.
EIO0000001354 07/2014
149
Programming
Post-Processing
Post-processing consists of the following:
Commands from the sequential processing for controlling the outputs
Interlocks specific to the outputs
Example:
150
EIO0000001354 07/2014
Programming
Action
In a POU, select a rung and click the drop-down button below the rung sequence identifier Rungx,
where x is the rung number in a POU.
Click an instruction in the list to define the rung as an initial step, post processing, or a step of the
Grafcet program.
Result: The rung is set for a Grafcet instruction. The operator of the instruction appears on the
button and the operand (step number) appears in suffix with the button.
NOTE: The step number is incremented by 1 as you define the next STEP or INITIAL STEP
instruction. You can define only one POST instruction in a program; therefore the POST instruction
does not have any step number.
To modify the step number, double-click the step number in a rung and enter the new number and
then press ENTER.
EIO0000001354 07/2014
151
Programming
Action
In a POU, select a rung in your program.
2
Click
(to deactivate the current step and optionally activate a specified step) or
(to
deactivate the current step and to deactivate the specified step) and insert this element in the action
zone of the rung (refer to Inserting a Graphic Element (see page 122)).
3
Alternatively, Press ALT+A to use ACTIVATE instruction or press ALT+D to use DEACTIVATE
instruction in the rung.
Result: The activate or deactivate ladder symbol appears in the action zone of the rung.
Press ENTER to insert this element.
In the program rung, double-click Address field on the Grafcet activate or deactivate symbol and
enter the Grafcet bit address (%Xi, where i is the step number).
For example, %X4 refers to the step 4 of the Grafcet program. If %X4 is the address for the deactivate
symbol, step 4 will be deactivated when the output of the rung, in which this symbol is used, is true.
NOTE: Current step is deactivated in every case.
152
EIO0000001354 07/2014
Programming
Section 6.12
Debugging in Online Mode
Page
Modifying Values
154
Forcing Values
155
EIO0000001354 07/2014
153
Programming
Modifying Values
Introduction
When in online mode, SoMachine Basic allows you to modify the values of certain object types.
Online updating is only possible if the object has read/write access. For example:
Refer to the description of objects in the SoMachine Basic Generic Functions Library Guide or the
Programming Guide of your hardware platform for information on which object types have
read/write access.
To modify the value of an object, add it to an animation table (see page 103) and set its properties
as required.
154
EIO0000001354 07/2014
Programming
Forcing Values
Overview
When in online mode, you can force the values of digital inputs and outputs to False (0) or True
(1). This allows you to set addresses to specific values and prevent the program logic or an external
system from changing the value. This function is mainly used for the debugging and fine-tuning of
programs.
To force the values of digital inputs or outputs when in online mode, either modify their
configuration properties or use an animation table (see page 102).
EIO0000001354 07/2014
155
Programming
EIO0000001354 07/2014
156
SoMachine Basic
Commissioning
EIO0000001354 07/2014
Chapter 7
Commissioning
Commissioning
What Is in This Chapter?
This chapter contains the following sections:
Section
Topic
Page
7.1
158
7.2
159
7.3
164
7.4
178
7.5
180
EIO0000001354 07/2014
157
Commissioning
Section 7.1
Overview of the Commissioning Window
1
2
158
Commissioning
Section 7.2
Managing the Connection to a Logic Controller
Page
160
Controller Information
162
163
EIO0000001354 07/2014
159
Commissioning
Action
In the Remote lookup field, type the IP address of the logic controller to add, for example
12.123.134.21
Action
1
Click
2
Select one of the logic controllers in the Local Devices or Ethernet Devices lists.
If a controller is connected by Ethernet on the same network cable than your PC, the IP address
of the controller appears in the list. Selecting the IP address in the list enables
(IP
Address Configuration button). Click this button to change the IP address of the controller.
3
If required, click
(Start Fashing LEDs button) to flash the LEDs of the selected controller
to identify the controller physically by its flashing LEDs. Click this button again to stop flashing
the LEDs.
160
EIO0000001354 07/2014
Commissioning
Step
Action
When connected, the protection status of the application currently stored in the logic controller
appears in the Selected Controller area of the window.
When the connection is successfully established, details about the logic controller appear in the
Selected Controller area of the window:
The firmware revision
The logic controller reference number
The reference numbers of all expansion modules connected to the logic controller
The current state of the connection between SoMachine Basic and the logic controller.
SoMachine Basic checks whether the hardware configuration of the logic controller is compatible
with the configuration of the current project.
If so, the application can be downloaded to the controller. The PC to Controller (download)
button is enabled and you can proceed to download the application (see page 181).
EIO0000001354 07/2014
161
Commissioning
Controller Information
Overview
Click Controller info in the left-hand area of the Commissioning window to display the following
information on the current state of the logic controller:
Executable RAM: This option verifies if a valid application is stored in the random access
memory (RAM) of the logic controller.
Protected RAM: This option is checked if the application in the RAM of the logic controller is
password protected.
Forced I/O: This option is checked if 1 or more digital inputs or outputs on the logic controller
are being forced to a specific value (see page 103).
Status: The current state of the logic controller.
This information can also be obtained from within a program by testing the system word %SW6.
For more information on controller states, see the programming guide of your logic controller.
Last stopped on: The date and time that the logic controller was last stopped (STOP, HALT,
and so on).
This information can also be obtained from within a program by testing the system word %SW54
through %SW57.
Last stopped reason: Displays the reason for the most recent stop of the logic controller.
This information can also be obtained from within a program by testing the system word %SW58.
Scan time (s): The following scan times:
Minimum (in microseconds): Shortest scan time since the last power-on of the logic
controller.
This information can also be obtained from within a program by testing the system word
%SW32 (in milliseconds).
Current (in microseconds): The current scan time.
This information can also be obtained from within a program by testing the system word
%SW30 (in milliseconds).
Maximum (in microseconds): The longest scan time since the last power-on of the logic
controller.
This information can also be obtained from within a program by testing the system word
%SW31 (in milliseconds).
Controller time: The following information is displayed only if the logic controller has a real time
clock (RTC):
Date (DD/MM/YYYY): The current date stored in the logic controller.
This information can also be obtained from within a program by testing the system words
%SW56 and %SW57.
Time (HH:MM:SS): The current time stored in the logic controller.
This information can also be obtained from within a program by testing the system words
%SW54 and %SW55.
The date and time are presented in same format as specified for the PC.
162
EIO0000001354 07/2014
Commissioning
Action
Select the RTC Management option in the left-hand area of the Commissioning window.
Click Apply.
EIO0000001354 07/2014
163
Commissioning
Section 7.3
SoMachine Basic Simulator
164
Page
165
167
169
172
177
EIO0000001354 07/2014
Commissioning
The philosophy of operation is such that the simulator replicates the behavior of the controller and
is, in fact, a virtual controller that you connect to with SoMachine Basic. Once you launch the
simulator, you can connect, run, stop and other associated actions that you would normally
accomplish while connected to a physical controller.
Accessing the SoMachine Basic Simulator
You can launch the simulator by any of the following methods:
Click Launch simulator button in the commissioning task area.
Press CTRL+B in the Commissioning window.
Click
Before launching the simulator, ensure that the program is valid. Otherwise, the simulator launch
is interrupted with a compilation error detected message that appears on the screen.
SoMachine Basic Simulator Windows
SoMachine Basic simulator has the following 2 windows:
Simulator time management window
Lets you control the RTC of the controller in order to simulate the passage of time and its effect
on the logical constructs affected by the RTC.
Simulator I/O manager window
Lets you manage the state of inputs/outputs of the controller and the expansion modules.
EIO0000001354 07/2014
165
Commissioning
After the connection between the PC and the virtual logic controller has been successfully
established (see How to Use the SoMachine Basic Simulator (see page 177)), SoMachine Basic
simulator windows appear on the screen:
166
EIO0000001354 07/2014
Commissioning
Click the pin symbol on the left-top of this window to pin or unpin the window to the foreground.
Click the minimize symbol on the right-top of this window to minimize the window in taskbar.
LED Status
The PWR, RUN, ERR, and STAT LEDs are simulated in the SoMachine Basic simulator I/O
manager window as they would appear on a connected base controller.
The following are the LED states displayed in the simulator I/O manager window of a simulated
logic controller:
LED
Status Information
PWR
RUN
ERR
STAT
EIO0000001354 07/2014
167
Commissioning
Input/Output Status
Simulator I/O manager window lets you monitor and control the I/Os of a controller and expansion
module when a program is running.
The inputs and outputs are displayed in a list of numbers. This list depends on the I/Os of the
selected controller and expansion module. For example, if your controller has n digital inputs, the
number list will display number starting from 0...(n-1), where each number corresponds to the
digital input at the corresponding input channel.
For a controller, the I/Os displayed are:
IN: Digital inputs.
OUT: Digital outputs.
ANA: Analog inputs.
168
EIO0000001354 07/2014
Commissioning
Control buttons:
To reset, jump back, jump forward, or end the time management associated with the RTC
Increment bar:
To fix the rate of the simulated passage of time relative to real time
1
2
3
4
5
6
EIO0000001354 07/2014
169
Commissioning
170
EIO0000001354 07/2014
Commissioning
Command
Description
Initialize
Allows you to reset the date and time back to that which is set in the Beginning time/date
field.
Jump Forward
Allows you to move forward the time and date from its current value in increments
established by the Increment bar.
Jump Back
Allows you to reverse the time and date from its current value in increments established
by the Increment bar.
End
Allows you to jump the date and time to that which is set in the End time/date field.
EIO0000001354 07/2014
171
Commissioning
Action
1 Click the digital input number in the simulator I/O manager window to change the discrete input value.
Result: Text color of the input number changes. Digital input values are identified by the text color:
Green: I/O is set to 1.
Black: I/O is set to 0.
2 Click again on the same input number to toggle the value.
172
EIO0000001354 07/2014
Commissioning
Follow these steps for bulk operation of modifying digital input values together:
Step
Action
1 Double-click the digital input number in the simulator I/O manager window,
Result: Set Discrete Inputs window listing all digital inputs, appears on the screen:
EIO0000001354 07/2014
173
Commissioning
Action
1 Double-click the analog input number in the simulator I/O manager window,
Result: Set Analog Inputs window listing all analog inputs, appears on the screen:
2 In the All Analog Inputs area of the Set Analog Inputs window, double-click the value field in the
Change Value column corresponding to the input to be modified.
3 Enter the value in the range 0...1023 and press ENTER.
4 Alternatively, in the Set Analog Inputs window, select an input from the Inputs list and move the
slider in the Change Value area to adjust the input value between 0...1023.
When you move the slider from left to right, the value increases and vice versa.
5 Click OK to save the changes and exit from the Set Analog Inputs window.
174
EIO0000001354 07/2014
Commissioning
Action
3 In the Select checkbox column, click the checkboxes corresponding to the outputs to trace.
EIO0000001354 07/2014
175
Commissioning
Step
Action
4 Select the Sample Interval from the drop-down menu to set the sample time interval for output
tracing:
1 second
5 seconds
10 seconds
20 seconds
5 Click Ok to save and exit from the Tracing Configuration window.
Result: Selected outputs are added to the Tracing window that displays tracing of the outputs with
simulated values:
176
EIO0000001354 07/2014
Commissioning
Action
Ensure that you have a valid program by checking the status message in the status area (for more
information, refer to Status Area (see page 43)). The program status should be No errors.
You can also run SoMachine Basic simulator when the program status is Advice.
Launch the simulator (refer to Accessing the Simulator (see page 165)).
Command your program using the simulator main window (refer to Control Buttons (see page 170)).
Check the LED status in the simulator main window (refer to LED Display (see page 168)).
Check the status of the inputs/outputs in the simulator I/O manager window (refer to Input/Output
Status (see page 168)).
Check the LED status in the simulator I/O manager window (refer to LED Status (see page 167)).
Modify the I/O values as required (refer to Modifying Values Using the Simulator (see page 172).
Trace the outputs as required (refer to Tracing the Outputs (see page 175).
10
11
EIO0000001354 07/2014
177
Commissioning
Section 7.4
Backing Up and Restoring Controller Memory
Action
Under Destination file, choose PC. Click the browse button, navigate to the folder in which to
write the backup file, and type the name of the backup file (*.csv).
Select Back up memory variables to include the logic controller memory in the backup. Specify
the First Memory Bit, Last Memory Bit, First Memory Word, and Last Memory Word to be
included in the backup.
NOTE: You can initiate a backup while the controller is in a [RUN] state. However, depending on
the amount of memory variables you specify to be included in the backup, it may be that the backup
can not be accomplished between logic scans. As a consequence, the backup would not
necessarily be coherent such that the value of memory variables could be modified from one scan
to another. If you wish to have a consistent set of values for the variables, you may need to first
put the controller into a [STOP] state.
178
EIO0000001354 07/2014
Commissioning
Restoring from a PC
Follow these steps to restore controller memory from a PC:
Step
1
Action
Ensure that the controller is in STOPPED state.
If the controller is in RUN state, perform any of the following actions to stop the controller:
Click stop controller icon
in the toolbar at the top of SoMachine Basic window.
In the Commissioning window, select Connet in the commissioning tree and then click Stop
Under Source file choose PC to restore the controller memory from a file stored on the PC. Click
the browse button, navigate to the folder containing the file, and select the previously backed up
file (*.csv).
If there is a power outage or communication interruption during the restore of the application data,
your machine may become inoperative. If a communication interruption or a power outage occurs,
reattempt the restore.
NOTICE
INOPERABLE EQUIPMENT
Do not interrupt the restore of the application data once the restore has begun.
Do not place your machine into service until the restore has completed successfully.
EIO0000001354 07/2014
179
Commissioning
Section 7.5
Downloading and Uploading Programs
180
Page
181
Controller Updates
183
EIO0000001354 07/2014
Commissioning
Action
Click Connect in the commissioning tree of the Commissioning window.
Select one of the logic controllers in the Local Devices or Ethernet Devices lists.
If the application has been configured to Start in Run, a hazard message is displayed and
prompts you to confirm that the application has been so configured.
Click OK to confirm the download of the application or click Cancel and modify the configuration.
Click OK to continue the transfer and overwrite the current logic controller application.
Result: A status bar appears showing the connection status.
To run the application you have downloaded, click Run controller and click OK to confirm the
action.
If a message appears informing you that the operating mode cannot be changed, click Close and
check whether the RUN/STOP switch on the logic controller is in the STOP position or,
alternatively, if the RUN/STOP input is configured, that it is not additionally preventing the
controller from passing into RUN. Otherwise, refer to the Hardware Guide of your logic controller
for details.
EIO0000001354 07/2014
181
Commissioning
Uploading an Application
Follow these steps to upload an application currently stored in the logic controller to SoMachine
Basic:
Step
182
Action
Select one of the logic controllers in the Local Devices or Ethernet Devices lists.
EIO0000001354 07/2014
Commissioning
Controller Updates
Overview
You can download firmware updates to the logic controller either directly from SoMachine Basic or
using an SD card.
Sending a Firmware Update to the Logic Controller
Performing a firmware change will delete the current application program in the device, including
the Boot Application in Flash memory.
NOTICE
LOSS OF APPLICATION DATA
Perform a backup of the application program to the hard disk of the PC before attempting a
firmware change.
Restore the application program to the device after a successful firmware change.
Action
Click the Browse button next to the Select Firmware File box and select the firmware file (*.mfw)
to download to the controller.
Click OK.
Result: The firmware download begins. Status or detected error messages are displayed in the
Details box.
If there is a power outage or communication interruption during the transfer of the application
program or a firmware change, your device may become inoperative. If a communication
interruption or a power outage occurs, reattempt the transfer.
NOTICE
INOPERABLE EQUIPMENT
Do not interrupt the transfer of the application program or a firmware change once the transfer
has begun.
Do not place the device into service until the transfer has completed successfully.
183
Commissioning
184
EIO0000001354 07/2014
SoMachine Basic
Saving Projects and Closing SoMachine Basic
EIO0000001354 07/2014
Chapter 8
Saving Projects and Closing SoMachine Basic
Page
Saving a Project
186
187
188
EIO0000001354 07/2014
185
Saving a Project
Overview
SoMachine Basic projects can be saved as files to the local PC. This file has the extension *.smbp
and contains:
Action
1
Click Save
If this is the first time you have saved the project, browse and select the folder in which to store
the project file.
Action
1
Click the menu arrow next to the Save button
186
Browse and select the folder in which to store the project file.
Type the new name of the project file and click Save.
EIO0000001354 07/2014
Action
1
Click the menu arrow next to the Save button
If it is not already selected, browse to the Examples folder in your SoMachine Basic installation
folder.
Choose Sample Project Files (*.smbe) as the file Type and click Save.
EIO0000001354 07/2014
187
188
EIO0000001354 07/2014
SoMachine Basic
EIO0000001354 07/2014
Appendices
EIO0000001354 07/2014
189
190
EIO0000001354 07/2014
SoMachine Basic
SoMachine Basic Keyboard Shortcuts
EIO0000001354 07/2014
Appendix A
SoMachine Basic Keyboard Shortcuts
Key
Command
View
Condition
CTRL
Copy
Textbox
CTRL
Paste
Textbox
CTRL
Cut
Textbox
CTRL
All
CTRL
Save project
All
CTRL
New project
All
CTRL
Open project
All
CTRL
Undo
TBD
CTRL
Redo
TBD
CTRL
Connect
All
CTRL
Disconnect
All
CTRL
Download
Commissioning
CTRL
Upload
Commissioning
CTRL
Stop
All
CTRL
Run
All
CTRL
Stop simulator
All
CTRL
Run simulator
All
CTRL
Search
Program
ALT
Left
Go to previous tab
All
ALT
Right
Go to following tab
All
ALT
F4
All
ALT
Program
F1
Show help
All
CTRL
Program
CTRL
Arrow key
Draw line
Ladder rung
EIO0000001354 07/2014
191
Modifier
Key
Command
View
Ladder rung
Condition
CTRL
Arrow key
Erase line
CTRL
Arrow key
SHIFT
Arrow key
Ladder rung
Suppr
Previous tab
Program
ESC
Ladder rung
ESC
Ladder rung
drawing in progress
ESC
Ladder rung
erasing in progress
ESC
Ladder rung
ESC
Ladder rung
ESC
Ladder rung
ENTER
Ladder rung
Arrow key
Ladder rung
Arrow key
Ladder rung
By default
F5
Open contact
Ladder rung
F6
Open branch
Ladder rung
SHIFT
F5
Close contact
Ladder rung
SHIFT
F6
Close branch
Ladder rung
F7
Coil
Ladder rung
CTRL
F7
Negated coil
Ladder rung
CTRL
F5
Set coil
Ladder rung
CTRL
F6
Reset coil
Ladder rung
F8
Application instruction
Ladder rung
F9
Ladder rung
F10
Ladder rung
CTRL
F9
Ladder rung
CTRL
F10
Ladder rung
192
EIO0000001354 07/2014
Modifier
Key
Command
View
Condition
SHIFT
F7
Ladder rung
SHIFT
F8
Ladder rung
ALT
F7
Ladder rung
ALT
F8
Ladder rung
CTRL+SHIFT
Comparison block
Ladder rung
XOR blocks
Ladder rung
Function blocks
Ladder rung
Activate step
Ladder rung
Deactivate step
Ladder rung
CTRL+ALT
F10
Ladder rung
Ladder rung
ALT
F10
Free-drawn line
Ladder rung
ALT
F9
Ladder rung
New contact
Ladder rung
Ladder rung
New contact OR
Ladder rung
Ladder rung
CTRL+SHIFT
F4
Rising edge
Ladder rung
CTRL+SHIFT
F5
Falling edge
Ladder rung
CTRL+SHIFT
Comparison block
Ladder rung
ALT
XOR blocks
Ladder rung
F10
Ladder rung
Ladder rung
New coil
Ladder rung
ALT
Ladder rung
CTRL+SHIFT
F9
Set coil
Ladder rung
CTRL+SHIFT
F9
Reset coil
Ladder rung
Activate step
Ladder rung
Deactivate step
Ladder rung
New instruction
Ladder rung
ALT
Ladder rung
Ladder rung
F2
Ladder rung
EIO0000001354 07/2014
193
Modifier
Key
Command
View
Condition
SHIFT
F2
Ladder rung
SHIFT
F3
Ladder rung
SHIFT
F4
Ladder rung
CTRL+SHIFT
F4
Rising edge
Ladder rung
CTRL+SHIFT
F5
Falling edge
Ladder rung
CTRL+SHIFT
Comparison block
Ladder rung
XOR blocks
Ladder rung
SHIFT
F7
Assignment
Ladder rung
CTRL+SHIFT
F9
Negated coil
Ladder rung
F9
Set coil
Ladder rung
SHIFT
F9
Reset coil
Ladder rung
Activate step
Ladder rung
Deactivate step
Ladder rung
SHIFT
F5
Function block
Ladder rung
CTRL+SHIFT
F6
Operation block
Ladder rung
F3
Line
Ladder rung
F3
Ladder rung
F4
Ladder rung
Ladder rung
F2
Ladder rung
F2
Ladder rung
SHIFT
F3
Ladder rung
SHIFT
F3
Ladder rung
F4
Normal contact
Ladder rung
SHIFT
F4
Negated contact
Ladder rung
CTRL
F9
Coil
Ladder rung
CTRL+SHIFT
F9
Negative coil
Ladder rung
F9
Set Coil
Ladder rung
SHIFT
F9
Reset Coil
Ladder rung
CTRL+SHIFT
F4
Rising edge
Ladder rung
CTRL+SHIFT
F5
Falling edge
Ladder rung
CTRL+SHIFT
{6, 7, 8, 9}
Operation Block
Ladder rung
CTRL+SHIFT
Ladder rung
X or ALT+X
Ladder rung
194
XOR blocks
EIO0000001354 07/2014
Modifier
Key
Command
O or ALT+O
Ladder rung
A or ALT+A
Activate step
Ladder rung
D or ALT+D
Deactivate step
Ladder rung
EIO0000001354 07/2014
View
Condition
195
196
EIO0000001354 07/2014
SoMachine Basic
Glossary
EIO0000001354 07/2014
Glossary
0-9
%S
According to the IEC standard, %S represents a system bit.
%SW
According to the IEC standard, %SW represents a system word.
A
animation table
A software table that displays the real-time values of objects such as input bits and memory words.
When SoMachine Basic is connected to a logic controller, the values of certain object types in
animation tables can be forced to specific values. Animation tables are saved as part of SoMachine
Basic applications.
application
A program including configuration data, symbols, and documentation.
C
configuration
The arrangement and interconnection of hardware components within a system and the hardware
and software parameters that determine the operating characteristics of the system.
F
Free POU
A programmable object unit (POU), typically containing library functions, that can be programmed
and updated independently of the master task of a program. Free POUs are available to be called
from within programs as subroutines or jumps. For example, the periodic task is a subroutine that
is implemented as a Free POU.
G
GRAFCET
The functioning of a sequential operation in a structured and graphic form.
This is an analytical method that divides any sequential control system into a series of steps, with
which actions, transitions, and conditions are associated.
EIO0000001354 07/2014
197
Glossary
I
instruction list language
A program written in the instruction list language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (see IEC 61131-3).
L
ladder diagram language
A graphical representation of the instructions of a controller program with symbols for contacts,
coils, and blocks in a series of rungs executed sequentially by a controller (see IEC 61131-3).
M
master task
A processor task that is run through its programming software. The master task has 2 sections:
IN: Inputs are copied to the IN section before execution of the master task.
OUT: Outputs are copied to the OUT section after execution of the master task.
P
POU
(program organization unit) A variable declaration in source code and a corresponding instruction
set. POUs facilitate the modular re-use of software programs, functions, and function blocks. Once
declared, POUs are available to one another.
S
symbol
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 preferred method because if the program
configuration changes, symbols are automatically updated with their new immediate address
associations. By contrast, any immediate addresses used as operands or parameters are not
updated (refer to immediate addressing).
198
EIO0000001354 07/2014
Glossary
W
watchdog
A watchdog is a special timer used to ensure that programs do not overrun their allocated scan
time. The watchdog timer is usually set to a higher value than the scan time and reset to 0 at the
end of each scan cycle. If the watchdog timer reaches the preset value, for example, because the
program is caught in an endless loop, a fault is declared and the program stopped.
EIO0000001354 07/2014
199
Glossary
200
EIO0000001354 07/2014
SoMachine Basic
Index
EIO0000001354 07/2014
Index
A
accumulator, 138
action zone, 121
addressing
symbolic, 61
allocating memory in controller, 64
allocation mode, 64
animation tables, 102
application
behavior, configuring, 70
definition of, 23
downloading to controller, 181
protecting with a password, 49
protecting with password, 52
whether password-protected, 162
assignment instructions
inserting in Ladder Diagram rungs, 130
B
Boolean
accumulator, 138
Boolean operators
graphic elements for, 124
branching modes
graphic element, 123
C
catalog, 55
replacing logic controller with reference
from, 56
coils
graphic elements for, 125
graphical representation of outputs, 119
comments
adding to Instruction List, 137
adding to Ladder Diagrams, 131
commissioning, 25
EIO0000001354 07/2014
comparison block
graphic elements for, 124
comparison blocks
inserting IL expressions in, 129
comparison expression
inserting in Ladder Diagram rungs, 129
configuration
current, 55
replacing logic controller in, 56
configuring
application behavior, 70
master task, 86
periodic task duration, 92
project properties, 49
contacts
graphic elements for, 123
graphical representation of inputs, 119
copying and pasting
POU, 84
creating
Free POU, 84
customizing, Ladder Editor, 45
D
developing programs, stages of, 24
development stages, 25
digital inputs
configuring as event sources, 95
downloading
application directly to controller, 35
firmware updates, 183
user application to controller, 181
E
end/jump
graphic elements, 127
event source
assigning subroutine as, 98
types of, 95
201
Index
event tasks
managing, 97
overview, 94
events
since last cold restart, 99
triggering subroutines with, 95
EXCEPTION state
fallback mode behavior, 72
expansion modules
supported devices, 20
exporting
symbol list, 115
F
fallback
mode, specifying, 72
firmware, downloading updates to controller,
183
forcing values
in animation tables, 102
of I/Os, 162
Free POU
assigning to an event source, 98
assigning to events, 84
assigning to periodic task, 84
Free POU
creating, 84
Free POU
for periodic task, 90
introduction to, 77
function blocks
graphic element, 125
functional levels, 70
G
general settings, 45
Grafcet, 147
how to use the instructions, 151
instructions, 147
post-processing, 150
preprocessing, 148
program structure, 148
sequential processing, 149
202
grafcet instructions
graphic element, 126
graphic elements
Ladder diagrams, 122
grid lines, style of in Ladder Editor, 45
H
hardware tree, 55
I
importing
symbol list, 114
inputs
configuring as event sources, 95
modifying, 132
Instruction List
comments, 137
displaying symbols in, 62
using rung templates with, 116
instructions
upstream/downstream, 132
K
keyboard shortcuts, 45
L
Ladder diagrams
comments, 131
graphic elements, 122
introduction, 119
programming principles, 121
reversing to Instruction List, 65
rungs, 120
using parentheses in, 133
using rung templates with, 116
Ladder Editor
customizing, 45
defining symbols in, 62
resetting pointer after insertion, 45
language, of user interface, 45
EIO0000001354 07/2014
Index
M
master task
assigning POU as, 77
configuring, 86
system bits and words controlling, 88
memory allocation, 64
modem, displaying status of, 162
modes, offline/online/simulator, 26
module areas, 25
N
normal scan mode, 87
O
objects
definition of, 60
updating values of in real time, 102
offline mode
displayed in status area, 43
overview, 26
EIO0000001354 07/2014
online mode, 64
animation tables in, 102
displayed in status area, 43
editing values in animation table, 103
overview, 26
updating RTC in, 163
operands, 138
operation blocks
graphic element, 126
inserting assignment instructions in, 130
operations
inserting in Ladder Diagram rungs, 130
outputs
modifying, 132
P
parentheses
modifiers, 144
nesting, 144
using in Ladder diagrams, 133
using in programs, 143
password
protecting an application , 52
removing from application, 52
removing from project, 51
requiring to open project file, 51
whether application is protected with, 162
password-protecting an application, 49
period, scan, 87
periodic
scan mode, 87
scan period, 92
tasks, 90
periodic task
as event source, 95
assigning Free POU to, 84
configuring duration of, 92
POU
copying, 84
Free, 90
pasting, 84
priority level, of events, 94
203
Index
program
definition of, 23
jumps, 132
program development, stages of, 24
program organization unit (POU), 77
program, configuring fallback modes, 72
programming
best practices, 132
grid, 121
languages, supported, 21
project
configuring properties, 49
definition of, 23
protecting with password, 51
templates, 34
properties, 49
pulse width (TON) , 88
R
RAM
executable contains application, 162
relay circuits, representing as Ladder diagrams, 119
removing password protection, 51, 52
replacing
logic controller in configuration, 56
reversibility
introduction to, 65
RTC
displaying current date and time, 162
managing with system bits, 132
updating in controller, 163
rung templates, 116
rungs
graphic element, 122
S
scan modes, 73, 87
scan task, configuring watchdog, 71
scan time
displaying minimum, maximum, current,
162
minimum, displayed in status area, 43
204
sections
in events, 94
of master task, 86
selection
graphic element, 123
settings
general, 45
simulator, 165
accessing the simulator, 165
how to use, 177
I/O manager window, 167
modifying values, 172
modifying values of analog inputs, 174
modifying values of digital inputs, 172
output tracing, 175
simulator windows, 165
Time Management window, 169
simulator mode
overview, 26
sources of events, 95
stages of developing a program, 25
Start Page, 25
startup state of logic controller, 71
state
initial logic controller, configuring, 71
status area, 43
stop sensors, wiring, 132
STOP state
fallback mode behavior, 72
subroutine
assigning to periodic task, 90
assigning to tasks, 97
associated with periodic event, 95
implementing as Free POU, 77
of master task, 86
triggering execution with an event, 95
supported devices, 20
symbol list
displaying, 114
exporting, 115
importing, 114
symbolic addressing, 61
symbols
addressing with, 61
defining in graphic elements of Ladder edEIO0000001354 07/2014
Index
itor, 62
defining in Properties window, 61
displaying in Instruction List code, 62
list of used, 114
storing in logic controller, 63
system bits
%S0, 132
%S11, 88
%S19, 88
%S31, 99
%S38, 99
%S39, 99
%S9, 132
system bits/words
controlling events with, 99
in symbol list, 114
system words
%SW0, 88
%SW27, 88
%SW30, 88
%SW30...%SW32, 162
%SW31, 88
%SW32, 88
%SW48, 99
%SW54...%SW57, 162
U
uploading
preventing with a password, 52
user interface, setting language of, 45
W
watchdog timer, configuring, 71
wiring stop sensors, 132
X
XOR
graphic elements for, 124
T
task
event, 94
periodic, 90
tasks, 73
tasks and scan modes, 73
template
inserting into rung, 116
project, 34
test zone, 121
TH0, TH1
configuring as event sources, 95
threshold outputs (of %HSC)
configuring as event sources, 95
timer, watchdog, 71
toolbar buttons, 41
EIO0000001354 07/2014
205
Index
EIO0000001354 07/2014
206