Professional Documents
Culture Documents
1
Getting Started
35011385.01
06/2008
www.schneider-electric.com
35011385 06/2008
Table of Contents
Chapter 2
Launching TwidoSuite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Program Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 3
Chapter 4
Chapter 5
Chapter 6
25
27
31
34
40
50
57
61
68
Monitoring an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Monitoring an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
35011385 06/2008
35011385 06/2008
35011385 06/2008
At a Glance
Document Scope
This document provides basic information and instructions for getting the
TwidoSuite programming software set up and operating.
Validity Note
The data and illustrations found in this book are not binding. We reserve the right to
modify our products in line with our policy of continuous product development. The
information in this document is subject to change without notice and should not be
construed as a commitment by Schneider Electric.
Product Related
Warnings
Schneider Electric assumes no responsibility for any errors that may appear in this
document. 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.
Copyright Schneider Electric 2008. All rights reserved.
All pertinent state, regional, and local safety regulations must be observed when
installing and using this product. For reasons of safety and to ensure compliance
with documented system data, only the manufacturer should perform repairs to
components.
When controllers are used for applications with technical safety requirements,
please follow the relevant instructions.
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 product related warning can result in injury or equipment
damage.
User Comments
35011385 06/2008
We welcome your comments about this document. You can reach us by e-mail at
techpub@schneider-electric.com
35011385 06/2008
1
Introduction
Overview
What's in this
Chapter?
35011385 06/2008
Topic
Page
System Requirements
Registering TwidoSuite
11
System Requirements
Hardware
Requirements
Your PC needs to meet the following minimum hardware requirements to run the
TwidoSuite programming software:
Requirement
Minimum
computer
RAM
128 MB
100 MB
Edition/Service Pack
Special Considerations
Windows 2000
Windows XP
Windows Vista
Note: Avoid patch 834707-SP1 (corrected by patch 890175) and patch 896358
which cause display problems with the Online Help.
The browser needs to be Microsoft Internet Explorer 4.01 or higher.
Connection to a
Twido PLC
35011385 06/2008
Installing the
Software
Step
uninstall any previous version of the TwidoSuite programming software (note that
if you own a version of the TwidoSuite programming software, uninstall it as well
for TwidoSuite is compatible with automation projects created with any version of
TwidoSuite),
close all Windows applications and virus-protection software.
Action
Result
TwidoSuite
35011385 06/2008
Uninstalling the
Software
10
To uninstall the TwidoSuite programming software from your computer, choose the
following path: Start Control Panel Add/Remove Programs
35011385 06/2008
Registering TwidoSuite
Introduction
Take a few minutes to register this software and become a member of the Schneider
automation community.
Registering is free and it will keep you updated with the latest product news,
software and firmware upgrades for your Twido controller.
Note: There is a 30-day trial period for this software. After expiry of the trial period,
you must register to be able to continue using this software.
How to Register
TwidoSuite
35011385 06/2008
1. Go to Miscellaneous
.
2. Click About on the task bar.
3. Complete the License form with "Company", "User" and "Serial Number"
information, and press Now.
Result: This starts the TwidoSuite Registration Wizard.
4. Follow the onscreen instructions to register your copy of the TwidoSuite software.
Note: There are four possible ways to register: Web, Phone, Fax, and E-mail.
5. Read the Terms of Service, acceptance is required.
6. Submit the registration.
11
12
35011385 06/2008
Launching TwidoSuite
2
Program Start
How to Start the
Program
You can either start the program via the TwidoSuite Application Launcher:
z from the Start Programs Schneider Electric TwidoSuite
Application Launcher path
z or from the desktop Application Launcher shortcut that has been installed with the
program:
TwidoSuite
Application
Launcher
Options
The Application Launcher constitutes the launch center for the TwidoSuite software
suite.
The TwidoSuite application comes in several language pairs available from the
Telemecanique download site:
z English-French
z English-German
z English-Spanish
z English-Italian
z English-Chinese(simplified)
Depending on which language pair you installed, it lets you run TwidoSuite in
English (default language) or the other installation language.
Use the Application Launcher to start TwidoSuite in:
z Programming Mode
z Monitoring Mode
z PLC Firmware Update
35011385 06/2008
13
Additional
Features
,
.
Note: By default the Video Demo is shown at TwidoSuite startup.To disable this
feature uncheck the box "Show video at startup" at the bottom of the video screen.
TwidoSuite
Application
Launcher
The following figure shows an example of the TwidoSuite Application Launcher for
the English-French installed language pair:
New
Programming Mode
Monitoring Mode
English
Franais
14
35011385 06/2008
3
Twido PLC Firmware Update
Overview
Note: The Telemecanique Twido PLC is delivered with firmware installed. The
procedures described for loading new firmware are only required if an update is
being made. Before replacing the firmware, you should carefully study the
corresponding instructions and contact the Telemecanique support.
When the TwidoSuite software is connected to the PLC, the firmware version that
you are currently using for your Twido PLC can be found via the Miscellaneous
button:
?
The Twido Windows Executive Loader Wizard is a Windows-based program that
guides you through the steps needed to update the Firmware Executive in your
Telemecanique Twido programmable controller. The Firmware Executive is the
operating system that runs your applications and manages controller operation.
The wizard provides an intuitive, point-and-click user interface that guides you
through the steps of the update procedure. It provides directions to quickly download
the latest version of the executive for your controller.
See the Executive Loader Wizard User Guide for detailed instructions. This guide
can be accessed using the Exec Loader utility online help.
Opening the
Exec Loader
Wizard
35011385 06/2008
You can open the Executive Loader Wizard from the TwidoSuite Application
Launcher by selecting the PLC Firmware Update option (see p. 13).
15
Firmware Upgrade
New Firmware
(Basic Steps)
There are four steps required to upgrade your executive. The wizard provides a
window for each step and online help is available for each step. The following table
summarizes each step:
Step
Window
Function
Welcome
Parameters
Transfer Progress
Note: Loading the firmware may not be interrupted under any circumstances as it
means the module can no longer be accessed, including via the Executive Loader
Wizard. Ensure that neither the communication connection nor the main power
input is disconnected or deactivated in any way and do not deactivate the
procedure with Abort.
16
35011385 06/2008
4
Introduction
Overview
This section also provides a work flow for creating a TwidoSuite project (see p. 20).
What's in this
Chapter?
35011385 06/2008
Page
Main Window
18
Setting Preferences
22
17
Interface
Main Window
TwidoSuite
Workspace
Taskbar
Telemecanique
010 1
01
10
10
Project
Describe
My project
0 00
0
0 01
0101
Program
0
1 010
0101
00
0101 0 00
1100
010
011 0 00
0101
Report
Configure
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 1 0 0 0
01 01 0 0
01
Program
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 10 0 0
01 1 0 0
0 10
Debug
Configure
the Hardware
Configure
the data
Configure
the behavior
Define
the protections
TWDLMDA20DTK
Module configuration.
Cancel
Apply
Table of inputs
Used Address
%I0.0
%I0.1
%I0.2
%I0.3
%I0.4
Symbol
Used By
Filtering
3 ms
3 ms
3 ms
3 ms
3 ms
Latch?
Run/Stop? Deactivation
Not used
Not used
Not used
Table of outputs
Used Address
%Q0.0
%Q0.1
%Q0.2
%Q0.3
Symbol
Status?
Used By
TwidoSuite
Functions bar
18
35011385 06/2008
Interface
Taskbar:
Provides access to all the tasks that you can perform under
the selected application step or substep.
Functions bar:
Display Options
Maximizes the main window
Minimizes the main window
Closes the TwidoSuite application
Docking button for the Application Steps bar
Resizes the main window
35011385 06/2008
19
Interface
Application
Steps/Substeps
Bar
Project
This is the first step in creating/opening an application. The Application Steps/
Substeps Bar displays the name of the open application in the top-right corner.
Describe
This is the second step in building the Twido automation application. The
Describe step lets you select hardware resources from the catalog and
describe how equipment interconnect with one-another via networks.
010 1
01
10
10
0 00
0
0 01
010 1
Program
This is the third step in setting up your Twido application. It provides access to
the following 3 substeps.
1.Configure
0 10
010 1
0 00
This substep lets you view/set:
0
010 1
00
110 1
0 10
zHardware Configuration for the base controller, expansion
011 0 0 00
010 1
modules, communication modules and hardware options
zData Objects Configuration for Simple Objects, Function
Blocks, I/O Objects, and Professional Objects
zController Behavior
zApplication Program / Password Protections
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 1 0 0 0
01 01 0 0
01
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 1 0 0 0
01 01 0 0
01
2.Program
Opens the default Program Editor (Ladder or List) and
provides access to the Symbol Editor.
3.Debug
Lets you manage the TwidoSuite-to-PLC connection and
provides access to Animation Tables Editor and Monitoring
tasks.
Report
This is the final step in setting up your application. It opens the Report Manager
window to select report components, configure printing options, and export the
application report to HTML format.
Miscellaneous
Provides access General Help and information About TwidoSuite.
Preference
Opens the User Preferences window.
i
20
35011385 06/2008
Interface
Quick Access
Bar
Return to previous task, as you left it
Analyze Program
S
S
35011385 06/2008
21
Interface
Setting Preferences
Displaying
Preferences
Preferences
Window
Preferences
Apply
Directoty:
Restore
None
Default projects
Schneider default
Customized
Default program editor
Ladder
List
Autosave project
every
Yes
minutes
15
No
Default background color
Clear
Dark
Default image
Automatic
Automatic management
The very highest
Manual
Manual management
Personalized image
Level 1.0
Level 2.0
Level 2.5
Level 3.0
Connection management
Name
Parity
COM1
Serial
COM1
Punit
5000
20
COM2
Serial
COM1
Punit
5000
20
My connection 1
Serial
192.168.1.1
Direct
5000
20
Modem connection
Ethernet
xxxxxxxxxx
5000
20
19200
None
Add
Modify
Delete
22
35011385 06/2008
5
At a Glance
Overview
In this section, you will learn how to create and edit a program with TwidoSuite.
To start TwidoSuite you need open the Application Launcher. Click the
located on your PC desktop.
TwidoSuite
icon
Programming Mode
Monitoring Mode
English
Franais
PLC Firmware
From TwidoSuite Application Launcher, you have access to the following modes:
z TwidoSuite Programming Mode
z TwidoSuite Monitoring Mode
z PLC Firmware Update utility
35011385 06/2008
23
Create/Edit Program
Application
Example
The following sections will introduce you step by step to the fundamentals of
TwidoSuite programming, through an actual application example: managing the
water level of a water tank used for irrigation:
What's in this
Chapter?
24
Topic
Page
25
27
31
34
40
50
57
61
68
35011385 06/2008
Create/Edit Program
Project Window
Telemecanique
0101
01
10
10
Project
Describe
My project
0 00
0
0 01 1
0 10
Program
Report
Project information
Project management
Update the project information
File information
Project
My project
Directory
Author
Authors name
Department
Service
Index
version
Industrial Property
Comment
XYZ
Description
Image
Create
TwidoSuite
Actions frame
35011385 06/2008
25
Create/Edit Program
How to Create a
New Project
26
35011385 06/2008
Create/Edit Program
35011385 06/2008
27
Create/Edit Program
Describe
Window
In the Describe window, you declare the Twido automation system elements
selecting hardware resources from the catalog and describing how equipment
interconnect with one-another via networks.
Bill of materials pane
My project
00
01010
01
10
10
0010
0101
i
Project
Describe
Program
Report
Catalog
1x2 landscape
Bill of materi-
Place
Export
Family
Refrence n...
Twido
Twido
Twido
Twido
TWDLMDA20DTK
TWDDDI8DT
TWDDAI8DT
TWDAMI2HT
Bases
Expansion modules
Q..
Discrete IO expansion
1
2
1
1
TWDDDI8DT
TWDDAI8DT
TWDDDI16DT
TWDDDI16DK
TWDDDI32DK
TWDDMM8DRT
TWDDMM24DRF
TWDNOI10M3
TWDDDO8UT
TWDDDO8TT
TWDDDI8DT
Expansion module with 8 24V DC
inputs, removable screw
terminal, 1 common line,
sink/source transistor. (25mA)
Page 1
REP
TwidoSuite
Graphic pane
28
35011385 06/2008
Create/Edit Program
z
Describe tool bar: Use the Describe tool bar to manage the graphic pane and
elements.
1x2 landscape
How to Describe
Your Application
1. Use drag-and-drop to place catalog elements in the graphic pane, starting with
the base controller (compact or modular), then adding expansion modules and
options as supported by the controller and as required by your application.
2. Configure communication ports by double-clicking the ports graphical representation in the graphic pane.
3. Use drag-and-drop to place network elements available from the catalog pane in
the graphic pane.
4. Click to select a Twido communication port and drag the cursor to draw the
network links between the Twido base controller and network elements. Connect
network elements with one another in the same manner to build network links.
Note: To find out more about describing applications, declaring network elements
and configuring networks, please refer to the TwidoSuite Operation Guide - Online
Help.
35011385 06/2008
29
Create/Edit Program
AutomaticWatering System
Example
My project
0 00
0 10 1
01
10
10
0
0 01 1
010
i
Project
Describe
Bill of materials
Program
Report
Catalog
1x2 landscape
Place
Export
Compact bases
Family Reference n...
Q..
Twido TWDLCAA10DRF 1
Twido TWDXCPRTC
1
TWDLCAA10DRF
TWDLCDA10DRF
TWDLCAA16DRF
TWDLCDA16DRF
TWDLCAA24DRF
TWDLCDA24DRF
TWDLCAA40DRF
TWDLCAE40DRF
TWDLCAA10DRF
Compact base controller,
230V AC, 6 24V DC inputs,
4 2A relay outputs.
Non-removable terminal blocks.
Page 1
REP
TWDXCPRTC
30
TWDLCAA10DRF
TwidoSuite
35011385 06/2008
Create/Edit Program
35011385 06/2008
Before you proceed with programming of your application, you must set your
application I/O wiring specifications.
31
Create/Edit Program
I/O Wiring
Specifications
Output specifications
z %Q0.0 output to water pump actuator
z %Q0.1 output to irrigation control valve
RTC Specifications
z RTC option must be installed on Twido 10 I/O base controller.
32
35011385 06/2008
Create/Edit Program
RTC Option
%Q0.0 Output to water tanks pump actuator
%Q0.1 Output to irrigation control valve
Controller Power Supply
35011385 06/2008
33
Create/Edit Program
Now that you have declared the hardware elements in the Describe step, you will
need to configure hardware and software resources.
To have access to hardware and software configuration options, select
010 1
01
10
10
Program
34
0 00
10
0 00
01 1
Configure
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 10 0 0
01 0 1 0 0
01
35011385 06/2008
Create/Edit Program
Configure
Hardware
Resources
Configuration pane
Telemecanique
0101
01
10
10
Project
Describe
My project
0 00
0
0 01
0 10 1
Program
0 10
0 10 1 0 0 0
0 10 1
0 00
1 10 1 0 1 0
0 11 0 0 0 0
0 10 1
Report
Configure
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 100 0
01 010 0
01
Program
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 1 0 0 0
01 1 0 0
010
Debug
Configure
the Hardware
Configure
the data
Configure
the behavior
Define
the protections
TWDLMDA20DTK
Module configuration.
Apply
Cancel
Table of inputs
Used Address
%I0.0
%I0.1
%I0.2
%I0.3
%I0.4
Symbol
Used By
Filtering
3 ms
3 ms
3 ms
3 ms
3 ms
Latch?
Run/Stop? Deactivation
Not used
Not used
Not used
Table of outputs
Used Address
%Q0.0
%Q0.1
%Q0.2
%Q0.3
Symbol
Status?
Used By
TwidoSuite
35
Create/Edit Program
36
35011385 06/2008
Create/Edit Program
Configure
Software
Resources
Select the Program Configure Configure Data task to open the software
configuration window.
Telemecanique
0 10 1
01
10
10
Project
Describe
My project
0 00
0 01 0
0 10 1
Program
0 10
0 000
0 1 01
00 0
0 1 01
01 0
1 1 01
0 1 10
00
0 1 01
0 10
0 10 1 0 00
0 10 1
1 0 00
1 10 0
0 10
0 11 1 0 00
0 10
Report
Program
Configure
Object Categories
Simple objects
Function blocks
I/O objects
Advanced objects
Allocation
Automat-
%M
%MW
%MD
%MF
%KW
%KD
%KF
Debug
Configure
the Hardware
Define Objects
Number of objects
Table
Configure
the data
Configure
the behavior
All
Used Equ. Used
Simple objects
10
10 0
0 1 00 1 0 00 0
01 0 1 0 1 0
11 1 0 0 0
01 0 1 0 0
01
Define
the protections
Symbol
%MW
%MW.0
%MW.1
%MW.2
%MW.3
%MW.4
%MW.5
%MW.6
%MW.7
%MW.8
%MW.9
%MW.10
%MW.11
%MW.12
%MW.13
%MW.14
%MW.15
%MW.16
%MW.17
%MW.18
%MW.19
1
0
TwidoSuite
37
Create/Edit Program
Note: Internal memory objects such as system bits and words, memory bits and
words, and network exchange words are non-configurable objects.
Automatic-Watering System Example
In this application example, you will need to configure two software objects:
z One Schedule Block (Real Time Clock 0) that will manage the weekly watering
schedule.
z One Counter (%C0) that will serve as a maintenance cycle counter.
Note: Configuring schedule blocks
To support schedule blocks, make sure the RTC option is installed on your
TWDLCAA10DRF controller.
z Schedule blocks are non-programmable objects that do not need any
declaration in the Ladder or List program. You simply need to enable them and
configure their respective parameters.
z
To configure the Schedule Block (Real Time Clock 0), follow these steps:
1. Select the Program Configure Configure Data task to open the software
objects configuration window.
2. From the "Object Categories" frame, select Advanced objects.
Result: The list of available advanced function blocks for that particular controller
is displayed in the dedicated "Advanced objects" frame below.
3. From the "Advanced objects" frame, select %SCH - Schedule blocks.
Result: The schedule blocks configuration window appears in the center pane.
Available schedule blocks (numbered 0 to 15) are listed in a table.
4. Select the schedule block you want to configure in the table: Real Time Clock 0.
Result: By default, the schedule block is disabled and all fields appear as nonconfigurable in the configuration window.
5. Click the Configured checkbox to activate the configuration fields and follow
these steps to configure the schedule block (the following settings are given as
an example only):
1. Enter the Output Bit address. In this application, this is the address of the
output terminal connected to the control valve of the irrigation system:
%Q0.1
2. Select Start Month and End Month for starting and ending the Schedule
Block.
Range: January to December.
3. Select Start Date and End Date for the day of the month for starting and
ending the Schedule Block.
Range: 1 to 31 (depending on month selection).
4. Select the Start Time and End Time for setting the time of day for starting and
ending the Schedule Block.
38
35011385 06/2008
Create/Edit Program
35011385 06/2008
39
Create/Edit Program
Use the Program Editor to develop the main program which is the core of your
Twido automation application. Major programming and configuration features
include reversible ladder and list language programming.
This section will focus on providing you the basics of Ladder language programming
in TwidoSuite program editor. For details on List language programming and
Ladder/List reversibility features, please refer to the TwidoSuite Programming Guide
on the CD-ROM.
0101
01
10
10
000
0
0 01 1
010
10
010 0
0 1 0 1 0 00 0
01 0 1 0 10
11 1 0 0 0
01 0 1 0 0
01
Note: In program mode, the task bar provides access to the Symbol Editor as
well.
40
35011385 06/2008
Create/Edit Program
Program Edition
Window
The Program Edition window features the Program Editor and five browsers and
tools available on the functions bar, as described in the following figure:
Program Editor
Program Browser
Telemecanique
0101
01
10
10
Project
Describe
My project
0 00
0
10 10
0 10 1
00
0 10 0 0 0
1 10 1 0 1 0
0 11 0 0 0 0
0 10 1
0
0 01 1
0 10
Program
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 100 0
01 010 0
01
Report
Program
Configure
1 2 3
Program
1 - - LADDER
Start [1,1]
End [1,1]
Ladder
Hex
Dec
100%
SR
List
R
R
Ladder
10
010 0
01 0 1 0 0 0
0 1 0 1 0 01 0
11 1 0 0 0
01 1 0 0
010
Debug
Edit
Program
abc
%TM %C
Define
Symbols
1 LD
SubRoutines
Standard
Standard
Etiq, %Li
Etap. ini.
Etap. db.
Etap. POST
All
Used
%I0.0
%I0.1
%Q0.0
%I0.3
Without
Address
Find
Symbol
Comment
10
01
01
10
TwidoSuite
Data Browser
Functions Bar
35011385 06/2008
Import Program
Export Program
Show/hide ProgramBrowser
Show/hide Cross-Ref Browser
Show/hide Data Browser
41
Create/Edit Program
Ladder Editor
Elements
The Ladder Editor is a graphics-based, program editor used to view, create and
edit ladder programs.
When you select Ladder in the program tool bar drop-down list box, the program
editor switches to Ladder mode. The following figure describes the various elements
that make up the ladder editor:
Section or Rung
header
Program Toolbar
Ladder
LD
Hex
Dec
100%
SR
List
R
Ladder
R
1
%TM %C
SECTION OR RUN TITLE
abc
Standard
Section or Rung
Standard
Label, %Li
Ini. step
Start step
Step POST
%I0.0
%Q0.0
%I0.0
Ladder elements
42
%I0.0
Programming grid
Extended Ladder
Palette Buttons
35011385 06/2008
Create/Edit Program
Program Edition
Tool Bars
3 ladder programming tool bars (see figure above) are available that allow you to
easily edit programs and graphically enter ladder instructions:
z Program Tool Bar
z Ladder Palette Tool Bar
z Extended Ladder Palette
Program Tool Bar
Ladder
Hex
Dec
100%
SR
abc
List
Ladder
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
35011385 06/2008
10
11 12
13
14
15
43
Create/Edit Program
%TM %C
9 10 11 12 13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Add rung
Insert rung
Add normally open contact
Add normally closed contact
Add coil
Add inverse coil
Add link
Remove link
Add Comparison block
Add Operation block
Add Timer block
Add Counter block
Add Jump or Subroutine Call
Extended Ladder Palette buttons (see below)
%TM %C
XOR
XORN
XORR
XORF
1
2
3
4
5
6
44
RET
1111123 1111123
%M %R %S
MSG
SBR
END
#D
%SC
35011385 06/2008
Create/Edit Program
Overview of
Ladder
Programming
You write a ladder program in the logical order required to control a machine or
process.
Sections/Subroutines
A TwidoSuite ladder program is made up of a sequence of sections and
subroutines containing ladder rungs. Sections and subroutines are delimited by
section/subroutine headers. They are numbered automatically by the TwidoSuite
software.
The following figure describes a typical section header (subroutine headers are
similar to this).
1
LD
SECTION TITLE
Rungs
A ladder rung is similar to a relay logic diagram. Each rung consists of one network
of linked graphical elements organized in a programming grid starting with a
potential bar on the left and ending with a potential bar on the right.
The following figure describes a typical ladder rung.
Comments
Symbol
Address
RUNG TITLE
Rung 1
main switch
SWITCH1
%I0.0
%Q0.0
Input element
(example of
normally open contact)
Output element
(example of
normal coil)
Note: Programs are limited to a total of 128 sections and subroutines with a
maximum of 64 subroutines (SR0 to SR63).
35011385 06/2008
45
Create/Edit Program
How to Edit a
Program
The following procedure gives you the basics to start editing a ladder program.
1. When you start writing a new program, press the Add Section icon
program tool bar at the following prompt.
on the
Result: The first section is inserted in the ladder editor, displaying the first empty
rung, as shown below. (Note that a program must contain at least one section.)
46
35011385 06/2008
Create/Edit Program
Note: At this stage, you will note that the red color bar shows that the rung is still
invalid.
8. You must specify an address to each element in the rung. Click the address field
above each element and enter the desired address. Enter %I0.0 for the input
contact and %Q0.0 for output coil (example). Note that you may also optionally
specify a symbol and comment for each element.
Result: The yellow color bar indicates that this rung is valid, but has not been
analyzed (compiled with the program) yet.
9. Click the Analyze icon
to start the program validation process and check for
possible program errors in the Error list box.
Note: To find out more about program edition rules and procedures, please refer
to the TwidoSuite Operation Guide - Online Help.
35011385 06/2008
47
Create/Edit Program
Example
Program for the
AutomaticWatering System
This section gives you the ladder program that applies to the automatic-watering
system example. This application consists of 2 independent processes:
z
z
This wil require to create 2 sections in the program, one for each process.
Water tank level management section
Insert the first section of the program, and create the following program.
Watering count
Add a section to the program, create the following program that will count the
watering cycles and save your project. (Note: If you have not done it yet at the Data
Objects Configuration stage, double-click the %C0 element and set the Preset
value to 100 cycles in the Counters table.)
48
35011385 06/2008
Create/Edit Program
2
Save the
Program
When the counter current value reaches 100, the memory bit %M0 is set to 1. Memory bit
%M0 can be used to control an LED that will indicate that maintenance is required after
completion of the 100 watering cycles. Note that you may connect a push button to the R
input to manually reset the maintenance cycle counter.
Once you have finished writing your program, you can save your program in any of
2 ways:
z Provided that you have already given a name to your application and specified
the project directory (see p. 25), click the Save current project shortcut
the Quick Access Bar.
z
Select
on
Project Save current project task and click the Save button.
Result: The project files containing the application program are saved to the disk in
the project directory which location has been specified in the project file information
window.
Note: It is good practice to frequently save your project to the PC disk as you are
writing larger ladder/list instructions programs to prevent any significant loss of
work due to power shut-down or other computer problems.
35011385 06/2008
49
Create/Edit Program
TwidoSuite offers a simulator function that enables you to test a newly written
program without loading it on a controller. The Twido Simulator lets you run the
program and test different parameters in order to see if the expected responses are
occurring.
Starting Twido
Simulator
To start the Twido Simulator select Program Program and click the Twido
Simulator button S at the bottom right of the TwidoSuite screen.
Result:
TwidoSuite switches automatically to Program Debug Animate the
program.
z The Twido Simulator overview window appears.
z The Dashboard pops up.
z If an RTC is configured or embedded, the Time Management Panel is also
displayed.
z
The Simulator loads the configuration you have created in the Describe screen.
Note: Some functions of your application cannot be tested using the Simulator.
Using Twido
Simulator
Once the Simulator is launched you can use the functions that are available in debug
mode. These are:
z Animate the program
z Manage animation tables
z Check PLC
z Monitor hardware configuration
z Monitor software configuration
z Monitor described configuration
z Monitor the behavior
You can find more information on animating tables and managing animation tables
in Debug the Program (see p. 64).
50
35011385 06/2008
Create/Edit Program
Twido Simulator
Overview
Window
The Twido simulator overview window shows the state of inputs/outputs of all the
described base controller and expansion modules.
The overview window is shown below:
NO SIMULATION
TWDNCO1M
IN
0 32767
1
20
30
4 223
5
6
7
NO SIMULATION
IN
OUT
0 8 16 0 8
STAT 1 9 17 1 9
2 10 18 2 10
3 11 19 3 11
4 12 20 4 12
5 13 21 5 13
6 14 22 6 14
7 15 23 7 15
PWR
RUN
ERR
TWDNOI10M3
TWDAMI8HT
TWDLMDA40DTK
10
1. Click to minimize to tray.
When the overview window is minimized, the Twido Simulator icon
appears
in the status area (on the bottom right of your screen). Double click on this icon
to restore the overview window.
2. Inputs states:
z Click to set/reset the corresponding input
z Double click to open the discrete input settings window.
3. Outputs states: double click to open the output tracing window.
4. Click to always toggle the overview window on top
5. PWR LED: Indicates if the simulated PLC is powered up.
6. RUN LED: Indicates the state of the simulated PLC.
7. ERR LED: Indicates the state of the simulated PLC.
8. STAT LED: The operation of the STAT LED is defined by user logic
9. Base controller and expansion modules references
10.Expansion modules that cannot be simulated.
Right click on the Overview Window to expand the following contextual menu:
Time Management: Opens the Time Management panel.
z
35011385 06/2008
51
Create/Edit Program
z
To access analog input settings, double click on the analog input LED.
To access discrete input settings, double click on the discrete input LED.
Twido Simulator
Dashboard
You can use the Twido Simulator dashboard to issue the following commands to the
controller:
z
Stop
Initialize
TWDLC-A24DRF
RUN
Error
Stat
TwidoSuite
RUN, ERR, and STAT LEDs are simulated in the Twido Simulator dashboard as
they would appear on a connected base controller (for details about these LEDs, see
the Twido Hardware Reference Guide).
Using Twido
Simulator
Dashboard
TWDLC-A24DRF
RUN
Error
Stat
TwidoSuite
My project
?
SIMULATION
Stop
52
35011385 06/2008
Create/Edit Program
Expanding
Twido Simulator
Dashboard
SIMULATION
RUN
Error
Stat
TwidoSuite
Application name :
Twido state :
Reference :
Firmware version :
Current time :
I\O failured :
I\O forced :
Current PLc scanning period :
Address used :
Port used :
35011385 06/2008
53
Create/Edit Program
Time
Management
Panel
The Time Management Panel allows to control the timing of the simulation (Action
on the time management panel modifies the RTC time accordingly and
immediately), you can choose:
z The beginning and the end of the simulation
z To accelerate the simulation.
Note: The default initial time of the simulation is the time of your PC.
The default duration of the simulation is 7 days.
The Time Management Panel is shown below:
1
3
?
Time Management
07/24/2007
17:34:00
Beginning
Simulation Period
End
Fin 07/31/2007
17:34:00
End
Beginning
5
Day
Month
Year
Hour
Minute Second
Min
Max
10
11
z
: Simulator in fast rewind
6. Indicates the current time of the simulation
7. Back to beginning time
8. Fast rewind in time
9. Fast forward in time
10.Go to the end time.
54
35011385 06/2008
Create/Edit Program
In order to run tests on your program, the Twido Simulator lets you set the input
values and the configure which outputs are traced.
You can set both the discrete inputs and analog inputs.
z
z
To open the discrete input settings window, double-click on the discrete input
LED.
To open the analog input settings window, double-click on the analog input LED.
You can also configure up to 8 outputs to be traced traced. You open the tracing
configuration window by clicking the Configure button of the output tracing window.
Output Traces
with the
Simulator
The outputs tracing window shows the variation of analog and discrete outputs over
time.
The outputs tracing window is shown below:
Tracing
Analog Outputs
100%
%QW0.1.0:-13108
0%
Discrete Outputs
%Q0.0.0: 0
%Q0.0.2: 1
Help
35011385 06/2008
Configure
OK
55
Create/Edit Program
Stopping Twido
Simulator
To stop the Twido Simulator, click the button S at the bottom right of the
TwidoSuite screen.
After stopping the simulation TwidoSuite returns to the screen displayed before
starting Twido Simulator.
Note: It is not possible to backup the Twido Simulator program before stopping.
56
35011385 06/2008
Create/Edit Program
35011385 06/2008
In this section, you will find out how to transfer the program to the Twido PLC and
start running your program on the controller. Note that a program must be saved
before it can be transferred to the PLC.
57
Create/Edit Program
Transfer the
Program
In order to run your application for debugging, you must first transfer it to the
controller RAM.
Follow these steps to download your application program to the PLC:
1. If the PC is not yet connected to the controller, select a connection from the
connections table in Program Debug Connect task and click Run.
Connection for Debugging
This connection method allows to
directly connect to the controller or to
transfer an application from the PC to
the controller.
Select a connection
Type
Name
Connection method
IP/Phone
Project
My connection 1
Ethernet
13.1.2.3.Direct
Project
My connection 2
Project
My connection 3
Modem
555554443333,
Project
My connection 4
USB
USB,8
PC
USB
Serial
USB,Punit
Serial
Punit
OK
Select a connection
Type
Name
Connection method
IP/Phone
Project
USB direct
USB
USB
Project
Ethernet direct
TCP/IP
192.168.0.1
Project
Modem direct
MODEM
+33 2 23 45 67 89
Project
COM1 P2P
Srie
COM1,@
PC
USB P2P
USB
USB,1
Communication established
Connection tests
The PC and controller applications do not match : immediate connection is not possible !
Hardware configurations match : transfer PC ==> Controller is possible
Controller application not protected : transfer Controller ==> PC is allowed
Comparing applications
Project
Controller
Application name
Base controller
ViewEx
TWDLCAA16DRF
ViewEx
TWDLCAA16DRF
Immediate connection
Transfer
PC ==> Controller
Transfer
Controller ==> PC
Cancel
Connect
58
35011385 06/2008
Create/Edit Program
35011385 06/2008
59
Create/Edit Program
Use the PLC Soft Control Panel to Run/Stop/Initialize a program that has been
downloaded to the PLC (see p. 58.)
To run the program that you have just tranferred to the PLC, follow this procedure:
1. If the connection between TwidoSuite and the PLC is not active, select a
connection from the connections table in Program Debug Connect task
and click OK to establish a connection.
2. When a successful connection is established between TwidoSuite and the
controller, the PLC Soft Control Panel dialog box appears in the form of a
dashboard, always on top of your TwidoSuite workspace.
TWDLC-A24DRF
RUN
Error
Stat
TwidoSuite
RUN
STOP
INTIALIZE
60
The Control Panel Dashboard is used in the same way as the Dashboard used for
the Simulator, refer to Twido Simulator Dashboard (see p. 52).
35011385 06/2008
Create/Edit Program
TwidoSuite provides many options to help you debug and adjust your program:
z
z
z
z
35011385 06/2008
Cross-Reference browser
Animation tables
Forcing I/Os
Program animation
61
Create/Edit Program
CrossReferencing your
Program
Introduction
Cross referencing makes it easier to locate several occurences of the same program
element throught the application, for debugging purposes.
It consists of selecting items in a program such as an address that you want to track
in an application. Once the items are selected, then a list is generated displaying
where the items are used in the application. Cross referencing provides a useful list
of the operands, symbols, lines and operators used in all or part of an application.
Cross-Reference Browser
010 1
01
10
10
Select Program
000
0
0 01
010 1
Program
10
10 0
0 1 00 1 0 0 0
0 1 0 1 0 01 0
11 1 0 0 0
01 0 1 0 0
01
Configure
Symbol: TEST
Section
62
Location
Section 1
Rung 1
Section 1
Rung 1
Operator
35011385 06/2008
Create/Edit Program
35011385 06/2008
63
Create/Edit Program
Using Animation
Tables
Use an animation table to view and adjust program variables online, when the PLC
is either in Run or Stop mode.
With an animation table, you can
as the program is running, monitor the actual value of any variable in the
controller and compare against expected value,
z change the value of variables independent of calculated values, until they are
updated again,
z backup the current values of all variables in an animation table,
z restore to the controller the retained values of all variables in an animation table,
z force inputs and outputs.
z
Column headings
Toolbar
Address
%I0.0
Used
Symbol
Current
0
Retained
0
Format
Decimal
%I0.1
Decimal
%I0.2
Decimal
Import a table
%I0.3
Decimal
Export a table
%I0.4
Decimal
%I0.5
Decimal
%I0.6
Decimal
%I0.7
Decimal
%I0.8
Decimal
10
%I0.9
Decimal
11
%Q0.1
Decimal
12
%Q0.2
Decimal
13
%Q0.3
Decimal
14
%Q0.4
Decimal
15
%Q0.5
Decimal
16
%IW1.0
Decimal
17
%IW1.1
Decimal
18
%IW1.2
Decimal
19
%IW1.3
Decimal
20
%IW1.4
Decimal
Animation tables
Name
My animation table 1
My animation table 2
My animation table 3
My animation table 4
My animation table 5
Address
Animation table
For more details, please refer to Debugging Online via the Program Animation in
TwidoSuite Operation Guide - Online Help.
64
35011385 06/2008
Create/Edit Program
Forcing I/Os
Forcing I/Os means that you forcibly set the values of one or more input or output
bits to either 0 or 1.
Note: You can force I/Os when TwidoSuite is in online mode, with the controller
either in Run or Stop mode.
How to Force I/Os in an Animation Table
The animation table tool bar provides Force Commands:
1
Force to 1
z
0
Force to 0
Clear Force
35011385 06/2008
65
Create/Edit Program
Animating a
Program
You can animate both Ladder and List programs when online. This section
describes how to animate a Ladder language program. For more details, please
refer to Animating a Program in TwidoSuite Operation Guide - Online Help.
How to Animate a Ladder Program
1. Select the Program Debug Animate program task to open the program
editor in animated mode.
Result: The program editor displays animated ladder elements.
2. Watch the animated ladder elements during program execution.
How Ladder Animation Works
You can watch the backlight of logical objects such as contacts, coils and special
objects turn on as their logical value becomes 1.
z You can keep track of data variables of fonction blocks, comparison blocks and
operation blocks, including current and preset values.
z
Note: Binary operands are displayed as 0 or 1, while all other values are displayed
in hexadecimal or decimal, depending on the format selected in Preferences
(see p. 22).
Display/hide the Animation tables
66
35011385 06/2008
Create/Edit Program
(leftmost button
Telemecanique
0 10 1
01
10
10
Project
Describe
My project
0 00
10
10 0
0 1 00 1 0 00 0
01 01 0 10
11 10 0 0
01 0 1 0 0
01
0 10
010 1
0 00
010 1
0 00
110 1
0 10
011 0 0 00
010 1
10
0 00
01 1
Program
Report
Program
Configure
Ladder
SR
Hex
Dec
100%
?
Stop
Debug
Disconnect
abc
%TM %C
10
10 0
0 1 00 1 0 0 0
01 01 0 0
0
11 1 0 0 1 0
01 0 1 0 0
01
1 LD
Animate
the program
Manage
animation tables
Check
PLC
Rung 0
%I0.0
%I0.1
%Q0.0
Monitor
hardware
configuration
Monitor
software
configuration
%I0.3
Monitor
described
configuration
Address
%M0
%Q0.1
%I0.0
Used
My animation table 1
Symbol
Current
Monitor
the behavior
Retained
Format
Decimal
Decimal
Decimal
S
S
TwidoSuite
35011385 06/2008
67
Create/Edit Program
With TwidoSuite report, you create custom printouts and html exports (to .htm file)
by selecting report items from the report manager browser.
Report Manager
Use the report manager to select report components, configure printing options, and
export the application report to HTML format.
on the
The report manager provides a tree-like structure view of the report items and
subitems that can be included in the report by checking the appropirate boxes.
Contents
Folder
Folder name
Station
Repaginate
Folder
Project My Project
First Page (2)
History (1)
Contents (1)
Describe (1)
Graphical Description (5)
Properties (1)
Nomenclature (1)
Twido
Configuration
Hardware (1)
Memory Objects (1)
Memory Report (1)
Behavior configuration (1)
Program
Contents (1)
Symbols (1)
Cross References (1)
Animation Tables (1)
Preferences (1)
About (1)
To configure the report, select an item from the report browser and set the options
that appear in the configuration window. For details on report options, please refer
to the TwidoSuite Operation Guide - Online Help.
68
35011385 06/2008
Create/Edit Program
Page Setup
Select the Report Page Setup task to set the information you want to display in
page headers and footers, and the page margins as well.
You can configure your report pages to show up to nine different types of information
in three seperate fields per header and footer line, including:
You can configure in your report page to show up to three different type of
information in three seperate fields per header and footer, including:
z Print date
z Creation date
z Modification date
z Project name
z Any text (Free)
z No text (None)
z Page number/Total number of pages (Page i/n)
z Page number (Page i)
z TwidoSuite version
z File name
Select the Report Print task to prepare the report for sending to the printer and/
or to an HTML export file.
The print window allows you to:
z preview the report with several page format and zooming options,
z choose the destination printer and access the printer properties,
z repaginate your report according to selected printing options
z send your report for printing on the selected print device,
z export your report to a HTML file.
35011385 06/2008
69
Create/Edit Program
70
35011385 06/2008
Monitoring an Application
6
Monitoring an Application
How to Start the
Monitoring Utility
TwidoSuite
New
Programming Mode
Monitoring Mode
English
Franais
35011385 06/2008
71
Monitoring
Monitoring
Features
Controller Status
RAM Executable
RAM Protected
I/O Forced
Potentiometers
Maximum (ms)
...
TD-33/V90
Current (ms)
Minimum (ms)
Date (dd/mm/yy)
Time (hh:mm:ss)
RTC Correction
Modem connected
Name
Command
Apply
1.
2.
3.
4.
5.
Cancel
For details on how to use the various monitoring features, please refer to Hardware
Monitoring chapter in TwidoSuite Operation Guide - Online help.
72
35011385 06/2008