Professional Documents
Culture Documents
Somachine Training Manual
Somachine Training Manual
SoMachine
Training Manual
SoMachine Version 3.0
DISCLAIMER
The information provided in this documentation contains general descriptions and/or technical characteristics of the performance of the
products contained herein. This documentation is not intended as a substitute for and is not to be used for determining suitability or reliability
of these products for specific user applications. It is the duty of any such user or integrator to perform the appropriate and complete risk
analysis, evaluation and testing of the products with respect to the relevant specific application or use thereof. Neither Schneider Electric nor
any of its affiliates or subsidiaries shall be responsible or liable for misuse of the information contained herein. If you have any suggestions
for improvements or amendments or have found errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical, including photocopying, without
express written permission of Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and using this product. For reasons of safety and
to help ensure compliance with documented system data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may result in injury, harm, or improper
operating results.
Failure to observe this information can result in injury or equipment damage.
2010 Schneider Electric. All rights reserved.
TRADEMARKS
Schneider Electric SAS has made every effort to supply trademark information about company names, products and services mentioned in
this manual. Trademarks shown below were derived from various sources.
Windows, Windows NT, Windows 2000, Windows XP, MSSQL Server and Excel are trademarks of Microsoft Corporation.
General Notice:
Some product names used in this manual are used for identification purposes only and may be trademarks of their respective companies.
About Us
Members of Schneiders team of Instructional Designers have tertiary qualifications in Education, Educational Course Development and are
also experienced trainers in their own right; some are also published authors. Currently, the team is supporting a range of over 70 courses in
multiple languages and multiple software environments.
Authors
Alynda Brown, Bruce Howlett, Eric Pauchet
Contributors
David Chapman, Michel Beridot
ii
February 2011
Contents
CHAPTER 1:
SoMachine
Manual Draft 2
iii
CHAPTER 5:
iv
February 2011
Chapter 1:
Introduction to SoMachine
Overview
All-in-One Software
design
commission
service
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.
The addition of this symbol to a Danger or Warning safety label
indicates that an electrical hazard exists, which will result in
personal injury if the instructions are not followed.
DANGER
DANGER indicates an imminently hazardous situation which, if not avoided, will
result in death or serious injury.
WARNING
WARNING indicates a potentially hazardous situation which, if not avoided, can
result in death or serious injury.
CAUTION
CAUTION indicates a potentially hazardous situation which, if not avoided, can
result in minor or moderate injury.
CAUTION
CAUTION, used without the safety alert symbol, indicates a potentially
hazardous situation which, if not avoided, can result in equipment damage.
1-2
February 2011
PLEASE NOTE
SoMachine
Manual Draft 2
1-3
Validity Note
This document has been updated with the release of SoMachine V3.0.
The technical characteristics of the device(s) described in this training manual may
also appear online. To access this information online:
Step
Action
In the Search box type the model number of a product or the name of a product
range.
If more than one model number appears in the Products search results, click on
the model number 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 presented in this manual should be the same as those that
appear online. In line with our policy of constant improvement we may revise
content over time to improve clarity and accuracy. In the event that you see a
difference between the manual and online information, use the online information
as your reference.
1-4
February 2011
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.
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.
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.
SoMachine
Manual Draft 2
1-5
The products specified in this document have been tested under actual service
conditions. Of course, your specific application requirements may be different
from those assumed for this and any related examples described herein. In that
case, you will have to adapt the information provided in this and other related
documents to your particular needs. To do so, you will need to consult the specific
product documentation of the hardware and/or software components that you may
add or substitute for any examples specified in this training documentation. Pay
particular attention and conform to any safety information, different electrical
requirements and normative standards that would apply to your adaptation.
WARNING
REGULATORY INCOMPATIBILITY
Be sure that all equipment applied and systems designed comply with all
applicable local, regional and national regulations and standards.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.
The use and application of the information contained herein require expertise in the
design and programming of automated control systems. Only the user or integrator
can be aware of all the conditions and factors present during installation and setup,
operation, and maintenance of the machine or process, and can therefore determine
the automation and associated equipment and the related safeties and interlocks
which can be effectively and properly used. When selecting automation and
control equipment, and any other related equipment or software, for a particular
application, the user or integrator must also consider any applicable local, regional
or national standards and/or regulations.
1-6
February 2011
Some of the major software functions and/ or hardware components used in the
examples described in this training document cannot be substituted without
significantly compromising the performance of your application. Further, any such
substitutions or alterations may completely invalidate any proposed architectures,
descriptions, examples, instructions, wiring diagrams and/or compatibilities
between the various hardware components and software functions specified herein
and in related documentation. You must be aware of the consequences of any
modifications, additions or substitutions. A residual risk, as defined by EN/ISO
12100-1, Article 5, will remain if:
it is necessary to modify the recommended logic and if the added or modified
components are not properly integrated in the control circuit.
you do not follow the required standards applicable to the operation of the
machine, or if the adjustments to and the maintenance of the machine are not
properly made (it is essential to strictly follow the prescribed machine
maintenance schedule).
the devices connected to any safety outputs do not have mechanically-linked
contacts.
CAUTION
EQUIPMENT INCOMPATIBILITY
Read and thoroughly understand all device and software documentation before
attempting any component substitutions or other changes related to the
application examples provided in this document.
Failure to follow these instructions can result in injury or equipment
damage.
SoMachine
Manual Draft 2
1-7
When applying this training and before using electrical control and automation
equipment after design and installation, the application and associated functional
safety system must be subjected to a start-up test by qualified personnel to verify
correct operation of the equipment. It is important that arrangements for such
testing be made and that enough time is allowed to perform complete and
satisfactory testing.
CAUTION
EQUIPMENT OPERATION HAZARD
Verify that all installation and set up procedures have been completed.
Verify that the completed system, including the functional safety system, is free
from all short circuits and grounds, except those grounds installed according to
local regulations. If high-potential voltage testing is necessary, follow the
recommendations in equipment documentation to help prevent injury or equipment
damage.
1-8
February 2011
WARNING
UNGUARDED MACHINERY CAN CAUSE SERIOUS INJURY
Note:
SoMachine
Manual Draft 2
1-9
Course Overview
Course
Objectives
Target Audience
1-10
February 2011
The training course will take one day to complete. The following program outlines
the topics that will be covered on each day:
Day
1
Topics
Introduction to SoMachine
SoMachine at a Glance
Project Management
Controller I/O Configuration
Controller Programming
SoMachine
Manual Draft 2
1-11
These are the skills you will achieve by the end of each chapter. An overview
providing a brief synopsis of the topic begins each section. Often, examples are
given to illustrate the conceptual overview.
Exercises
After a concept is explained you will be given exercises that practise the skills you
just learned. These exercises begin by explaining the general concept of each
exercise and then step-by-step procedures are listed to guide you through each
procedure.
Example Paste a genie from a library in the Include project onto a test page called Utility.
1
Run the Milk_Upgrade project then trigger and view some alarms.
i.
User Input
Example KETTLE_TEMP/25
Note that some exercises will show a fragment of information already typed into a
SoMachine screen and then ask students to add extra lines of configuration. In this
instance, the previously entered material will be given to the student as pale grey
italic text:
KETTLE_TEMP/25
OVEN_TEMP/5
1-12
February 2011
A note will refer to a feature which may not be obvious at first glance but
something that always should be kept in mind.
Note
Example Note:
Any events named GLOBAL are enabled automatically when events are enabled.
Menus and Menu
Options
Text separated by the double arrow symbol indicates that you are to select a
menu
Text written this way indicates the Horizontal then the (Vertical) tab you are to
select.
SoMachine
Manual Draft 2
1-13
See Also
For further information about Templates, see SoMachine Help - Using Page
Templates.
Further Training
This heading describes topics that are covered in more advanced courses.
Caution
Example -
CAUTION
UNINTENDED EQUIPMENT OPERATION
Verify that all installation and set up procedures have been completed.
Failure to follow these instructions can result in equipment damage.
1-14
February 2011
Chapter 2:
SoMachine at a Glance
Overview
Introduction
Introduction to SoMachine
OEM Solution
Software
One Machine
Environment
SoMachine in
Flexible Machine
Control
2-2
February 2011
System Requirements
Before the
Installation of
SoMachine
Before installing SoMachine the computer that will be used as the Server needs to
be configured. SoMachine has been designed for machines with the following
specifications:
Hardware
Requirements
The computer equipment may need to be upgraded to run SoMachine Version 3.0,
as the minimum hardware requirements have changed:
Description
Minimum Specification
Recommended
Processor
Random Access
Memory (RAM)
2 GB
3 GB
Available Disk
Space
Drive
DVD Reader
DVD Reader
Display
Peripherals
Web Access
Software
Requirements
SoMachine Component
Operating System
SoMachine
Manual Draft 2
2-3
Features of SoMachine
Standard
Languages
Controller
Programming
Services
HMI Based
Services
Motion Services
2-4
February 2011
Integrated
Fieldbus
Configurators
Master:
-
CANopen
CANmotion
AS-interface
Connectivity:
Application
Libraries
Profibus-DP
Ethernet IP
Modbus TCP
General:
-
Segment Solutions:
SoMachine
Manual Draft 2
2-5
To start SoMachine:
Select the SoMachine item from the Windows start menu:
Start Programs Schneider Electric SoMachine SoMachine
or
Double click the SoMachine icon on the desktop
2-6
February 2011
Home Screen
Visual Graphical
User Interface
Navigation within SoMachine is intuitive and highly visual. The GUI is optimised
in such a way that the appropriate tools become available as you enter different
development stages of your project. The user interface ensures nothing is
overlooked, and suggests the tasks to be performed throughout the project
development cycle. The workspace has been streamlined, so that only that which is
necessary and relevant to the current task is featured, without any superfluous
information.
Main Selection
Screen
After successful startup SoMachine displays the main selection screen with the
open Home screen that provides access to the functions.
SoMachine
Hide/View Handle
Work Area
Online Help
Information Pane
Manual Draft 2
2-7
The task selection pane on the left-hand side of the main selection screen groups
the SoMachine functions in folders according to the tasks that can be performed.
Commands Provided
Machine workflow
Learning Center
a quick overview
an eLearning
examples
2-8
February 2011
SoMachine
Manual Draft 2
2-9
Command
Description
Home
Execute this command to return to the Home screen, that is the main
selection screen.
Save
Save As
Save/Send
archive
to save the archive file to a connected drive by using the Save button
of the Project Archive dialog box
or
2-10
Help
About
Execute this command to open the About dialog box that provides
information about the currently installed SoMachine.
Exit
February 2011
The SoMachine user interface is optimised to be intuitive and highly visual. With
the help of the navigation tabs a project workflow is ensured and nothing will be
overlooked.
After starting a project the user is asked to fill in the Properties with useful
information for project identification.
After defining the scope of the project the user creates a Configuration with at
least one controller. The graphical configuration screen makes it easy to establish
the hardware with additional modules, e.g. an additional controller, an HMI or
fieldbus communication.
SoMachine
Manual Draft 2
2-11
The Program tab opens the project for programming and application development.
All CoDeSys functionalities are available in this area.
The Commissioning tab provides online access to the controller and the connected
devices for monitoring device status and the user is able to download the
application(s) or update the firmware.
2-12
February 2011
The Show existing machine task allows users to open an existing project.
The Task includes the following commands:
Browse for existing project
Extract archive
How to Open an
Existing Project
The work area provides quick access to the four SoMachine projects that have been
opened most recently.
SoMachine
Manual Draft 2
2-13
Search the directory tree in the left pane for the folder that contains the existing
project then double click the project icon in the Work area
or
Select the project in the Work area and click the Open button in the Project
Information pane
2-14
February 2011
Launch SoMachine.
ii.
When the Home screen appears click the Show existing machine
item in the Task pane, then click Browse for existing project item
in the Task pane
iii.
Search the directory tree in the left pane for the folder that contains
the existing project examples. If the default path has been installed
this will be
SoMachine
iv.
v.
Manual Draft 2
2-15
2-16
When the project is opened SoMachine will display the project in the
General Properties tab.
February 2011
Properties Screen
Additional
Project
Information
The Properties screen allows users to enter additional project information. The
textual and graphical information entered here is optional. As this information is
always displayed in the information pane for the project selected in the work area,
it helps to identify the individual projects, avoiding the need to open them. This
screen is only displayed after a project has been opened.
SoMachine
Manual Draft 2
2-17
The task selection pane on the left-hand side of the properties screen groups the
SoMachine functions in folders according to the tasks that can be performed.
Tasks of the
Properties Screen
Commands Provided
General Task
File Information
Author Information
File Information
Author Information
Functions Menu
Description Task
2-18
February 2011
The Description task allows users to add an image to the project. This optional
customer image helps users to identify the project.
The work area provides the Add button to add a preferred Customer Image to the
SoMachine project and displays the Configuration View corresponding to the
settings in the Configuration screen. After an image has been added to the project
Change and Remove buttons are provided.
SoMachine
Manual Draft 2
2-19
The Custom Information task allows users to customise project information that
they may consider relevant. The screen provides entry fields for custom
information as well as a button to add attachments to the project.
Methods of Using
the Interface
Many actions have more than one way of being invoked. For example, a typical
action will be invoked by:
Click a tool on a toolbar
Select a menu item from the main menu
Use a keyboard shortcut
Right click inside a window and select an item from a context sensitive menu
This manual, frequently demonstrates only one method of performing an action.
This is not because this is necessarily best method, but because it is too time
consuming and unnecessary to show all possible methods. Your instructor will
encourage the use of a variety of methods.
2-20
February 2011
SoMachine
ii.
Return to the Home screen and click the Learning Center item in
the left pane.
iii.
iv.
v.
vi.
Manual Draft 2
2-21
2-22
ii.
Click the Configuration tab then select the device in the Work area
to display the description in the Information pane.
February 2011
SoMachine
If the tree branches are closed they may be expanded by clicking the
plus (+) sign next to each object. Double click the Library Manager
item. This opens the Library Manager Editor which displays all the
defined libraries in this PLC.
Manual Draft 2
2-23
2-24
ii.
iii.
Click the Library Manager tab and the graphic toolbar will disappear.
February 2011
SoMachine
Select Online Simulation from the menu to place the project into
Simulation mode.
ii.
iii.
iv.
Manual Draft 2
2-25
2-26
v.
vi.
Type the name of one of the countries into the input field and press
ENTER.
vii.
February 2011
ix.
6
SoMachine
ii.
iii.
Manual Draft 2
2-27
Chapter 3:
Project Management
Overview
Introduction
New Projects
First Step in the
Configuration
The first step when configuring SoMachine is to create a new project. The project
is where all information is stored.
SoMachine facilitates project creation by providing different project templates.
The project templates are categorised in four groups:
Description
Empty Projects
Generic Implementations
Conveying
Implementations
Configure
Projects
SoMachine provides tools that assist users in creating new projects quickly and
easily.
It provides for project startup:
a variety of preferred implementations. A dedicated TVDA Finder tool (Tested
Validated Documented Architectures) assists users in selecting the preferred
implementation that best suits individual projects.
a variety of application projects for conveying, hoisting, and packaging that
provide basic configurations for these applications.
some examples that provide basic projects for making yourself familiar with
SoMachine.
Once the project is created, SoMachine provides extensive possibilities to add
textual and graphical information to each project file. This additional information
enables users to distinguish projects avoiding the need to open them when they
have to select the suitable project out of those that are available on the computer.
For easy configuration of the project, SoMachine provides a graphical
configuration editor that allows users to add and configure the requested devices in
a comfortable way.
3-2
February 2011
The Create new machine menu allows users to create a new project either from
scratch or by using a project template.
SoMachine
Manual Draft 2
3-3
How to Create an
Empty Project
The Start with empty project command allows users to create a new project from
scratch without any preconfigured devices or settings. The command opens a Save
Project As dialog box where users can browse to the destination folder and assign
a name to the new project.
When the Save Project As dialog opens browse for a location using the Save in:
field
Create a name for the project in the Filename: field then click Save.
3-4
February 2011
SoMachine
ii.
Click the Start with empty project item from the expanded menu.
iii.
When the Save Project As dialog appears use the Save in: field to
navigate to the C:\Class folder. Use the File name: field to name
the project Empty.project then click the Save button.
Manual Draft 2
3-5
3-6
When the project is created SoMachine will display the project in the
General Properties tab.
February 2011
SoMachine
ii.
Click the Program tab. The Devices pane is also empty. When a
device is added to the project the devices pane will be populated
with standard references.
Manual Draft 2
3-7
The Start with standard project command allows users to create a new project on
the basis of a specified PLC. SoMachine provides a variety of PLCs that can be
used as templates to create individual projects.
Select the device from the Device: drop down list then click the Create Project
button.
3-8
February 2011
SoMachine
At the Home screen click the Create new machine item in the left
pane.
ii.
Click the Start with standard project item from the expanded menu.
iii.
Select the device TM238LFDC24DT from the Device: drop down list.
Change the default name of the POU Name: to MyPOU. Click the
Create Project button.
Manual Draft 2
3-9
When the Save Project As dialog appears use the Save in: field to
navigate to the C:\Class folder. Use the File name: field to name
the project Standard.project then click the Save button.
3-10
February 2011
SoMachine
Open the Program tab. Select each of the objects in the Devices
pane to view the objects that have populated this pane. Compare
this with the Devices pane in the Empty project.
Manual Draft 2
3-11
Archive Projects
Save the
Compiled Project
Archive
Properties
How to Create an
Archive
To create an archive:
Select File Project Archive Save/Send Archive from the main menu. Enter
desired path for the archive file when prompted.
Note:
Archiving is possible only if the project was compiled and when the Upload
information has been included, when it contains at least the comments.
3-12
February 2011
ii.
iii.
iv.
Open Windows Explorer and compare the size of the two files
SoMachine
v.
vi.
Why? _________________________________________
Manual Draft 2
3-13
Chapter 4:
Overview
Introduction
The Configuration screen is only displayed after a SoMachine project has been
opened.
The screen consists of a graphical configuration editor that provides necessary
functions to perform the entire hardware and network configuration of the machine.
The configuration settings performed here will also be available in the controller
and Vijeo Designer Program screen
4-2
Hide/View Handle
Work Area
Online Help
Display Manager
Information Pane
February 2011
The Task Selection pane of the Configuration tab lists the devices that may be
added to the configuration in the graphical configuration editor grouped by type
into Logic Controller, HMI Controller, and other categories of devices.
When a new project is created from scratch, the work area of the graphical
Configuration Editor will be empty. The work area will display a prompt for the
user to drag a device from the list in the left pane into this empty area.
SoMachine
Manual Draft 2
4-3
Display Manager
Functions of the
Display Manager
4-4
Zoom
100%
Show All
Reroute
Reroute On Drop
Coll All
Exp Last
Exp All
February 2011
To add a device:
Select the device in this list and drag it to the work area. Notice the device
description on the right, designed to help you make the correct selection.
When the device has been added to the work area a graphical representation of the
device is displayed.
SoMachine
Manual Draft 2
4-5
SoMachine will return a list of devices meeting the search phrase that was entered
or will display a message indicating that no devices were found.
4-6
February 2011
SoMachine
ii.
iii.
iv.
Drag and Drop the controller TM238LFDC24DT into the work area.
v.
When the device has been added to the work area a graphical
representation of the device is displayed.
Manual Draft 2
4-7
Select a module from the Add object dialog then click Add and close. Notice the
Information panel displays information on the selected device. This helps the user
to select the correct device
4-8
February 2011
SoMachine
ii.
iii.
iv.
When the hot spot is clicked the Add Object dialog will open.
Manual Draft 2
4-9
v.
Click the (+) next to the Digital Expansion Modules branch then
the Inputs branch and select the TM2DA18DT module. Notice that
when the module is selected the Information pane give a description
of the module
vi.
Click the Add and close button to add the module to the device
4-10
button.
February 2011
Chapter 5:
Controller Programming
Overview
Introduction
Program Screen
Devices Window
The Devices window consists of four main nodes. Configuration screens are
accessed by double clicking on the node in the device tree. The four main nodes
are:
Area
Description
Controller
Program
Embedded Functions
Advantys
CAN devices
Servo & Stepper drives
etc.
5-2
February 2011
Item
Description
Applications
PLC Settings
Services
SoMachine
Status
Information
Manual Draft 2
5-3
Application
-
Library Manager
-
Add optional libraries to current project or create your own custom library
Libraries provide the following items that are executed in the runtime
system of the automation device:
Datatype definitions
Global variables
Visualization objects
Task Configuration
-
5-4
February 2011
IO
-
Configuration of the M238s internal I/O. The M238 has 6 discrete inputs,
8 fast inputs, 6 discrete outputs, 4 fast outputs
HSC
-
SoMachine
Configuration of the built-in high speed counter. The HSC function can
execute fast counts of pulses from sensors, encoders, switches, etc. The
HSC is independent of the M238 scan time.
Manual Draft 2
5-5
PTO_PWM
-
The PTO function provides a square wave output for a specified number of pulses
and a specified cycle time.
The PTO function can be implemented in two different modes:
-
Two PTO channels are available on the Modicon M238 controller. Each PTO
channel is associated to 2 fast outputs and 1 standard input:
PWM uses a square wave whose duty cycle is modulated resulting in the variation
5-6
February 2011
CANbus
-
SoMachine
Manual Draft 2
5-7
Tasks
Task Basics
The M238 allows the configuration of up to seven tasks with the restrictions listed
below.
There are Five types of tasks:
Cyclic (3 max) - executed on a time scheduleevery 50ms
Event (2 Max) - executed on L -> H transition of trigger on event tag
Freewheeling (1 Max) starts with program and cycles, no specific time
External Event (4 Max) (not in menu) executed when designated system
event is TRUE. Example - embedded input = ON or OFF or Both
See Also:
For further information about Maximum Number of Tasks for each platform, see
SoMachine Help - and search for Maximum Number of Tasks.
Task Triggering
the combination of priority and condition determine the order that the tasks
will be executed
5-8
February 2011
SoMachine
Manual Draft 2
5-9
The Devices window allows users to add POUs (Program Organization Units) to
the application. A POU is an object in SoMachine where programming code is
written.
5-10
POU Type
Description
Program
Returns one or several values during operation. All values are retained
from the last time the program was run until the next. It can be called
by another POU.
Function Block
Function
February 2011
SoMachine
To create a POU:
Right click Application and select Add Object POU from the menu.
Manual Draft 2
5-11
All POUs are created in this manner. When finished, they must be scheduled to
run by assigning them to a Task.
5-12
February 2011
SoMachine
ii.
iii.
Right click the Application node and select Add Object POU from
the menu.
Manual Draft 2
5-13
5-14
iv.
When the Add POU dialog opens type the name POU_ST in the
Name: field then select Structured Text (ST) in the Implementation
Language: field. Click the Open button when complete.
v.
The Devices pane will display the new POU and the Work area will
be open ready for the user to enter the new program.
vi.
February 2011
Return to the Devices pane and double click the POU_ST item to
open the programming editor.
ii.
Create four INT variables shown between the VAR and END_VAR.
These are local variables and are only usable in this POU. Be careful
with the syntax.
iii.
SoMachine
Manual Draft 2
5-15
Gateway Configuration
How to Add a
USB Gateway
If no gateway is present, you can use the Add gateway... button to add one. You
can also configure multiple gateways but only one can be active at a time. When
the Set active path button is pressed, the path visualisation changes from normal
to bold.
Use the Set active path button to select the active gateway. When the Set active
path button is pressed, the path visualisation changes from normal to bold.
5-16
February 2011
Task Configuration
How to
Configure a Task
To Configure a Task:
A POU_ST is added to MAST Function.
Priority Define the priority of the current task (0 is the highest priority, 31 is the
lowest priority).
Type Define the type of task
Event start on rising edge of the variable associated to trigger the event
External Event start on rising edge of the trigger input for the event.
Freewheeling - execute at start program. At the end of a cycle run, the task
is automatically restarted in a continuous loop, after a delay that is 30%proportional to the duration of the last task cycle. There is no cycle time
defined but T#: 1...1000 ms.
Watchdog Enable the watchdog, enter the watchdog time and the sensitivity.
The Sensitivity field defines the number of times a watchdog overrun can occur
SoMachine
Manual Draft 2
5-17
5-18
February 2011
Double click the MAST item in the Devices pane to open the MAST
Configuration window in the Work area.
ii.
Click Add POU in the POUs section of the Configuration tab. This
will open the Input Assistant.
iii.
OK.
SoMachine
Manual Draft 2
5-19
5-20
iv.
The POUs section of the MAST Configuration tab will display the
POU_ST item.
v.
Check the lower left corner of the SoMachine window under the
Messages section to see that the message Precompile OK has
appeared.
vi.
February 2011
PLC Simulator
Offline PLC
Simulator
Program development
Program debugging
SoMachine
Manual Draft 2
5-21
5-22
February 2011
SoMachine
ii.
iii.
Manual Draft 2
5-23
5-24
An
ii.
February 2011
Enter some values into the Prepared value field for var1, var2, var3
as shown. The Prepared Value field is a queue for the variables. The
values are not currently applied to the variables.
iv.
The values are written into the variables and the average is
calculated.
SoMachine
Manual Draft 2
5-25
POU ST
Note:
5-26
February 2011
SoMachine
Return to the Devices pane and add a new POU program in the
Function Block Diagram (FBD) language. Name the new POU
POU_FBD.
ii.
Create the same four INT variables that were used in Exercise Create a POU (page 5-13).
iii.
Right click to the left of Network 1 in the lower pane of the Work
area and select Insert Box from the menu.
Manual Draft 2
5-27
When the Input Assistant opens select FDB Operators from the
Categories: pane then select ADD from the Items: pane. Click OK.
v.
5-28
February 2011
button.
vii.
This will open the Input Assistant. Select var1 then click OK. In
the same manner add variables var2 and var3 to the second and
third inputs respectively.
viii.
Right click the Output pin and select Insert Box to open the Input
Assistant. Select Keywords from the Categories: pane then select
DIV from the Items: pane. Click OK. Add 3 to the lower input pin
(denominator).
SoMachine
Manual Draft 2
5-29
5-30
ix.
Right click the Output pin of the DIV block and select Insert
Assignment.
x.
The completed
February 2011
SoMachine
ii.
Select Online Login from the main menu. Since the code has
changed SoMachine will prompt for the type of login. Select Login
with online change then click OK.
iii.
iv.
Enter values into the variables in the same manner as before. Check
the display to see whether the program is functioning correctly.
v.
Manual Draft 2
5-31
POU IL
POU LD
and coils.
5-32
February 2011
ii.
iii.
Note:
FBD, LD and IL formats can be converted from one format to another. SFC and
CFC cannot be converted.
2
SoMachine
Manual Draft 2
5-33
CFC (Continuous Function Chart) is similar to FBD. Unlike FDB it allows the free
placement of components.
Note:
5-34
February 2011
SoMachine
ii.
iii.
Create this POU by following the program below. Ask the instructor
if additional help is needed.
iv.
Manual Draft 2
5-35
Watchdog Mechanisms
M238 Watchdog
Operation
5-36
Monitoring the task shows you how long the task is taking to execute
Monitoring the actual task execution time helps determine the correct WDT
setting
February 2011
Structuring an Application
POU Program
Structure
SoMachine
Manual Draft 2
5-37
Function
Creation
Normally used when you need repeat the same calculation with different
vars. Number crunching
Example -
5-38
February 2011
SoMachine
Manual Draft 2
5-39
5-40
Right click the Application node and select Add Object POU.
ii.
February 2011
iii.
iv.
Save and Build the application. Fix any errors that appear.
The next steps will call the function from a new program POU.
Create a new POU program call the function
i.
SoMachine
Open the POU_FBD program. Right click the left margin, and select
Insert Network from the menu.
Manual Draft 2
5-41
5-42
ii.
Right click the left margin and add a box to the network that was
just created.
iii.
When the Input Assistant opens select the item Module Calls in the
Categories pane. Expand the Application branch and select the
function CalcAvg. Click OK.
February 2011
SoMachine
iv.
v.
Manual Draft 2
5-43
Sample Project
Escalator Project
5-44
The Escalator project is a simple project that is designed to start and run an
escalator. This project will be used to consolidate all of the features of SoMachine
that have been demonstrated in this tutorial.
February 2011
SoMachine
At the Home screen click the Create new machine item in the left
pane.
ii.
Click the Start with standard project item from the expanded menu.
iii.
Select the device TM238LFDC24DT from the Device: drop down list.
Name the POU Escalator_Mgt and select Continuous Function
Chart as the Implementation Language. Click the Create Project
button.
Manual Draft 2
5-45
5-46
iv.
v.
When the project is opened SoMachine will display the project in the
Properties tab. Add Title, Author and Company information into the
Author Information fields.
vi.
February 2011
Global Variables
Global Variable
List (GVL)
A Global Variable List (GVL) is a list of variables that are available to all parts of
the application. The fact that all POUs as well as other sections of the application,
have access to these variables is what makes them global. A maximum of three
GVL lists may be created per application
Note:
Global Variables are declared in the same manner as local variables but are
located in a GVL file.
SoMachine
Manual Draft 2
5-47
5-48
ii.
Double click the GVL item in the Devices tree. The GVL Tab will
open in the right pane.
iii.
February 2011
ii.
iii.
Add the CFC Diagram to the lower pane. Note that the comments
are not necessary.
iv.
Notice that the AND function block has a little circle on the lower left
pin.
This is a Negated pin. To negate the pin right click the pin and
select Negate from the menu.
SoMachine
v.
vi.
vii.
Manual Draft 2
5-49
5-50
Add an Action (sub program) using Ladder Logic Diagram for the
Emergency Management.
i.
Right click the Escalator_Mgt POU and select Add Object Action...
from the menu.
ii.
When
iii.
February 2011
SoMachine
Right click the Escalator_Mgt POU and select Add Object Action...
from the menu.
ii.
When the Add Action dialog appears name the Action Maintenance
and select Structured Text as the Implementation language. Click
Open.
iii.
Add boxes to the program to add the two Actions to the program.
ii.
Manual Draft 2
5-51