WEG WPS Programming Software User Manual 10001381480 en
WEG WPS Programming Software User Manual 10001381480 en
Software
WPS v2.5X
User Manual
User Manual
Series: WPS
Language: English
Document number: 10001381480 / R11
Contents
1 WPS v2.5X
..........................................................................................................23
2 Introduction
..........................................................................................................24
2.1 Welcome
......................................................................................................................................... 24
2.2 System
.........................................................................................................................................
Requirements 24
2.3 Supported
.........................................................................................................................................
Equipments 24
2.4 Copyright
.........................................................................................................................................
Notice 25
2.5 Safety
.........................................................................................................................................
Notice 25
3 What's..........................................................................................................26
New
3.1 What's
.........................................................................................................................................
New - This Version 26
3.2 What's
.........................................................................................................................................
New - Previous Versions 26
4 Installation/Uninstallation
..........................................................................................................33
4.1 Before
.........................................................................................................................................
Installing 33
4.2 Installing
......................................................................................................................................... 33
4.3 Uninstalling
......................................................................................................................................... 33
5 Getting
..........................................................................................................34
to Know the Environment
5.1 Environment
......................................................................................................................................... 34
5.2 Configuration
.........................................................................................................................................
Structure 34
6 Quick ..........................................................................................................36
Start
6.1 Welcome
.........................................................................................................................................
Window 36
6.2 Creating
.........................................................................................................................................
New Configuration 51
6.3 New Configuration
.........................................................................................................................................
- Online Equipment 52
6.4 New Configuration
.........................................................................................................................................
- Offline Equipment 60
6.5 Creating
.........................................................................................................................................
New Resource 68
6.6 New Resource
.........................................................................................................................................
- Online Equipment 68
6.7 Pop-up
.........................................................................................................................................
Menu 76
6.8 Pop-up
.........................................................................................................................................
Menu - Configuration 76
6.9 Pop-up
.........................................................................................................................................
Menu - Resource 91
7 Communication
..........................................................................................................100
7.1 Equipment
.........................................................................................................................................
Parameterization 100
7.2 Establishing
.........................................................................................................................................
Communication - USB Serial Port 100
7.3 Establishing
.........................................................................................................................................
Communication - RS232 104
7.4 Establishing
.........................................................................................................................................
Communication - RS485 109
7.5 Cables
......................................................................................................................................... 114
7.6 USB/Serial
.........................................................................................................................................
Converter 116
WPS v2.5X | 3
8 Ladder
..........................................................................................................118
8.1 Concepts
......................................................................................................................................... 118
8.1.1 Introduction
.......................................................................................................................................................................................... 118
8.1.2 Legend
.......................................................................................................................................................................................... 120
8.1.3 Contact
..........................................................................................................................................................................................
Logic 121
8.1.4 Data
..........................................................................................................................................................................................
types 123
8.1.5 Direct
..........................................................................................................................................................................................
Representation 123
8.2 Editor
......................................................................................................................................... 124
8.2.1 Desktop
.......................................................................................................................................................................................... 124
8.2.2 Ladder
..........................................................................................................................................................................................
Menu 125
8.2.3 Rungs
.......................................................................................................................................................................................... 126
8.2.3.1 Overview
....................................................................................................................................................................................... 126
8.2.3.2 Editing
....................................................................................................................................................................................... 127
8.2.3.3 Title
.......................................................................................................................................................................................
and Comment 127
8.2.3.4 Inserting
.......................................................................................................................................................................................
Elements 128
8.2.3.4.1 Overview
................................................................................................................................................................................ 128
8.2.3.4.2 In Series
................................................................................................................................................................................ 129
8.2.3.4.3 In Parallel
................................................................................................................................................................................ 130
8.2.3.5 Brow
.......................................................................................................................................................................................
sing 130
8.2.3.5.1 With................................................................................................................................................................................
the Keyboard 130
8.2.3.5.2 With................................................................................................................................................................................
the Mouse 132
8.2.3.6 Copy/Paste
....................................................................................................................................................................................... 133
8.2.4 Variables
.......................................................................................................................................................................................... 137
8.2.4.1 Overview
....................................................................................................................................................................................... 137
8.2.4.2 Fields
....................................................................................................................................................................................... 138
8.2.4.3 Editing
.......................................................................................................................................................................................
in the Rung 140
8.2.4.4 Literals
.......................................................................................................................................................................................
in the Rung 142
8.2.4.5 Arrays
.......................................................................................................................................................................................
in the Rung 142
8.2.4.6 Instances
.......................................................................................................................................................................................
and Structures in the Rung 143
8.2.4.7 Volatile
.......................................................................................................................................................................................
and Retentive Instances 144
8.2.5 Com
..........................................................................................................................................................................................
pile 148
8.2.6 Transfer
.......................................................................................................................................................................................... 149
8.2.7 Online
..........................................................................................................................................................................................
Monitoring 150
8.3 Working
.........................................................................................................................................
with USERFBs 154
8.3.1 Creating
..........................................................................................................................................................................................
USERFBs 154
8.3.2 Adding
..........................................................................................................................................................................................
input/output 156
8.3.3 Editing
..........................................................................................................................................................................................
the Ladder 159
8.3.4 Using
..........................................................................................................................................................................................
USERFBs 160
9 Diagnostic
..........................................................................................................162
9.1 Monitoring
.........................................................................................................................................
Variable 162
9.2 Trend
......................................................................................................................................... 163
9.2.1 Overview
.......................................................................................................................................................................................... 163
9.2.2 Configuration
.......................................................................................................................................................................................... 164
10 Wizards
..........................................................................................................167
10.1 Overview
......................................................................................................................................... 167
10.2 Monitoring
.........................................................................................................................................
Wizard 167
10.3 Configuration
.........................................................................................................................................
Wizard 169
11 Equipments
..........................................................................................................175
(Devices)
WPS v2.5X | 4
Contents
11.1 CFW100
......................................................................................................................................... 175
11.1.1 Description
.......................................................................................................................................................................................... 175
11.1.2 System
..........................................................................................................................................................................................
Markers 175
11.1.3 I/O's
.......................................................................................................................................................................................... 178
11.1.4 Im..........................................................................................................................................................................................
port from WLP 179
11.1.5 Param
..........................................................................................................................................................................................
eters 181
11.1.5.1 Overview
....................................................................................................................................................................................... 181
11.1.5.2 Configuration
....................................................................................................................................................................................... 183
11.1.5.3 Read
.......................................................................................................................................................................................
and Write of Parameters 185
11.1.5.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 188
11.1.5.5 User
.......................................................................................................................................................................................
Parameters 198
11.1.6 Ladder
.......................................................................................................................................................................................... 200
11.1.6.1 Coil
....................................................................................................................................................................................... 200
11.1.6.1.1 DIRECTCOIL
................................................................................................................................................................................ 200
11.1.6.1.2 INVERTEDCOIL
................................................................................................................................................................................ 201
11.1.6.1.3 RESETCOIL
................................................................................................................................................................................ 203
11.1.6.1.4 SETCOIL................................................................................................................................................................................ 204
11.1.6.1.5 TOGGLECOIL
................................................................................................................................................................................ 205
11.1.6.2 Communication
.......................................................................................................................................................................................
Netw ork 206
11.1.6.2.1 Modbus ................................................................................................................................................................................
RTU 206
11.1.6.2.1.1 Modbus
................................................................................................................................................................................
RTU Overview 206
11.1.6.2.1.2 MB_MasterControlStatus
................................................................................................................................................................................ 207
11.1.6.2.1.3 MB_ReadBinary
................................................................................................................................................................................ 209
11.1.6.2.1.4 MB_ReadRegister
................................................................................................................................................................................ 213
11.1.6.2.1.5 MB_SlaveStatus
................................................................................................................................................................................ 217
11.1.6.2.1.6 MB_WriteBinary
................................................................................................................................................................................ 219
11.1.6.2.1.7 MB_WriteRegister
................................................................................................................................................................................ 223
11.1.6.3 Compare
....................................................................................................................................................................................... 227
11.1.6.3.1 COMP_EQ................................................................................................................................................................................ 227
11.1.6.3.2 COMP_GE................................................................................................................................................................................ 229
11.1.6.3.3 COMP_GT................................................................................................................................................................................ 231
11.1.6.3.4 COMP_LE................................................................................................................................................................................ 233
11.1.6.3.5 COMP_LT................................................................................................................................................................................ 235
11.1.6.3.6 COMP_NE................................................................................................................................................................................ 237
11.1.6.4 Contact
....................................................................................................................................................................................... 238
11.1.6.4.1 NCCONTACT
................................................................................................................................................................................ 238
11.1.6.4.2 NOCONTACT
................................................................................................................................................................................ 240
11.1.6.4.3 NTSCONTACT
................................................................................................................................................................................ 241
11.1.6.4.4 PTSCONTACT
................................................................................................................................................................................ 242
11.1.6.5 Control
....................................................................................................................................................................................... 244
11.1.6.5.1 PID ................................................................................................................................................................................ 244
11.1.6.6 Conversion
....................................................................................................................................................................................... 249
11.1.6.6.1 BOOL ................................................................................................................................................................................ 249
11.1.6.6.1.1 BYTE_TO_BOOL
................................................................................................................................................................................ 249
11.1.6.6.1.2 DWORD_TO_BOOL
................................................................................................................................................................................ 251
11.1.6.6.1.3 REAL_TO_BOOL
................................................................................................................................................................................ 252
11.1.6.6.1.4 WORD_TO_BOOL
................................................................................................................................................................................ 254
11.1.6.6.2 BYTE ................................................................................................................................................................................ 255
11.1.6.6.2.1 BOOL_TO_BYTE
................................................................................................................................................................................ 255
11.1.6.6.2.2 DWORD_TO_BYTE
................................................................................................................................................................................ 257
11.1.6.6.2.3 REAL_TO_BYTE
................................................................................................................................................................................ 258
11.1.6.6.2.4 WORD_TO_BYTE
................................................................................................................................................................................ 260
11.1.6.6.3 DWORD ................................................................................................................................................................................ 262
11.1.6.6.3.1 BOOL_TO_DWORD
................................................................................................................................................................................ 262
WPS v2.5X | 5
11.1.6.6.3.2 BYTE_TO_DWORD
................................................................................................................................................................................ 263
11.1.6.6.3.3 REAL_TO_DWORD
................................................................................................................................................................................ 265
11.1.6.6.3.4 WORD_TO_DWORD
................................................................................................................................................................................ 266
11.1.6.6.4 REAL ................................................................................................................................................................................ 268
11.1.6.6.4.1 BOOL_TO_REAL
................................................................................................................................................................................ 268
11.1.6.6.4.2 BYTE_TO_REAL
................................................................................................................................................................................ 269
11.1.6.6.4.3 DWORD_TO_REAL
................................................................................................................................................................................ 271
11.1.6.6.4.4 WORD_TO_REAL
................................................................................................................................................................................ 272
11.1.6.6.5 WORD ................................................................................................................................................................................ 274
11.1.6.6.5.1 BOOL_TO_WORD
................................................................................................................................................................................ 274
11.1.6.6.5.2 BYTE_TO_WORD
................................................................................................................................................................................ 275
11.1.6.6.5.3 DWORD_TO_WORD
................................................................................................................................................................................ 277
11.1.6.6.5.4 REAL_TO_WORD
................................................................................................................................................................................ 278
11.1.6.7 Counter
....................................................................................................................................................................................... 280
11.1.6.7.1 CTD................................................................................................................................................................................ 280
11.1.6.7.2 CTU................................................................................................................................................................................ 283
11.1.6.7.3 CTUD ................................................................................................................................................................................ 286
11.1.6.8 Data
.......................................................................................................................................................................................
Transfer 291
11.1.6.8.1 DEMUX ................................................................................................................................................................................ 291
11.1.6.8.2 ILOAD ................................................................................................................................................................................ 293
11.1.6.8.3 ILOADBOOL
................................................................................................................................................................................ 294
11.1.6.8.4 ISTORE ................................................................................................................................................................................ 296
11.1.6.8.5 ISTOREBOOL
................................................................................................................................................................................ 297
11.1.6.8.6 MUX................................................................................................................................................................................ 299
11.1.6.8.7 SEL ................................................................................................................................................................................ 302
11.1.6.8.8 STORE ................................................................................................................................................................................ 304
11.1.6.8.9 USERERR................................................................................................................................................................................ 306
11.1.6.9 Filter
....................................................................................................................................................................................... 308
11.1.6.9.1 LOWPASS................................................................................................................................................................................ 308
11.1.6.10 Logic
....................................................................................................................................................................................... 311
11.1.6.10.1 Logic................................................................................................................................................................................
Bit 311
11.1.6.10.1.1 RESETBIT
................................................................................................................................................................................ 311
11.1.6.10.1.2 SETBIT
................................................................................................................................................................................ 313
11.1.6.10.1.3 TESTBIT
................................................................................................................................................................................ 315
11.1.6.10.2 Logic................................................................................................................................................................................
Boolean 317
11.1.6.10.2.1 AND ................................................................................................................................................................................ 317
11.1.6.10.2.2 NOT ................................................................................................................................................................................ 318
11.1.6.10.2.3 OR................................................................................................................................................................................ 320
11.1.6.10.2.4 XNOR................................................................................................................................................................................ 321
11.1.6.10.2.5 XOR ................................................................................................................................................................................ 323
11.1.6.10.3 Logic................................................................................................................................................................................
Rotate 324
11.1.6.10.3.1 ROL ................................................................................................................................................................................ 324
11.1.6.10.3.2 ROR ................................................................................................................................................................................ 326
11.1.6.10.4 Logic................................................................................................................................................................................
Shift 328
11.1.6.10.4.1 ASHL................................................................................................................................................................................ 328
11.1.6.10.4.2 ASHR................................................................................................................................................................................ 330
11.1.6.10.4.3 SHL ................................................................................................................................................................................ 332
11.1.6.10.4.4 SHR ................................................................................................................................................................................ 334
11.1.6.11 Math
....................................................................................................................................................................................... 336
11.1.6.11.1 Math................................................................................................................................................................................
Basic 336
11.1.6.11.1.1 ABS ................................................................................................................................................................................ 336
11.1.6.11.1.2 ADD ................................................................................................................................................................................ 338
11.1.6.11.1.3 DIV................................................................................................................................................................................ 340
11.1.6.11.1.4 MOD ................................................................................................................................................................................ 342
WPS v2.5X | 6
Contents
WPS v2.5X | 7
11.2.6.2.1 Modbus
................................................................................................................................................................................
RTU 433
11.2.6.2.1.1 Modbus
................................................................................................................................................................................
RTU Overview 433
11.2.6.2.1.2 MB_MasterControlStatus
................................................................................................................................................................................ 434
11.2.6.2.1.3 MB_ReadBinary
................................................................................................................................................................................ 436
11.2.6.2.1.4 MB_ReadRegister
................................................................................................................................................................................ 440
11.2.6.2.1.5 MB_SlaveStatus
................................................................................................................................................................................ 444
11.2.6.2.1.6 MB_WriteBinary
................................................................................................................................................................................ 446
11.2.6.2.1.7 MB_WriteRegister
................................................................................................................................................................................ 450
11.2.6.3 Compare
....................................................................................................................................................................................... 454
11.2.6.3.1 COMP_EQ................................................................................................................................................................................ 454
11.2.6.3.2 COMP_GE................................................................................................................................................................................ 456
11.2.6.3.3 COMP_GT................................................................................................................................................................................ 458
11.2.6.3.4 COMP_LE................................................................................................................................................................................ 460
11.2.6.3.5 COMP_LT................................................................................................................................................................................ 462
11.2.6.3.6 COMP_NE................................................................................................................................................................................ 464
11.2.6.4 Contact
....................................................................................................................................................................................... 465
11.2.6.4.1 NCCONTACT
................................................................................................................................................................................ 465
11.2.6.4.2 NOCONTACT
................................................................................................................................................................................ 467
11.2.6.4.3 NTSCONTACT
................................................................................................................................................................................ 468
11.2.6.4.4 PTSCONTACT
................................................................................................................................................................................ 469
11.2.6.5 Control
....................................................................................................................................................................................... 471
11.2.6.5.1 PID ................................................................................................................................................................................ 471
11.2.6.6 Conversion
....................................................................................................................................................................................... 476
11.2.6.6.1 BOOL ................................................................................................................................................................................ 476
11.2.6.6.1.1 BYTE_TO_BOOL
................................................................................................................................................................................ 476
11.2.6.6.1.2 DWORD_TO_BOOL
................................................................................................................................................................................ 478
11.2.6.6.1.3 REAL_TO_BOOL
................................................................................................................................................................................ 479
11.2.6.6.1.4 WORD_TO_BOOL
................................................................................................................................................................................ 481
11.2.6.6.2 BYTE
................................................................................................................................................................................ 482
11.2.6.6.2.1 BOOL_TO_BYTE
................................................................................................................................................................................ 482
11.2.6.6.2.2 DWORD_TO_BYTE
................................................................................................................................................................................ 484
11.2.6.6.2.3 REAL_TO_BYTE
................................................................................................................................................................................ 485
11.2.6.6.2.4 WORD_TO_BYTE
................................................................................................................................................................................ 487
11.2.6.6.3 DWORD
................................................................................................................................................................................ 489
11.2.6.6.3.1 BOOL_TO_DWORD
................................................................................................................................................................................ 489
11.2.6.6.3.2 BYTE_TO_DWORD
................................................................................................................................................................................ 490
11.2.6.6.3.3 REAL_TO_DWORD
................................................................................................................................................................................ 492
11.2.6.6.3.4 WORD_TO_DWORD
................................................................................................................................................................................ 493
11.2.6.6.4 REAL................................................................................................................................................................................ 495
11.2.6.6.4.1 BOOL_TO_REAL
................................................................................................................................................................................ 495
11.2.6.6.4.2 BYTE_TO_REAL
................................................................................................................................................................................ 496
11.2.6.6.4.3 DWORD_TO_REAL
................................................................................................................................................................................ 498
11.2.6.6.4.4 WORD_TO_REAL
................................................................................................................................................................................ 499
11.2.6.6.5 WORD
................................................................................................................................................................................ 501
11.2.6.6.5.1 BOOL_TO_WORD
................................................................................................................................................................................ 501
11.2.6.6.5.2 BYTE_TO_WORD
................................................................................................................................................................................ 502
11.2.6.6.5.3 DWORD_TO_WORD
................................................................................................................................................................................ 504
11.2.6.6.5.4 REAL_TO_WORD
................................................................................................................................................................................ 505
11.2.6.7 Counter
....................................................................................................................................................................................... 507
11.2.6.7.1 CTD................................................................................................................................................................................ 507
11.2.6.7.2 CTU................................................................................................................................................................................ 510
11.2.6.7.3 CTUD ................................................................................................................................................................................ 513
11.2.6.8 Data
.......................................................................................................................................................................................
Transfer 518
11.2.6.8.1 DEMUX ................................................................................................................................................................................ 518
WPS v2.5X | 8
Contents
WPS v2.5X | 9
11.2.6.11.3.7 TAN ................................................................................................................................................................................ 600
11.2.6.11.4 Math................................................................................................................................................................................
Util 602
11.2.6.11.4.1 MAX ................................................................................................................................................................................ 602
11.2.6.11.4.2 MIN ................................................................................................................................................................................ 604
11.2.6.11.4.3 SAT ................................................................................................................................................................................ 606
11.2.6.12 Module
....................................................................................................................................................................................... 609
11.2.6.12.1 USERFB ................................................................................................................................................................................ 609
11.2.6.13 Motion
.......................................................................................................................................................................................
Control 610
11.2.6.13.1 MW_RefVelocity
................................................................................................................................................................................ 610
11.2.6.14 Timer
....................................................................................................................................................................................... 613
11.2.6.14.1 TON................................................................................................................................................................................ 613
11.2.6.14.2 TOF................................................................................................................................................................................ 617
11.2.6.14.3 TP ................................................................................................................................................................................ 620
11.2.6.15 Structures
....................................................................................................................................................................................... 623
11.2.7 Com
..........................................................................................................................................................................................
m unication 626
11.2.7.1 Force
.......................................................................................................................................................................................
I/O 626
11.3 CFW500
......................................................................................................................................... 627
11.3.1 Description
.......................................................................................................................................................................................... 628
11.3.2 Param
..........................................................................................................................................................................................
eters 628
11.3.2.1 Overview
....................................................................................................................................................................................... 628
11.3.2.2 Configuration
....................................................................................................................................................................................... 630
11.3.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 632
11.3.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 635
11.3.2.5 User
.......................................................................................................................................................................................
Parameters 645
11.4 CFW501
......................................................................................................................................... 647
11.4.1 Description
.......................................................................................................................................................................................... 647
11.4.2 Param
..........................................................................................................................................................................................
eters 648
11.4.2.1 Overview
....................................................................................................................................................................................... 648
11.4.2.2 Configuration
....................................................................................................................................................................................... 650
11.4.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 652
11.4.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 655
11.4.2.5 User
.......................................................................................................................................................................................
Parameters 665
11.5 CFW-11
......................................................................................................................................... 667
11.5.1 Description
.......................................................................................................................................................................................... 667
11.5.2 Param
..........................................................................................................................................................................................
eters 668
11.5.2.1 Overview
....................................................................................................................................................................................... 668
11.5.2.2 Configuration
....................................................................................................................................................................................... 669
11.5.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 672
11.5.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 675
11.5.2.5 User
.......................................................................................................................................................................................
Parameters 685
11.5.3 Diagnostic
.......................................................................................................................................................................................... 687
11.5.3.1 Trace
....................................................................................................................................................................................... 687
11.5.3.1.1 Overview
................................................................................................................................................................................ 687
11.5.3.1.2 Configuration
................................................................................................................................................................................ 689
11.6 LDW900
......................................................................................................................................... 695
11.6.1 Description
.......................................................................................................................................................................................... 695
11.6.2 System
..........................................................................................................................................................................................
Markers 696
11.6.3 Oriented
..........................................................................................................................................................................................
Start-Up 699
11.6.4 Auto-Tuning
.......................................................................................................................................................................................... 703
11.6.5 Im..........................................................................................................................................................................................
port from WLP 705
11.6.6 Param ..........................................................................................................................................................................................
eters 0
11.6.7 Ladder.......................................................................................................................................................................................... 0
11.6.7.1 Logic....................................................................................................................................................................................... 0
WPS v2.5X | 10
Contents
11.6.7.2 Math....................................................................................................................................................................................... 0
11.6.7.3 Motion .......................................................................................................................................................................................
Control 0
11.6.8 Cam
..........................................................................................................................................................................................
Profiles 708
11.6.9 Structures
.......................................................................................................................................................................................... 719
11.6.10 Diagnostic
.......................................................................................................................................................................................... 0
11.6.11 Com..........................................................................................................................................................................................
m unication 0
11.7 MW500
......................................................................................................................................... 722
11.7.1 Description
.......................................................................................................................................................................................... 722
11.7.2 Param
..........................................................................................................................................................................................
eters 722
11.7.2.1 Overview
....................................................................................................................................................................................... 722
11.7.2.2 Configuration
....................................................................................................................................................................................... 722
11.7.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 725
11.7.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 728
11.7.2.5 User
.......................................................................................................................................................................................
Parameters 738
11.8 PLC300
......................................................................................................................................... 740
11.8.1 Description
.......................................................................................................................................................................................... 740
11.8.2 New
..........................................................................................................................................................................................
Features and Corrections 741
11.8.3 I/O's
.......................................................................................................................................................................................... 748
11.8.4 System
..........................................................................................................................................................................................
Markers 752
11.8.5 Ladder
.......................................................................................................................................................................................... 760
11.8.5.1 Coil
....................................................................................................................................................................................... 760
11.8.5.1.1 DIRECTCOIL
................................................................................................................................................................................ 760
11.8.5.1.2 IMMEDIATECOIL
................................................................................................................................................................................ 761
11.8.5.1.3 INVERTEDCOIL
................................................................................................................................................................................ 762
11.8.5.1.4 RESETCOIL
................................................................................................................................................................................ 763
11.8.5.1.5 SETCOIL................................................................................................................................................................................ 764
11.8.5.1.6 TOGGLECOIL
................................................................................................................................................................................ 765
11.8.5.2 Communication
.......................................................................................................................................................................................
Netw ork 766
11.8.5.2.1 CANopen................................................................................................................................................................................ 766
11.8.5.2.1.1 CANopen
................................................................................................................................................................................
Overview 766
11.8.5.2.1.2 CO_MasterControlStatus
................................................................................................................................................................................ 768
11.8.5.2.1.3 CO_SDORead
................................................................................................................................................................................ 771
11.8.5.2.1.4 CO_SDOWrite
................................................................................................................................................................................ 774
11.8.5.2.1.5 CO_SlaveStatus
................................................................................................................................................................................ 777
11.8.5.2.2 Modbus ................................................................................................................................................................................
RTU 778
11.8.5.2.2.1 Modbus
................................................................................................................................................................................
RTU Overview 778
11.8.5.2.2.2 MB_MasterControlStatus
................................................................................................................................................................................ 779
11.8.5.2.2.3 MB_ReadBinary
................................................................................................................................................................................ 781
11.8.5.2.2.4 MB_ReadRegister
................................................................................................................................................................................ 785
11.8.5.2.2.5 MB_SlaveStatus
................................................................................................................................................................................ 789
11.8.5.2.2.6 MB_WriteBinary
................................................................................................................................................................................ 791
11.8.5.2.2.7 MB_WriteRegister
................................................................................................................................................................................ 795
11.8.5.2.3 Modbus ................................................................................................................................................................................
TCP 799
11.8.5.2.3.1 Modbus
................................................................................................................................................................................
TCP Overview 799
11.8.5.2.3.2 MBTCP_ClientControlStatus
................................................................................................................................................................................ 799
11.8.5.2.3.3 MBTCP_ReadBinary
................................................................................................................................................................................ 802
11.8.5.2.3.4 MBTCP_ReadRegister
................................................................................................................................................................................ 806
11.8.5.2.3.5 MBTCP_ServerStatus
................................................................................................................................................................................ 810
11.8.5.2.3.6 MBTCP_WriteBinary
................................................................................................................................................................................ 813
11.8.5.2.3.7 MBTCP_WriteRegister
................................................................................................................................................................................ 817
11.8.5.3 Compare
....................................................................................................................................................................................... 821
11.8.5.3.1 COMP_EQ................................................................................................................................................................................ 821
11.8.5.3.2 COMP_GE................................................................................................................................................................................ 823
11.8.5.3.3 COMP_GT................................................................................................................................................................................ 825
WPS v2.5X | 11
11.8.5.3.4 COMP_LE................................................................................................................................................................................ 827
11.8.5.3.5 COMP_LT................................................................................................................................................................................ 829
11.8.5.3.6 COMP_NE................................................................................................................................................................................ 831
11.8.5.4 Contact
....................................................................................................................................................................................... 832
11.8.5.4.1 NCCONTACT
................................................................................................................................................................................ 832
11.8.5.4.2 NOCONTACT
................................................................................................................................................................................ 834
11.8.5.4.3 NTSCONTACT
................................................................................................................................................................................ 835
11.8.5.4.4 PTSCONTACT
................................................................................................................................................................................ 836
11.8.5.5 Control
....................................................................................................................................................................................... 838
11.8.5.5.1 PID ................................................................................................................................................................................ 838
11.8.5.5.2 PID2................................................................................................................................................................................ 843
11.8.5.6 Conversion
....................................................................................................................................................................................... 850
11.8.5.6.1 BCD................................................................................................................................................................................ 850
11.8.5.6.1.1 BCD_TO_WORD
................................................................................................................................................................................ 850
11.8.5.6.1.2 WORD_TO_BCD
................................................................................................................................................................................ 851
11.8.5.6.2 BOOL ................................................................................................................................................................................ 853
11.8.5.6.2.1 BYTE_TO_BOOL
................................................................................................................................................................................ 853
11.8.5.6.2.2 DWORD_TO_BOOL
................................................................................................................................................................................ 854
11.8.5.6.2.3 REAL_TO_BOOL
................................................................................................................................................................................ 856
11.8.5.6.2.4 WORD_TO_BOOL
................................................................................................................................................................................ 858
11.8.5.6.3 BYTE ................................................................................................................................................................................ 859
11.8.5.6.3.1 BOOL_TO_BYTE
................................................................................................................................................................................ 859
11.8.5.6.3.2 DWORD_TO_BYTE
................................................................................................................................................................................ 861
11.8.5.6.3.3 DWORD_TO_BYTES
................................................................................................................................................................................ 862
11.8.5.6.3.4 REAL_TO_BYTE
................................................................................................................................................................................ 865
11.8.5.6.3.5 WORD_TO_BYTE
................................................................................................................................................................................ 867
11.8.5.6.3.6 WORD_TO_BYTES
................................................................................................................................................................................ 868
11.8.5.6.4 DWORD ................................................................................................................................................................................ 871
11.8.5.6.4.1 BOOL_TO_DWORD
................................................................................................................................................................................ 871
11.8.5.6.4.2 BYTE_TO_DWORD
................................................................................................................................................................................ 872
11.8.5.6.4.3 BYTES_TO_DWORD
................................................................................................................................................................................ 873
11.8.5.6.4.4 REAL_TO_DWORD
................................................................................................................................................................................ 875
11.8.5.6.4.5 STRING_TO_DWORD
................................................................................................................................................................................ 877
11.8.5.6.4.6 WORD_TO_DWORD
................................................................................................................................................................................ 879
11.8.5.6.4.7 WORDS_TO_DWORD
................................................................................................................................................................................ 880
11.8.5.6.5 Rad-Deg................................................................................................................................................................................ 882
11.8.5.6.5.1 DEG_TO_RAD
................................................................................................................................................................................ 882
11.8.5.6.5.2 RAD_TO_DEG
................................................................................................................................................................................ 883
11.8.5.6.6 REAL ................................................................................................................................................................................ 885
11.8.5.6.6.1 BOOL_TO_REAL
................................................................................................................................................................................ 885
11.8.5.6.6.2 BYTE_TO_REAL
................................................................................................................................................................................ 886
11.8.5.6.6.3 DWORD_TO_REAL
................................................................................................................................................................................ 888
11.8.5.6.6.4 STRING_TO_REAL
................................................................................................................................................................................ 889
11.8.5.6.6.5 WORD_TO_REAL
................................................................................................................................................................................ 892
11.8.5.6.7 STRING ................................................................................................................................................................................ 893
11.8.5.6.7.1 DWORD_TO_STRING
................................................................................................................................................................................ 893
11.8.5.6.7.2 REAL_TO_STRING
................................................................................................................................................................................ 895
11.8.5.6.8 WORD ................................................................................................................................................................................ 897
11.8.5.6.8.1 BOOL_TO_WORD
................................................................................................................................................................................ 897
11.8.5.6.8.2 BYTE_TO_WORD
................................................................................................................................................................................ 898
11.8.5.6.8.3 BYTES_TO_WORD
................................................................................................................................................................................ 900
11.8.5.6.8.4 DWORD_TO_WORD
................................................................................................................................................................................ 901
11.8.5.6.8.5 DWORD_TO_WORDS
................................................................................................................................................................................ 903
11.8.5.6.8.6 REAL_TO_WORD
................................................................................................................................................................................ 905
WPS v2.5X | 12
Contents
11.8.5.7 Counter
....................................................................................................................................................................................... 907
11.8.5.7.1 CTD................................................................................................................................................................................ 907
11.8.5.7.2 CTU................................................................................................................................................................................ 910
11.8.5.7.3 CTUD ................................................................................................................................................................................ 913
11.8.5.8 Data
.......................................................................................................................................................................................
Transfer 918
11.8.5.8.1 ARRAYCOPY
................................................................................................................................................................................ 918
11.8.5.8.2 DEMUX ................................................................................................................................................................................ 921
11.8.5.8.3 DEMUX2 ................................................................................................................................................................................ 924
11.8.5.8.4 ILOAD ................................................................................................................................................................................ 926
11.8.5.8.5 ILOADBOOL
................................................................................................................................................................................ 928
11.8.5.8.6 ISTORE ................................................................................................................................................................................ 929
11.8.5.8.7 ISTOREBOOL
................................................................................................................................................................................ 931
11.8.5.8.8 MUX................................................................................................................................................................................ 933
11.8.5.8.9 MUX2 ................................................................................................................................................................................ 936
11.8.5.8.10 ReadRecipe
................................................................................................................................................................................ 938
11.8.5.8.11 SCALE ................................................................................................................................................................................ 941
11.8.5.8.12 SEL ................................................................................................................................................................................ 944
11.8.5.8.13 STORE ................................................................................................................................................................................ 946
11.8.5.8.14 SWAP ................................................................................................................................................................................ 948
11.8.5.8.15 SWAP2 ................................................................................................................................................................................ 949
11.8.5.8.16 WriteRecipe
................................................................................................................................................................................ 951
11.8.5.9 Filter
....................................................................................................................................................................................... 955
11.8.5.9.1 LOWPASS................................................................................................................................................................................ 955
11.8.5.10 Hardw
.......................................................................................................................................................................................
are 957
11.8.5.10.1 IMMEDIATE_INPUT
................................................................................................................................................................................ 957
11.8.5.10.2 IMMEDIATE_OUTPUT
................................................................................................................................................................................ 959
11.8.5.10.3 P_RAMP ................................................................................................................................................................................ 961
11.8.5.10.4 PWM................................................................................................................................................................................ 965
11.8.5.10.5 READENC................................................................................................................................................................................ 967
11.8.5.10.6 READENC2
................................................................................................................................................................................ 968
11.8.5.10.7 READENC3
................................................................................................................................................................................ 971
11.8.5.10.8 READENC4
................................................................................................................................................................................ 972
11.8.5.11 Logic
....................................................................................................................................................................................... 974
11.8.5.11.1 Logic................................................................................................................................................................................
Bit 974
11.8.5.11.1.1 RESETBIT
................................................................................................................................................................................ 974
11.8.5.11.1.2 SETBIT
................................................................................................................................................................................ 977
11.8.5.11.1.3 TESTBIT
................................................................................................................................................................................ 979
11.8.5.11.2 Logic................................................................................................................................................................................
Boolean 981
11.8.5.11.2.1 AND ................................................................................................................................................................................ 981
11.8.5.11.2.2 NOT ................................................................................................................................................................................ 982
11.8.5.11.2.3 OR................................................................................................................................................................................ 984
11.8.5.11.2.4 XNOR................................................................................................................................................................................ 985
11.8.5.11.2.5 XOR ................................................................................................................................................................................ 987
11.8.5.11.3 Logic................................................................................................................................................................................
Rotate 988
11.8.5.11.3.1 ROL ................................................................................................................................................................................ 988
11.8.5.11.3.2 ROR ................................................................................................................................................................................ 990
11.8.5.11.4 Logic................................................................................................................................................................................
Shift 992
11.8.5.11.4.1 ASHL................................................................................................................................................................................ 992
11.8.5.11.4.2 ASHR................................................................................................................................................................................ 994
11.8.5.11.4.3 SHL ................................................................................................................................................................................ 996
11.8.5.11.4.4 SHR ................................................................................................................................................................................ 998
11.8.5.12 Math
....................................................................................................................................................................................... 1000
11.8.5.12.1 Math ................................................................................................................................................................................
Basic 1000
11.8.5.12.1.1 ABS
................................................................................................................................................................................ 1000
WPS v2.5X | 13
11.8.5.12.1.2 ADD
................................................................................................................................................................................ 1002
11.8.5.12.1.3 DIV
................................................................................................................................................................................ 1004
11.8.5.12.1.4 MOD
................................................................................................................................................................................ 1006
11.8.5.12.1.5 MUL
................................................................................................................................................................................ 1008
11.8.5.12.1.6 NEG
................................................................................................................................................................................ 1010
11.8.5.12.1.7 SUB
................................................................................................................................................................................ 1012
11.8.5.12.2 Math ................................................................................................................................................................................
Extended 1014
11.8.5.12.2.1 ALOG10
................................................................................................................................................................................ 1014
11.8.5.12.2.2 EXP
................................................................................................................................................................................ 1016
11.8.5.12.2.3 LN................................................................................................................................................................................ 1018
11.8.5.12.2.4 LOG10
................................................................................................................................................................................ 1020
11.8.5.12.2.5 POW
................................................................................................................................................................................ 1021
11.8.5.12.2.6 ROUND
................................................................................................................................................................................ 1023
11.8.5.12.2.7 SQRT
................................................................................................................................................................................ 1024
11.8.5.12.2.8 TRUNC
................................................................................................................................................................................ 1026
11.8.5.12.3 Math ................................................................................................................................................................................
Trigonometry 1027
11.8.5.12.3.1 ACOS
................................................................................................................................................................................ 1027
11.8.5.12.3.2 ASIN
................................................................................................................................................................................ 1029
11.8.5.12.3.3 ATAN
................................................................................................................................................................................ 1031
11.8.5.12.3.4 ATAN2
................................................................................................................................................................................ 1032
11.8.5.12.3.5 COS
................................................................................................................................................................................ 1034
11.8.5.12.3.6 SIN
................................................................................................................................................................................ 1036
11.8.5.12.3.7 TAN
................................................................................................................................................................................ 1037
11.8.5.12.4 Math ................................................................................................................................................................................
Util 1039
11.8.5.12.4.1 MAX
................................................................................................................................................................................ 1039
11.8.5.12.4.2 MIN
................................................................................................................................................................................ 1041
11.8.5.12.4.3 SAT
................................................................................................................................................................................ 1043
11.8.5.13 Module
....................................................................................................................................................................................... 1046
11.8.5.13.1 CALL ................................................................................................................................................................................ 1046
11.8.5.13.2 USERFB
................................................................................................................................................................................ 1047
11.8.5.14 RTC
....................................................................................................................................................................................... 1049
11.8.5.14.1 INTIME
................................................................................................................................................................................ 1049
11.8.5.14.2 INWEEKDAY
................................................................................................................................................................................ 1053
11.8.5.15 Screen
....................................................................................................................................................................................... 1057
11.8.5.15.1 SETSCREEN
................................................................................................................................................................................ 1057
11.8.5.16 String
....................................................................................................................................................................................... 1059
11.8.5.16.1 STR_COMPARE
................................................................................................................................................................................ 1059
11.8.5.16.2 STR_CONCAT
................................................................................................................................................................................ 1063
11.8.5.16.3 STR_COPY
................................................................................................................................................................................ 1064
11.8.5.16.4 STR_COPY_LAST
................................................................................................................................................................................ 1067
11.8.5.16.5 STR_DELETE
................................................................................................................................................................................ 1070
11.8.5.16.6 STR_FIND
................................................................................................................................................................................ 1073
11.8.5.16.7 STR_FIND_LAST
................................................................................................................................................................................ 1076
11.8.5.16.8 STR_INSERT
................................................................................................................................................................................ 1079
11.8.5.16.9 STR_LENGTH
................................................................................................................................................................................ 1082
11.8.5.16.10 STR_REPLACE
................................................................................................................................................................................ 1084
11.8.5.17 Timer
....................................................................................................................................................................................... 1087
11.8.5.17.1 TOF ................................................................................................................................................................................ 1087
11.8.5.17.2 TON ................................................................................................................................................................................ 1089
11.8.5.17.3 TP ................................................................................................................................................................................ 1093
11.8.5.18 Tasks
....................................................................................................................................................................................... 1096
11.8.5.19 Structures
....................................................................................................................................................................................... 1104
11.8.5.20 Recipes
....................................................................................................................................................................................... 1106
11.8.6 Screen
.......................................................................................................................................................................................... 1110
WPS v2.5X | 14
Contents
11.8.6.1 Alarms
....................................................................................................................................................................................... 1110
11.8.6.2 Screen
.......................................................................................................................................................................................
Editor 1115
11.8.7 Event
..........................................................................................................................................................................................
Log 1127
11.8.8 Setup
.......................................................................................................................................................................................... 1136
11.8.8.1 Configuration
....................................................................................................................................................................................... 1136
11.8.8.2 Configuration
.......................................................................................................................................................................................
Window s 1137
11.8.8.2.1 Display
................................................................................................................................................................................ 1137
11.8.8.2.2 Analog
................................................................................................................................................................................ 1137
11.8.8.2.3 Encoder
................................................................................................................................................................................ 1138
11.8.8.2.4 RS232................................................................................................................................................................................ 1138
11.8.8.2.5 RS485................................................................................................................................................................................ 1139
11.8.8.2.6 CAN ................................................................................................................................................................................ 1139
11.8.8.2.7 LAN ................................................................................................................................................................................ 1140
11.8.8.2.8 Modbus
................................................................................................................................................................................
TCP 1140
11.8.8.2.9 Clock................................................................................................................................................................................
Settings 1141
11.8.8.2.10 Language
................................................................................................................................................................................ 1141
11.8.8.2.11 Watchdog
................................................................................................................................................................................ 1142
11.8.9 Com
..........................................................................................................................................................................................
m unication 1142
11.8.9.1 Online
.......................................................................................................................................................................................
Commands 1142
11.8.9.2 Force
.......................................................................................................................................................................................
I/O 1145
11.8.9.3 Dow
.......................................................................................................................................................................................
nload 1147
11.8.9.4 Hot
.......................................................................................................................................................................................
Dow nload 1150
11.8.9.4.1 Overview
................................................................................................................................................................................ 1150
11.8.9.4.2 Enable/Disable
................................................................................................................................................................................
Hot Dow nload 1150
11.8.9.4.3 Restrictions
................................................................................................................................................................................ 1153
11.8.9.4.4 Operation
................................................................................................................................................................................ 1155
11.8.9.5 Upload
....................................................................................................................................................................................... 1157
11.8.9.6 Comparison
.......................................................................................................................................................................................
of resource and device 1158
11.8.9.7 Modbus
.......................................................................................................................................................................................
File Manager 1160
11.8.9.8 Communication
.......................................................................................................................................................................................
RS232 1162
11.8.9.9 Communication
.......................................................................................................................................................................................
RS485 1165
11.9 PSRW
......................................................................................................................................... 1167
11.9.1 Description
.......................................................................................................................................................................................... 1167
11.10 SCA06
......................................................................................................................................... 1167
11.10.1 Description
.......................................................................................................................................................................................... 1167
11.10.2 System
..........................................................................................................................................................................................
Markers 1168
11.10.3 Oriented
..........................................................................................................................................................................................
Start-Up 1172
11.10.4 Auto-Tuning
.......................................................................................................................................................................................... 1176
11.10.5 Im
..........................................................................................................................................................................................
port from WLP 1178
11.10.6 Param
..........................................................................................................................................................................................
eters 1181
11.10.6.1 Overview
....................................................................................................................................................................................... 1181
11.10.6.2 Configuration
....................................................................................................................................................................................... 1183
11.10.6.3 Read
.......................................................................................................................................................................................
and Write of Parameters 1185
11.10.6.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 1188
11.10.6.5 User
.......................................................................................................................................................................................
Parameters 1198
11.10.7 Ladder
.......................................................................................................................................................................................... 1200
11.10.7.1 Coil
....................................................................................................................................................................................... 1200
11.10.7.1.1 DIRECTCOIL
................................................................................................................................................................................ 1200
11.10.7.1.2 IMMEDIATECOIL
................................................................................................................................................................................ 1201
11.10.7.1.3 INVERTEDCOIL
................................................................................................................................................................................ 1203
11.10.7.1.4 RESETCOIL
................................................................................................................................................................................ 1204
11.10.7.1.5 SETCOIL
................................................................................................................................................................................ 1205
11.10.7.1.6 TOGGLECOIL
................................................................................................................................................................................ 1206
11.10.7.2 Communication
.......................................................................................................................................................................................
Netw ork 1208
WPS v2.5X | 15
11.10.7.2.1 CANopen
................................................................................................................................................................................ 1208
11.10.7.2.1.1 CANopen
................................................................................................................................................................................
Overview 1208
11.10.7.2.1.2 CO_SDORead
................................................................................................................................................................................ 1209
11.10.7.2.1.3 CO_SDOWrite
................................................................................................................................................................................ 1213
11.10.7.3 Compare
....................................................................................................................................................................................... 1216
11.10.7.3.1 COMPEQ
................................................................................................................................................................................ 1216
11.10.7.3.2 COMPGE
................................................................................................................................................................................ 1218
11.10.7.3.3 COMPGT
................................................................................................................................................................................ 1220
11.10.7.3.4 COMPLE
................................................................................................................................................................................ 1222
11.10.7.3.5 COMPLT
................................................................................................................................................................................ 1224
11.10.7.3.6 COMPNE
................................................................................................................................................................................ 1226
11.10.7.4 Contact
....................................................................................................................................................................................... 1227
11.10.7.4.1 NCCONTACT
................................................................................................................................................................................ 1227
11.10.7.4.2 NOCONTACT
................................................................................................................................................................................ 1229
11.10.7.4.3 NTSCONTACT
................................................................................................................................................................................ 1230
11.10.7.4.4 PTSCONTACT
................................................................................................................................................................................ 1231
11.10.7.5 Control
....................................................................................................................................................................................... 1233
11.10.7.5.1 PID................................................................................................................................................................................ 1233
11.10.7.6 Conversion
....................................................................................................................................................................................... 1238
11.10.7.6.1 BCD ................................................................................................................................................................................ 1238
11.10.7.6.1.1 BCD_TO_WORD
................................................................................................................................................................................ 1238
11.10.7.6.1.2 WORD_TO_BCD
................................................................................................................................................................................ 1239
11.10.7.6.2 BOOL ................................................................................................................................................................................ 1241
11.10.7.6.2.1 BYTE_TO_BOOL
................................................................................................................................................................................ 1241
11.10.7.6.2.2 DWORD_TO_BOOL
................................................................................................................................................................................ 1242
11.10.7.6.2.3 LREAL_TO_BOOL
................................................................................................................................................................................ 1244
11.10.7.6.2.4 REAL_TO_BOOL
................................................................................................................................................................................ 1245
11.10.7.6.2.5 WORD_TO_BOOL
................................................................................................................................................................................ 1247
11.10.7.6.3 BYTE ................................................................................................................................................................................ 1248
11.10.7.6.3.1 BOOL_TO_BYTE
................................................................................................................................................................................ 1248
11.10.7.6.3.2 DWORD_TO_BYTE
................................................................................................................................................................................ 1250
11.10.7.6.3.3 DWORD_TO_BYTES
................................................................................................................................................................................ 1251
11.10.7.6.3.4 LREAL_TO_BYTE
................................................................................................................................................................................ 1254
11.10.7.6.3.5 REAL_TO_BYTE
................................................................................................................................................................................ 1255
11.10.7.6.3.6 WORD_TO_BYTE
................................................................................................................................................................................ 1257
11.10.7.6.3.7 WORD_TO_BYTES
................................................................................................................................................................................ 1258
11.10.7.6.4 DWORD................................................................................................................................................................................ 1261
11.10.7.6.4.1 BOOL_TO_DWORD
................................................................................................................................................................................ 1261
11.10.7.6.4.2 BYTE_TO_DWORD
................................................................................................................................................................................ 1262
11.10.7.6.4.3 BYTES_TO_DWORD
................................................................................................................................................................................ 1263
11.10.7.6.4.4 LREAL_TO_DWORD
................................................................................................................................................................................ 1265
11.10.7.6.4.5 REAL_TO_DWORD
................................................................................................................................................................................ 1266
11.10.7.6.4.6 WORD_TO_DWORD
................................................................................................................................................................................ 1268
11.10.7.6.4.7 WORDS_TO_DWORD
................................................................................................................................................................................ 1269
11.10.7.6.5 LREAL................................................................................................................................................................................ 1271
11.10.7.6.5.1 BOOL_TO_LREAL
................................................................................................................................................................................ 1271
11.10.7.6.5.2 BYTE_TO_LREAL
................................................................................................................................................................................ 1272
11.10.7.6.5.3 DWORD_TO_LREAL
................................................................................................................................................................................ 1273
11.10.7.6.5.4 REAL_TO_LREAL
................................................................................................................................................................................ 1274
11.10.7.6.5.5 WORD_TO_LREAL
................................................................................................................................................................................ 1275
11.10.7.6.6 Rad-Deg
................................................................................................................................................................................ 1276
11.10.7.6.6.1 DEG_TO_RAD
................................................................................................................................................................................ 1276
11.10.7.6.6.2 RAD_TO_DEG
................................................................................................................................................................................ 1277
11.10.7.6.7 REAL ................................................................................................................................................................................ 1279
WPS v2.5X | 16
Contents
11.10.7.6.7.1 BOOL_TO_REAL
................................................................................................................................................................................ 1279
11.10.7.6.7.2 BYTE_TO_REAL
................................................................................................................................................................................ 1280
11.10.7.6.7.3 DWORD_TO_REAL
................................................................................................................................................................................ 1282
11.10.7.6.7.4 LREAL_TO_REAL
................................................................................................................................................................................ 1283
11.10.7.6.7.5 WORD_TO_REAL
................................................................................................................................................................................ 1284
11.10.7.6.8 WORD ................................................................................................................................................................................ 1286
11.10.7.6.8.1 BOOL_TO_WORD
................................................................................................................................................................................ 1286
11.10.7.6.8.2 BYTE_TO_WORD
................................................................................................................................................................................ 1287
11.10.7.6.8.3 BYTES_TO_WORD
................................................................................................................................................................................ 1289
11.10.7.6.8.4 DWORD_TO_WORD
................................................................................................................................................................................ 1290
11.10.7.6.8.5 DWORD_TO_WORDS
................................................................................................................................................................................ 1292
11.10.7.6.8.6 LREAL_TO_WORD
................................................................................................................................................................................ 1294
11.10.7.6.8.7 REAL_TO_WORD
................................................................................................................................................................................ 1295
11.10.7.7 Counter
....................................................................................................................................................................................... 1297
11.10.7.7.1 CTD ................................................................................................................................................................................ 1297
11.10.7.7.2 CTU ................................................................................................................................................................................ 1300
11.10.7.7.3 CTUD ................................................................................................................................................................................ 1303
11.10.7.8 Data
.......................................................................................................................................................................................
Transfer 1308
11.10.7.8.1 ARRAYCOPY
................................................................................................................................................................................ 1308
11.10.7.8.2 DEMUX................................................................................................................................................................................ 1311
11.10.7.8.3 DEMUX2
................................................................................................................................................................................ 1314
11.10.7.8.4 ILOAD................................................................................................................................................................................ 1316
11.10.7.8.5 ILOADBOOL
................................................................................................................................................................................ 1318
11.10.7.8.6 ISTORE
................................................................................................................................................................................ 1319
11.10.7.8.7 ISTOREBOOL
................................................................................................................................................................................ 1321
11.10.7.8.8 MUX ................................................................................................................................................................................ 1323
11.10.7.8.9 MUX2 ................................................................................................................................................................................ 1326
11.10.7.8.10 SCALE ................................................................................................................................................................................ 1328
11.10.7.8.11 SEL................................................................................................................................................................................ 1331
11.10.7.8.12 STORE ................................................................................................................................................................................ 1333
11.10.7.8.13 SWAP ................................................................................................................................................................................ 1335
11.10.7.8.14 SWAP2 ................................................................................................................................................................................ 1336
11.10.7.8.15 USERERR ................................................................................................................................................................................ 1338
11.10.7.9 Filter
....................................................................................................................................................................................... 1341
11.10.7.9.1 LOWPASS
................................................................................................................................................................................ 1341
11.10.7.10 Hardw
.......................................................................................................................................................................................
are 1344
11.10.7.10.1 IMMEDIATE_INPUT
................................................................................................................................................................................ 1344
11.10.7.10.2 IMMEDIATE_OUTPUT
................................................................................................................................................................................ 1346
11.10.7.10.3 READENC5................................................................................................................................................................................ 1348
11.10.7.11 Logic
....................................................................................................................................................................................... 1351
11.10.7.11.1 Logic ................................................................................................................................................................................
Bit 1351
11.10.7.11.1.1 RESETBIT
................................................................................................................................................................................ 1351
11.10.7.11.1.2 SETBIT................................................................................................................................................................................ 1353
11.10.7.11.1.3 TESTBIT
................................................................................................................................................................................ 1355
11.10.7.11.2 Logic ................................................................................................................................................................................
Boolean 1357
11.10.7.11.2.1 AND ................................................................................................................................................................................ 1357
11.10.7.11.2.2 NOT ................................................................................................................................................................................ 1358
11.10.7.11.2.3 OR ................................................................................................................................................................................ 1360
11.10.7.11.2.4 XNOR ................................................................................................................................................................................ 1361
11.10.7.11.2.5 XOR ................................................................................................................................................................................ 1363
11.10.7.11.3 Logic ................................................................................................................................................................................
Rotate 1364
11.10.7.11.3.1 ROL ................................................................................................................................................................................ 1364
11.10.7.11.3.2 ROR ................................................................................................................................................................................ 1366
11.10.7.11.4 Logic ................................................................................................................................................................................
Shift 1368
WPS v2.5X | 17
11.10.7.11.4.1 ASHL ................................................................................................................................................................................ 1368
11.10.7.11.4.2 ASHR ................................................................................................................................................................................ 1370
11.10.7.11.4.3 SHL ................................................................................................................................................................................ 1372
11.10.7.11.4.4 SHR ................................................................................................................................................................................ 1374
11.10.7.12 Math
....................................................................................................................................................................................... 1376
11.10.7.12.1 Math ................................................................................................................................................................................
Basic 1376
11.10.7.12.1.1 ABS ................................................................................................................................................................................ 1376
11.10.7.12.1.2 ADD ................................................................................................................................................................................ 1378
11.10.7.12.1.3 DIV ................................................................................................................................................................................ 1380
11.10.7.12.1.4 MOD ................................................................................................................................................................................ 1382
11.10.7.12.1.5 MUL ................................................................................................................................................................................ 1384
11.10.7.12.1.6 NEG ................................................................................................................................................................................ 1386
11.10.7.12.1.7 SUB ................................................................................................................................................................................ 1388
11.10.7.12.2 Math ................................................................................................................................................................................
Extended 1390
11.10.7.12.2.1 ALOG10
................................................................................................................................................................................ 1390
11.10.7.12.2.2 EXP ................................................................................................................................................................................ 1392
11.10.7.12.2.3 LN ................................................................................................................................................................................ 1394
11.10.7.12.2.4 LOG10................................................................................................................................................................................ 1396
11.10.7.12.2.5 POW ................................................................................................................................................................................ 1397
11.10.7.12.2.6 ROUND................................................................................................................................................................................ 1399
11.10.7.12.2.7 SQRT ................................................................................................................................................................................ 1400
11.10.7.12.2.8 TRUNC................................................................................................................................................................................ 1402
11.10.7.12.3 Math ................................................................................................................................................................................
Trigonometry 1403
11.10.7.12.3.1 ACOS ................................................................................................................................................................................ 1403
11.10.7.12.3.2 ASIN ................................................................................................................................................................................ 1405
11.10.7.12.3.3 ATAN ................................................................................................................................................................................ 1407
11.10.7.12.3.4 ATAN2................................................................................................................................................................................ 1408
11.10.7.12.3.5 COS ................................................................................................................................................................................ 1410
11.10.7.12.3.6 SIN ................................................................................................................................................................................ 1412
11.10.7.12.3.7 TAN ................................................................................................................................................................................ 1413
11.10.7.12.4 Math ................................................................................................................................................................................
Util 1415
11.10.7.12.4.1 MAX ................................................................................................................................................................................ 1415
11.10.7.12.4.2 MIN ................................................................................................................................................................................ 1417
11.10.7.12.4.3 SAT ................................................................................................................................................................................ 1419
11.10.7.13 Module
....................................................................................................................................................................................... 1422
11.10.7.13.1 CALL ................................................................................................................................................................................ 1422
11.10.7.13.2 USERFB ................................................................................................................................................................................ 1423
11.10.7.13.3 Working................................................................................................................................................................................
w ith USERFBs 1425
11.10.7.13.3.1 Creating
................................................................................................................................................................................
USERFBs 1425
11.10.7.13.3.2 Adding
................................................................................................................................................................................
input/output 1427
11.10.7.13.3.3 Editing
................................................................................................................................................................................
the Ladder 1430
11.10.7.13.3.4 Using................................................................................................................................................................................
USERFBs 1431
11.10.7.14 Motion
.......................................................................................................................................................................................
Control 1432
11.10.7.14.1 Motion ................................................................................................................................................................................
Control Cam 1432
11.10.7.14.1.1 MC_CamIn
................................................................................................................................................................................ 1432
11.10.7.14.1.2 MC_CamOut
................................................................................................................................................................................ 1437
11.10.7.14.1.3 MC_CamTableSelect
................................................................................................................................................................................ 1439
11.10.7.14.1.4 MW_CamCalc
................................................................................................................................................................................ 1441
11.10.7.14.2 Motion ................................................................................................................................................................................
Control Command 1446
11.10.7.14.2.1 MC_Pow
................................................................................................................................................................................
er 1446
11.10.7.14.2.2 MC_Reset
................................................................................................................................................................................ 1449
11.10.7.14.2.3 MC_Stop
................................................................................................................................................................................ 1451
11.10.7.14.2.4 MW_IqControl
................................................................................................................................................................................ 1455
11.10.7.14.3 Motion ................................................................................................................................................................................
Control Gear 1457
WPS v2.5X | 18
Contents
11.10.7.14.3.1 MC_GearIn
................................................................................................................................................................................ 1457
11.10.7.14.3.2 MC_GearInPos
................................................................................................................................................................................ 1462
11.10.7.14.3.3 MC_GearOut
................................................................................................................................................................................ 1465
11.10.7.14.3.4 MC_PhasingRelative
................................................................................................................................................................................ 1466
11.10.7.14.4 Motion ................................................................................................................................................................................
Control Homing 1469
11.10.7.14.4.1 MC_FinishHoming
................................................................................................................................................................................ 1469
11.10.7.14.4.2 MC_HomeDirect
................................................................................................................................................................................ 1470
11.10.7.14.4.3 MC_StepAbsoluteSw
................................................................................................................................................................................
itch 1473
11.10.7.14.4.4 MC_StepLimitSw
................................................................................................................................................................................
itch 1477
11.10.7.14.4.5 MC_StepReferencePulse
................................................................................................................................................................................ 1480
11.10.7.14.5 Motion ................................................................................................................................................................................
Control Move 1483
11.10.7.14.5.1 MC_MoveAbsolute
................................................................................................................................................................................ 1483
11.10.7.14.5.2 MC_MoveRelative
................................................................................................................................................................................ 1489
11.10.7.14.5.3 MC_MoveVelocity
................................................................................................................................................................................ 1495
11.10.7.15 RTC ....................................................................................................................................................................................... 1500
11.10.7.15.1 INTIME ................................................................................................................................................................................ 1500
11.10.7.15.2 INWEEKDAY................................................................................................................................................................................ 1503
11.10.7.16 Timer
....................................................................................................................................................................................... 1507
11.10.7.16.1 TOF ................................................................................................................................................................................ 1507
11.10.7.16.2 TON ................................................................................................................................................................................ 1509
11.10.7.16.3 TP ................................................................................................................................................................................ 1513
11.10.7.17 Cam .......................................................................................................................................................................................
Profiles 1516
11.10.7.18 Structures
....................................................................................................................................................................................... 1527
11.10.8 Diagnostic
.......................................................................................................................................................................................... 1530
11.10.8.1 Monitoring
.......................................................................................................................................................................................
Panel 1530
11.10.8.1.1 Main ................................................................................................................................................................................
Signals 1530
11.10.8.2 Log
....................................................................................................................................................................................... 1531
11.10.8.2.1 Overview
................................................................................................................................................................................ 1531
11.10.8.2.2 Configuration
................................................................................................................................................................................ 1532
11.10.8.3 Trace
....................................................................................................................................................................................... 1533
11.10.8.3.1 Overview
................................................................................................................................................................................ 1533
11.10.8.3.2 Configuration
................................................................................................................................................................................ 1534
11.11 SSW-06
......................................................................................................................................... 1540
11.11.1 Description
.......................................................................................................................................................................................... 1540
11.11.2 Param
..........................................................................................................................................................................................
eters 1541
11.11.2.1 Overview
....................................................................................................................................................................................... 1541
11.11.2.2 Configuration
....................................................................................................................................................................................... 1542
11.11.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 1545
11.11.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 1548
11.11.2.5 User
.......................................................................................................................................................................................
Parameters 1558
11.12 SSW-07
......................................................................................................................................... 1560
11.12.1 Description
.......................................................................................................................................................................................... 1560
11.12.2 Param
..........................................................................................................................................................................................
eters 1561
11.12.2.1 Overview
....................................................................................................................................................................................... 1561
11.12.2.2 Configuration
....................................................................................................................................................................................... 1563
11.12.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 1565
11.12.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 1568
11.12.2.5 User
.......................................................................................................................................................................................
Parameters 1578
11.13 SSW-08
......................................................................................................................................... 1580
11.13.1 Description
.......................................................................................................................................................................................... 1580
11.13.2 Param
..........................................................................................................................................................................................
eters 1581
11.13.2.1 Overview
....................................................................................................................................................................................... 1581
11.13.2.2 Configuration
....................................................................................................................................................................................... 1583
WPS v2.5X | 19
11.13.2.3 Read
.......................................................................................................................................................................................
and Write of Parameters 1585
11.13.2.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters 1588
11.13.2.5 User
.......................................................................................................................................................................................
Parameters 1598
11.14 SSW900
......................................................................................................................................... 1600
11.14.1 Description
.......................................................................................................................................................................................... 1600
11.14.2 I/O's
.......................................................................................................................................................................................... 1601
11.14.3 System
..........................................................................................................................................................................................
Markers 1601
11.14.4 Volatile
..........................................................................................................................................................................................
Markers 1605
11.14.5 Im
..........................................................................................................................................................................................
port from WLP 1606
11.14.6 Param
..........................................................................................................................................................................................
eters 1609
11.14.6.1 Overview
....................................................................................................................................................................................... 1609
11.14.6.2 Configuration
....................................................................................................................................................................................... 1611
11.14.6.3 Read
.......................................................................................................................................................................................
and Write of Parameters 1613
11.14.6.4 Hide/Unhide
.......................................................................................................................................................................................
Parameters and Group of Parameters_2 1616
11.14.6.5 User
.......................................................................................................................................................................................
Parameters 1626
11.14.7 Ladder
.......................................................................................................................................................................................... 1628
11.14.7.1 Coil
....................................................................................................................................................................................... 1628
11.14.7.1.1 DIRECTCOIL
................................................................................................................................................................................ 1628
11.14.7.1.2 INVERTEDCOIL
................................................................................................................................................................................ 1629
11.14.7.1.3 RESETCOIL
................................................................................................................................................................................ 1631
11.14.7.1.4 SETCOIL
................................................................................................................................................................................ 1632
11.14.7.1.5 TOGGLECOIL
................................................................................................................................................................................ 1633
11.14.7.2 Communication
.......................................................................................................................................................................................
Netw ork 1634
11.14.7.2.1 Modbus
................................................................................................................................................................................
RTU 1634
11.14.7.2.1.1 Modbus
................................................................................................................................................................................
RTU Overview 1634
11.14.7.2.1.2 MB_MasterControlStatus
................................................................................................................................................................................ 1635
11.14.7.2.1.3 MB_ReadBinary
................................................................................................................................................................................ 1637
11.14.7.2.1.4 MB_ReadRegister
................................................................................................................................................................................ 1641
11.14.7.2.1.5 MB_SlaveStatus
................................................................................................................................................................................ 1645
11.14.7.2.1.6 MB_WriteBinary
................................................................................................................................................................................ 1647
11.14.7.2.1.7 MB_WriteRegister
................................................................................................................................................................................ 1651
11.14.7.3 Compare
....................................................................................................................................................................................... 1655
11.14.7.3.1 COMP_EQ
................................................................................................................................................................................ 1655
11.14.7.3.2 COMP_GE
................................................................................................................................................................................ 1657
11.14.7.3.3 COMP_GT
................................................................................................................................................................................ 1659
11.14.7.3.4 COMP_LE
................................................................................................................................................................................ 1661
11.14.7.3.5 COMP_LT
................................................................................................................................................................................ 1663
11.14.7.3.6 COMP_NE
................................................................................................................................................................................ 1665
11.14.7.4 Contact
....................................................................................................................................................................................... 1666
11.14.7.4.1 NCCONTACT
................................................................................................................................................................................ 1666
11.14.7.4.2 NOCONTACT
................................................................................................................................................................................ 1668
11.14.7.4.3 NTSCONTACT
................................................................................................................................................................................ 1669
11.14.7.4.4 PTSCONTACT
................................................................................................................................................................................ 1670
11.14.7.5 Control
....................................................................................................................................................................................... 1672
11.14.7.5.1 PID................................................................................................................................................................................ 1672
11.14.7.6 Conversion
....................................................................................................................................................................................... 1677
11.14.7.6.1 BOOL ................................................................................................................................................................................ 1677
11.14.7.6.1.1 BYTE_TO_BOOL
................................................................................................................................................................................ 1677
11.14.7.6.1.2 DWORD_TO_BOOL
................................................................................................................................................................................ 1679
11.14.7.6.1.3 REAL_TO_BOOL
................................................................................................................................................................................ 1680
11.14.7.6.1.4 WORD_TO_BOOL
................................................................................................................................................................................ 1682
11.14.7.6.2 BYTE ................................................................................................................................................................................ 1683
11.14.7.6.2.1 BOOL_TO_BYTE
................................................................................................................................................................................ 1683
11.14.7.6.2.2 DWORD_TO_BYTE
................................................................................................................................................................................ 1685
WPS v2.5X | 20
Contents
11.14.7.6.2.3 REAL_TO_BYTE
................................................................................................................................................................................ 1686
11.14.7.6.2.4 WORD_TO_BYTE
................................................................................................................................................................................ 1688
11.14.7.6.3 DWORD................................................................................................................................................................................ 1690
11.14.7.6.3.1 BOOL_TO_DWORD
................................................................................................................................................................................ 1690
11.14.7.6.3.2 BYTE_TO_DWORD
................................................................................................................................................................................ 1691
11.14.7.6.3.3 REAL_TO_DWORD
................................................................................................................................................................................ 1693
11.14.7.6.3.4 WORD_TO_DWORD
................................................................................................................................................................................ 1694
11.14.7.6.4 REAL ................................................................................................................................................................................ 1696
11.14.7.6.4.1 BOOL_TO_REAL
................................................................................................................................................................................ 1696
11.14.7.6.4.2 BYTE_TO_REAL
................................................................................................................................................................................ 1697
11.14.7.6.4.3 DWORD_TO_REAL
................................................................................................................................................................................ 1699
11.14.7.6.4.4 WORD_TO_REAL
................................................................................................................................................................................ 1700
11.14.7.6.5 WORD ................................................................................................................................................................................ 1702
11.14.7.6.5.1 BOOL_TO_WORD
................................................................................................................................................................................ 1702
11.14.7.6.5.2 BYTE_TO_WORD
................................................................................................................................................................................ 1703
11.14.7.6.5.3 DWORD_TO_WORD
................................................................................................................................................................................ 1705
11.14.7.6.5.4 REAL_TO_WORD
................................................................................................................................................................................ 1706
11.14.7.7 Counter
....................................................................................................................................................................................... 1708
11.14.7.7.1 CTD ................................................................................................................................................................................ 1708
11.14.7.7.2 CTU ................................................................................................................................................................................ 1711
11.14.7.7.3 CTUD ................................................................................................................................................................................ 1714
11.14.7.8 Data
.......................................................................................................................................................................................
Transfer 1719
11.14.7.8.1 DEMUX................................................................................................................................................................................ 1719
11.14.7.8.2 ILOAD................................................................................................................................................................................ 1721
11.14.7.8.3 ILOADBOOL
................................................................................................................................................................................ 1722
11.14.7.8.4 ISTORE
................................................................................................................................................................................ 1724
11.14.7.8.5 ISTOREBOOL
................................................................................................................................................................................ 1725
11.14.7.8.6 MUX ................................................................................................................................................................................ 1727
11.14.7.8.7 SEL................................................................................................................................................................................ 1730
11.14.7.8.8 STORE................................................................................................................................................................................ 1732
11.14.7.8.9 USERERR
................................................................................................................................................................................ 1734
11.14.7.9 Filter
....................................................................................................................................................................................... 1735
11.14.7.9.1 LOWPASS
................................................................................................................................................................................ 1735
11.14.7.10 Logic
....................................................................................................................................................................................... 1737
11.14.7.10.1 Logic ................................................................................................................................................................................
Bit 1737
11.14.7.10.1.1 RESETBIT
................................................................................................................................................................................ 1737
11.14.7.10.1.2 SETBIT................................................................................................................................................................................ 1739
11.14.7.10.1.3 TESTBIT
................................................................................................................................................................................ 1741
11.14.7.10.2 Logic ................................................................................................................................................................................
Boolean 1743
11.14.7.10.2.1 AND ................................................................................................................................................................................ 1743
11.14.7.10.2.2 NOT ................................................................................................................................................................................ 1744
11.14.7.10.2.3 OR ................................................................................................................................................................................ 1746
11.14.7.10.2.4 XNOR ................................................................................................................................................................................ 1747
11.14.7.10.2.5 XOR ................................................................................................................................................................................ 1749
11.14.7.10.3 Logic ................................................................................................................................................................................
Rotate 1750
11.14.7.10.3.1 ROL ................................................................................................................................................................................ 1750
11.14.7.10.3.2 ROR ................................................................................................................................................................................ 1752
11.14.7.10.4 Logic ................................................................................................................................................................................
Shift 1754
11.14.7.10.4.1 ASHL ................................................................................................................................................................................ 1754
11.14.7.10.4.2 ASHR ................................................................................................................................................................................ 1756
11.14.7.10.4.3 SHL ................................................................................................................................................................................ 1758
11.14.7.10.4.4 SHR ................................................................................................................................................................................ 1760
11.14.7.11 Math
....................................................................................................................................................................................... 1762
11.14.7.11.1 Math ................................................................................................................................................................................
Basic 1762
WPS v2.5X | 21
11.14.7.11.1.1 ABS ................................................................................................................................................................................ 1762
11.14.7.11.1.2 ADD ................................................................................................................................................................................ 1764
11.14.7.11.1.3 DIV ................................................................................................................................................................................ 1766
11.14.7.11.1.4 MOD ................................................................................................................................................................................ 1768
11.14.7.11.1.5 MUL ................................................................................................................................................................................ 1770
11.14.7.11.1.6 NEG ................................................................................................................................................................................ 1772
11.14.7.11.1.7 SUB ................................................................................................................................................................................ 1774
11.14.7.11.2 Math ................................................................................................................................................................................
Extended 1776
11.14.7.11.2.1 ALOG10................................................................................................................................................................................ 1776
11.14.7.11.2.2 EXP ................................................................................................................................................................................ 1778
11.14.7.11.2.3 LN ................................................................................................................................................................................ 1780
11.14.7.11.2.4 LOG10 ................................................................................................................................................................................ 1782
11.14.7.11.2.5 POW ................................................................................................................................................................................ 1783
11.14.7.11.2.6 ROUND ................................................................................................................................................................................ 1785
11.14.7.11.2.7 SQRT ................................................................................................................................................................................ 1786
11.14.7.11.2.8 TRUNC ................................................................................................................................................................................ 1788
11.14.7.11.3 Math ................................................................................................................................................................................
Trigonometry 1789
11.14.7.11.3.1 ACOS ................................................................................................................................................................................ 1789
11.14.7.11.3.2 ASIN ................................................................................................................................................................................ 1791
11.14.7.11.3.3 ATAN ................................................................................................................................................................................ 1793
11.14.7.11.3.4 ATAN2 ................................................................................................................................................................................ 1794
11.14.7.11.3.5 COS ................................................................................................................................................................................ 1796
11.14.7.11.3.6 SIN ................................................................................................................................................................................ 1798
11.14.7.11.3.7 TAN ................................................................................................................................................................................ 1799
11.14.7.11.4 Math ................................................................................................................................................................................
Util 1801
11.14.7.11.4.1 MAX ................................................................................................................................................................................ 1801
11.14.7.11.4.2 MIN ................................................................................................................................................................................ 1803
11.14.7.11.4.3 SAT ................................................................................................................................................................................ 1805
11.14.7.12 Module
....................................................................................................................................................................................... 1808
11.14.7.12.1 USERFB ................................................................................................................................................................................ 1808
11.14.7.13 Timer
....................................................................................................................................................................................... 1809
11.14.7.13.1 TOF ................................................................................................................................................................................ 1809
11.14.7.13.2 TON ................................................................................................................................................................................ 1812
11.14.7.13.3 TP ................................................................................................................................................................................ 1816
11.14.7.14 RTC....................................................................................................................................................................................... 1819
11.14.7.14.1 INTIME ................................................................................................................................................................................ 1819
11.14.7.14.2 INWEEKDAY
................................................................................................................................................................................ 1823
11.14.7.15 Structures
....................................................................................................................................................................................... 1827
11.14.8 Com
..........................................................................................................................................................................................
m unication 1829
11.14.8.1 Force
.......................................................................................................................................................................................
I/O 1829
12 WComm
..........................................................................................................1832
12.1 Introduction
......................................................................................................................................... 1832
12.2 Configuration
......................................................................................................................................... 1834
12.2.1 Menus
.......................................................................................................................................................................................... 1834
12.2.2 Quickstart
..........................................................................................................................................................................................
Guide for FTP 1838
12.2.3 Configuration
..........................................................................................................................................................................................
File 1841
12.3 Add/Remove
.........................................................................................................................................
Connections 1845
Index 1848
WPS v2.5X | 22
WPS v2.5X
1 WPS v2.5X
Start
Welcome
WPS v2.5X | 23
Introduction
2 Introduction
2.1 Welcome
Welcome to the WPS!
WPS v2.5X is an innovative integrated tool to access several families of WEG products, adding the concepts
of:
The programming environment of the Ladder language meets the requirements of IEC 61131-3.
It is strongly recommended that the user is familiar with these guidelines and concepts that this standard
presents in order to use the software optimally.
WPS v2.5X | 24
Introduction
Ladder Available
Equipm ent Trace Trend Param eters
WLP WPS
PLC300 - v1.76+ - v1.76+ v1.76+
SCA06 <v2.00 v2.00+ v1.10+ v1.10+ v1.10+
CFW300 - v1.00+ - v1.00+ v1.00+
CVW500 v1.00+ - - v1.00+ v1.00+
WPS v2.5X | 25
What's New
3 What's New
3.1 What's New - This Version
WPS v2.5X
New Functions:
Enhancements:
Functionalities:
Improvements:
WPS V2.30
Functionalities:
Improvements:
WPS v2.5X | 26
What's New
WPS V2.20
Functionalities:
Improvements:
WPS V2.10
Functionalities:
Improvements:
WPS V2.00
Functionalities:
Support to SCA06 starting at firmware version v2.00, agregatting the functios of SuperDrive G2 and WLP
PLC300 v2.10 with support to Strings
WPS v2.5X | 27
What's New
WPS V1.80
Functionalities:
WPS V1.70
Functionalities:
Upload and download variable data, this function allows to preserve variables values during the program
download. This function is compatible with firmware v1.70 or above.
Export and download binaries
Creation of "text input" component on screen editor
Improvements:
Project management:
Creation of multiple CANopen configurations
Possibility of association of a ladder to a task on the last wizard step during the new ladder wizard
Ladder editor:
Optimization in ladder diagram editor, reducing the use of CPU and memory
Dragging variable from variables list and dropping it into the block argument
RUNG title length increased
Number of elements per RUNG increased
Automatic tag break
Screen name display during configuration of F buttons in screen editor
Optimization in monitoring to reduce the response time
Optimization in compiler to reduce compile-time
Clock synchronization between the computer clock and project setup
Corrections:
Correction during removal of POU from task, where changes are not saved when another action is not made
in sequence
Correction in the compiler when the same POU was linked to more than one task
Correction of lock during the load of variables table when large structure type is used
Correction for performance increase during search of structure fields
When the component "numeric input" was configured as INT and contains decimal digits the limit values
were not being compiled correctly
Unset of main selection during resource version change
Function keys were not working when used with variables of type BOOL with size bigger than 0 (zero), the
compiler was not generating the correct memory address for this variables
SD Card password was being stored even with the related option disabled, the compiler was not checking
the signal of SD Card password
During compiling errors where the variable does not exist anymore, the compiler was not displaying the
variable name
When two variable nodes of structures were expanded on variables table at the same time one of the
structures displays the variables names as ???
The variables sampled in event log were not displaying the correct values
Correction of functional deviation in the compiler when any argument from the USERFB was a member of a
WPS v2.5X | 28
What's New
structure or an instance. In this case the number of bits that was being considered was the size of the
whole structure, when the correct should be only the size of this member
Correction of functional deviation in the compiler when distinct ladders were calling USERFB instances with
the same name, occasionally, the compiler was inverting the call of USERFB's. The compiler was
overwriting the arguments file from the USERFB, when the name of instance was the same
Do not allow creation of folder and files related to USERFB with invalid names
Block of "text" component editing when it reaches his limit size
Alarm compilation was not displaying correct variables names in case of compiling errors
Correction of validation on new task creation
During compilation in case of duplicated variables the compiler was not displaying the duplicated variable
name
Correction into resource comparison, in specific situations in Ladder files, some small differences are not
being detected by the function
WPS V1.60
Functionalities:
Improvements:
Project management:
"Save as..." in the resource configuration
"Search" for the variables in all the resource
Properties of the resource folder
Edition of structure members
Indication in the files open on the editor if they belong to the main selection
Highlight on the programs not used in any tasks
Link on the output window of the compiler
Alarm keys:
Automatic resizing of the Message component
Shortcut keys in the alarm edition
Printing of the screens with their properties
Ladder editor:
Allow to change the contact or coil type already inserted in the ladder
Change of the output variables of the BYTE counters for BOOL to use in contacts
Variables:
Possibility to erase multiple variables from the variable window
Disable the variable window when closing or changing the resource selection
Selection of the variable address by means of the Modbus address
Corrections:
Increase of the number of retries before displaying the error messages during the online monitoring
Correction of fault when saving the renamed variables. After renaming the variables, the save button was not
being enabled and the changes were not being saved.
Change of the default .csv variable importation file from "," to ";".
Locking of the renaming action in the GLOBAL_IO group.
WPS v2.5X | 29
What's New
WPS V1.50
Functionalities:
Program upload
Force I/O
Language configuration in the PLC300 setup
Option to display variables on the alarm screens
Option of filling in the fields "Numeric Input" and "Numeric Output" with zeros on the user’s screens
Download option:
Initialize output and volatile variables
Stop/Start the execution of the program automatically
Online command menu for the password-protected operations of recording and loading program, setup and
firmware on the SD card.
Improvements:
Corrections:
Increase the number of retries before displaying the error messages during the online monitoring
Correction of fault when recording the renamed variables. After renaming the variables, the save button was
not being enabled and the changes were not being recorded.
Change of the default .csv variable import file to ";" instead of ",".
Locking of the renaming action in the GLOBAL_IO group.
Change of the maximum memory area size of the screens
Compiler presented error when compiling the structure with invalid element. Change to accept repeated
variables in GLOBAL_IO group.
32-bit data types (DWORD, DINT, UDINT, REAL) enabled for the network variables
Fault in the compilation of the watchdog variables of the start, stop and main tasks
Fault in the compilation of String variables using the STRING# syntax in the ReadRecipe and WriteRecipe
WPS v2.5X | 30
What's New
WPS V1.40
Functionalities:
Corrections:
WPS V1.30
Functionalities:
Ladder Editor:
Corrections:
Optimization of the ladder editor so as to guarantee ladder files with up to 200 rungs and moderate memory
and CPU consumption. In such situation, the 1.20 version of WPS presented slow performance and
WPS v2.5X | 31
What's New
crashes.
PLC300:
WPS V1.20
WPS v2.5X | 32
Installation/Uninstallation
4 Installation/Uninstallation
4.1 Before Installing
Check the following items before installing the WPS v2.5X:
4.2 Installing
When installing a newer version of WPS it is recommended that the previous version be removed first and the
system be rebooted, to make sure that the new installation is performed correctly.
Close all running programs to avoid interference with the installation process and follow the steps below.
1. Double-click the installer icon to start the installer. The installation program will start and a welcome window
will appear.
2. In the installation wizard, respond to the License Agreement, then press Next button.
3. Specify an empty folder inside which the WPS v2.5X will be installed. Make sure the installation location is
correct and that there is sufficient disk space for installation.
4. Confirm to create an empty folder.
5. Select the type of installation you want.
6. Select the program group to create the shortcuts for the WPS v2.5X.
7. Select shortcuts for additional programs: create a shortcut on the desktop and create a shortcut for quick
start.
8. Click the Install button to start installation.
9. Click the Finish button to complete the setup.
4.3 Uninstalling
If necessary, remove the WPS v2.5X by using the following procedures.
NOTE!
Always use the Add or Remove Programs application to remove WPS. Do not delete files and
folders manually.
WPS v2.5X | 33
Getting to Know the Environment
1. Menus: show the several options for editing, visualization, communication, and help in the development
environment;
2. Toolbar: displays the main commands of the software;
3. Configurations Window: shows the tree including the open Configuration structure;
4. Editor Window: main part of the development environment where the edition of the components that will
form the source file takes place;
5. Palette Window: includes the components to be inserted into the editor through drag'n drop;
6. Output Window: shows compilation and download messages.
Therefore, every application developed on it has a configuration with the following hierarchical structure:
Configuration: is at the highest level of the hierarchy, defining all the elements contained in a software
application that interact to perform the control functions.
o Resource: second level of the hierarchy, represents any element with processing capacity to implement
programs. In the WPS, resources are independent from each other, and each one has a linked product to
it. Global variables in an application are in this scope.
WPS v2.5X | 34
Getting to Know the Environment
The following figure shows the layout of this hierarchy in the WPS.
Lettering:
1. Configuration;
2. Resource;
3. POUs;
4. Tasks;
WPS v2.5X | 35
Quick Start
6 Quick Start
6.1 Welcome Window
This chapter contains some basic information so that you get familiar with the software.
The welcome window appears when the program is started for the first time.
There is also one more option, Always display welcome window, which will be explained below.
The user can also close this window without selecting any of the options and use his/her own working
methodology.
The quick monitoring of parameters allows viewing and changing the parameters online, but it is possible
neither to create a new configuration, nor to save the parameters on the computer.
WPS v2.5X | 36
Quick Start
1) Function Selection
2) Communication Configuration
The next window defines the options for communication with the equipment.
WPS v2.5X | 37
Quick Start
If you select one equipment, the default communication configuration of the equipment will be loaded to the
window.
However, check that the window configuration is the same as of the equipment. If not, update this window
according to the equipment configuration.
WPS v2.5X | 38
Quick Start
You can check if the communication is correct by clicking the Test button in this window.
The field is refreshed. The connected equipment appears in the status field.
WPS v2.5X | 39
Quick Start
5) Monitoring in Progress
The Online field displays the real value of the parameters on the equipment, and most parameters allow
modification. Reading parameters cannot be changed.
WPS v2.5X | 40
Quick Start
In order to end the monitoring, click the Close button in the window.
WPS v2.5X | 41
Quick Start
New Configuration
1) Function Selection
WPS v2.5X | 42
Quick Start
From this step on, see Creating New Configuration for further details.
Open Configuration
1) Function Selection
WPS v2.5X | 43
Quick Start
3) Configuration Selection
Select the desired configuration and click the Open Configuration button.
4) Configuration Window
WPS v2.5X | 44
Quick Start
At this moment, the configuration opens. In the configuration window, you can view the configuration and the
resources that are part of the configuration.
Import Configuration
1) Function Selection
2) Import Window
Click the ... button in order to open the selection of the backup file containing the configuration that you wish
to import.
WPS v2.5X | 45
Quick Start
Select the file with the bkp extension that you wish to import and click Open.
WPS v2.5X | 46
Quick Start
The Backup File field is filled out with the file selected in the previous step.
WPS v2.5X | 47
Quick Start
5) Configuration Location
WPS v2.5X | 48
Quick Start
6) Imported Configuration
In the configuration window, you can view the imported configuration and its resources.
WPS v2.5X | 49
Quick Start
The Always show welcome window option allows the window to be displayed in the initialization of the
WPS.
Uncheck this option if you do not wish to see the welcome window in the next initialization.
WPS v2.5X | 50
Quick Start
Examples
Equipment is online:
Equipment Offline:
WPS v2.5X | 51
Quick Start
CFW300
You can also use the keyboard shortcut (Ctrl+Shift+C) or the New Configuration button on the Toolbar:
A window will pop up prompting you to enter the configuration name and the first resource to be created. Enter
the names in the respective fields and click Next.
WPS v2.5X | 52
Quick Start
3) Communication Configuration
The next window defines the options for communication with the equipment.
WPS v2.5X | 53
Quick Start
If you select one equipment, the default configuration of the communication of the equipment will be loaded to
the window.
Still, check that the window configuration is the same as of the equipment. If not, update this window
according to the equipment configuration.
WPS v2.5X | 54
Quick Start
NOTE!
In this example, the CFW300-CUSB accessory is being used, which appears in Windows as a
USB serial port (virtual COM port);
When the cable is connected to the personal computer/equipment, the Windows device manager
informs the name of the USB serial port which was created.
You can check if the communication is correct by clicking the Test button in this window.
The status field is refreshed. The connected equipment appears in the status field.
WPS v2.5X | 55
Quick Start
6) Equipment Selection
The window shows the equipment that is connected to the resource that was created.
WPS v2.5X | 56
Quick Start
7) Read ID
If you click the Read ID button, a window containing the information on the equipment will open. Click OK to
close it.
WPS v2.5X | 57
Quick Start
A new window pops up enabling to import from the CFW100 a Ladder project developed on the WLP (WEG
Ladder Programmer).
9) Configuration Tree
After those steps, the tree with the configurations should look like the following image.
WPS v2.5X | 58
Quick Start
The settings made in the setup can be changed later in resource properties.
WPS v2.5X | 59
Quick Start
NOTE!
Depending on the equipment, new windows may appear from this step on, with initial settings
and oriented start-ups.
CFW300
WPS v2.5X | 60
Quick Start
You can also use the keyboard shortcut (Ctrl+Shift+C) or the New Configuration button on the Toolbar:
A window will pop up prompting you to enter the configuration name and the first resource to be created. Enter
the names in the respective fields and click Next.
3) Communication Configuration
The next window defines the options for communication with the equipment.
WPS v2.5X | 61
Quick Start
If you select one equipment, the default communication configuration of the equipment will be loaded.
WPS v2.5X | 62
Quick Start
Depending on the physical layer, it will be necessary to review this configuration when the equipment is
connected to the WPS.
For example, if the CFW300-CUSB accessory is used on the CFW300, Windows creates a USB serial port
which is only known at the moment of the connection of the equipment and personal computer.
At this moment, it is not possible to test the communication (equipment is not connected).
Thus, when you click Test, the status indicates Equipment offline.
WPS v2.5X | 63
Quick Start
6) Equipment Selection
The window shows the equipment that is connected to the resource that was created.
WPS v2.5X | 64
Quick Start
7) Read ID
If you click the Read ID button, as there is no equipment connected, a fault window pops up (Device
connection Failure). Click OK to close it.
WPS v2.5X | 65
Quick Start
A new window pops up enabling to import from the CFW100 a Ladder project developed on the WLP (WEG
Ladder Programmer).
9) Configuration Tree
After those steps, the tree with the configurations should look like the following image.
WPS v2.5X | 66
Quick Start
The settings made in the setup can be changed later in resource properties.
WPS v2.5X | 67
Quick Start
Example
Equipment is online:
CFW300
WPS v2.5X | 68
Quick Start
You can also use the keyboard shortcut (Ctrl+Shift+R) or the New Resource button on the Toolbar:
A window will pop up prompting you to enter the configuration name and the first resource to be created. Enter
the names in the respective fields and click Next.
WPS v2.5X | 69
Quick Start
3) Communication Configuration
The next window defines the options for communication with the equipment.
If you select one equipment, the default configuration of the communication of the equipment will be loaded to
the window.
Still, check that the window configuration is the same as of the equipment. If not, update this window
according to the equipment configuration.
WPS v2.5X | 70
Quick Start
NOTE!
In this example, the CFW300-CUSB accessory is being used, which appears in Windows as a
USB serial port (virtual COM port);
When the cable is connected to the personal computer/equipment, the Windows device manager
informs the name of the USB serial port which was created.
You can check if the communication is correct by clicking the Test button in this window.
The status field is refreshed. The connected equipment appears in the status field.
WPS v2.5X | 71
Quick Start
6) Equipment Selection
The window shows the equipment that is connected to the resource that was created.
WPS v2.5X | 72
Quick Start
7) Read ID
If you click the Read ID button, a window containing the information on the equipment will open. Click OK to
close it.
WPS v2.5X | 73
Quick Start
A new window pops up enabling to import from the CFW100 a Ladder project developed on the WLP (WEG
Ladder Programmer).
9) Configuration Tree
After those steps, the tree with the configurations should look like the following image.
WPS v2.5X | 74
Quick Start
The settings made in the setup can be changed later in resource properties.
WPS v2.5X | 75
Quick Start
NOTE!
Depending on the equipment, new windows may appear from this step on, with initial settings
and oriented start-ups.
The pop-up menu is a floating menu accessed with the second or third button of the mouse, which enables
quick access to the options related to the object selected by the cursor.
On the WPS, a pop-up menu adds options to make some operations simpler:
WPS v2.5X | 76
Quick Start
New Configuration
New Resource
---
Save As...
Rename...
Delete
---
Export Binaries for Download...
Export Configuration
---
Open in Explorer
---
Print
---
Properties
New Configuration
New Resource
WPS v2.5X | 77
Quick Start
Save As...
Click OK to accept or
Click Cancel in order to cancel the operation.
Rename...
Click OK to accept or
Click Cancel in order to cancel the operation.
Delete
Click OK to delete or
Click Cancel in order to cancel the operation.
The WPS v2.5X compiler generates binary files from the source files in the resource. When these files are
transferred to the machine, they are interpreted and executed.
The export binaries for download functionality encapsulates the binaries files into a .bbp file. This .bbp file can
be redistributed, but the original source file can not be viewed or changed.
Right-click the configuration that contains the resource to be exported, and then, in the popup menu, click
Export Binaries for Download.
WPS v2.5X | 78
Quick Start
The Export Binaries for Download menu item can also be used to export.
In the File menu, click Export, and then Export Binaries for Download.
WPS v2.5X | 79
Quick Start
3) Configuration Selection
A window of the export wizard will open, displaying the name and path of the configuration containing the
resource to be exported.
WPS v2.5X | 80
Quick Start
4) Resource Selection
Then the resource selection screen will pop up, containing the binaries to be selected for exportation.
WPS v2.5X | 81
Quick Start
5) Error Exporting
If the exported resource has not been previously compiled, an error message will pop up.
WPS v2.5X | 82
Quick Start
Compile the resource and return to the first step of this tutorial.
NOTE!
Always compile the desired resource before exporting its binary files.
6) Select Options
The next screen is similar to the resource download screen, enabling the configuration of several download
options.
The last checkbox defines whether those settings can be changed at the moment of the download of the
binaries.
WPS v2.5X | 83
Quick Start
NOTE!
Download options change depending of the resource selected.
Finally, one last screen allows defining the name of the file and its location. Click the ... button in order to
change those data.
This screen also allows entering a password to protect the file. If desired, check the checkbox and enter the
password.
WPS v2.5X | 84
Quick Start
Export Configuration
The WPS v2.5X allows the configurations to be exported to a backup file in the .bkp format.
Right-click the configuration to be exported, and then, in the pop-up menu, click Export Configuration.
WPS v2.5X | 85
Quick Start
WPS v2.5X | 86
Quick Start
3) Configuration Selection
The export wizard will open, displaying the name and path of the configuration to be exported.
WPS v2.5X | 87
Quick Start
4) Resource Selection
Then a screen to select the resources to be exported to the file will pop up.
WPS v2.5X | 88
Quick Start
5) Select Options
Finally, one last screen allows defining the name of the backup file and its location.
This screen also allows entering a password to protect the file. If desired, check the checkbox and enter the
password.
WPS v2.5X | 89
Quick Start
In the exit window, you can view messages informing generation of the exported configuration.
Open in Explorer
The user can view the content of the folder in Windows Explorer.
WPS v2.5X | 90
Quick Start
Properties
Click the Properties item, and a window will pop up with the following items:
WPS v2.5X | 91
Quick Start
Rename...
Delete
---
Print
---
Properties
When a configuration has several resources, the resource in use must be defined as main resource.
In order to define a resource as main resource, click the Define as Main Resource item in the pop-up menu.
After clicking the menu item, the resource will show in bold.
NOTE!
Remember to always set a resource you wish to work as main resource, preventing download
and editing errors.
New Resource
See the section Creating New Resource for details on creating a new resource.
Save As...
In the Name field, enter the new name of the resource and click OK.
WPS v2.5X | 92
Quick Start
Rename
Click OK to accept or
Click Cancel in order to cancel the operation.
Delete
Click OK to delete or
Click Cancel in order to cancel the operation.
WPS v2.5X | 93
Quick Start
Properties
In order to view/edit the resource properties, click the Properties menu item in the pop-up menu.
Communication Configuration;
Program Copy;
Equipment;
Information;
Memory Areas.
1) Communication Configuration
WPS v2.5X | 94
Quick Start
2) Program Copy
NOTE!
This option is available only for CFW300.
In Program Copy, a checkbox allows selecting the copy type of the user program from the memory card to the
equipment:
Allow copying: allows the ladder program to be copied to a flash memory module (CFW300-MMF);
Allow only one copy: allows the ladder program to be copied to a flash memory module (CFW300-MMF),
which allows loading it to another equipment; however, it does not allow copying from that equipment to
another flash memory module, that is, it does not allow copy of the copy;
Do not allow copying: does not allow the ladder program to be copied to a flash memory module (CFW300-
MMF);
WPS v2.5X | 95
Quick Start
3) Device
WPS v2.5X | 96
Quick Start
4) Information
Author;
Client;
Description.
WPS v2.5X | 97
Quick Start
5) Memory Areas
In Memory Areas, it is possible to change the amount of memory (in bytes) allocated to each resource
section.
Allocated memory: the editable text boxes show information of allocated memory, enabling the user to
change them;
Used memory: the non-editable text boxes show information on the memory currently used by the resource
loaded on the equipment;
Limits: next to these boxes, it is displayed the range of acceptable values of allocated memory for each
field.
WPS v2.5X | 98
Quick Start
WPS v2.5X | 99
Communication
7 Communication
7.1 Equipment Parameterization
The following parameters must be set so as to establish the communication with the equipments:
USB Driver: it is necessary to install the USB FTDI drive available in the folder USB_Driver\FTDI.
CFW300
The figure below shows how to connect a computer to the equipment via USB.
The Windows device manager indicates the serial port connected to the equipment.
The computer name on the device manager is illegible on purpose.
On the WPS, select the serial port correctly in the window Property > Communication Configuration as
follows.
NOTE!
Turn off the equipment before making the connections.
1. Insert the mini-B connector of the USB cable into the USB connector of the equipment;
2. Insert the A-type connector of the USB cable into the computer USB port;
3. In the device manager, check which serial port is connected;
4. Make sure that the serial connection is selected in the Communication Configuration category of the
resource Property window;
5. The serial port and its resource configuration on the WPS must be the same serial port that appears in the
Windows device manager where the USB cable is connected;
6. Never change the values in parameters P308, P310, P311 and P312 during a connection. Changing those
parameters causes the immediate loss of communication between the PC and the equipment.
CFW300
The figure below shows how to connect a computer to the equipment via RS232.
The Windows device manager indicates the serial port connected to the equipment.
The computer name on the device manager is illegible on purpose.
On the WPS, select the serial port correctly in the window Property > Communication Configuration as
follows.
NOTE!
Turn off the equipment before making the connections.
1. Make the connections of the serial DB9 female connector of the RS232 cable to the CFW300-RS232
accessory as shown in the previous figures;
2. Insert the DB9 female connector of the RS232 cable into the DB9 male connector of the computer;
3. In the device manager, check which serial port is connected;
4. Make sure that the serial connection is selected in the Communication Configuration category of the
resource Property window;
5. The serial port and its configuration of the resource in the WPS must be the same serial port that appears
in the Windows device manager where the RS232 cable is connected;
6. Never change the values in parameters P308, P310, P311 and P312 during a connection. Changing those
parameters causes the immediate loss of communication between the PC and the equipment.
The connection of the computer to the isolated USB to RS485 converter is done by means of the USB Cable.
In this case, it is necessary to install the USB driver of the isolated converter, normally supplied by the
manufacturer of the converter.
CFW300
The figure below shows how to connect a computer to the equipment via RS485.
The figure below shows an example using the Novus USB-i485 converter.
The Windows device manager indicates the serial port connected to the device.
The computer name on the device manager is illegible on purpose.
On the WPS, select the serial port correctly in the window Property > Communication Configuration as
follows.
NOTE!
Turn off the equipment before making the connections.
1. Make the connections from the connector of the isolated USB RS485 converter to the CFW300-RS485
accessory as shown in the previous figures;
2. Insert the USB cable into the connector of the isolated USB RS85 converter and into the computer USB
port;
3. In the device manager, check which serial port is connected;
4. Make sure that the serial connection is selected in the Communication Configuration category of the
resource Property window;
5. The serial port and its resource configuration on the WPS must be the same serial port that appears in the
Windows device manager where the USB cable is connected;
6. Never change the values in parameters P308, P310, P311 and P312 during a connection. Changing those
parameters causes the immediate loss of communication between the PC and the equipment.
7.5 Cables
The figure below details the cable for the point-to-point USB connection.
A = Type A Connector
B = Type B Connector
NOTE!
Always use a USB shielded interconnection cable, standard host/device shielded USB cable.
Unshielded cables may generate communication errors.
NOTE!
The USB connection is galvanically isolated from the power grid and other elevated voltages
internal to the drive. The USB connection, though, is not isolated from the protection earthing
(PE). Use an isolated laptop to connect to the USB connector, or a desktop connected to the
same protection earthing (PE) as the drive.
Purchasing Suggestions
Manufacturer:
Samtec, Inc: http://www.samtec.com
If you wish to purchase a USB cable directly from Samtec, please see below:
Description Item
High speed shielded USB cable Revision 2.0, 1 m, Samtec USBC-AM-MB-B-B-S-1
High speed shielded USB cable Revision 2.0, 2 m, Samtec USBC-AM-MB-B-B-S-2
High speed shielded USB cable Revision 2.0, 3 m, Samtec USBC-AM-MB-B-B-S-3
At the time this manual has been written, the specification could be found at
http://www.samtec.com/ftppub/cpdf/USBC-AM-BM-B-B-S-X-MKT.pdf
The USB/SERIAL converter allows a plug & play connection with your microcomputer, leaving the existing
serial port free.
8 Ladder
8.1 Concepts
8.1.1 Introduction
Ladder Programming is the graphical representation of boolean equations combining contacts (input
arguments) with coils (output results).
Ladder programming enables testing and modifying data by standard graphical symbols. These symbols are
positioned in the Ladder diagram in a way that is similar to a line of a logic diagram with relays. The Ladder
diagram is delimited on the left and on the right by busbar lines.
Graphical Components
1. Left busbar
2. Right busbar
3. Horizontal connection
4. Vertical connection
5. Contact
6. Coil
7. Power flow
Busbars
The editor is delimited on the left by a vertical line known as left busbar, and on the right by a vertical line
known as right busbar.
The connection elements may be horizontal or vertical. The state of the connection elements may be denoted
by 1 or 0, corresponding to the literal Boolean value 1 or 0, respectively. The term connection state must be
synonymous with the term power flow.
The state of the left busbar may always be considered 1. No states are defined on the right busbar.
The horizontal connection element must be indicated by a horizontal line. A horizontal connection element
transmits the state of the element immediately on the left to the element immediately on the right.
The vertical connection element must consist of vertical lines intersected by one or more horizontal
connections on each side.
The state of the vertical connection must represent the logical OR of states 1 of horizontal connections on the
left side, i.e. the state of the vertical connections must be:
The state of the vertical connections must be copied to all associated horizontal connections on its right.
The state of vertical connections must not be copied to associated horizontal connections on its left.
Execution Control
The following figure shows how the program in Ladder is executed. The card continually runs a Scanning
cycle. The cycle begins when the I/O System in the hardware compiles the last values of all input signals and
records those values in fixed areas of the memory.
The lines in the Ladder program are then run in a fixed order, starting with the first line. During program
scanning, new values for physical outputs, as determined by the logic of several Ladder lines, are initially
written to an area of the output memory. Finally, when the Ladder program has finished running, all output
values retained in the memory are inscribed in the physical outputs by the hardware in a single operation.
8.1.2 Legend
CONFIGURATION: It is the organization of a software application in a higher level. It may contain Resources
within a Configuration.
FUNCTION: It is a block responsible for executing a certain behavior or an action based on possible
parameters (VAR_IN, VAR_IN_OUT, VAR_OUT).
LD (Ladder Diagram): Graphical language based on the electric diagrams (interconnected contacts and
coils), according to the power flow between the elements.
OVERFLOW: It occurs when the result of a mathematical calculation exceeds the limits permitted for the
result data type.
POU: Program Organization Unit. It may be: Program, Functional Block or Function.
PROGRAM: It is the logical grouping of all programming elements and constructions necessary for processing
the signals required to control a machine or process.
RESOURCE: They consist of any element with processing capacity responsible for executing the programs.
STACK: Stack of the Ladder program. It is the memory area used to perform the Program Logics.
TASK: Responsible for the execution of programs, in a periodical or triggered way, with trigger by event.
DATATYPE: It informs the compiler the space taken by a variable and its respective format (to the Blocks).
VARIABLE: It consists of a memory position able to withhold and represent a value or expression. It may have
scope:
Location: whose automatic position is calculated by the compiler.
Global: located in a determined memory area with digital inputs and outputs, it may be accessed at any
point of the Configuration.
The variable may be:
Retentive: it stores the value after powering down the device;
Volatile: it begins with the value contained in the initial value field after the powering down of the device;
Constant: it does not allow the modification of its content.
VAR: Variables for internal use of a User’s Block (USERFB). Equivalent to a variable of Local scope.
VAR_IN: Input argument of a User’s Block (USERFB). Variables configured in this field will be only read on the
USERFB.
VAR_IN_OUT: Input and output argument of a User’s Block (USERFB). It will not allow CONSTANT variables,
PHYSICAL INPUTS (%I_), NETWORK INPUTS (%I_) or READING SYSTEM MARKERS (%S_), because they
will be read at the beginning of the USERFB and will be updated with new values (written) at the end of the
USERFB.
VAR_OUT: Output argument of a User’s Block (USERFB). It will not allow CONSTANT variables, PHYSICAL
INPUTS (%I_), NETWORK INPUTS (%I_) or READING SYSTEM MARKERS (%S_), because they will be
updated with new values (written) at the end of the USERFB.
WATCHDOG: It is a way provided by the manufacturer to perform specific actions if the integrity of the system
is violated.
The figure above performs an AND Logic between the two last elements charged on the STACK, lowers a level
of the STACK, and places the result on top of the STACK. That means that the following Boolean operation is
performed: top of the STACK = BIT1.BIT2.
Truth Table
Figure 2: Contacts
in Parallel
The figure above performs an OR Logic between the two last elements charged on the STACK, lowers a level
of the STACK, and places the result on top of the STACK. That means that the following Boolean operation is
performed: top of the STACK = BIT1 + BIT2.
Truth Table
NOTE!
The data type STRING considers only the number of characters in the size of the variable. The
byte occupied by the null terminator is not added to the size.
Syntax: %<Format><Size>
First Letter:
At (Format) Description
Input: It receives the values from analog and
I
discrete variables, or input netw ork variables.
Output: It stores the values to be w ritten in the
Q analog and discrete outputs, or output netw ork
variables.
M RAM memory internal marker.
S System status marker
C System command marker
Second Letter:
At (Format) Description
X Bit
B Byte (8 bits)
W Word (16 bits)
D Double Word (32 bits)
L Long Word (64 bits)
8.2 Editor
8.2.1 Desktop
Whenever a Ladder file is opened through its shortcut in the project tree, the variable/Ladder editor will show
as per the figure below.
NOTE!
If any docker is not visible, activate through the Palette item in Window menu.
Through this menu, it is possible to execute all the operations regarding the Ladder as well as to know the
keyboard shortcuts for those operations.
8.2.3 Rungs
8.2.3.1 Overview
The Ladder program is edited through a graphical editor that organizes it through the rungs. Every rung in the
Ladder program corresponds to an interlock that relates input elements to output elements. Said editor is
shown in the following figure.
NOTE!
Outputs will always be connected to the right of the output busbar.
Through the Ladder/rungs editor tool bar, it is possible to perform the following operations:
- Edit arguments
8.2.3.2 Editing
In order to edit a rung, the rung must be selected. In order to select the rung, you may click on it with the
mouse or use the rung selection control in the Ladder Editor toolbar. Whenever the rung is selected, there
will be a grey bar on the left side of the rung as shown in the following figure.
After editing the title and comment, the editor will become as follows.
The selected element will be involved by a green, striped rectangle. There will also be a red dot indicating
where the new element will be inserted (insertion point).
A mouse drag and drop operation must be used in order to insert elements using the palette. For that purpose,
click on the palette element, keep the mouse pressed, move the mouse up to the insertion point in the Ladder,
and release the mouse button.
After inserting an element, e.g. a contact, the rung will become as follows.
8.2.3.4.2 In Series
Through the insertion point of elements, it is possible to insert an element in series. For that purpose, use the
following insertion points:
Figure 1 - Inserts an
element in series
before the selected
element
Figure 2 - Inserts an
element in series
after the selected
element
8.2.3.4.3 In Parallel
Through the insertion point of elements, it is possible to insert an element in parallel. For that purpose, use the
following insertion points:
Figure 1 - Inserts an
element in parallel
above the selected
element
Figure 2 - Inserts an
element in parallel
under the selected
element
8.2.3.5 Browsing
8.2.3.5.1 With the Keyboard
Browsing with the keyboard in the rung is done by the keys , , , . Through these keys, it is possible to
select several elements inside the rung, and also define the insertion point of new elements.
As shown in the item previous to insert an element of the contact type in the rung, it will become as follows.
By pressing the browsing keys, we can modify the insertion point of a new element, as shown in the following
figures:
Key indicates that the new element will be inserted before the selected element
Key indicates that the new element will be inserted parallelly above the selected element
Key indicates that the new element will be inserted parallelly below the selected element
Key indicates that the new element will be inserted after the selected element
As the insertion point has already been selected, and by pressing the same key as the corresponding
direction, the selection will move on to the next element, as shown in the following figure.
When inserting elements to the browser in parallel through the elements, we browse through each element
individually, conforming to the following example.
In this situation, when inserting an element, we are making this insertion related to this element. Should it be
necessary to insert an element related to the parallel that is a group of elements, we must use the G key,
which will select the group, and then we can define the insertion point, and make the insertion as shown in the
following figures.
Pressing G:
Every time the G key is pressed, we select the group immediately above the selected element/group, and in
the end, we go back to the original element, so, in some situations, it is necessary to touch the G key more
than once. Through the G key it is possible to make many insertion operations conforming to the following
examples.
Insert an element in series to the group formed by elements that are internal to a parallel
During the element insertion operation with the mouse, by dragging and releasing the mouse in the palette, as
we drag the elements over the rung, the selection and the insertion point follow the mouse cursor so as to
determine the insertion point. The following figure exemplifies the insertion of elements via mouse.
During the insertion via mouse, it is also possible to select the group of elements. For that purpose, as the
previously selected element is dragged, press the Ctrl function key and keep it pressed; while the Ctrl key is
being pressed, the mouse will select insertion points related to groups.
8.2.3.6 Copy/Paste
Overview
All the copy, cut and paste functions are available in the Ladder editor through the edit menu or through the
corresponding keyboard shortcuts. In order to execute these operations it is necessary to have rung and/or
element selected.
Copy/paste an element
It is also possible to copy, cut and paste multiple elements selected either by the mouse or by the G key as
previously mentioned. Below is an example of copying and pasting multiple elements.
Figure 4: Then, select timer with insertion point before and press Ctrl+V
There might be cases in which it is not possible to paste and there will not be modification in the rung after the
command.
Copy/paste rungs
The selection of rungs for the operations of copy, cut and paste is only performed through the mouse as
shown in the figures below.
Figure 5: Through the mouse from the right side out of the rung
Figure 6: Through the mouse from the left side out of the rung
8.2.4 Variables
8.2.4.1 Overview
During the Ladder edition, it is necessary to define the variables used in the Ladder components. This
definition can be done directly in the Ladder and/or in the editor/list of variables.
The table of variables must be activated through the menu Window > Variables as shown in the following
figure.
The variables of the GLOBAL scope (1) present the groups (2) as shown in figure 1.
In this area of the global variables, the following groups are available:
The variables of the LOCAL scope (1) present the groups (2) as per figure 2.
Location: variables only accessible through the Ladder that is being edited
Local Retentive: similar to the local group, but with retentive memory
NOTE!
A retentive memory keeps its value even with the equipment off.
8.2.4.2 Fields
When defining a variable through the variable editor/list, some data must be defined for the variables. In the
following items, those data will be presented according to the group the variable belongs to.
Constant:
System:
Global Parameter:
I/O:
NOTE!
When size is greater than zero, the variables are accessed in the Ladder through their array
index.
In order to define a variable for the argument, it is necessary to enter the argument edition mode, which is
done in two ways.
ATTENTION!
As from the version 1.30 of the WPS the output arguments of the functional blocks can be
optional.
The arguments in question will not be initialized with the declaration ??? and may be omitted if
they do not have to be used in the Ladder logic.
1. By the mouse:
Double clicking the mouse directly on the argument
2. By the keyboard:
Pressing the F2 key.
For elements with one argument, it directly enters the argument edition mode.
In the other elements with more than one element, it is necessary to select the argument through the arrow
keys and then press the F2 key again.
When entering the edition mode, the element will appear similar to the following figure.
At this moment, an edition box will be enabled for you to enter the variable name. When the Edit button is
pressed, a box to create the new variable will be enabled.
In this box you should define the following options for the variable:
If there are already variables defined for the type compatible with the Ladder element, a selection box with
these variables will show together with the edition box. In order to select the desired variable, press the down
arrow key and after having the variable selected, press enter. The figure below shows this function.
In this example, the PT input of the TON block was configured with the value 1000, which is a literal.
ATTENTION!
In some blocks, for data verification and consistency reasons, it will be necessary to define the data
type of the literal through specific notation that will contain the following options: BOOL#, BYTE#,
INT#, UINT#, DINT#, UDINT#, WORD#, DWORD# and REAL#. Example: WORD#17321
In order to view the indices of a variable of the array type, expand the variable in the variable window as shown
in the following figure.
In order to view the internal variables of the instances and structures, expand the variable in the variable
window as shown in the following figure.
The FBs have internal variables that store their data during the consecutive execution cycles. According to the
application requirement, these FBs may have their instances configured as retentive (LOCAL_RETAIN or
GLOBAL_RETAIN) or volatile (LOCAL_RETAIN or GLOBAL_RETAIN). The input and output variable
associated to the FB can also be configured as retentive or volatile. The retentive variables retain their values
after the device is shut down, whereas the volatile variables load their initial values after a reset.
When we want the FB to keep the values after the reset of the device, it is necessary that the FB instances
and the variables associated to its inputs be configured as retentive. That will make the FB internal variables
and the associated input variables keep the values previous to shutdown.
In the example below, we have the use of the TON block with retentive instances and variables:
Figure 2: TP block with retentive instance and variables one second after the setup.
When we want the FB to reset its values after the shutdown of the device, it is necessary that the FB instance
and the variables associated to its inputs be configured as volatile. That will make the FB internal variables and
the associated input variables reset the values previous to shutdown.
Below is an example of use of the CTU block with retentive instance and variables:
Figure 3: CTU block with volatile instance and variables before reset.
Figure 4: CTU block with volatile instance and variables after reset.
In the use of the USERFB, it is possible to define variables of LOCAL, LOCAL_RETAIN, VAR_IN, VAR_OUT
and VAR_IN_OUT type. The internal variables defined as LOCAL will always be volatile, and the
LOCAL_RETAIN ones will always be retentive. The internal variable defined as VAR_IN, VAR_OUT and
VAR_IN_OUT will be volatile in case the instance of the USERFB is associated to the LOCAL or GLOBAL
group and retentive in case it is associated to the LOCAL_RETAIN or GLOBAL_RETAIN group.
8.2.5 Compile
In order to compile a Program (POU), there are four options:
Figure 2: Compile
from the Toolbar
4. Clicking the right button of the mouse on the name of the resource.
The results of the compilation, indicating errors and warnings, can be viewed through the Default Output
window.
8.2.6 Transfer
In order to download a resource, there are four options:
Figure 2: Download
from the Toolbar
4. Clicking the right button of the mouse on the name of the resource.
After the Ladder program is compiled and loaded on the device, it is possible to monitor the Ladder by
The online monitoring will graphically represent the logical state of the Ladder program. An example of online
monitoring can be seen in the following figure.
For functional blocks, the values are presented as shown in the following figure:
The variables values are shown on their respective variables; the internal values of the instance are shown on
the name of the respective argument.
Writing of variables
In order to write variables, just double click the variable you wish to write and a value writing box will open as
shown in the following figure.
In this box, you must enter the desired value and press the Write button in order to write the value. The
Toggle button is used to toggle the value written between zero and the current value.
Monitoring of instances
In order to monitor, just double click the instance variable and a box related to instance monitoring will open as
shown in the following figure.
In order to write on instance internal variables, just click on the corresponding line, use the value edition box
and the Write and Toggle buttons as already mentioned in the previous item.
Monitoring of structures
For the variables created from structures defined in the resource, just click on the corresponding variable and a
box similar to the instance monitoring one will open. See the following example.
Monitoring of arrays
For variables created with size greater than zero, it is possible to monitor all the data of their array. In order to
do so, just click on the corresponding variable and a monitoring box will open. See the following example.
In these blocks, the inputs and outputs are defined by the user, who handles them in the Ladder diagram
associated with the block. Here's how to create your USERFB.
1. In the Projects window, locate the resource in which you want to create the USERFB, right-click in User
2. In the wizard, insert a name for the library to which the USERFB will belong and click Next.
4. If you want to insert a password to protect the block code, check the Encrypt binary checkbox and type a
password. Otherwise, uncheck it. Click Finish.
That's it! The USERFB has been succesfully created. You should see the following in the Projects window.
1. In the Projects window, double click the USERFB file in order to open its Ladder editor.
Analysing the following figure, we see that the USERFB Variables window is different from other Ladder files.
It has only volatile and retain variables in LOCAL scope, which are the internal variables of the block, used in
its subroutine. Besides these, it has three more groups: VAR_IN, VAR_OUT and VAR_IN_OUT.
VAR_IN: internal variables that repersent the input arguments for that block.
VAR_OUT: internal variables that repersent the output arguments for that block.
VAR_IN_OUT: internal variables that repersent the input/output arguments for that block.
3. In order to create an input, click in the VAR_IN tab and click in the symbol. In the window, set a name
and a datatype to this variable and click OK.
4. In order to create an output, click in the VAR_OUT tab and click in the symbol. In the window, set a
name and a datatype to this variable and click OK.
5. In order to create an input/output, click in the VAR_IN_OUT tab and click in the symbol. In the window,
set a name and a datatype to this variable and click OK.
1. In the Projects window, double click the USERFB file in order to open its Ladder editor.
The Ladder Editor will open, like any other Ladder diagram. Any block may be inserted in it, including other
USERFBs. Remember that only local variables may be used in it.
1. In the Projects window, double click the USERFB file in order to open its Ladder editor.
2. In the Pallete window, select the USERFB block from the Module category and drag it to the position
where you want to use it in the Ladder diagram.
3. Double click the question marks (???) above the block in order to insert a instance variable for the
USERFB. Type in the variable name and click Edit. In the confirmation dialog, click Yes to create the new
variable.
4. In the Add dialog, type in a name for the variable and select its parameters. In the Datatype field, choose
the name of the desired USERFB (if there is only one, the field will not be enabled).
For example, if your USERFB name is MYUSERFB, the correct datatype to be selected is
$USERFB_MYUSERFB.
That's it! Your very own USERFB is inserted in the diagram and ready to work!
9 Diagnostic
9.1 Monitoring Variable
Monitoring Variable allows creating sets of variables for monitoring in a Resource.
To do this, right-click on Variable Monitoring and select New File, following the on-screen instructions for
creating a new file.
9.2 Trend
9.2.1 Overview
Trend is a graph of the values of variables versus time.
The Trend function has ten monitoring channels, which means it is possible to monitor up to ten variables
and/or parameters at the same time.
1. Channels, Start, Stop and Graphic Zoom: This bar contains the options to add, edit and remove
channels, and also the options to control the chart, such as zoom in, zoom out, set width, set height and
set all. There are buttons to start or stop data acquisition.
2. Time: This bar contains the options to configure the sampling periods and time range to be shown on the
graphic.
3. Chart: This screen shows graphically the monitored values of the channels. In the lower part is the time of
collection, and on the left is the range of values per unit of measurement of the channels.
4. Channel Table: This table shows the data of the chosen channels in the position where the cursor is,
besides the possibility to hide channels (Visible), change the channel color (Color) and set the chart limits
per unit of measurement (Maximum).
9.2.2 Configuration
Below is a list of the necessary steps to create a trend configuration.
2. Addition and configuration of the channels on the button on the upper left corner.
3. After adding the channel, just click on Connect Device and the trend will start automatically.
10 Wizards
10.1 Overview
Wizards allow the user to configure and monitor variables of the configured equipment in the resource through
predefined windows.
1. Toolbar: displays the main commands of the software and contains the Connect Device button
required for writing and reading the equipment variables;
2. Configurations Window: displays the configurations, where each configuration contains resources, and
the resource contains the monitoring and configuration wizards;
3. Wizard Title: displays the title of the open wizard;
4. Wizard Toolbar: displays the commands for upload and monitoring , writing and printing
values of a configured wizard variables (Configuration Wizards only);
5. Equipment Status: displays the status of the connected equipment (Configuration Wizards only);
6. Message from an Equipment Status: displays the message of an alarm, failure or configuration status of
the connected equipment (Configuration Wizards only);
7. Equipment Variable Area: displays the writing and reading variables of the configured equipment and can
contain tabs for better division of the equipment's features.
to.
The Wizards folder in the Configurations Window contains the list of wizards implemented for the
equipment being a Monitoring Wizard identified by the icon .
When opening a Monitoring Wizard with communication with the equipment not established, a window will
be presented to the user as below.
To start monitoring the window variables, press the Connect Device button so that the communication
with the device is established.
If the communication with the equipment is established the window background will change from light gray to
dark gray. When closing the window no questioning will be done to the user.
The Wizards folder in the Configurations Window contains the list of wizards implemented for the
equipment being a Configuration Wizard identified by the icon .
You can save the programmed values in a Configuration Wizard thus generating a new wizard file identified
by the icon .
When opening a Configuration Wizard with communication with the equipment not established, a window
will be presented to the user as below.
The configuration with the equipment not connected (offline) is done with the Upload and Monitor Values
When the configuration is finished, the user can save the values of the wizard by closing the wizard and
confirming the saving of the values.
A new wizard file with a generic name will then be saved, where the user can then manipulate this new file
according to the options shown by right-clicking the file as shown below.
You can also create a new file based on the equipment wizard by right-clicking the wizard as shown below.
To print all the values of the Configuration Wizard you need to press the Print Values button in the
Wizard Toolbar. A print file will be generated in the format shown below.
To send all the values of the Configuration Wizard to the equipment it is necessary to press the Connect
Device button so that the communication with the equipment is established and then press the Write
To start a Configuration Wizard with the connected equipment (online) it is necessary to press the Monitor
Values button so that the monitoring of the equipment variables is activated in the wizard. At this point
the wizard variables are updated with the values that are on the connected equipment.
If the communication with the equipment is established the window background will change from light gray to
dark gray. When closing the window will ask a question related to saving the values of the wizard.
11 Equipments (Devices)
11.1 CFW100
11.1.1 Description
The CFW100 frequency inverter is a high-performance product which allows speed control of three-phase
induction motors. This product provides the user with the options of vector (VVW) or scalar (V/f) control, both
programmable according to the application.
The scalar mode (V/f) is recommended for simpler applications, such as the activation of most pumps and
fans. In such cases it is possible to reduce the losses in the motor and the inverter using the "V/f Quadratic",
which results in energy savings. The V/f mode is used when more than a motor is activated by an inverter
simultaneously (multimotor applications). In the vector mode (VVW), the operation is optimized for the motor
in use, obtaining a better performance in terms of speed regulation.
The frequency inverter CFW100 also has functions of PLC (Programmable Logic Controller) by means of the
SoftPLC (integrated) feature. It has a slot for connection of the accessories for input and output (I/Os)
expansion, communication networks or remote HMI.
Refer to the user's manual of the CFW100 for further details about the product.
NOTE!
CFW100 versions below V3.00 do not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
Groups:
CFW: reading and writing variables of the CFW100 frequency inverter.
Subgroups:
STS: reading variable (status);
CMD: writing variable (command).
Ladder
Logical Status
Speed
%
-- 3100 CFW_STS_MOTOR_SPEED_13BITS Motor speed in 13 bits (8192)
SW6200
%
-- 3101 CFW_STS_MOTOR_SYNC_SPEED Motor synchronous speed in rpm
SW6202
%
-- 3102 CFW_STS_MOTOR_SPEED_RPM Motor speed in rpm
SW6204
%
-- 3103 CFW_STS_SPEED_REFERENCE Speed reference after ramp in rpm
SW6206
%
-- 3104 CFW_STS_PRES_ALARM Alarm number that may be present in the inverter
SW6208
%
-- 3105 CFW_STS_PRES_FAULT Fault number that may be present in the inverter
SW6210
%
-- 3106 CFW_STS_RATED_CURRENT Inverter rated current (HD) in A (x10)
SW6212
%
-- 3107 CFW_STS_MOTOR_CURRENT Motor current w ithout filter in A (x10)
SW6214
%
-- 3108 CFW_STS_MOTOR_TORQUE Motor torque w ithout filter in % (x10)
SW6216
Logical Command
11.1.3 I/O's
Hardware information can be found in the Manual of the CFW100 at the website www.weg.net.
Digital Inputs
Analog Inputs
Digital Outputs
Analog Outputs
The import from WLP can be executed during the resource creation.
1. To execute the import WLP function click the Import from WLP button and select the WLP project folder or
the WLP BKP file.
2. After import from WLP completed successfully click the Finish button to copy the imported files to new
resource.
11.1.5 Parameters
11.1.5.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.1.5.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.1.6 Ladder
11.1.6.1 Coil
11.1.6.1.1 DIRECTCOIL
Logical block used to assign direct values of the output variables.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example keeps the digital output DO9 permanently connected, because the value of A in
this case is the value of the left bus which is always considered high logic level (TRUE).
11.1.6.1.2 INVERTEDCOIL
Logical block used for assigning values denied to output variables.
Ladder Representation
Block Structure
Operation
The block transfers the denied value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example disables the digital output DO3 when some of the digital inputs DI1 and DI2 are
with FALSE value. When both inputs are with a TRUE value, DO3 activates.
11.1.6.1.3 RESETCOIL
Logical block used for indefinite disabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers a FALSE value to the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI5.
11.1.6.1.4 SETCOIL
Logical block used for indefinite enabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers the value of A for the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI6.
11.1.6.1.5 TOGGLECOIL
Logical block used for output variables alternance.
Ladder Representation
Block Structure
Operation
When identifying a transition from FALSE to TRUE (leading edge) on A, the block reverses the status
of O1.
Diagram
Block Flowchart
Example
The above example inverts the state of the digital output DO6 to each disabling the internal buzzer.
The CFW300 allows operation as a master for the Modbus RTU network. For this operation, it is necessary to
observe the following points:
The following functions are available for the sending of requisitions by the Modbus master:
o Function 01: Read Coils
o Function 02: Read Discrete Inputs
o Function 03: Read Holding Registers
o Function 04: Read Input Registers
o Function 05: Write Single Coil
o Function 06: Write Single Register
o Function 15: Write Multiple Coils
o Function 16: Write Multiple Registers
In order to control and monitor the Modbus RTU communication using the CFW300, the following blocks were
developed, and they must be used when programming in Ladder.
11.1.6.2.1.2 MB_MasterControlStatus
Block that allows monitoring various statuses of the Modbus RTU network master.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the master and input requests. When Execute receives FALSE level, the inputs are
ignored and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE
level and block finished its execution.
A TRUE level DisableComm disables the Modbus RTU communication and resets the status counters
and markers of the master. These markers and counters are displayed in the output block each
having some data corresponding to its description. Their values are also cleared at shutdown of the
master.
Block Flowchart
Example
The example above requests status data of the Modbus RTU network master, and allows disabling
communication through DISABLE. The block ends successfully, Done output is activated.
11.1.6.2.1.3 MB_ReadBinary
Block that performs a reading of up to 128 binary data (via Read Coils or Read Discrete Inputs) of a
slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus slave RTU in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT Modbus RTU slave of SLAVE address through the Read Discrete Input function.
These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.1.6.2.1.4 MB_ReadRegister
Block that performs a reading of up to 64 16-bit registers (via Read Holding Registers or Read Input
Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of registers indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting them when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT in the Modbus RTU slave of SLAVE address through the Read Input Register
function. These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.1.6.2.1.5 MB_SlaveStatus
Block that allows monitoring the status of 4 slaves of the Modbus RTU network.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
number of errors recorded for each slave. When Execute receives FALSE level, the inputs are ignored
and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE level and
block finished its execution.
The ErrorsToSetOffline # input allows registering the number of errors identified in a slave that will
feature an offline communication. AddressSlave inputs allow inserting four slave addresses to be
monitored. When this monitored slave reports the programmed number of errors, its corresponding
SlaveOffline output is set to TRUE level. If any of SlaveOffline outputs is at TRUE level, GeneralOffline
also receives TRUE level.
Block Flowchart
Example
The above example checks the number of error responses sent by the slaves 2, 4, 6 and 8 of the
Modbus RTU. If any of them is greater than 5, its SX_OFF status is led to TRUE level. The block ends
successfully, Done output is activated.
11.1.6.2.1.6 MB_WriteBinary
Block that performs a writing of up to 128 binary data (via Write Single Coil or Write Multiple Coils) in
a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. If the slave is not free, the block waits Busy go to FALSE level to resubmit
the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Coil. The block ends successfully, Done output is activated.
11.1.6.2.1.7 MB_WriteRegister
Block that performs a reading of up to sixteen 16-bit registers (via Write Single Register or Write
Multiple Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of Value values in a number of registers indicated by NumberOfData in
InitialDataAddress address using chosen function in Function# and sets the Active output, resetting it
when receiving the response from the slave. If the slave is not free, the block waits Busy go to FALSE
level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Register. The block ends successfully, Done output is activated.
11.1.6.3 Compare
11.1.6.3.1 COMP_EQ
Block that compares the values of Value1 and Value2, enabling the output Q if both are equal.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the output Q the TRUE value if Value1 and
Value2 are the same. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated. Notice that the types of the input variables can be different
without causing execution problems.
The example above checks equality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is disabled.
11.1.6.3.2 COMP_GE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
or equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN it sends the Q output to the TRUE value if Value1 is higher
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is disabled.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is activated.
11.1.6.3.3 COMP_GT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is higher
than Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is activated.
11.1.6.3.4 COMP_LE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than or
equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is disabled.
11.1.6.3.5 COMP_LT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks minority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is activated.
The example above checks the minority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the minority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is disabled.
11.1.6.3.6 COMP_NE
Block that compares the values of Value1 and Value2, enabling the Q output if Value1 is different from
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is
different from Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks inequality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is disabled.
11.1.6.4 Contact
11.1.6.4.1 NCCONTACT
Normally closed contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the opposite value of digital input DI1 to the digital output
DO2.
11.1.6.4.2 NOCONTACT
Normally open contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the value of digital input DI1 to the digital output DO2.
11.1.6.4.3 NTSCONTACT
Falling edge transition contact.
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from TRUE to FALSE (falling edge or negative edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed or a positive pulse on
the digital input DI2 is given.
11.1.6.4.4 PTSCONTACT
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from FALSE to TRUE (leading edge or positive edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed and a positive pulse on
the digital input DI2 is given.
11.1.6.5 Control
11.1.6.5.1 PID
Block that performs the function of a discrete PID controller. From the input variables, it calculates the
corresponding controller output.
Ladder Representation
Block Structure
Operation
On the positive transition edge in EN, Output receives zero value, and the block executes its
functionality as EN is at TRUE level.
When enabled, this block performs a routine PID control with the Kp, Ki and Kd parameters chosen.
The PID topology used may be the Academic or Parallel, depending on what is chosen in Type#.
Academic Form:
Parallel Form:
The levels of the output signal of the controller are saturated at value MinimumOutput and
MaximumOutput. The SelectSetPoint input level FALSE causes the SetPoint reference be adopted,
allowing the controller maintains control over the process. When SelectSetPoint goes to TRUE level,
the controller has no more domain, and ManualSetPoint becomes to be considered the output signal
of the controller.
Action# will define the feedback operation. If Action# is DIRECT, the operation will be SetPoint –
Feedback. If Action# is REVERSE, the operation will be Feedback – SetPoint.
Feedback receives the process variable considered as the plant output. Ts# receives the sampling
time for the controller and # TauSetPoint receives the time constant for the input filter of the automatic
reference.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Effects of the alteration of gains on the process
If Kp decreases, the process becomes slower; generally more stable or less oscillating; it has
less overshoot.
If Kp increases, the process responds faster; it may become more unstable or more
oscillating; it has more overshoot.
If Ki decreases, the process becomes slower, lagging to reach the "SetPoint"; it becomes
more stable or less oscillating; it has less overshoot.
If Ki increases, the process becomes faster, quickly reaching the "SetPoint"; it becomes more
unstable or more oscillating; it has more overshoot.
If Kd decreases, the process becomes slower; it has less overshoot.
If Kd increases, it has more overshoot.
NOTE!
How to improve the performance of the process through the adjustment of gains (valid for the
Academic PID)
If the performance of the process is almost good, but the overshoot is a bit high, try to: (1)
decrease Kp 20%, (2) decrease Ki 20% and/or (3) decrease Kd 50%.
If the performance of the process is almost good, but it does not have overshoot and lags to
reach the "SetPoint", try to: (1) increase Kp 20%, (2) increase Ki 20% and/or (3) increase Kd
50%.
If the performance of the process is good, but the process output is varying too much, try to:
(1) increase Kd 50%, (2) decrease Kp 20%.
If the performance of the process is bad, i.e. after start up, the transitory lasts several periods
of oscillation that reduce very slowly or never reduce at all, try to: (1) decrease Kp 50%.
If the performance of the process is bad, i.e. after start up it slowly moves towards the
"SetPoint" without overshoot, but is still very far and the process output is less than the rated
value, try to: (1) increase Kp 50%, (2) increase Ki 50%, (3) increase Kd 70%.
Block Flowchart
Example
The above example creates a loop of a digital PID form with sampling time 50 ms, using the
constants KP, KI and KD for control. Automatic reference SETPOINT, filtered by a first order filter with
time constant of 0:01 is used. The error signal is calculated as the difference between the filtered
reference and variable SAIDA_PLANTA. The controller output is saturated between the values 0.1 and
2.5 and sent to the variable ENTRADA_PLANTA.
11.1.6.6 Conversion
11.1.6.6.1 BOOL
11.1.6.6.1.1 BYTE_TO_BOOL
Block that performs the conversion of a BYTE value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BYTE, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.1.2 DWORD_TO_BOOL
Block that performs the conversion of a DWORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in DWORD, into a BOOL value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.1.3 REAL_TO_BOOL
Block that performs the conversion of a REAL value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in REAL, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice in the
last example that the values very close to the machine epsilon may result in an interpretation of the
FALSE value.
11.1.6.6.1.4 WORD_TO_BOOL
Block that performs the conversion of a WORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.2 BYTE
11.1.6.6.2.1 BOOL_TO_BYTE
Block that performs the conversion of a BOOL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.2.2 DWORD_TO_BYTE
Block that performs the conversion of a DWORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.1.6.6.2.3 REAL_TO_BYTE
Block that performs the conversion of a REAL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that the
results are truncated in decimal and only the eight least significant bits are taken into account.
11.1.6.6.2.4 WORD_TO_BYTE
Block that performs the conversion of a WORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.1.6.6.3 DWORD
11.1.6.6.3.1 BOOL_TO_DWORD
Block that performs the conversion of a BOOL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a DWORD value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.3.2 BYTE_TO_DWORD
Block that performs the conversion of a BYTE value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.3.3 REAL_TO_DWORD
Block that performs the conversion of a REAL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated. Note that the
results are truncated in decimal and only the thirty-two least significant bits are taken into account.
11.1.6.6.3.4 WORD_TO_DWORD
Block that performs the conversion of a WORD value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in WORD, into a DWORD value storing the final
result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.4 REAL
11.1.6.6.4.1 BOOL_TO_REAL
Block that performs the conversion of a BOOL value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.4.2 BYTE_TO_REAL
Block that performs the conversion of a BYTE value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.4.3 DWORD_TO_REAL
Block that performs the conversion of a DWORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.4.4 WORD_TO_REAL
Block that performs the conversion of a WORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.5 WORD
11.1.6.6.5.1 BOOL_TO_WORD
Block that performs the conversion of a BOOL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.5.2 BYTE_TO_WORD
Block that performs the conversion of a BYTE value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.1.6.6.5.3 DWORD_TO_WORD
Block that performs the conversion of a DWORD value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Notice that only the
sixteen least significant bits are taken into account.
11.1.6.6.5.4 REAL_TO_WORD
Block that performs the conversion of a REAL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Note that the results
are truncated in decimal and only the sixteen least significant bits are taken into account.
11.1.6.7 Counter
11.1.6.7.1 CTD
Countdown block of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it decrements the CV variable until it is zero. While
CV equals zero, the output Q remains at TRUE level. By detecting high-level LD, the block loads the
PV value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. As CV has a value of zero, the Q output is
enabled.
The value of the PV variable was changed to 20, but not yet loaded.
By identifying TRUE level in LD, the block loads the PV value to CV. Since this value is greater than
zero, the Q output is disabled.
At each leading edge identified in CD, the value of COUNT is decremented until it reaches zero, when
the Q output is enabled.
11.1.6.7.2 CTU
Block for gradual count of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it increments the CV variable until it is equal to PV.
While CV equals PV, the output Q remains at TRUE level. By detecting high-level R, the block loads
the zero value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. Since CV has a lower value than of PV, the
Q output is disabled.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the Q output is enabled.
By identifying TRUE level in R, the block loads the zero value to CV. Since this value is lower than of
PV, the Q output is disabled.
11.1.6.7.3 CTUD
Block for gradual count and countdown of input pulses.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it acts as a CTD block and block CTU at the same time
acting on the same CV counter. That is: increments CV until it reaches PV to the leading edges in
CU and decrements CV until it reaches zero to the leading edges in CD. A positive transition in R
carries zero in CV, while a leading edge in LD loads the PV value in CV. If CV has zero value, QD
receives TRUE, and if CV has value equal to PV, QU receives TRUE.
The ENO value forwards to the next Ladder block the EN value.
Block Flowchart
Operation Diagram
Example
The example above shows the disabled block, with all its internal variables zeroed. Although the
external controls are activated, these values are not forwarded to the instance of the block.
When activated, the block identifies the value of PRESET, loading it in PV, and identifies that the
output is at zero, enabling the QD output. When execution is completed, the ENO output is activated.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the QU output is enabled. When execution is completed, the ENO output is activated.
At each leading edge detected in CD, the CV value is decremented. When CV is a value between
zero and PV, both QD and QU outputs are deactivated. When execution is completed, the ENO
output is activated.
A TRUE value in R resets CV, while a TRUE value in LD loads the value of PV to CV. As we can see,
R prevails over LD, leaving CV and enabling the QD output. When execution is completed, the ENO
output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in Word 15 Boolean
values stored in Bit0 to Bit15 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYWORD in Boolean values, which are stored in the
output variables BIT0 to Bit15. The block ends successfully and the ENO output is activated.
11.1.6.8.2 ILOAD
Block which indirectly loads the value of a variable and transfers it to Value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the of the Address variable belonging to
the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of the address 40 of group 2 (GLOBAL_SYSTEM%S), which
represents the status of ESC key in UINT format for the VALUE variable. The block ends with
success and ENO output is activated.
11.1.6.8.3 ILOADBOOL
Block that indirectly loads the value of a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the Bit contents of the Address variable
belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of bit 1 of the address 24 of group 2 (S GLOBAL_SYSTEM%),
which represents the status of ESC key for the VALUE variable. The block ends with success and
ENO output is activated.
11.1.6.8.4 ISTORE
Block that indirectly loads the Value value in a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the contents of the Address
variable belonging to the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the VALUE value in WORD format in address 444 of group 3
(GLOBAL_SYSTEM% C), which represents the index of the communication port Modbus TCP. The
block ends with success and ENO output is activated.
11.1.6.8.5 ISTOREBOOL
Block that indirectly loads the Value value in a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the Bit contents of the Address
variable belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of VALUE in bit 7 of the address 121 in group 3
(GLOBAL_SYSTEM% C), which represents the disable command of CANopen communication. The
block ends with success and ENO output is activated.
11.1.6.8.6 MUX
Block that creates a new WORD variable from the concatenation of 16 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable Word. Bit0 corresponds to LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYWORD. The block ends with success and ENO output is activated.
11.1.6.8.7 SEL
Block that replicates to the output the value of an input variable (Value0 or Value1) according to the
Selector selection.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it replicates to the Result variable the Value0 value if
selector is FALSE or the Value1 value if Selector is TRUE.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
TRUE level, the RESULT output gets the value of VALUE1. The block ends successfully and the ENO
output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
11.1.6.8.8 STORE
Block that performs direct storage of data from a source to a destination.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it stores the contents from SRC into DST.
NOTE!
SRC and DST must have data types of the same size.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated.
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated. Note that the binary pattern is maintained between variables of different
types.
11.1.6.8.9 USERERR
Block that generates an alarm or fault with the number programmed by the user.
Ladder Representation
Block Structure
NOTE!
(*) USERERR_INST_0 instance must be configurated to SCA06 and LDW900 .
Operation
When this block has a TRUE value in EN, it generates an alarm or equipment failure, depending on
the type defined in TYPE with CODE code.
The value of ENO informs if the generation of alarm or fault has been executed successfully.
Block Flowchart
Example
The above example, when identifying TRUE level in DI1, generates a fault with the code 974 and sets
the DO1 output.
On devices that have text-based HMI, messages can be configured through an editor. To access the
editor, right click on the USERERR block and select the "Edit USERERR Table" option.
The texts configured in the table will be displayed on the HMI when the block USERERR is enabled.
After editing the table, select the argument CODE of the block equal to the CODE column of the
table.
11.1.6.9 Filter
11.1.6.9.1 LOWPASS
Block that filters the input using a low pass filter of first order and inserts the result in the output.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, filters the input value of Input using a low pass first order
filter described by Tau and Ts#, inserting the result in Output. On the leading edge of EN, Output
receives zero.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example causes OUTPUT, by identifying a leading edge in EN, to display a behavior of first
order with time constant equal to Tau and the sampling time of 2 ms, in order to achieve the reference
set to INPUT. At each calculation completed successfully, the ENO output is activated.
11.1.6.10 Logic
11.1.6.10.1 Logic Bit
11.1.6.10.1.1 RESETBIT
Logical block used to perform reset of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, resets the bit indicated in Position in the Data variable
that is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the reset of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above resets the bit of AUX zero position, whose initial value is 200 (1100 1000, in
binary). Since this bit already had FALSE value, nothing has changed.
The example above resets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above resets the bit in position nine of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.1.6.10.1.2 SETBIT
Logical block used to perform the set of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sets the bit indicated in Position in the Data variable that
is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the set of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit of AUX zero position, whose initial value is 153 (1001 1001, in binary).
Since this bit already had TRUE value, nothing has changed.
The example above sets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above sets the bit in position fifteen of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.1.6.10.1.3 TESTBIT
Logical block that revolutions the value of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sends to the output Q the bit value indicated in Position
in the Data variable.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit value of zero position of AUX, whose initial value is 74 (0100 1010 in
binary) to the output Q. Since this bit has value 0, the output is disabled.
The example above sets the value of the bit of position three of AUX to the output Q. Since this bit
has value 1, the output is enabled.
The example above sets the bit value of position ten of AUX to output Q. Since AUX is a variable of
BYTE type, it has only eight bits. Thus, the example above creates a runtime error in the block and
therefore the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “and” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "and" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.1.6.10.2.2 NOT
Block that performs a logical operation of boolean "not" in a variable, storing the result in another.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the denied Boolean value of
the Value input variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a boolean "not" operation in AUX, storing the result in AUX2.
11.1.6.10.2.3 OR
Logical block that performs an Boolean "or" operation between two variables, storing the result in a
third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “or” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "or" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.1.6.10.2.4 XNOR
Logical block that performs an Boolean "not exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “denied exclusive or”
Boolean operation of input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "denied exclusive or" Boolean operation between AUX and AUX2,
storing the result in AUX3.
11.1.6.10.2.5 XOR
Logical block that performs an Boolean "exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “xor” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "xor" Boolean operation between AUX and AUX2, storing the result in
AUX3.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical left shifts, according to the Shift value. The most significant bits
that are being discarded are returned to the least significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical left shift by one position in the VALUE variable whose initial
value is -100 (1001 1100 in binary). The discarded bits on the left are reinserted on the right. The final
result (0011 1001 in binary) is stored in RESULT.
The above example performs a logical left rotation by five positions in the VALUE variable whose initial
value is 21 (0001 0101 in binary). The discarded bits on the left are reinserted on the right. The final
result (1010 0010 in binary) is stored in RESULT.
11.1.6.10.3.2 ROR
Block that performs a logical right rotation operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical right shifts, according to the Shift value. The least significant bits
that are being discarded are returned to the most significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logic right shift by one position in the VALUE variable whose initial
value is -128 (1000 0000 in binary). The discarded bits on the right are reinserted on the left. The final
result (0100 0000 in binary) is stored in RESULT. Notice that the sign is not preserved in this
operation.
The above example performs a logical right rotation by one position in the VALUE variable whose
initial value is -127 (1000 0001 in binary). The discarded bits on the right are reinserted on the left. The
final result (1100 0000 in binary) is stored in RESULT.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic left shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
Description of exemple.
Description of exemple.
11.1.6.10.4.2 ASHR
Block that performs arithmetic left shift operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic right shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs an arithmetic right shift by three positions in the VALUE variable whose
initial value is 52 (0011 0100 in binary). The bits on the right are being discarded, and on the left new
zeros are inserted. The final result (0000 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by two positions in the VALUE variable whose
initial value is -79 (1011 0001 in binary). The bits on the right will be discarded and new ones on the
left are inserted, since the arithmetic right shifts preserve the sign of the variable. The final result
(1111 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by thirteen positions in the VALUE variable
whose initial value is -128 (1000 0000 in binary). The bits on the right are being discarded, and on the
left new ones are inserted. The final result (1111 1111 in binary) is stored in RESULT.
11.1.6.10.4.3 SHL
Block that performs a binary logical left shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts left, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is 56 (0011 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (0011 1000 0000 in binary) is stored in RESULT.
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is -56 (1100 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (1100 1000 0000 in binary) is stored in RESULT. Since RESULT is SINT
type, it only accepts the first eight bits (1000 0000).
11.1.6.10.4.4 SHR
Block that performs a binary logical right shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts right, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by two positions in the VALUE variable whose initial
value is 124 (0111 1100 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 1111 in binary) is stored in RESULT.
The above example performs a logical right shift by three positions in the VALUE variable whose initial
value is -98 (1001 1110 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 0011 in binary) is stored in RESULT.
11.1.6.11 Math
11.1.6.11.1 Math Basic
11.1.6.11.1.1 ABS
Block that calculates the Value module, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the absolute value of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the absolute value of the VALUE variable whose initial value is -45,
storing the final result, 45, in RESULT.
The above example calculates the absolute value of the VALUE variable whose initial value is -45. The
final result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by
SINT type. Therefore, RESULT remains unchanged and the output is disabled.
11.1.6.11.1.2 ADD
Block that calculates the sum of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sum of Value1 and Value2
variables. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT.
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the sum of VALUE1 and VALUE2 variables. The final result -170
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.1.6.11.1.3 DIV
Block that calculates the division of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the division of Value1 and
Value2 variables. The value stored will be the exact division if Result is REAL, or, in other cases, only
the quotient. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is of REAL type, the exact value of the division is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it. Notice that the block
accepts arguments of both signs.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains unchanged
and the output is disabled.
11.1.6.11.1.4 MOD
Block that calculates the remainder of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the remainder of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains
unchanged and the output is disabled.
11.1.6.11.1.5 MUL
Block that calculates the multiplication of the values of Value1 and Value2, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the multiplication of Value1
and Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT.
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the product of VALUE1 and VALUE2 variables. The final result 224
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.1.6.11.1.6 NEG
Block that calculates the opposite (i.e., the product with -1) of a value passed by Value, storing the
result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the opposite of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the opposite of the VALUE variable whose initial value is 21, storing
the final result, -21, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -56, storing
the final result, 56, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -128. The final
result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by SINT
type. Therefore, RESULT remains unchanged and the output is disabled.
11.1.6.11.1.7 SUB
Block that calculates the subtraction between the Value1 and Value2 values, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the subtraction of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the subtraction of VALUE1 and VALUE2 variables. The final result 141
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the antilogarithm of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the minimum input value for which the block revolutions a nonzero
result. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Below the minimum values cause the block to return a null value. The block ends with
success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the maximum input value for which the block revolutions a valid result.
The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Values higher than the maximum cause the block to generate an error, the RESULT output
remains unchanged and Done output is disabled.
11.1.6.11.2.2 EXP
Block that calculates the exponential of the Euler number "and" raised to the value of Value, storing
the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the exponent of the Euler
number "and" raised to the Value variable. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the minimum input value for which the block revolutions a nonzero result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values below the minimum cause the block to return to a null value. The block ends with success
and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the maximum input value for which the block revolutions a valid result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values higher than the maximum cause the block to generate an error, the RESULT output remains
unchanged and Done output is disabled.
11.1.6.11.2.3 LN
Block that calculates the natural logarithm of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the natural logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has value zero, and Done output is
disabled.
11.1.6.11.2.4 LOG10
Block that calculates the common logarithm (base 10) of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the common logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.1.6.11.2.5 POW
Block that calculates the value of Value raised to the exponent Power, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of Value raised to
the exponent Power. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. Since the result is higher than the maximum supported by REAL type, the block
generates an error and Done output is disabled.
11.1.6.11.2.6 ROUND
Block that rounds the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the rounded value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals less than 0.5 are discarded. The block ends with success and Done output is activated.
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals greater than or equal to 0.5 promote unity value immediately above. The block ends with
success and Done output is activated.
11.1.6.11.2.7 SQRT
Block that calculates the square root value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the square root value of
Value. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.1.6.11.2.8 TRUNC
Block that truncates the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the truncated value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example truncates the value of the VALUE variable, storing the final result in RESULT.
Decimals are discarded. The block ends with success and Done output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arccosine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block generates a runtime error, since VALUE has value inferior to 1, and
Done output is disabled.
11.1.6.11.3.2 ASIN
Block that calculates the arcsine of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arcsine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block generates a runtime error, since VALUE has value superior to 1, and
Done output is disabled.
11.1.6.11.3.3 ATAN
Block that calculates the arctangent of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for positive values, is always in the first quadrant. The block ends with
success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for negative values, is always in the fourth quadrant. The block ends
with success and Done output is activated.
11.1.6.11.3.4 ATAN2
Block that calculates the arctangent of Y/X, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Y/X. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and Y, is always in the first quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and positive values of Y, is always in the second
quadrant. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and Y, is always in the third quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and negative values of Y, is always in the fourth
quadrant. The block ends with success and Done output is activated.
11.1.6.11.3.5 COS
Block that calculates the cosine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the cosine of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
11.1.6.11.3.6 SIN
Block that calculates the sine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sine of Angle. If no errors,
the Done variable is set. If there is any error in the operation, Done is not set, staying in FALSE
status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts negative input values.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts values greater than one full turn.
11.1.6.11.3.7 TAN
Block that calculates the tangent of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the tangent of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the highest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is higher than the maximum supported by SINT type, the
block generates an error and Done output is disabled.
11.1.6.11.4.2 MIN
Block that compares the values of Value1 and Value2 and stores the lowest of them in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the lowest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is lower than the minimum supported by SINT type, the
block generates an error and Done output is disabled.
11.1.6.11.4.3 SAT
Block that performs a routine for saturation of the value found in Value in accordance with the limits
for Minimum and Maximum, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it performs a comparison between Value and Minimum and
Maximum. If Value is in the range between Minimum and Maximum, Result receives the value of
Value and Q remains FALSE. If Value is higher than Maximum, Result receives Maximum and Q
receives TRUE. If Value is lower than Minimum, Result receives Minimum and Q receives TRUE. If
there is any error in the operation, Q is not set, staying in FALSE status, while Result remains with
its value unchanged.
When EN has FALSE value, Result remains unchanged and Q remains in FALSE.
Block Flowchart
Example
The above example passes the VALUE value to RESULT, since it is not lower than MINIMUM or
higher than MAXIMUM. The block ends successfully and the Q output is disabled, since there was no
saturation.
The above example passes the MAXIMUM to RESULT, since VALUE is higher than MAXIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MINIMUM to RESULT, since VALUE is lower than MINIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MAXIMUM value to RESULT, since VALUE is higher than MAXIMUM.
The block ends successfully and the Q output is activated, since there was saturation.
11.1.6.12 Module
11.1.6.12.1 USERFB
Block that performs a subroutine programmed by the user.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine programmed by the user and updates the values of the outputs
after completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Refer to section Working with USERFBs for further information.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Ladder Representation
Block Structure
Operation
When this block has a “0” value in EN, it does not execute and ENO output is zero.
RunAutomatic = TRUE
When this block has a “1” value in EN input, the drive is general enabled, no other motion block is
active, the Run/Stop command goes to "1", the speed reference value is send to drive and the ENO
output is set to “1”.
If EN input has a "0" value, and this block is active, the Run/Stop command is set to "0" and ENO
output goes to "0".
RunAutomatic = FALSE
When this block has a “1” value in EN input, the drive is general enabled, the Run/Stop command is
set to "1", no other motion block is active, the speed reference value is send to drive and the ENO
output is set to “1”.
If EN input has a "0" value and this block is active, ENO output is set to "0".
NOTE!
Check the source of speed reference and command Run/Stop for correct operation of this
block
Block Flowchart
Example
The above example shows the MW_RefVelocity block, set to Hz and the RunAutomatic command in
TRUE, if drive is general enabled and the block is enabled, the speed reference is changed.
The above example shows the MW_RefVelocity block, set to Hz and RunAutomatic command in
FALSE, if drive is general enabled, it is necessary the Run command. So, when the block be enabled,
the speed reference would be changed.
11.1.6.14 Timer
11.1.6.14.1 TON
Timer block that, when energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is FALSE, the Q output is FALSE and ET also receives the value zero.
On the edge positive transition in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state TRUE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of the block and of the routine variables.
When activated the IN input, counting is triggered. Since ET equals PT, the Q output is enabled.
Note that a change in PRESET variable is not forwarded to the PT field while the IN entry remains
enabled.
Disabling the IN input, the value of PT is updated and the Q output is disabled. When activating it
again, counting is triggered.
When ET reaches the value PT, the Q is output enabled and remains so while IN is at TRUE level.
11.1.6.14.2 TOF
Timer block that, when energized, disables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is TRUE, the Q output is also TRUE and ET also receives the value zero.
On the negative transition edge in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state FALSE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example disables the DO1 output to identify a low level in DI1 for 12 seconds, remaining
disabled until DI1 again be TRUE.
11.1.6.14.3 TP
Timer block that, when identifies it is energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
On the edge positive transition in IN, Q receives TRUE value, counting is triggered and ET is
incremented according to TIMEBASE. When ET equals PT, the Q output goes to state FALSE until
IN revolutions to FALSE. At that moment, if IN is at TRUE level, nothing happens. On the edge
positive transition in IN, ET is automatically reset.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example enables the DO1 output for six seconds at each DI1 positive transition.
11.1.6.15 Structures
Structure is a data grouping used to define a recipe or an object.
In the Ladder program, it is possible to create variables of the structure type and use them in the blocks. To
access the internal members of the structure, the '.' is used followed by its respective member.
Creating a structure
1. With the right button of the mouse on the folder Structure, click on New file.
3. Configure the structure using the buttons presented in the figure below.
4. After finishing the edition of the structure, click on the button Finish.
Editing a structure
Just double click on the desired structure, as shown in figure 4, and a window will open as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
11.1.7 Communication
11.1.7.1 Force I/O
Overview
The force inputs and outputs window is used for the values of the digital and analog inputs to be read by the
program, by values manipulated by the user, regardless their physical state. It also allows the manipulation of
the physical states of the digital and analog outputs by the user independently of the values calculated by the
program.
In order to force the device inputs and outputs, it is necessary that the online monitoring be active and the
option Run cyclically be enabled. The data are sent to the device every 2 seconds.
The values can be edited with the device disconnected. The configurations are stored in the resources and
recorded whenever the main resource selection is changed.
The data displayed on the force I/O window contain the values belonging to the resource (and configuration)
selected as main.
The force I/O window is open trough the menu Online > Force I/O:
Toolbar
The toolbar of the force window has the options to run cyclically, upload the device force configuration, enable
For each digital and analog input and output there is a selection box linked to enable the force, a status field
and an edition field.
Digital:
Analog:
NOTE!
The analog signal scale has 15 bits plus 1 bit for signal, except for SSW900 which it has only 10
unsigned bits.
11.2 CFW300
11.2.1 Description
The CFW300 frequency inverter is a high-performance product which allows speed control of three-phase
induction motors. This product provides the user with the options of vector (VVW) or scalar (V/f) control, both
The scalar mode (V/f) is recommended for simpler applications, such as the activation of most pumps and
fans. In such cases it is possible to reduce the losses in the motor and the inverter using the "V/f Quadratic",
which results in energy savings. The V/f mode is used when more than a motor is activated by an inverter
simultaneously (multimotor applications). In the vector mode (VVW), the operation is optimized for the motor
in use, obtaining a better performance in terms of speed regulation.
The frequency inverter CFW300 also has functions of PLC (Programmable Logic Controller) by means of the
SoftPLC (integrated) feature. It has two slots for simultaneous connection of the accessories: Slot 1 -
Communication accessory or external HMI and Slot 2 - Input and output (I/O) expansion accessory.
Refer to the user's manual of the CFW300 for further details about the product.
Groups:
CFW: reading and writing variables of the CFW300 frequency inverter.
Subgroups:
STS: reading variable (status);
CMD: writing variable (command).
Ladder
Logical Status
Speed
%
-- 3100 CFW_STS_MOTOR_SPEED_13BITS Motor speed in 13 bits (8192)
SW6200
%
-- 3101 CFW_STS_MOTOR_SYNC_SPEED Motor synchronous speed in rpm
SW6202
%
-- 3102 CFW_STS_MOTOR_SPEED_RPM Motor speed in rpm
SW6204
%
-- 3103 CFW_STS_SPEED_REFERENCE Speed reference after ramp in rpm
SW6206
%
-- 3104 CFW_STS_PRES_ALARM Alarm number that may be present in the inverter
SW6208
%
-- 3105 CFW_STS_PRES_FAULT Fault number that may be present in the inverter
SW6210
%
-- 3106 CFW_STS_RATED_CURRENT Inverter rated current (HD) in A (x10)
SW6212
%
-- 3107 CFW_STS_MOTOR_CURRENT Motor current w ithout filter in A (x10)
SW6214
%
-- 3108 CFW_STS_MOTOR_TORQUE Motor torque w ithout filter in % (x10)
SW6216
%
-- 3109 CFW_STS_IRC_2_INFO IRC_2 info
SW6218
Logical Command
11.2.3 I/O's
Hardware information can be found in the Manual of the CFW300 at the website www.weg.net.
Digital Inputs
Analog Inputs
Digital Outputs
Analog Outputs
NOTE!
The addresses of the digital and analog outputs were changed from firmware version 1.20. To
convert the variables it is necessary to change the addresses:
%QB6 => %QB0
%QW8 => %QW2
%QW10 => %QW4
The import from WLP can be executed during the resource creation.
1. To execute the import WLP function click the Import from WLP button and select the WLP project folder or
the WLP BKP file.
2. After import from WLP completed successfully click the Finish button to copy the imported files to new
resource.
11.2.5 Parameters
11.2.5.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.2.5.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.2.6 Ladder
11.2.6.1 Coil
11.2.6.1.1 DIRECTCOIL
Logical block used to assign direct values of the output variables.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example keeps the digital output DO9 permanently connected, because the value of A in
this case is the value of the left bus which is always considered high logic level (TRUE).
11.2.6.1.2 INVERTEDCOIL
Logical block used for assigning values denied to output variables.
Ladder Representation
Block Structure
Operation
The block transfers the denied value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example disables the digital output DO3 when some of the digital inputs DI1 and DI2 are
with FALSE value. When both inputs are with a TRUE value, DO3 activates.
11.2.6.1.3 RESETCOIL
Logical block used for indefinite disabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers a FALSE value to the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI5.
11.2.6.1.4 SETCOIL
Logical block used for indefinite enabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers the value of A for the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI6.
11.2.6.1.5 TOGGLECOIL
Logical block used for output variables alternance.
Ladder Representation
Block Structure
Operation
When identifying a transition from FALSE to TRUE (leading edge) on A, the block reverses the status
of O1.
Diagram
Block Flowchart
Example
The above example inverts the state of the digital output DO6 to each disabling the internal buzzer.
The CFW300 allows operation as a master for the Modbus RTU network. For this operation, it is necessary to
observe the following points:
The following functions are available for the sending of requisitions by the Modbus master:
o Function 01: Read Coils
o Function 02: Read Discrete Inputs
o Function 03: Read Holding Registers
o Function 04: Read Input Registers
o Function 05: Write Single Coil
o Function 06: Write Single Register
o Function 15: Write Multiple Coils
o Function 16: Write Multiple Registers
In order to control and monitor the Modbus RTU communication using the CFW300, the following blocks were
developed, and they must be used when programming in Ladder.
11.2.6.2.1.2 MB_MasterControlStatus
Block that allows monitoring various statuses of the Modbus RTU network master.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the master and input requests. When Execute receives FALSE level, the inputs are
ignored and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE
level and block finished its execution.
A TRUE level DisableComm disables the Modbus RTU communication and resets the status counters
and markers of the master. These markers and counters are displayed in the output block each
having some data corresponding to its description. Their values are also cleared at shutdown of the
master.
Block Flowchart
Example
The example above requests status data of the Modbus RTU network master, and allows disabling
communication through DISABLE. The block ends successfully, Done output is activated.
11.2.6.2.1.3 MB_ReadBinary
Block that performs a reading of up to 128 binary data (via Read Coils or Read Discrete Inputs) of a
slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus slave RTU in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT Modbus RTU slave of SLAVE address through the Read Discrete Input function.
These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.2.6.2.1.4 MB_ReadRegister
Block that performs a reading of up to 64 16-bit registers (via Read Holding Registers or Read Input
Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of registers indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting them when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT in the Modbus RTU slave of SLAVE address through the Read Input Register
function. These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.2.6.2.1.5 MB_SlaveStatus
Block that allows monitoring the status of 4 slaves of the Modbus RTU network.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
number of errors recorded for each slave. When Execute receives FALSE level, the inputs are ignored
and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE level and
block finished its execution.
The ErrorsToSetOffline # input allows registering the number of errors identified in a slave that will
feature an offline communication. AddressSlave inputs allow inserting four slave addresses to be
monitored. When this monitored slave reports the programmed number of errors, its corresponding
SlaveOffline output is set to TRUE level. If any of SlaveOffline outputs is at TRUE level, GeneralOffline
also receives TRUE level.
Block Flowchart
Example
The above example checks the number of error responses sent by the slaves 2, 4, 6 and 8 of the
Modbus RTU. If any of them is greater than 5, its SX_OFF status is led to TRUE level. The block ends
successfully, Done output is activated.
11.2.6.2.1.6 MB_WriteBinary
Block that performs a writing of up to 128 binary data (via Write Single Coil or Write Multiple Coils) in
a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. If the slave is not free, the block waits Busy go to FALSE level to resubmit
the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Coil. The block ends successfully, Done output is activated.
11.2.6.2.1.7 MB_WriteRegister
Block that performs a reading of up to sixteen 16-bit registers (via Write Single Register or Write
Multiple Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of Value values in a number of registers indicated by NumberOfData in
InitialDataAddress address using chosen function in Function# and sets the Active output, resetting it
when receiving the response from the slave. If the slave is not free, the block waits Busy go to FALSE
level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Register. The block ends successfully, Done output is activated.
11.2.6.3 Compare
11.2.6.3.1 COMP_EQ
Block that compares the values of Value1 and Value2, enabling the output Q if both are equal.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the output Q the TRUE value if Value1 and
Value2 are the same. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated. Notice that the types of the input variables can be different
without causing execution problems.
The example above checks equality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is disabled.
11.2.6.3.2 COMP_GE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
or equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN it sends the Q output to the TRUE value if Value1 is higher
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is disabled.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is activated.
11.2.6.3.3 COMP_GT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is higher
than Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is activated.
11.2.6.3.4 COMP_LE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than or
equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is disabled.
11.2.6.3.5 COMP_LT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks minority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is activated.
The example above checks the minority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the minority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is disabled.
11.2.6.3.6 COMP_NE
Block that compares the values of Value1 and Value2, enabling the Q output if Value1 is different from
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is
different from Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks inequality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is disabled.
11.2.6.4 Contact
11.2.6.4.1 NCCONTACT
Normally closed contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the opposite value of digital input DI1 to the digital output
DO2.
11.2.6.4.2 NOCONTACT
Normally open contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the value of digital input DI1 to the digital output DO2.
11.2.6.4.3 NTSCONTACT
Falling edge transition contact.
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from TRUE to FALSE (falling edge or negative edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed or a positive pulse on
the digital input DI2 is given.
11.2.6.4.4 PTSCONTACT
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from FALSE to TRUE (leading edge or positive edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed and a positive pulse on
the digital input DI2 is given.
11.2.6.5 Control
11.2.6.5.1 PID
Block that performs the function of a discrete PID controller. From the input variables, it calculates the
corresponding controller output.
Ladder Representation
Block Structure
Operation
On the positive transition edge in EN, Output receives zero value, and the block executes its
functionality as EN is at TRUE level.
When enabled, this block performs a routine PID control with the Kp, Ki and Kd parameters chosen.
The PID topology used may be the Academic or Parallel, depending on what is chosen in Type#.
Academic Form:
Parallel Form:
The levels of the output signal of the controller are saturated at value MinimumOutput and
MaximumOutput. The SelectSetPoint input level FALSE causes the SetPoint reference be adopted,
allowing the controller maintains control over the process. When SelectSetPoint goes to TRUE level,
the controller has no more domain, and ManualSetPoint becomes to be considered the output signal
of the controller.
Action# will define the feedback operation. If Action# is DIRECT, the operation will be SetPoint –
Feedback. If Action# is REVERSE, the operation will be Feedback – SetPoint.
Feedback receives the process variable considered as the plant output. Ts# receives the sampling
time for the controller and # TauSetPoint receives the time constant for the input filter of the automatic
reference.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Effects of the alteration of gains on the process
If Kp decreases, the process becomes slower; generally more stable or less oscillating; it has
less overshoot.
If Kp increases, the process responds faster; it may become more unstable or more
oscillating; it has more overshoot.
If Ki decreases, the process becomes slower, lagging to reach the "SetPoint"; it becomes
more stable or less oscillating; it has less overshoot.
If Ki increases, the process becomes faster, quickly reaching the "SetPoint"; it becomes more
unstable or more oscillating; it has more overshoot.
If Kd decreases, the process becomes slower; it has less overshoot.
If Kd increases, it has more overshoot.
NOTE!
How to improve the performance of the process through the adjustment of gains (valid for the
Academic PID)
If the performance of the process is almost good, but the overshoot is a bit high, try to: (1)
decrease Kp 20%, (2) decrease Ki 20% and/or (3) decrease Kd 50%.
If the performance of the process is almost good, but it does not have overshoot and lags to
reach the "SetPoint", try to: (1) increase Kp 20%, (2) increase Ki 20% and/or (3) increase Kd
50%.
If the performance of the process is good, but the process output is varying too much, try to:
(1) increase Kd 50%, (2) decrease Kp 20%.
If the performance of the process is bad, i.e. after start up, the transitory lasts several periods
of oscillation that reduce very slowly or never reduce at all, try to: (1) decrease Kp 50%.
If the performance of the process is bad, i.e. after start up it slowly moves towards the
"SetPoint" without overshoot, but is still very far and the process output is less than the rated
value, try to: (1) increase Kp 50%, (2) increase Ki 50%, (3) increase Kd 70%.
Block Flowchart
Example
The above example creates a loop of a digital PID form with sampling time 50 ms, using the
constants KP, KI and KD for control. Automatic reference SETPOINT, filtered by a first order filter with
time constant of 0:01 is used. The error signal is calculated as the difference between the filtered
reference and variable SAIDA_PLANTA. The controller output is saturated between the values 0.1 and
2.5 and sent to the variable ENTRADA_PLANTA.
11.2.6.6 Conversion
11.2.6.6.1 BOOL
11.2.6.6.1.1 BYTE_TO_BOOL
Block that performs the conversion of a BYTE value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BYTE, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.1.2 DWORD_TO_BOOL
Block that performs the conversion of a DWORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in DWORD, into a BOOL value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.1.3 REAL_TO_BOOL
Block that performs the conversion of a REAL value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in REAL, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice in the
last example that the values very close to the machine epsilon may result in an interpretation of the
FALSE value.
11.2.6.6.1.4 WORD_TO_BOOL
Block that performs the conversion of a WORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.2 BYTE
11.2.6.6.2.1 BOOL_TO_BYTE
Block that performs the conversion of a BOOL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.2.2 DWORD_TO_BYTE
Block that performs the conversion of a DWORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.2.6.6.2.3 REAL_TO_BYTE
Block that performs the conversion of a REAL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that the
results are truncated in decimal and only the eight least significant bits are taken into account.
11.2.6.6.2.4 WORD_TO_BYTE
Block that performs the conversion of a WORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.2.6.6.3 DWORD
11.2.6.6.3.1 BOOL_TO_DWORD
Block that performs the conversion of a BOOL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a DWORD value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.3.2 BYTE_TO_DWORD
Block that performs the conversion of a BYTE value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.3.3 REAL_TO_DWORD
Block that performs the conversion of a REAL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated. Note that the
results are truncated in decimal and only the thirty-two least significant bits are taken into account.
11.2.6.6.3.4 WORD_TO_DWORD
Block that performs the conversion of a WORD value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in WORD, into a DWORD value storing the final
result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.4 REAL
11.2.6.6.4.1 BOOL_TO_REAL
Block that performs the conversion of a BOOL value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.4.2 BYTE_TO_REAL
Block that performs the conversion of a BYTE value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.4.3 DWORD_TO_REAL
Block that performs the conversion of a DWORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.4.4 WORD_TO_REAL
Block that performs the conversion of a WORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.5 WORD
11.2.6.6.5.1 BOOL_TO_WORD
Block that performs the conversion of a BOOL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.5.2 BYTE_TO_WORD
Block that performs the conversion of a BYTE value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.2.6.6.5.3 DWORD_TO_WORD
Block that performs the conversion of a DWORD value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Notice that only the
sixteen least significant bits are taken into account.
11.2.6.6.5.4 REAL_TO_WORD
Block that performs the conversion of a REAL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Note that the results
are truncated in decimal and only the sixteen least significant bits are taken into account.
11.2.6.7 Counter
11.2.6.7.1 CTD
Countdown block of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it decrements the CV variable until it is zero. While
CV equals zero, the output Q remains at TRUE level. By detecting high-level LD, the block loads the
PV value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. As CV has a value of zero, the Q output is
enabled.
The value of the PV variable was changed to 20, but not yet loaded.
By identifying TRUE level in LD, the block loads the PV value to CV. Since this value is greater than
zero, the Q output is disabled.
At each leading edge identified in CD, the value of COUNT is decremented until it reaches zero, when
the Q output is enabled.
11.2.6.7.2 CTU
Block for gradual count of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it increments the CV variable until it is equal to PV.
While CV equals PV, the output Q remains at TRUE level. By detecting high-level R, the block loads
the zero value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. Since CV has a lower value than of PV, the
Q output is disabled.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the Q output is enabled.
By identifying TRUE level in R, the block loads the zero value to CV. Since this value is lower than of
PV, the Q output is disabled.
11.2.6.7.3 CTUD
Block for gradual count and countdown of input pulses.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it acts as a CTD block and block CTU at the same time
acting on the same CV counter. That is: increments CV until it reaches PV to the leading edges in
CU and decrements CV until it reaches zero to the leading edges in CD. A positive transition in R
carries zero in CV, while a leading edge in LD loads the PV value in CV. If CV has zero value, QD
receives TRUE, and if CV has value equal to PV, QU receives TRUE.
The ENO value forwards to the next Ladder block the EN value.
Block Flowchart
Operation Diagram
Example
The example above shows the disabled block, with all its internal variables zeroed. Although the
external controls are activated, these values are not forwarded to the instance of the block.
When activated, the block identifies the value of PRESET, loading it in PV, and identifies that the
output is at zero, enabling the QD output. When execution is completed, the ENO output is activated.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the QU output is enabled. When execution is completed, the ENO output is activated.
At each leading edge detected in CD, the CV value is decremented. When CV is a value between
zero and PV, both QD and QU outputs are deactivated. When execution is completed, the ENO
output is activated.
A TRUE value in R resets CV, while a TRUE value in LD loads the value of PV to CV. As we can see,
R prevails over LD, leaving CV and enabling the QD output. When execution is completed, the ENO
output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in Word 15 Boolean
values stored in Bit0 to Bit15 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYWORD in Boolean values, which are stored in the
output variables BIT0 to Bit15. The block ends successfully and the ENO output is activated.
11.2.6.8.2 ILOAD
Block which indirectly loads the value of a variable and transfers it to Value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the of the Address variable belonging to
the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of the address 40 of group 2 (GLOBAL_SYSTEM%S), which
represents the status of ESC key in UINT format for the VALUE variable. The block ends with
success and ENO output is activated.
11.2.6.8.3 ILOADBOOL
Block that indirectly loads the value of a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the Bit contents of the Address variable
belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of bit 1 of the address 24 of group 2 (S GLOBAL_SYSTEM%),
which represents the status of ESC key for the VALUE variable. The block ends with success and
ENO output is activated.
11.2.6.8.4 ISTORE
Block that indirectly loads the Value value in a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the contents of the Address
variable belonging to the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the VALUE value in WORD format in address 444 of group 3
(GLOBAL_SYSTEM% C), which represents the index of the communication port Modbus TCP. The
block ends with success and ENO output is activated.
11.2.6.8.5 ISTOREBOOL
Block that indirectly loads the Value value in a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the Bit contents of the Address
variable belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of VALUE in bit 7 of the address 121 in group 3
(GLOBAL_SYSTEM% C), which represents the disable command of CANopen communication. The
block ends with success and ENO output is activated.
11.2.6.8.6 MUX
Block that creates a new WORD variable from the concatenation of 16 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable Word. Bit0 corresponds to LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYWORD. The block ends with success and ENO output is activated.
11.2.6.8.7 SEL
Block that replicates to the output the value of an input variable (Value0 or Value1) according to the
Selector selection.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it replicates to the Result variable the Value0 value if
selector is FALSE or the Value1 value if Selector is TRUE.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
TRUE level, the RESULT output gets the value of VALUE1. The block ends successfully and the ENO
output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
11.2.6.8.8 STORE
Block that performs direct storage of data from a source to a destination.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it stores the contents from SRC into DST.
NOTE!
SRC and DST must have data types of the same size.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated.
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated. Note that the binary pattern is maintained between variables of different
types.
11.2.6.8.9 USERERR
Block that generates an alarm or fault with the number programmed by the user.
Ladder Representation
Block Structure
NOTE!
(*) USERERR_INST_0 instance must be configurated to SCA06 and LDW900 .
Operation
When this block has a TRUE value in EN, it generates an alarm or equipment failure, depending on
the type defined in TYPE with CODE code.
The value of ENO informs if the generation of alarm or fault has been executed successfully.
Block Flowchart
Example
The above example, when identifying TRUE level in DI1, generates a fault with the code 974 and sets
the DO1 output.
On devices that have text-based HMI, messages can be configured through an editor. To access the
editor, right click on the USERERR block and select the "Edit USERERR Table" option.
The texts configured in the table will be displayed on the HMI when the block USERERR is enabled.
After editing the table, select the argument CODE of the block equal to the CODE column of the
table.
11.2.6.9 Filter
11.2.6.9.1 LOWPASS
Block that filters the input using a low pass filter of first order and inserts the result in the output.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, filters the input value of Input using a low pass first order
filter described by Tau and Ts#, inserting the result in Output. On the leading edge of EN, Output
receives zero.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example causes OUTPUT, by identifying a leading edge in EN, to display a behavior of first
order with time constant equal to Tau and the sampling time of 2 ms, in order to achieve the reference
set to INPUT. At each calculation completed successfully, the ENO output is activated.
11.2.6.10 Logic
11.2.6.10.1 Logic Bit
11.2.6.10.1.1 RESETBIT
Logical block used to perform reset of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, resets the bit indicated in Position in the Data variable
that is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the reset of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above resets the bit of AUX zero position, whose initial value is 200 (1100 1000, in
binary). Since this bit already had FALSE value, nothing has changed.
The example above resets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above resets the bit in position nine of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.2.6.10.1.2 SETBIT
Logical block used to perform the set of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sets the bit indicated in Position in the Data variable that
is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the set of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit of AUX zero position, whose initial value is 153 (1001 1001, in binary).
Since this bit already had TRUE value, nothing has changed.
The example above sets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above sets the bit in position fifteen of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.2.6.10.1.3 TESTBIT
Logical block that revolutions the value of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sends to the output Q the bit value indicated in Position
in the Data variable.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit value of zero position of AUX, whose initial value is 74 (0100 1010 in
binary) to the output Q. Since this bit has value 0, the output is disabled.
The example above sets the value of the bit of position three of AUX to the output Q. Since this bit
has value 1, the output is enabled.
The example above sets the bit value of position ten of AUX to output Q. Since AUX is a variable of
BYTE type, it has only eight bits. Thus, the example above creates a runtime error in the block and
therefore the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “and” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "and" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.2.6.10.2.2 NOT
Block that performs a logical operation of boolean "not" in a variable, storing the result in another.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the denied Boolean value of
the Value input variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a boolean "not" operation in AUX, storing the result in AUX2.
11.2.6.10.2.3 OR
Logical block that performs an Boolean "or" operation between two variables, storing the result in a
third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “or” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "or" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.2.6.10.2.4 XNOR
Logical block that performs an Boolean "not exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “denied exclusive or”
Boolean operation of input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "denied exclusive or" Boolean operation between AUX and AUX2,
storing the result in AUX3.
11.2.6.10.2.5 XOR
Logical block that performs an Boolean "exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “xor” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "xor" Boolean operation between AUX and AUX2, storing the result in
AUX3.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical left shifts, according to the Shift value. The most significant bits
that are being discarded are returned to the least significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical left shift by one position in the VALUE variable whose initial
value is -100 (1001 1100 in binary). The discarded bits on the left are reinserted on the right. The final
result (0011 1001 in binary) is stored in RESULT.
The above example performs a logical left rotation by five positions in the VALUE variable whose initial
value is 21 (0001 0101 in binary). The discarded bits on the left are reinserted on the right. The final
result (1010 0010 in binary) is stored in RESULT.
11.2.6.10.3.2 ROR
Block that performs a logical right rotation operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical right shifts, according to the Shift value. The least significant bits
that are being discarded are returned to the most significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logic right shift by one position in the VALUE variable whose initial
value is -128 (1000 0000 in binary). The discarded bits on the right are reinserted on the left. The final
result (0100 0000 in binary) is stored in RESULT. Notice that the sign is not preserved in this
operation.
The above example performs a logical right rotation by one position in the VALUE variable whose
initial value is -127 (1000 0001 in binary). The discarded bits on the right are reinserted on the left. The
final result (1100 0000 in binary) is stored in RESULT.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic left shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
Description of exemple.
Description of exemple.
11.2.6.10.4.2 ASHR
Block that performs arithmetic left shift operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic right shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs an arithmetic right shift by three positions in the VALUE variable whose
initial value is 52 (0011 0100 in binary). The bits on the right are being discarded, and on the left new
zeros are inserted. The final result (0000 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by two positions in the VALUE variable whose
initial value is -79 (1011 0001 in binary). The bits on the right will be discarded and new ones on the
left are inserted, since the arithmetic right shifts preserve the sign of the variable. The final result
(1111 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by thirteen positions in the VALUE variable
whose initial value is -128 (1000 0000 in binary). The bits on the right are being discarded, and on the
left new ones are inserted. The final result (1111 1111 in binary) is stored in RESULT.
11.2.6.10.4.3 SHL
Block that performs a binary logical left shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts left, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is 56 (0011 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (0011 1000 0000 in binary) is stored in RESULT.
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is -56 (1100 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (1100 1000 0000 in binary) is stored in RESULT. Since RESULT is SINT
type, it only accepts the first eight bits (1000 0000).
11.2.6.10.4.4 SHR
Block that performs a binary logical right shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts right, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by two positions in the VALUE variable whose initial
value is 124 (0111 1100 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 1111 in binary) is stored in RESULT.
The above example performs a logical right shift by three positions in the VALUE variable whose initial
value is -98 (1001 1110 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 0011 in binary) is stored in RESULT.
11.2.6.11 Math
11.2.6.11.1 Math Basic
11.2.6.11.1.1 ABS
Block that calculates the Value module, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the absolute value of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the absolute value of the VALUE variable whose initial value is -45,
storing the final result, 45, in RESULT.
The above example calculates the absolute value of the VALUE variable whose initial value is -45. The
final result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by
SINT type. Therefore, RESULT remains unchanged and the output is disabled.
11.2.6.11.1.2 ADD
Block that calculates the sum of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sum of Value1 and Value2
variables. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT.
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the sum of VALUE1 and VALUE2 variables. The final result -170
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.2.6.11.1.3 DIV
Block that calculates the division of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the division of Value1 and
Value2 variables. The value stored will be the exact division if Result is REAL, or, in other cases, only
the quotient. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is of REAL type, the exact value of the division is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it. Notice that the block
accepts arguments of both signs.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains unchanged
and the output is disabled.
11.2.6.11.1.4 MOD
Block that calculates the remainder of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the remainder of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains
unchanged and the output is disabled.
11.2.6.11.1.5 MUL
Block that calculates the multiplication of the values of Value1 and Value2, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the multiplication of Value1
and Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT.
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the product of VALUE1 and VALUE2 variables. The final result 224
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.2.6.11.1.6 NEG
Block that calculates the opposite (i.e., the product with -1) of a value passed by Value, storing the
result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the opposite of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the opposite of the VALUE variable whose initial value is 21, storing
the final result, -21, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -56, storing
the final result, 56, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -128. The final
result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by SINT
type. Therefore, RESULT remains unchanged and the output is disabled.
11.2.6.11.1.7 SUB
Block that calculates the subtraction between the Value1 and Value2 values, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the subtraction of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the subtraction of VALUE1 and VALUE2 variables. The final result 141
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the antilogarithm of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the minimum input value for which the block revolutions a nonzero
result. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Below the minimum values cause the block to return a null value. The block ends with
success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the maximum input value for which the block revolutions a valid result.
The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Values higher than the maximum cause the block to generate an error, the RESULT output
remains unchanged and Done output is disabled.
11.2.6.11.2.2 EXP
Block that calculates the exponential of the Euler number "and" raised to the value of Value, storing
the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the exponent of the Euler
number "and" raised to the Value variable. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the minimum input value for which the block revolutions a nonzero result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values below the minimum cause the block to return to a null value. The block ends with success
and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the maximum input value for which the block revolutions a valid result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values higher than the maximum cause the block to generate an error, the RESULT output remains
unchanged and Done output is disabled.
11.2.6.11.2.3 LN
Block that calculates the natural logarithm of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the natural logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has value zero, and Done output is
disabled.
11.2.6.11.2.4 LOG10
Block that calculates the common logarithm (base 10) of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the common logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.2.6.11.2.5 POW
Block that calculates the value of Value raised to the exponent Power, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of Value raised to
the exponent Power. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. Since the result is higher than the maximum supported by REAL type, the block
generates an error and Done output is disabled.
11.2.6.11.2.6 ROUND
Block that rounds the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the rounded value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals less than 0.5 are discarded. The block ends with success and Done output is activated.
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals greater than or equal to 0.5 promote unity value immediately above. The block ends with
success and Done output is activated.
11.2.6.11.2.7 SQRT
Block that calculates the square root value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the square root value of
Value. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.2.6.11.2.8 TRUNC
Block that truncates the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the truncated value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example truncates the value of the VALUE variable, storing the final result in RESULT.
Decimals are discarded. The block ends with success and Done output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arccosine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block generates a runtime error, since VALUE has value inferior to 1, and
Done output is disabled.
11.2.6.11.3.2 ASIN
Block that calculates the arcsine of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arcsine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block generates a runtime error, since VALUE has value superior to 1, and
Done output is disabled.
11.2.6.11.3.3 ATAN
Block that calculates the arctangent of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for positive values, is always in the first quadrant. The block ends with
success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for negative values, is always in the fourth quadrant. The block ends
with success and Done output is activated.
11.2.6.11.3.4 ATAN2
Block that calculates the arctangent of Y/X, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Y/X. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and Y, is always in the first quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and positive values of Y, is always in the second
quadrant. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and Y, is always in the third quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and negative values of Y, is always in the fourth
quadrant. The block ends with success and Done output is activated.
11.2.6.11.3.5 COS
Block that calculates the cosine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the cosine of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
11.2.6.11.3.6 SIN
Block that calculates the sine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sine of Angle. If no errors,
the Done variable is set. If there is any error in the operation, Done is not set, staying in FALSE
status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts negative input values.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts values greater than one full turn.
11.2.6.11.3.7 TAN
Block that calculates the tangent of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the tangent of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the highest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is higher than the maximum supported by SINT type, the
block generates an error and Done output is disabled.
11.2.6.11.4.2 MIN
Block that compares the values of Value1 and Value2 and stores the lowest of them in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the lowest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is lower than the minimum supported by SINT type, the
block generates an error and Done output is disabled.
11.2.6.11.4.3 SAT
Block that performs a routine for saturation of the value found in Value in accordance with the limits
for Minimum and Maximum, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it performs a comparison between Value and Minimum and
Maximum. If Value is in the range between Minimum and Maximum, Result receives the value of
Value and Q remains FALSE. If Value is higher than Maximum, Result receives Maximum and Q
receives TRUE. If Value is lower than Minimum, Result receives Minimum and Q receives TRUE. If
there is any error in the operation, Q is not set, staying in FALSE status, while Result remains with
its value unchanged.
When EN has FALSE value, Result remains unchanged and Q remains in FALSE.
Block Flowchart
Example
The above example passes the VALUE value to RESULT, since it is not lower than MINIMUM or
higher than MAXIMUM. The block ends successfully and the Q output is disabled, since there was no
saturation.
The above example passes the MAXIMUM to RESULT, since VALUE is higher than MAXIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MINIMUM to RESULT, since VALUE is lower than MINIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MAXIMUM value to RESULT, since VALUE is higher than MAXIMUM.
The block ends successfully and the Q output is activated, since there was saturation.
11.2.6.12 Module
11.2.6.12.1 USERFB
Block that performs a subroutine programmed by the user.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine programmed by the user and updates the values of the outputs
after completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Refer to section Working with USERFBs for further information.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Ladder Representation
Block Structure
Operation
When this block has a “0” value in EN, it does not execute and ENO output is zero.
RunAutomatic = TRUE
When this block has a “1” value in EN input, the drive is general enabled, no other motion block is
active, the Run/Stop command goes to "1", the speed reference value is send to drive and the ENO
output is set to “1”.
If EN input has a "0" value, and this block is active, the Run/Stop command is set to "0" and ENO
output goes to "0".
RunAutomatic = FALSE
When this block has a “1” value in EN input, the drive is general enabled, the Run/Stop command is
set to "1", no other motion block is active, the speed reference value is send to drive and the ENO
output is set to “1”.
If EN input has a "0" value and this block is active, ENO output is set to "0".
NOTE!
Check the source of speed reference and command Run/Stop for correct operation of this
block
Block Flowchart
Example
The above example shows the MW_RefVelocity block, set to Hz and the RunAutomatic command in
TRUE, if drive is general enabled and the block is enabled, the speed reference is changed.
The above example shows the MW_RefVelocity block, set to Hz and RunAutomatic command in
FALSE, if drive is general enabled, it is necessary the Run command. So, when the block be enabled,
the speed reference would be changed.
11.2.6.14 Timer
11.2.6.14.1 TON
Timer block that, when energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is FALSE, the Q output is FALSE and ET also receives the value zero.
On the edge positive transition in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state TRUE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of the block and of the routine variables.
When activated the IN input, counting is triggered. Since ET equals PT, the Q output is enabled.
Note that a change in PRESET variable is not forwarded to the PT field while the IN entry remains
enabled.
Disabling the IN input, the value of PT is updated and the Q output is disabled. When activating it
again, counting is triggered.
When ET reaches the value PT, the Q is output enabled and remains so while IN is at TRUE level.
11.2.6.14.2 TOF
Timer block that, when energized, disables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is TRUE, the Q output is also TRUE and ET also receives the value zero.
On the negative transition edge in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state FALSE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example disables the DO1 output to identify a low level in DI1 for 12 seconds, remaining
disabled until DI1 again be TRUE.
11.2.6.14.3 TP
Timer block that, when identifies it is energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
On the edge positive transition in IN, Q receives TRUE value, counting is triggered and ET is
incremented according to TIMEBASE. When ET equals PT, the Q output goes to state FALSE until
IN revolutions to FALSE. At that moment, if IN is at TRUE level, nothing happens. On the edge
positive transition in IN, ET is automatically reset.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example enables the DO1 output for six seconds at each DI1 positive transition.
11.2.6.15 Structures
Structure is a data grouping used to define a recipe or an object.
In the Ladder program, it is possible to create variables of the structure type and use them in the blocks. To
access the internal members of the structure, the '.' is used followed by its respective member.
Creating a structure
1. With the right button of the mouse on the folder Structure, click on New file.
3. Configure the structure using the buttons presented in the figure below.
4. After finishing the edition of the structure, click on the button Finish.
Editing a structure
Just double click on the desired structure, as shown in figure 4, and a window will open as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
11.2.7 Communication
11.2.7.1 Force I/O
Overview
The force inputs and outputs window is used for the values of the digital and analog inputs to be read by the
program, by values manipulated by the user, regardless their physical state. It also allows the manipulation of
the physical states of the digital and analog outputs by the user independently of the values calculated by the
program.
In order to force the device inputs and outputs, it is necessary that the online monitoring be active and the
option Run cyclically be enabled. The data are sent to the device every 2 seconds.
The values can be edited with the device disconnected. The configurations are stored in the resources and
recorded whenever the main resource selection is changed.
The data displayed on the force I/O window contain the values belonging to the resource (and configuration)
selected as main.
The force I/O window is open trough the menu Online > Force I/O:
Toolbar
The toolbar of the force window has the options to run cyclically, upload the device force configuration, enable
For each digital and analog input and output there is a selection box linked to enable the force, a status field
and an edition field.
Digital:
Analog:
NOTE!
The analog signal scale has 15 bits plus 1 bit for signal, except for SSW900 which it has only 10
unsigned bits.
11.3 CFW500
Enter topic text here.
11.3.1 Description
With a modern design and power range of 0.25 to 30 hp, the CFW500 is a high-performance variable speed
drive that assists in the speed and torque control of three-phase induction motors. The device also features
sensorless vector, vector encoder or scalar, SoftPLC, which adds functions of PLC (Programmable Logic
Controller), Pump Genius, which features dedicated functions for pumping and selectable plug-in modules,
which provide a flexible and optimized for any application.
Refer to the user's manual of the CFW500 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.3.2 Parameters
11.3.2.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.3.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.4 CFW501
Enter topic text here.
11.4.1 Description
With a modern design and power range of 0.25 to 30 hp, the CFW501 is a high-performance variable speed
drive that assists in the speed and torque control of three-phase induction motors. The device also features
sensorless vector, vector encoder or scalar, SoftPLC, which adds functions of PLC (Programmable Logic
Controller), Pump Genius, which features dedicated functions for pumping and selectable plug-in modules,
which provide a flexible and optimized for any application.
Refer to the user's manual of the CFW501 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.4.2 Parameters
11.4.2.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.4.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.5 CFW-11
Enter topic text here.
11.5.1 Description
Refer to the user's manual of the CFW-11 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.5.2 Parameters
11.5.2.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
change the values and the modification will occur on-line.
5. Modified parameters: Whenever a parameter value in the User column is different from the Monitored
column, it will be shown in red.
6. Output. This screen shows error information in case they occur during the writing or reading of the
parameters.
11.5.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.5.3 Diagnostic
11.5.3.1 Trace
11.5.3.1.1 Overview
The trace function is used to register variables* of interest of the device (such as current, voltage, speed, etc.)
when a certain event occurs in the system. Since it triggers the storage of the variables, in the system this
event is called trigger, and the user can define up to three trigger conditions and the logic to be used in them
(AND or OR logic).
The stored variables can be seen as graphics by using the WPS running on a PC connected via USB or via
serial to the device.
Below is an overview of the configuration screen of the trace function (example using SCA06).
1. Graphic Zoom. This bar contains the options to control the graphic, such as export to image file, zoom in,
zoom out, set width, set height, se all and show or not show the graphic lettering.
2. Trace Status. This item shows the present status of the trace function: not started, trigger occurred and
concluded.
3. Parameters. In this part are all the parameters that can be configured in the trace routine, such as triggers,
conditions, channels to be monitored and sampling period.
4. Graphic. In this area is the graphic after the conclusion of trace. In the lower part is the time line and on the
right are the values separated by unit of measurement.
5. Markers. The markers are within the graphic area. After the graphic is set, just click on the black marker to
create red markers (fixed). It is possible to add two fixed markers. Those fixed markers are used to
calculate the average and effective values between the two points.
6. Trace command. Below is the description of the command functions:
6.1.Read configuration: It reads the trace configuration parameters and updates the parameters on the
screen (item 3).
6.2.Save configuration: It sends the trace configuration parameters (item 3) to the equipment.
6.3.Read Data: Command used only when the trace status is concluded, that is, there is already a
concluded trace on the equipment, and you just wish to download the data without starting a new trace.
6.4.Force Trigger: Forces the trigger regardless the conditions.
6.5.Start Trace: It starts the trace function.
7. Channel Table. This table shows the data of the chosen channels, besides the possibility to hide
channels (Visible), change the channel color (Color) and set the graphic limits per unit of measurement
(Maximum).
11.5.3.1.2 Configuration
Below is a list of the necessary steps to create a trace configuration:
2. After the creation of the trace file, it is necessary to set the desired configurations in the part of parameters.
3. After making the desired configurations, just click on save configuration to send them to the equipment.
Notice that it is necessary to be connected to the equipment with the option Connect Device of the WPS.
4. After the configurations are saved, just click on Start Trace. Notice that the status of the trace function
changed to Waiting, that is, the tool is now waiting for the trigger execution to set the graphic and show the
trace values.
5. After trigger occurs, the graphic and the values will be shown in the table and the trace function status will
be Concluded.
6. If you wish, you can click on the black cursor of the graphic and add fixed cursors so that the calculation of
the average and effective values will be performed for the channels in the defined ranges.
11.6 LDW900
11.6.1 Description
The LDW900 is a high performance product directed to the lifts market for speed control, torque and PM motor
position of sinusoidal alternating current.
Its main feature is the energy regeneration option to the power grid at the time of engine braking, reducing the
consumption of electricity.
Another feature of the product is the high performance and precision control of motor shaft movement due to
operation in closed loop through position feedback provided by an encoder.
It has operator interface with six-digit LED's display for control, adjustment and display of all parameters,
connected to expansion accessories, PLC function, positioning blocks, free programming software and
CANopen communication included in the standard product.
Refer to the user manual and LDW900 programming manual for more information about the product.
Groups:
LDW: reading and writing variables of the LDW900 lift drive;
CO: reading and writing variables of the CANopen network.
Subgroups:
STS: reading variable (status);
CMD: writing variable (command).
Ladder
Real Axis
Virtual Axis
Current
Counters
CANopen
%SB6100 0 800 CO_STS_MASTER_CONTACTED The CANopen master contacted all the slaves
%SB6100 3 803 CO_STS_MASTER_INIT_FINISHED The CANopen master initialized all the slaves
CANopen
%CB6001 0 8 CO_CMD_NMT_TOGGLE NMT command transmission by the CANopen master: toggle bit
NOTE!
Below description of the real axis and virtual status:
0. Disabled.
1. Errorstop.
2. Standstill.
3. Stopping.
4. Homing.
5. Continuous Motion.
6. Discrete Motion.
7. Synchronized Motion.
Note 1: When the drive is in "Stopping" on "Errorstop" every block can be called, but only MC_Reset block is
executed;
Note 2: Attempt to enable the drive, but the drive is in fault;
Note 3: Enabling the drive and the drive is not in fault;
Note 4: MC_Stop.Done is true and MC_Stop.Execute is false;
Note 5: MC_StepDirect, MC_StepRefPulse or MC_FinishHoming.
The Oriented Start-Up can be executed during the resource creation, or throught the context menu off the
resource by selecting the option Oriented Start-Up.
1. On the Start-Up screen the main options that require configuration are the parameters P385 (Servomotor
Model) and P202 (Operation Mode).
2. According to the operation mode selected the configurator will be adjusted enabling or disabling other
options, below is a example of the options enabled when the operation mode is 5 - CANopen.
3. After the definition of the operation mode and other options, is only necessary to click on Execute Start-Up
, if it is executed properly a message informing success will be displayed otherwise a message informing
4. After the successfull execution of the Start-Up during the resource creation, the system will enable a step
named Auto-Tuning in the wizard, this step is up to the user to perform or not.
11.6.4 Auto-Tuning
The function Auto-Tuning is utilized to realize automatic adjusts on SCA-06 to obtain a better performance of
the equipment.
The Auto-Tuning can be executed during the resource creation, or throught the resource context menu by
selecting the option Auto-Tuning.
1. On the Auto-Tuning screen the options that require configuration are P582 (Rotation Direction) and if the
user program should be stopped before execution and started again after the Auto-Tuning conclusion.
2. After choosing the options is only necessary to click on Execute Auto-Tuning to start the process that
takes less than a minute. if it is executed properly a message informing success will be displayed
otherwise a message informing fail will be displayed.
The import from WLP can be executed during the resource creation.
1. To execute the import WLP function click the Import from WLP button and select the WLP project folder or
the WLP BKP file.
2. After import from WLP completed successfully click the Finish button to copy the imported files to new
resource.
Description
The cam tables from 1 to 10 are tables of fixed points, which are transmitted at the moment of the download of
the application. In order to use the tables 1 to 10, first the MC_CamTableSelect block must be executed with
the desired table and then the MC_CamIn block.
The cam tables 11 to 20 are tables of variable points. In order to use the tables 11 to 20, first the
MC_CamCalc block must be executed with the desired table and then the MC_CamIn block.
For the SCA06 equipment, it is allowed programming at most 200 fixed points and 100 variable points, seeing
that the maximum number of variable points of each table must be configured in the Max Points column, as
shown below:
In order to edit the cam table, click on the Edit button, and the cam profile editor will open, as in the figure
below:
Cam table:
NOTE!
The CAM block is always relative, so the first point of the cam table will always be master= 0 and
slave = 0.
Master speed:
Speed used to calculate the speed, acceleration and jerk of the slave.
NOTE!
The speed, acceleration and jerk of the slave must be used as reference to develop the cam
profile, where they are calculated numerically, not taking into account load, inertia, torque and
dynamics of the drive.
A point can be added by means of the add or insert point buttons or by double clicking the graphic in the
position where you wish to add the point. You can double click any region of the graphic. In case an
interpolation already exists in this region, the editor will insert this point between the two points of the
interpolation.
The point is always added as linear interpolation.
When a point is added or inserted by means of the respective buttons, the master and slave values come
zeroed. In case of point insertion, that may cause an interruption of the profile, because the master position
must always grow in relation to the origin; therefore, the value of the master and slave must be edited by
clicking on their cells in the cam table.
On the figure below, a point was inserted by double clicking:
In order to change the type of interpolation, click on the type cell in the line corresponding to the origin of the
interpolation and select the desired type.
In the figure below, the point was changed for cubic interpolation.
Now, in this curve, it is already possible to see other magnitudes besides the position, such as speed,
acceleration and jerk. For a better view of all magnitudes, we can use the Set Zoom All button according to
the figure below.
The same way, we can choose one of the magnitudes and use the Apply Selected Zoom button. In the
example below, a zoom was applied to the speed.
Another interesting tool is the cursor. In the example below, we will place the cursor in point of maximum
speed.
You must bear in mind that the speed, acceleration and jerk of the slave depend on the master speed;
therefore, it is interesting to change them so as to simulate something really close to the effective values. In
the figure below, the master speed will be changed to 1000 rpm and we will analyze the same position of the
cursor.
During the project of the cam profile, all those magnitudes must be observed, because they may be
accomplished or not due to mechanical, electrical and electronic limitations of the involved equipment.
Since the acceleration and jerk graphics are calculated taking into account the interpolation between two
points, the acceleration and jerk will be shown as equal to zero in the junctions between linear interpolations.
Although in theory we know that in a speed step the acceleration and jerk are infinite, in practice the
acceleration and jerk at this moment will also depend on the mechanical, electrical and electronic limitations
of the involved equipment. Those speed steps must be observed and considered in the project of the cam
profile. The figure below shows an example of this situation.
The CAM block offers two types of interpolation: linear and cubic. The following equations are used:
Linear:
Cubic:
where:
pe = slave position
ve = slave speed
ae = slave acceleration
je = slave jerk
pm = master position
vm = master speed
pim = master initial position
pfm = master final position
pie = slave initial position
pfe = slave final position
a = coefficient calculated by the CAM editor
b = coefficient calculated by the CAM editor
c = coefficient calculated by the CAM editor
A point can be changed by means of the cam table by using direct edition or moving the point in the graphic.
In order to move the point in the graphic, place the cursor on the point, which is marked with a red square,
click and hold it, and drag it to the new position.
When you click on the point, the cam table will move to this point, selecting the related cell.
The operation of moving the point in the graphic is interactive and calculates all the profile each time the point
is changed. The new point can be seen in the cam table.
The point is removed directly in the cam table. In order to do so, select one of the cells referring to the point
and click on the Remove Point button.
Click on one of the corners of the region you wish to zoom and hold it, and move the mouse so as to mark a
region. Then a rectangle will show on the graphic; release the button. The figure below shows an example of
this zoom.
Graphic menu
In order to access the graphic menu, right click on the graphic area, and the following menu will show.
11.6.9 Structures
Structure is a data grouping used to define a recipe or an object.
In the Ladder program, it is possible to create variables of the structure type and use them in the blocks. To
access the internal members of the structure, the '.' is used followed by its respective member.
Creating a structure
1. With the right button of the mouse on the folder Structure, click on New file.
3. Configure the structure using the buttons presented in the figure below.
4. After finishing the edition of the structure, click on the button Finish.
Editing a structure
Just double click on the desired structure, as shown in figure 4, and a window will open as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
11.7 MW500
11.7.1 Description
The MW500 is a high-performance variable speed drive for controlling three-phase induction motors with
dedicated functions and high degree of protection IP66 / NEMA4X that allow their use in applications requiring
a high level of precision and robustness. In addition, the MW500 has excellent flexibility because it can be
installed directly on the wall or mounted on the motor, reducing costs of wiring and panels.
Refer to the user's manual of the MW500 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.7.2 Parameters
11.7.2.2 Configuration
11.7.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.8 PLC300
11.8.1 Description
PLC300 is a PLC with integrated HMI, developed to meet the need of interface with the user on panels and
machines and at the same time a complete expandable PLC, fast and with several communication ports,
enabling the product to be master of CANopen networks (CAN network) and/or Modbus RTU (RS-485 network)
PLC300 is available in six different models. With our without HMI; standard or plus, and a version with HMI,
though without membrane, in which the user can personalize the PLC appearance following specifications
present in the product CD.
The identification of PLC300 is done by a two or three letter suffix. The letters have the following meaning:
H: HMI
B: Blind (without HMI)
P: Plus
S: Standard
C: Custom (without membrane)
For further details on the product, refer to PLC300 equipment's user manual.
New Functions:
ARRAY_COPY block;
SCALE block;
Conversion block MUX2;
Conversion block DEMUX2;
Conversion block BYTES_TO_DWORD;
Conversion block DWORD_TO_BYTES;
Conversion block BYTES_TO_WORD;
Conversion block WORD_TO_BYTES;
Status LED: In some undesired situation the Status LED was turning red, overwriting the green LED,
signaling PLC without application or stopped;
Numeric input fix: When using decimal places, it was truncating the value rather than rounding it at CAST
time, and it could change the value entered by the user.
PLC300 V3.41
New Functions:
ARRAY_COPY block;
SCALE block;
Conversion block MUX2;
Conversion block DEMUX2;
Conversion block BYTES_TO_DWORD;
Conversion block DWORD_TO_BYTES;
Conversion block BYTES_TO_WORD;
Conversion block WORD_TO_BYTES;
Conversion block WORDS_TO_DWORD;
Conversion block DWORD_TO_WORD;
CALL block;
System markers for accessing the function key LEDs F1...F6;
PID2 block;
IMMEDIATE_OUTPUT block also for the expansion modules;
SWAP2 block.
Status LED: In some undesired situation the Status LED was turning red, overwriting the green LED,
signaling PLC without application or stopped;
Numeric input fix: When using decimal places, it was truncating the value rather than rounding it at CAST
time, and it could change the value entered by the user.
PLC300 V3.30
New Functions:
Follow CANopen;
"Change of State" log event with variable list;
Ethernet function blocks with 128 bytes of data.
PLC300 V3.00
New Functions:
NOTE!
It's strongly recommended to always upgrade the PLC300 firmware to the latest available version.
Hardware version 1 (H1): v1.76 or higher
Hardware version 2 (H2): v2.42 or higher
Hardware version 2 w/ 1MB (H2-1MB): v3.08 or higher
PLC300 V2.40
Locking of Modbus RTU blocks when utilized in USERFB. When disabling USERFB with a Modbus RTU
block activated (which reserves the modbus master resource) other Modbus RTU blocks couldn´t be
executed anymore;
General backup in version 2.3x was presenting problems during the backup of files in SD Card; and
The Watchdog was being activated in some devices during the initialization causing it to stop responding.
NOTE!
It's strongly recommended to always upgrade the PLC300 firmware to the latest available version.
Hardware version 1 (H1): v1.76 or higher
Hardware version 2 (H2): v2.42 or higher
Hardware version 2 w/ 1MB (H2-1MB): v3.08 or higher
PLC300 V2.30
New Functions:
Hot Download: Implementation that allows the realization of hot download on the resource, in other words,
its possible to change the ladder program, screens, alarms and logs with the actual program running and
after the download conclusion the new program is executed automatically;
Watchdog: Implementation of a configurable Watchdog with minimal time of 300ms. The outputs state can
be configure in case of Watchdog, as also one exit for exclusive use;
Markers for monitoring the maximum and minimum time of scan cycle;
Markers to disable the keys HOME, SETUP and ALARM.
PLC300 V2.10
New Functions:
PLC300 V2.00
New Functions:
Creation of block P_RMAP that generates train pulses with frequency in form of "ramp";
PLC300 V1.70
New Functions:
NOTE!
It's strongly recommended to always upgrade the PLC300 firmware to the latest available version.
Hardware version 1 (H1): v1.76 or higher
Hardware version 2 (H2): v2.42 or higher
Hardware version 2 w/ 1MB (H2-1MB): v3.08 or higher
PLC300 V1.60
Creation of new instructions for program size and scan cycle reduction
PLC300 V1.50
New Functions:
o RS485_MAX_RX_BUFFER_LENGTH
o RS485_ENABLE_END_CHARACTER
o RS485_START_TX
Automatic Software Recovery (ASR) function
PLC300 V1.40
New Functions:
PLC300 V1.30
New Functions:
PLC300 V1.20
New Functions:
Tasks
o INTERVAL
o SINGLE
o EXTERN EVENT (DI9, DI10 and Z pulse)
o COUNT (DI9, DI10, A, B, Z pulses and quadrature AB)
o SYSTEM (start and stop)
Status System Markers (%S_)
o TICK_100US
o INTERVAL_TASK1_WATCHDOG...INTERVAL_TASK8_WATCHDOG
o SINGLE_TASK1_WATCHDOG...SINGLE_TASK8_WATCHDOG
o EXT_EVENT_TASK1_WATCHDOG...EXT_EVENT_TASK3_WATCHDOG
o COUNT_TASK1_WATCHDOG...COUNT_TASK8_WATCHDOG
o MAIN_TASK_WATCHDOG
o START_TASK_WATCHDOG
o STOP_TASK_WATCHDOG
Command System Markers (%C_)
o INTERVAL_TASK1_DISABLE...INTERVAL_TASK8_DISABLE
o SINGLE_TASK1_DISABLE...SINGLE_TASK8_DISABLE
o EXT_EVENT_TASK1_WATCHDOG...EXT_EVENT_TASK3_WATCHDOG
o COUNT_TASK1_DISABLE...COUNT_TASK8_DISABLE
Hardware Blocks
o IMMEDIATEINPUT
o IMMEDIATEOUTPUT
o READENC3
Coil Block
o IMMEDIATECOIL
Options to initialize or not the retentive variables and alarm history in the download.
PWM Block - frequency value of 0 Hz allowed
ReadEnc and ReadEnc2 Blocks - Value Data Type can be DINT when the counted pulses are
Quadrature_AB, allowing negative values according to the rotation direction of the encoder.
MB_WriteBinary Block - in previous versions, the block always wrote the value 1.
Variable addresses modified for access via Modbus.
PLC300 V1.10
New Functions:
PLC300 V1.00
Initial version.
11.8.3 I/O's
Hardware information can be found in the Manual of the PLC300 at the website www.weg.net.
Digital Inputs
Analog Inputs
Digital Outputs
Analog Outputs
Some markers of the BYTE type (%SB or %CB) are allocated in the same modbus address for registers. In
this case:
(L): indicates that it is the least significant byte of the WORD;
(H): indicates that it is the most significant byte of the WORD;
NOTE!
The base address was modified from 3000 to 0 in firmware version 2.10.
11.8.5 Ladder
11.8.5.1 Coil
11.8.5.1.1 DIRECTCOIL
Logical block used to assign direct values of the output variables.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example keeps the digital output DO9 permanently connected, because the value of A in
this case is the value of the left bus which is always considered high logic level (TRUE).
11.8.5.1.2 IMMEDIATECOIL
Logical block used for assigning values to standard digital outputs instantly.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the digital output corresponding to O1.
Unlike the direct coil, this block does not wait until the end of the scan cycle so that the output value
is updated; this is done at the same time the block is activated.
NOTE!
This block only works with standard digital outputs of the product.
Compatibility
Device Version
PLC300 1.20 or higher
SCA06 2.00 or higher
Diagram
Block Flowchart
Example
The above example immediately activates the internal buzzer when it detects that the power of the
CANopen bus was stopped and remains on until the power is restored.
11.8.5.1.3 INVERTEDCOIL
Logical block used for assigning values denied to output variables.
Ladder Representation
Block Structure
Operation
The block transfers the denied value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example disables the digital output DO3 when some of the digital inputs DI1 and DI2 are
with FALSE value. When both inputs are with a TRUE value, DO3 activates.
11.8.5.1.4 RESETCOIL
Logical block used for indefinite disabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers a FALSE value to the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI5.
11.8.5.1.5 SETCOIL
Logical block used for indefinite enabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers the value of A for the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI6.
11.8.5.1.6 TOGGLECOIL
Logical block used for output variables alternance.
Ladder Representation
Block Structure
Operation
When identifying a transition from FALSE to TRUE (leading edge) on A, the block reverses the status
of O1.
Diagram
Block Flowchart
Example
The above example inverts the state of the digital output DO6 to each disabling the internal buzzer.
Besides the operation as a slave, the PLC300 programmable controller also allows operation as a master for
the CANopen network. PLC300 characteristics and functions as a master for the CANopen network will be
described as follows.
By default, PLC300 programmable controller is programmed to operate as a slave for the CANopen network.
Programming the equipment as a master for the network must be done by using the WSCAN software that
also allows the configuration of the whole CANopen network. A detailed description of the WSCAN software
windows and functions must be obtained in the menu "Help" in the software itself.
After the master configuration has been created, it is necessary to download the configurations by using one
of the product's programming interfaces - refer to the user manual for further information. Once programmed as
a master for the network, in case it is necessary to delete said configurations, the function to delete the user
program - available in the Setup menu - also deletes the CANopen master configurations.
NOTE!
CANopen network is a flexible network that allows several different ways of configuring and
operating. Nonetheless, such a flexibility requires the user to have a good knowledge of the
communication functions and objects used to configure the network, as well as knowledge of the
WSCAN programming software.
PLC300 programmable controller allows the control of a group of up to 63 slaves, using the following
communication tasks and resources:
Physical characteristics - installation, connector, cable, etc. - are the same for PLC300 operating both as a
master and a slave. Address configurations and communication rate are also necessary for the operation as a
master, but these configurations are programmed by the WSCAN software according to the properties defined
for the master in the software itself.
NOTE!
Input network markers are used to map data in RPDOs, while output network markers are used
to map data in TPDOs. They can be accessed in Byte (%IB or %QB), Word (%IW or %QW), or
Double Word (%ID or %QD). Nonetheless, their function is not pre-defined and depends on the
Ladder application developed for the PLC300 controller.
Master Operation
Once programmed to operate as a master, the PLC300 programmable controller will perform the following
steps in order to perform the sequential initialization for each one of the slaves.
1. By sending the communication reset command to the whole network, so that the slaves initialize with
values known for the communication objects.
2. Equipment identification in the network, through the reading via SDO of the 1000h/00h object - Object
Identification.
3. Writing via SDO of all objects programmed for the slave, which usually include the configuration and
mapping of TPDOs and RPDOs, node guarding, heartbeat, besides the manufacturer's specific objects, in
case they are programmed.
4. Error control task initialized - node guarding or heartbeat - in case they are programmed.
5. Sending of the slave to the operating mode.
If one of these steps fails, communication error with the slave will be indicated. Depending on the
configurations, the initialization of slaves will be aborted, and the master will initialize the following slave,
returning to the slave presenting error, after trying to initialize all other slaves in the network.
Similarly, if during the operation of a slave, an error in the error control task is identified, depending on the
configurations made for the master, the slave will be automatically reset and the initialization procedure will be
performed over.
NOTE!
The communication state and the state of each slave can be observed in input system markers.
Besides the communication and configuration objects made in the WSCAN software, blocks for the monitoring
and sending of commands, which can be used during the creation of the application in Ladder for the PLC300
programmable controller, are also available. It is not necessary to use said blocks during the equipment
operation, but its use provides more flexibility and facilitates the diagnosis of communication problems during
the PLC300 programmable controller operation.
11.8.5.2.1.2 CO_MasterControlStatus
Block that allows monitoring various statuses of the CANopen network master.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the master and input requests. When Execute receives FALSE level, the inputs are
ignored and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE
level and block finished its execution.
A TRUE level DisableComm disables the CANopen communication and resets the status counters
and markers of the master.
Outputs receive TRUE level when the status of the CANopen master matches description (disabled
communication, power failure, etc.).
Block Flowchart
Example
The example above requests status data of the CANopen network master, and allows disabling
communication through DISABLE and to send commands NMT to NODEID through SEND_COMM.
The block ends successfully, Done output is activated.
11.8.5.2.1.3 CO_SDORead
Block that performs a reading of data via SDO from a remote slave in CANopen network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute it checks whether the SDO client in the specified
NodeID # address is free to send data (Busy variable at FALSE level). If so, it sends the reading
request to the object of Size# size located in Index# and SubIndex# and sets the Active output,
resetting it when receiving the response from the slave. The received data is stored in the Value
variable. If the slave is not free, the block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to Size#. It is important to check this compatibility not to generate
errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Card cannot execute the function
2 Timeout in slave response
3 Slave returned error
Block Flowchart
Example
The example above requests reading of the data size SIZE, located in INDEX - SUBINDEX, of the
NODEID device. This data is forwarded to VALUE. The block ends successfully, Done output is
activated.
11.8.5.2.1.4 CO_SDOWrite
Block that performs a writing of data via SDO from a remote slave in CANopen network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute it checks whether the SDO client in the specified
NodeID # address is free to send data (Busy variable at FALSE level). If so, it sends the writing
request to the object of Size# size located in Index# and SubIndex# and sets the Active output,
resetting it when receiving the response from the slave. If the slave is not free, the block waits Busy
go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to Size#. It is important to check this compatibility not to generate
errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Card cannot execute the function
2 Timeout in slave response
3 Slave returned error
Block Flowchart
Example
The example above requests writing of the data size VALUE, located in INDEX - SUBINDEX, of the
NODEID device. The block ends successfully, Done output is activated.
11.8.5.2.1.5 CO_SlaveStatus
Block that allows monitoring various statuses of the CANopen network master.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the slave. When Execute receives FALSE level, the inputs are ignored and the outputs
are zeroed. The Done output receives TRUE level when Execute has TRUE level and block finished its
execution.
Outputs receive TRUE level when the status of the CANopen slave indicated by address NodeID
matches description (boot error, download success, etc.).
Block Flowchart
Example
The example above requests data from the slave 20 of the CANopen network. The block ends
successfully, Done output is activated.
Besides the operation as a slave, the PLC300 programmable controller also allows operation as a master for
the Modbus RTU network. For this operation, it is necessary to observe the following points:
In order to control and monitor the Modbus RTU communication using the PLC300 programmable controller,
the following blocks were developed, and they must be used when programming in Ladder.
11.8.5.2.2.2 MB_MasterControlStatus
Block that allows monitoring various statuses of the Modbus RTU network master.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the master and input requests. When Execute receives FALSE level, the inputs are
ignored and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE
level and block finished its execution.
A TRUE level DisableComm disables the Modbus RTU communication and resets the status counters
and markers of the master. These markers and counters are displayed in the output block each
having some data corresponding to its description. Their values are also cleared at shutdown of the
master.
Block Flowchart
Example
The example above requests status data of the Modbus RTU network master, and allows disabling
communication through DISABLE. The block ends successfully, Done output is activated.
11.8.5.2.2.3 MB_ReadBinary
Block that performs a reading of up to 128 binary data (via Read Coils or Read Discrete Inputs) of a
slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus slave RTU in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT Modbus RTU slave of SLAVE address through the Read Discrete Input function.
These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.8.5.2.2.4 MB_ReadRegister
Block that performs a reading of up to 64 16-bit registers (via Read Holding Registers or Read Input
Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of registers indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting them when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT in the Modbus RTU slave of SLAVE address through the Read Input Register
function. These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.8.5.2.2.5 MB_SlaveStatus
Block that allows monitoring the status of 4 slaves of the Modbus RTU network.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
number of errors recorded for each slave. When Execute receives FALSE level, the inputs are ignored
and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE level and
block finished its execution.
The ErrorsToSetOffline # input allows registering the number of errors identified in a slave that will
feature an offline communication. AddressSlave inputs allow inserting four slave addresses to be
monitored. When this monitored slave reports the programmed number of errors, its corresponding
SlaveOffline output is set to TRUE level. If any of SlaveOffline outputs is at TRUE level, GeneralOffline
also receives TRUE level.
Block Flowchart
Example
The above example checks the number of error responses sent by the slaves 2, 4, 6 and 8 of the
Modbus RTU. If any of them is greater than 5, its SX_OFF status is led to TRUE level. The block ends
successfully, Done output is activated.
11.8.5.2.2.6 MB_WriteBinary
Block that performs a writing of up to 128 binary data (via Write Single Coil or Write Multiple Coils) in
a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. If the slave is not free, the block waits Busy go to FALSE level to resubmit
the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Coil. The block ends successfully, Done output is activated.
11.8.5.2.2.7 MB_WriteRegister
Block that performs a reading of up to sixteen 16-bit registers (via Write Single Register or Write
Multiple Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of Value values in a number of registers indicated by NumberOfData in
InitialDataAddress address using chosen function in Function# and sets the Active output, resetting it
when receiving the response from the slave. If the slave is not free, the block waits Busy go to FALSE
level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Register. The block ends successfully, Done output is activated.
Besides the operation as server, the programmable controller PLC300 also allows the operation as client of the
Modbus TCP network. For this operation, it is necessary to observe the following points:
The sending and receiving of telegrams via Ethernet interface using the Modbus TCP protocol is
programmed by using blocks in Ladder programming language. It is necessary to know the available blocks
and the Ladder programming software in order to program the network client.
The following functions are available to send requests by the Modbus TCP client:
o Function 01: Read Coils
o Function 02: Read Discrete Inputs
o Function 03: Read Holding Registers
o Function 04: Read Input Registers
o Function 05: Write Single Coil
o Function 06: Write Single Register
o Function 15: Write Multiple Coil
o Function 16: Write Multiple Registers
In order to control and monitor Modbus TCP communication using the programmable controller PLC300, the
following blocks were developed, which must be used during Ladder programming.
11.8.5.2.3.2 MBTCP_ClientControlStatus
Block that allows monitoring various statuses of the Modbus TCP network client.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the master and input requests. When Execute receives FALSE level, the inputs are
ignored and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE
level and block finished its execution.
A TRUE level DisableComm disables the Modbus TCP communication and resets the status counters
and markers of the client. These markers and counters are displayed in the output block each having
some data corresponding to its description. Their values are also cleared at shutdown of the client.
Compatibility
Device Version
PLC300 1.30 or higher
Block Flowchart
Example
The example above requests status data of the Modbus RTU network client, and allows disabling
communication through DISABLE. The block ends successfully, Done output is activated.
11.8.5.2.3.3 MBTCP_ReadBinary
Block that performs a reading of up to 128 binary data (via Read Coils or Read Discrete Inputs) of a
server on the Modbus TCP network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus TCP server in
specified address in ServerAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the server. The received data is stored in the Value variable. If the server is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Client not enabled
4 Timeout in server response
5 Server returned error
6 Failed to connect to server
7 TCP/IP connection terminated prematurely
Compatibility
Device Version
PLC300 1.30 or higher
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT – 1 in Modbus TCP server of SERVER:PORT address through the Read
Discrete Input function. These data are forwarded to VALUE. The block ends successfully, Done
output is activated.
11.8.5.2.3.4 MBTCP_ReadRegister
Block that performs a reading of up to 64 16-bit registers (via Read Holding Registers or Read Input
Registers) of a server on the Modbus TCP network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus TCP server in
specified address in ServerAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of registers indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the server. The received data is stored in the Value variable. If the server is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Client not enabled
4 Timeout in server response
5 Server returned error
6 Failed to connect to server
7 TCP/IP connection terminated prematurely
Compatibility
Device Version
PLC300 1.30 or higher
Block Flowchart
Example
The above example requests reading of a number of register data described by DATA_COUNT
positioned in the INIT1 in Modbus TCP server of SERVER:PORT address through the Read Holding
Register function. These data are forwarded to VALUE. The block ends successfully, Done output is
activated.
11.8.5.2.3.5 MBTCP_ServerStatus
Block that allows monitoring the status of 4 servers of the Modbus TCP network.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the number of errors recorded for each server. When Execute receives FALSE level, the
inputs are ignored and the outputs are zeroed. The Done output receives TRUE level when Execute
has TRUE level and block finished its execution.
The ErrorsToSetOffline # input allows registering the number of errors identified in a server that will
feature an offline communication. AddressServer inputs allow inserting four server addresses to be
monitored. If you want to leave a channel ignored, enter the value 0 in the server address. When this
monitored server reports the programmed number of errors, its corresponding SlaveOffline output is
set to TRUE level. If any of SlaveOffline outputs is at TRUE level, GeneralOffline also receives TRUE
level.
Compatibility
Device Version
PLC300 1.30 or higher
Block Flowchart
Example
The above example checks the number of error responses sent by the servers 192.168.10.100:502
and 192.168.10.102:502 of the Modbus TCP network. If any of them is greater than 40, its SX_OFF
status is led to TRUE level. The block ends successfully, Done output is activated.
11.8.5.2.3.6 MBTCP_WriteBinary
Block that performs a writing of up to 128 binary data (via Write Single Coil or Write Multiple Coils) in
a server on the Modbus TCP network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus TCP server in
specified address in ServerAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of the Value values in a number of bits indicated by NumberOfData in
InitialDataAddress address using chosen function in Function# and sets the Active output, resetting it
when receiving the response from the server. If the server is not free, the block waits Busy go to
FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Client not enabled
4 Timeout in server response
5 Server returned error
6 Failed to connect to server
7 TCP/IP connection terminated prematurely
Compatibility
Device Version
PLC300 1.30 or higher
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus TCP server at SERVER:PORT address using the
function Write Single Coil. The block ends successfully, Done output is activated.
11.8.5.2.3.7 MBTCP_WriteRegister
Block that performs a writing of up to sixteen 16-bit registers (via Write Single Register or Write
Multiple Registers) of a server on the Modbus TCP network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus TCP server in
specified address in ServerAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of Value values in a number of registers indicated by NumberOfData in
InitialDataAddress address using chosen function in Function# and sets the Active output, resetting it
when receiving the response from the server. If the server is not free, the block waits Busy go to
FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Client not enabled
4 Timeout in server response
5 Server returned error
6 Failed to connect to server
7 TCP/IP connection terminated prematurely
Compatibility
Device Version
PLC300 1.30 or higher
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus TCP server at SERVER:PORT address using the
function Write Multiple Registers. The block ends successfully, Done output is activated.
11.8.5.3 Compare
11.8.5.3.1 COMP_EQ
Block that compares the values of Value1 and Value2, enabling the output Q if both are equal.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the output Q the TRUE value if Value1 and
Value2 are the same. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated. Notice that the types of the input variables can be different
without causing execution problems.
The example above checks equality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is disabled.
11.8.5.3.2 COMP_GE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
or equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN it sends the Q output to the TRUE value if Value1 is higher
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is disabled.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is activated.
11.8.5.3.3 COMP_GT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is higher
than Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is activated.
11.8.5.3.4 COMP_LE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than or
equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is disabled.
11.8.5.3.5 COMP_LT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks minority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is activated.
The example above checks the minority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the minority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is disabled.
11.8.5.3.6 COMP_NE
Block that compares the values of Value1 and Value2, enabling the Q output if Value1 is different from
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is
different from Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks inequality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is disabled.
11.8.5.4 Contact
11.8.5.4.1 NCCONTACT
Normally closed contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the opposite value of digital input DI1 to the digital output
DO2.
11.8.5.4.2 NOCONTACT
Normally open contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the value of digital input DI1 to the digital output DO2.
11.8.5.4.3 NTSCONTACT
Falling edge transition contact.
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from TRUE to FALSE (falling edge or negative edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed or a positive pulse on
the digital input DI2 is given.
11.8.5.4.4 PTSCONTACT
Leading edge transition contact.
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from FALSE to TRUE (leading edge or positive edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed and a positive pulse on
the digital input DI2 is given.
11.8.5.5 Control
11.8.5.5.1 PID
Block that performs the function of a discrete PID controller. From the input variables, it calculates the
corresponding controller output.
Ladder Representation
Block Structure
Operation
On the positive transition edge in EN, Output receives zero value, and the block executes its
functionality as EN is at TRUE level.
When enabled, this block performs a routine PID control with the Kp, Ki and Kd parameters chosen.
The PID topology used may be the Academic or Parallel, depending on what is chosen in Type#.
Academic Form:
Parallel Form:
The levels of the output signal of the controller are saturated at value MinimumOutput and
MaximumOutput. The SelectSetPoint input level FALSE causes the SetPoint reference be adopted,
allowing the controller maintains control over the process. When SelectSetPoint goes to TRUE level,
the controller has no more domain, and ManualSetPoint becomes to be considered the output signal
of the controller.
Action# will define the feedback operation. If Action# is DIRECT, the operation will be SetPoint –
Feedback. If Action# is REVERSE, the operation will be Feedback – SetPoint.
Feedback receives the process variable considered as the plant output. Ts# receives the sampling
time for the controller and # TauSetPoint receives the time constant for the input filter of the automatic
reference.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Effects of the alteration of gains on the process
If Kp decreases, the process becomes slower; generally more stable or less oscillating; it has
less overshoot.
If Kp increases, the process responds faster; it may become more unstable or more
oscillating; it has more overshoot.
If Ki decreases, the process becomes slower, lagging to reach the "SetPoint"; it becomes
more stable or less oscillating; it has less overshoot.
If Ki increases, the process becomes faster, quickly reaching the "SetPoint"; it becomes more
unstable or more oscillating; it has more overshoot.
If Kd decreases, the process becomes slower; it has less overshoot.
If Kd increases, it has more overshoot.
NOTE!
How to improve the performance of the process through the adjustment of gains (valid for the
Academic PID)
If the performance of the process is almost good, but the overshoot is a bit high, try to: (1)
decrease Kp 20%, (2) decrease Ki 20% and/or (3) decrease Kd 50%.
If the performance of the process is almost good, but it does not have overshoot and lags to
reach the "SetPoint", try to: (1) increase Kp 20%, (2) increase Ki 20% and/or (3) increase Kd
50%.
If the performance of the process is good, but the process output is varying too much, try to:
(1) increase Kd 50%, (2) decrease Kp 20%.
If the performance of the process is bad, i.e. after start up, the transitory lasts several periods
of oscillation that reduce very slowly or never reduce at all, try to: (1) decrease Kp 50%.
If the performance of the process is bad, i.e. after start up it slowly moves towards the
"SetPoint" without overshoot, but is still very far and the process output is less than the rated
value, try to: (1) increase Kp 50%, (2) increase Ki 50%, (3) increase Kd 70%.
Block Flowchart
Example
The above example creates a loop of a digital PID form with sampling time 50 ms, using the
constants KP, KI and KD for control. Automatic reference SETPOINT, filtered by a first order filter with
time constant of 0:01 is used. The error signal is calculated as the difference between the filtered
reference and variable SAIDA_PLANTA. The controller output is saturated between the values 0.1 and
2.5 and sent to the variable ENTRADA_PLANTA.
11.8.5.5.2 PID2
Block that performs auto tuning of a discrete PID controller. From the input variables, it calculates the
corresponding controller output PID or PI throw relay method. This block also implements the
obtained controller or another that the user wishes.
Ladder Representation
Block Structure
Operation
The operation of the PID2 block is divided into two parts: Control and Automatic Tuning.
The Tune variable defines which mode of operation. Whenever Tune = 0, the system operates in control mode,
with values of the user defined gains, in the same way as the PID block.
The control part is exactly the same as the PID block, see the PID Help.
When Tune receives a value other than 0, the automatic tuning process starts. Some rules need to be obeyed
so that tuning can occur. They will be displayed in the sequence.
The Auto-Tuning
For the Automatic Tuning, the Relay Method is used, which is based on obtaining the critical gain and
critical period , which can be used to obtain PID controller gains through several tuning rules: Ziegler-
Nichols, Ciancone-Marlin, Tyreus- Luyben, ITAE, among others.
During the tuning process, the control is switched off and a "relay" determines the output of the controller
(Output), as shown below.
At start, the relay (Output) goes to the value and after a period the output (Feedback) starts to
increase. When the output becomes higher than the value of the setpoint + hysteresis, the relay switches to
, and so on, as shown below.
Since the value of the manipulated variable (Output) stabilized at the point of operation, we have:
From the obtained subtraction curve, the necessary parameters are obtained to obtain the controller.
In order for automatic tuning to be performed properly, two criteria must be obeyed:
1) place the system at the operating point to be calibrated (the difference must be less than 20%);
2) variable , which is the manipulated variable, may not be showing oscillation greater than 20%;
OBS: you can use the Manual mode of the block to reach the operating point without large oscillations (via the
variable ).
2) Set a value for . An initial value of 10% of the manipulated variable value is recommended ( )
Ex: Assuming that to stabilize at the point of operation = 12.3. In this case, use
3) Set an initial value for . This value should be slightly larger than the noise present in the system.
An initial value of 2% of the Setpoint value can be used if no noise is known;
4) Set a value in milliseconds ( ) to . This value depends on the system being applied to the
block. Slower systems will require a longer time. It should be sufficient for at least 10 cycles of the relay to be
complete, although with 5 cycles the system generally already stabilizes;
5) Place the system in the operating point. If a pre-control has already been done, it can be applied. Another
option is to use the manual mode and vary input until the system stabilizes at the point of
operation, that is, as close as possible to ;
6) Enable tuning by choosing the type of control (PI or PID and the rule used) through the variable , as
shown in Table 2;
7) The output will inform you the status of the automatic tuning process, as shown in Table 9. At
the end of the process, the output value will be received if the calibration is performed
successfully and the outputs , and will be updated with the values obtained in the tuning
process.
Tune Controller
0 Disabled
1 Automatic PID Controller
2 Automatic PI Controller
3 Tyreus-Luyben PID Controller
4 Tyreus-Luyben PI Controller
5 PID ITAE Controller
6 PI ITAE Controller
7 Ciancone-Marlin PID Controller
8 Ciancone-Marlin PI Controller
9 Ziegler-Nichols PID Controller
10 Ziegler-Nichols PI Controller
Table 2
Table 3
The Tyreus-Luyben methods are recommended for systems with the dominant time constant in relation to the
transport delay. Ciancone-Marlin methods are recommended for systems with a long transport delay. The
minimum ITAE method is for intermediary situations.
It is recommended for initial tuning or for users without some practice with the method of the relays, the use of
automatic 1 or 2 for , leaving the system to choose the most appropriate way.
After tuning, the method can be changed causing a new controller to be calculated without re-tuning, since the
required data is stored internally. This allows other methods to be easily experienced.
Block Flowchart
N/A
Example
11.8.5.6 Conversion
11.8.5.6.1 BCD
11.8.5.6.1.1 BCD_TO_WORD
Block that performs the conversion of a BCD code into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BCD and converts it to
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example converts the VALUE variable, in BCD, into a WORD value storing the final result
in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.1.2 WORD_TO_BCD
Block that performs the conversion of a WORD value into a BCD code.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BCD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BCD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.2 BOOL
11.8.5.6.2.1 BYTE_TO_BOOL
Block that performs the conversion of a BYTE value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BYTE, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.2.2 DWORD_TO_BOOL
Block that performs the conversion of a DWORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in DWORD, into a BOOL value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.2.3 REAL_TO_BOOL
Block that performs the conversion of a REAL value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in REAL, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice in the
last example that the values very close to the machine epsilon may result in an interpretation of the
FALSE value.
11.8.5.6.2.4 WORD_TO_BOOL
Block that performs the conversion of a WORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.3 BYTE
11.8.5.6.3.1 BOOL_TO_BYTE
Block that performs the conversion of a BOOL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.3.2 DWORD_TO_BYTE
Block that performs the conversion of a DWORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.8.5.6.3.3 DWORD_TO_BYTES
Block that performs the conversion of a 32 bits (DWORD) value into four 8 bits (4 BYTES) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
four BYTE values (from Result1 to Result4, where Result 1 is LSB), storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into four BYTE value
storing the final result in RESULT1, RESULT2, RESULT3 and RESULT4. The block ends with
success and ENO output is activated.
11.8.5.6.3.4 REAL_TO_BYTE
Block that performs the conversion of a REAL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that the
results are truncated in decimal and only the eight least significant bits are taken into account.
11.8.5.6.3.5 WORD_TO_BYTE
Block that performs the conversion of a WORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.8.5.6.3.6 WORD_TO_BYTES
Block that performs the conversion of a 16 bits (WORD) value in two 8 bits (2 BYTES) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it in
two BYTE variables, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE "VAL_IN", in WORD, in two BYTE
values storing the final result in RESULT1 and RESULT2. The block ends with success and ENO
output is activated.
11.8.5.6.4 DWORD
11.8.5.6.4.1 BOOL_TO_DWORD
Block that performs the conversion of a BOOL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a DWORD value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.4.2 BYTE_TO_DWORD
Block that performs the conversion of a BYTE value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.4.3 BYTES_TO_DWORD
Block that performs the conversion of four 8 bits (BYTE) values into a 32 bits (DWORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value1, Value2, Value3 and Value4 values
as BYTE and converts it into a DWORD variable, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of four variables VALUE1..4, in BYTE, into a DWORD
value storing the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.4.4 REAL_TO_DWORD
Block that performs the conversion of a REAL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated. Note that the
results are truncated in decimal and only the thirty-two least significant bits are taken into account.
11.8.5.6.4.5 STRING_TO_DWORD
Block that performs the conversion of a STRING value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it reads the value of STR as STRING character by
character, performing the conversion to REAL and storing in OUT. If the first character is not
mathematically valid, the OUT output receives zero. If there are valid characters, these characters will
be converted to the end of STRING, or until it finds an invalid character.
NOTE!
If the number represented in the string is higher than the maximum supported by a DWORD, the
Result value saturates in this maximum value.
When EN has FALSE value, OUT remains unchanged and DONE remains FALSE.
The DONE value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
The following examples show various conversions of STRING into values of DWORD type. All
conversions enable the DONE output to the end of the operation.
The conversion above was successfully completed. The underscore is a valid mathematical character.
The conversion above was successfully completed. The decimal point is not mathematically valid for
decimals and ends the conversion, truncating the result to what had already been converted.
The conversion above was not successfully completed. The first character was not identified as
mathematically valid, and the output was zeroed.
11.8.5.6.4.6 WORD_TO_DWORD
Block that performs the conversion of a WORD value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in WORD, into a DWORD value storing the final
result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.4.7 WORDS_TO_DWORD
Block that performs the conversion of two 16 bits (WORD) values into a 32 bits (DWORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value1 and Value2 values as WORD and
converts it into a DWORD variable, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of two variable VALUE1 and VALUE2, in WORD, into a
DWORD value storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.8.5.6.5 Rad-Deg
11.8.5.6.5.1 DEG_TO_RAD
Block that performs the conversion of a value in degrees into a value in radians.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as in degrees and converts it
into radians, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in degrees, into a corresponding value
in radians storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.8.5.6.5.2 RAD_TO_DEG
Block that performs the conversion of a value in radians into a value in degrees.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as in radians and converts it
into degrees, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in radians, into a corresponding value
in degrees storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.8.5.6.6 REAL
11.8.5.6.6.1 BOOL_TO_REAL
Block that performs the conversion of a BOOL value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.6.2 BYTE_TO_REAL
Block that performs the conversion of a BYTE value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.6.3 DWORD_TO_REAL
Block that performs the conversion of a DWORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.6.4 STRING_TO_REAL
Block that performs the conversion of a STRING value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it reads the value of STR as STRING character by
character, performing the conversion to REAL and storing in DONE. If the first character is not
mathematically valid, the OUT output receives zero. If there are valid characters, these characters will
be converted to the end of STRING, or until it finds an invalid character.
NOTE!
The block interprets the dot (.) as a decimal tab, and not the comma (,).
When EN has FALSE value, OUT remains unchanged and DONE remains FALSE.
The DONE value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
The following examples show various conversions of STRING into values of REAL type. All
conversions enable the DONE output to the end of the operation.
The conversion above was successfully completed. The decimal point is a valid mathematical
character.
The conversion above was successfully completed. The dash and decimal point are valid
mathematical characters.
The conversion above was successfully completed. The dash and the power indicator of 10 "and" are
valid mathematical characters.
The conversion above was not successfully completed. The first character was not identified as
mathematically valid, and the output was zeroed.
The conversion above was successfully completed. The "p" character is not mathematically valid and
ends the conversion, truncating the result to what had already been converted.
11.8.5.6.6.5 WORD_TO_REAL
Block that performs the conversion of a WORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.7 STRING
11.8.5.6.7.1 DWORD_TO_STRING
Block that performs the conversion of a DWORD value into a STRING value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the IN value as DWORD and converts it into
STRING, storing in Result.
NOTE!
If the number represented has more digits than the capacity of the STRING, the value will be
truncated.
When EN has FALSE value, OUT remains unchanged and DONE remains FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
The following examples show various conversions of DWORD type values into STRING. All
conversions enable the DONE output to the end of the operation.
The above conversion was successful, but the size of the result of the conversion is greater than the
OUT size, and this has been truncated.
The above conversion was successful, but the size of the result of the conversion is greater than the
OUT size, and this has been truncated.
11.8.5.6.7.2 REAL_TO_STRING
Block that performs the conversion of a REAL value into a STRING value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the IN value as REAL and converts it into
STRING, storing in OUT and sending TRUE to the DONE output.
NOTE!
If the number represented has more digits than the capacity of the STRING, the value will be
truncated.
When EN has FALSE value, OUT remains unchanged and DONE remains FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
The following examples show various conversions of REAL type values into STRING. All conversions
enable the DONE output to the end of the operation.
The above conversion was successful, but the size of the result of the conversion is greater than the
OUT size, and this has been truncated.
11.8.5.6.8 WORD
11.8.5.6.8.1 BOOL_TO_WORD
Block that performs the conversion of a BOOL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.8.2 BYTE_TO_WORD
Block that performs the conversion of a BYTE value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.8.5.6.8.3 BYTES_TO_WORD
Block that performs the conversion of two 8 bits (BYTE) values into a 16 bits (WORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value1 and Value2 values as BYTE and
converts it into a WORD variable, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of two variable VALUE1 and VALUE2, in BYTE, into a
WORD value storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.8.5.6.8.4 DWORD_TO_WORD
Block that performs the conversion of a DWORD value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Notice that only the
sixteen least significant bits are taken into account.
11.8.5.6.8.5 DWORD_TO_WORDS
Block that performs the conversion of a 32 bits (DWORD) value in two 16 bits (2 WORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the value as DWORD and converts it in two
WORD variables (Result1 and Result2), storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of a variable VALUE, in DWORD, in two WORD values
storing the final result in RESULT1 and RESULT2. The block ends with success and ENO output is
activated.
11.8.5.6.8.6 REAL_TO_WORD
Block that performs the conversion of a REAL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Note that the results
are truncated in decimal and only the sixteen least significant bits are taken into account.
11.8.5.7 Counter
11.8.5.7.1 CTD
Countdown block of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it decrements the CV variable until it is zero. While
CV equals zero, the output Q remains at TRUE level. By detecting high-level LD, the block loads the
PV value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. As CV has a value of zero, the Q output is
enabled.
The value of the PV variable was changed to 20, but not yet loaded.
By identifying TRUE level in LD, the block loads the PV value to CV. Since this value is greater than
zero, the Q output is disabled.
At each leading edge identified in CD, the value of COUNT is decremented until it reaches zero, when
the Q output is enabled.
11.8.5.7.2 CTU
Block for gradual count of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it increments the CV variable until it is equal to PV.
While CV equals PV, the output Q remains at TRUE level. By detecting high-level R, the block loads
the zero value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. Since CV has a lower value than of PV, the
Q output is disabled.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the Q output is enabled.
By identifying TRUE level in R, the block loads the zero value to CV. Since this value is lower than of
PV, the Q output is disabled.
11.8.5.7.3 CTUD
Block for gradual count and countdown of input pulses.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it acts as a CTD block and block CTU at the same time
acting on the same CV counter. That is: increments CV until it reaches PV to the leading edges in
CU and decrements CV until it reaches zero to the leading edges in CD. A positive transition in R
carries zero in CV, while a leading edge in LD loads the PV value in CV. If CV has zero value, QD
receives TRUE, and if CV has value equal to PV, QU receives TRUE.
The ENO value forwards to the next Ladder block the EN value.
Block Flowchart
Operation Diagram
Example
The example above shows the disabled block, with all its internal variables zeroed. Although the
external controls are activated, these values are not forwarded to the instance of the block.
When activated, the block identifies the value of PRESET, loading it in PV, and identifies that the
output is at zero, enabling the QD output. When execution is completed, the ENO output is activated.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the QU output is enabled. When execution is completed, the ENO output is activated.
At each leading edge detected in CD, the CV value is decremented. When CV is a value between
zero and PV, both QD and QU outputs are deactivated. When execution is completed, the ENO
output is activated.
A TRUE value in R resets CV, while a TRUE value in LD loads the value of PV to CV. As we can see,
R prevails over LD, leaving CV and enabling the QD output. When execution is completed, the ENO
output is activated.
Ladder Representation
Block Structure
Operation
This block, when it has a value of TRUE in EN, copies LEN values from the POS_SRC position from
the input array (VAR_SRC) to the position POS_DST into the destination array (Result).
Comments:
- POS_SRC, POS_DST and LEN input variables only accept positive integers. If a negative value is
assigned to any of them, the value zero will be considered.
- The Input Array can be repeated on the output without worrying about data being overwritten.
- If the amount of data to be copied defined by LEN exceeds the last position of the input array, only
valid data will be copied to the last position of the input array, thus avoiding any garbage being
assigned to the output array.
- If the amount of data to be copied defined by LEN exceeds the last position of the output array, only
the data required to complete it will be copied, preventing subsequent memory from receiving
unwanted values.
- The block will not execute if LEN has a value greater than the size of the input array.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
It is important to notice that not only LEN but also POS_SRC will not exceed the
VAR_SRC array's size. The same must be noticed when setting values to POS_DST,
related to the output array Result.
To learn how to create arrays please go to: Ladder > Editor > Variables > Editing in
the Rung
Block Flowchart
Example
In the examples above the value of the variable SRC is copied to DST array, according to source
position (POS_SRC), destination (POS_DST) and the lenght to be copied (LEN). The block ends with
success and ENO output is activated.
11.8.5.8.2 DEMUX
Block that creates 16 new BOOL variables from the decomposition of a WORD variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in Word 15 Boolean
values stored in Bit0 to Bit15 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYWORD in Boolean values, which are stored in the
output variables BIT0 to Bit15. The block ends successfully and the ENO output is activated.
11.8.5.8.3 DEMUX2
Block that creates 32 new BOOL variables from the decomposition of a DWORD variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in DWord 32 Boolean
values stored in Bit0 to Bit31 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYDWORD in Boolean values, which are stored in the
output variables BIT0 to Bit31. The block ends successfully and the ENO output is activated
11.8.5.8.4 ILOAD
Block which indirectly loads the value of a variable and transfers it to Value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the of the Address variable belonging to
the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of the address 40 of group 2 (GLOBAL_SYSTEM%S), which
represents the status of ESC key in UINT format for the VALUE variable. The block ends with
success and ENO output is activated.
11.8.5.8.5 ILOADBOOL
Block that indirectly loads the value of a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the Bit contents of the Address variable
belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of bit 1 of the address 24 of group 2 (S GLOBAL_SYSTEM%),
which represents the status of ESC key for the VALUE variable. The block ends with success and
ENO output is activated.
11.8.5.8.6 ISTORE
Block that indirectly loads the Value value in a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the contents of the Address
variable belonging to the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the VALUE value in WORD format in address 444 of group 3
(GLOBAL_SYSTEM% C), which represents the index of the communication port Modbus TCP. The
block ends with success and ENO output is activated.
11.8.5.8.7 ISTOREBOOL
Block that indirectly loads the Value value in a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the Bit contents of the Address
variable belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of VALUE in bit 7 of the address 121 in group 3
(GLOBAL_SYSTEM% C), which represents the disable command of CANopen communication. The
block ends with success and ENO output is activated.
11.8.5.8.8 MUX
Block that creates a new WORD variable from the concatenation of 16 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable Word. Bit0 corresponds to LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYWORD. The block ends with success and ENO output is activated.
11.8.5.8.9 MUX2
Block that creates a new DWORD variable from the concatenation of 32 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable DWord. Bit0 corresponds to LSB (least significant bit) and Bit31
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYDWORD. The block ends with success and ENO output is activated.
11.8.5.8.10 ReadRecipe
Block that gets the recipe from a recipe file and sends it to a variable.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in Execute, it gets the data from the selected recipe by the
INDEX index in the # FILENAME file and sends them to the DST. If everything goes successfully, Q
receives TRUE and remains so while Execute is TRUE.
NOTE!
Recipes stored in RAM is identified by 'RECIPE_NAME'. Recipes stored on the SD card are
identified by 'RECIPE_NAME.CSV'.
If there is any error in the execution, the Error output is activated and ErrorID displays an error code
according to the table below.
Code Description
1 Incomplete recipe
2 Invalid structure
3 Nonexistent recipe
4 Invalid file
5 Invalid file or nonexistent SD card
6 SD card blocked for w riting
7 SD card busy (log or other use)
Block Flowchart
Example
The above example searches the index 3 of the recipe file stored in RAM 'RECIPE_RAM'. The block
does not find the specified file, enabling the ERROR output with ERRORID with value 5 and disabling
the Q output.
The above example searches the index 3 of the recipe file stored in RAM 'RECIPE_RAM'. The block
finds the specified file, but does not find the index 3, enabling the ERROR output with ERRORID with
value 3 and disabling the Q output.
The above example searches the index 3 of the recipe file stored in RAM 'RECIPE_RAM'. The block
finds the file and the specified index, stores values in DST, disables the ERROR output and enables
Q output.
11.8.5.8.11 SCALE
Block that converts a value from a scale to another one.
Ladder Representation
Block Structure
Operation
This block, when it has a TRUE value in EN, by setting the minimum and maximum values of the
variable to be converted and the minimum and maximum values of the new scale variable, defined by
the user, performs the Scale function for the conversion of the variable according to equation:
Where:
and
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
- The value in MAXin must be greater than value in MINin;
- The value in MAXout must be greater than value in MINout ;
- Value in Value according to: MINin = Value = MAXin.
Block Flowchart
Example
The example above stores the value of the variable VALUE in Result. The block considers the
equation described above and ends with success and ENO output is activated.
11.8.5.8.12 SEL
Block that replicates to the output the value of an input variable (Value0 or Value1) according to the
Selector selection.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it replicates to the Result variable the Value0 value if
selector is FALSE or the Value1 value if Selector is TRUE.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
TRUE level, the RESULT output gets the value of VALUE1. The block ends successfully and the ENO
output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
11.8.5.8.13 STORE
Block that performs direct storage of data from a source to a destination.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it stores the contents from SRC into DST.
NOTE!
SRC and DST must have data types of the same size.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated.
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated. Note that the binary pattern is maintained between variables of different
types.
11.8.5.8.14 SWAP
Block that performs a swap between the odd bytes and consecutive even bytes into Value and sends
the value to Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it changes the values of the odd bytes (1, 3, 5 and 7) and
the consecutive even bytes (2, 4, 6 and 8, respectively) of the Value variable, storing the result in
Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTA!
Caution when using in Result a variable of REAL type, because the block does not
perform type conversion, that is, it only reverses the bytes in memory.
Block Flowchart
Example
The example changes the position of byte 1 value of VALUE (0x44) with byte 2 of VALUE (0x3D),
storing the final result (0x44_3D) in RESULT. The block ends with success and ENO output is
activated.
The example changes the position of byte 1 value of VALUE (0x96) with byte 2 of VALUE (0xA8) and
byte 3 of VALUE (0x0D) with byte 4 of VALUE (0x00), storing the final result (0x0D_00_96_A8) in
RESULT. The block ends with success and ENO output is activated.
11.8.5.8.15 SWAP2
Block that rearranges the bytes of a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it rearranges the bytes from Value variable, storing the
result in Result.
Type defines how the bytes will be rearranged, as shown in Table 2.
Note that for 16-bit variables, only options 0 and 1 are valid.
For 32-bit variables the options 0, 1, 2, and 3 are valid.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Invalid TYPE options assigns FALSE to ENO, and Result value is not changed.
NOTA!
Caution when using in Result a variable of REAL type, because the block does not
perform type conversion, that is, it only reverses the bytes in memory.
Block Flowchart
Example
The example rearranges the position of value VALUE_IN according to the type set in TYPE_IN = 1
(AB->BA), storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.8.5.8.16 WriteRecipe
Block that writes a recipe into a recipe file from a variable.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in Execute, it gets the data from SRC file and sends them
to the recipe file selected by the INDEX index in the FILENAME#. If everything goes successfully, Q
receives TRUE and remains so while Execute is TRUE.
NOTE!
Recipes stored in RAM is identified by 'RECIPE_NAME'. Recipes stored on the SD card are
identified by 'RECIPE_NAME.CSV'.
If there is any error in the execution, the Error output is activated and ErrorID displays an error code
according to the table below.
Code Description
1 Incomplete recipe
2 Invalid structure
3 Nonexistent recipe
4 Invalid file
5 Invalid file or nonexistent SD card
6 SD card blocked for w riting
Block Flowchart
Example
The above example attempts to write the contents of SRC in the index 4 of the recipes file stored in
SD card 'RECIPE_SD.CSV'. The block does not find the specified file, enabling the ERROR output
with ERRORID with value 5 and disabling the Q output.
The above example attempts to write the contents of SRC in the index 4 of the recipes file stored in
SD card 'RECIPE_SD.CSV'. The block finds the specified file, but does not find the index 4, enabling
the ERROR output with ERRORID with value 3 and disabling the Q output.
The above example attempts to write the contents of SRC in the index 4 of the recipes file stored in
SD card 'RECIPE_SD.CSV'. The block finds the file and the specified index, stores values in the
recipe, disables the ERROR output and enables Q output.
11.8.5.9 Filter
11.8.5.9.1 LOWPASS
Block that filters the input using a low pass filter of first order and inserts the result in the output.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, filters the input value of Input using a low pass first order
filter described by Tau and Ts#, inserting the result in Output. On the leading edge of EN, Output
receives zero.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example causes OUTPUT, by identifying a leading edge in EN, to display a behavior of first
order with time constant equal to Tau and the sampling time of 2 ms, in order to achieve the reference
set to INPUT. At each calculation completed successfully, the ENO output is activated.
11.8.5.10 Hardware
11.8.5.10.1 IMMEDIATE_INPUT
Block that performs an instantaneous reading of the selected input value, without changing the value
of images (GLOBAL_IO variables).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it gets the immediate value of the selected input in
Source#. If selected the analog input AI1, its value is passed on to Destination. If the digital input is
selected, its bits are concatenated so that DI1 be the least significant bit and DI10 be the most
significant bit and the result is sent to Destination.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 1.20 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The example above is an immediate reading of the signs of the digital inputs DI1 to DI10 of the
PLC300. This reading is then interpreted as a binary sequence with DI1 being the least significant bit
and the result is sent to the DESTINATION variable. The block ends with success, ENO output is
activated.
11.8.5.10.2 IMMEDIATE_OUTPUT
Block that performs an instantaneous reading of the selected output port, without changing the value
of images (GLOBAL_IO variables).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it writes immediately in the selected output the value of
Source. If selected analog output AO1, the Source value is passed on to it. If the digital outputs are
selected, DO1 will receive the zero bit of Source, DO2 bit one, DO3 bit two, and so on.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 1.20 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example is for immediate SOURCE written value, interpreted as a binary sequence, the
digital outputs DO1 to DO9 of the PLC300 and DO1 receives the value of the least significant bit. The
block ends with success, ENO output is activated. Note that the immediate writing does not prevail
over direct coil DO1 or over enabling coils in DO2, DO3 and DO4.
11.8.5.10.3 P_RAMP
Block that generates a PWM signal with a certain numer of pulses at the digital output DO9,
respecting a ramp of rise and fall in frequency..
Ladder Representation
Block Structure
Operation
When the EN input is TRUE, the block generates a PWM signal at output DO9. Initially, it generates
a rise ramp, ranging from zero frequency to Frquency value (between 0 and 200 KHz), based on the
Time and Steps settings. At the appropriate time, the block generates a descent ramp, with the same
profile as the rise ramp, until the frequency is zero and the Pulses value is reached.
When the Pulses value is reached, the DONE output goes to TRUE.
If the EN input goes to FALSE before reaching the Pulses number, the PWM generation stops
immediately.
The duty cycle of the signal remains constant at 0.5 throught the block execution.
For wich the frequency ramp is generated, it is necessary thet the number of Steps is less or equal
than to a quarter of the Frequency value, that is:
Steps = (1/4) . Frequency
If this limitation is not respected, the frequency ramp will not be generated. It means that PWM signal
goes directly to the Frequency value.
Example: If the Frequency value is 100 Hz, for the frequency ramp to be generated, the number of
Steps must be less or equal than 25.
NOTE!
Having other PWM blocks running, whichever is called first will have priority.
NOTE!
This block has priority over any coil that is writing data in DO9.
Compatibility
Device Version
PLC300 2.00 or higher
Block Flowchart
Example
The above example enables a PWM signal in DO9 output with initial frequency 0 Hz and duty cycle of
50%. The rise time of the ramp frequency is 500 ms, and the ramp has 5 frequency steps (0, 50, 100,
150 and 200 Hz). In total executing the block, 1000 pulses will be sent to the output. The block ends
with success, Q output is activated.
11.8.5.10.4 PWM
Block that inserts a PWM signal on digital output DO9.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it inserts into DO9 a PWM signal with a given frequency in
Frequency (between 0 and 300 kHz) and pulse width determined by Width (between 0 and 1000,
where 1000 would be 100% active cycle).
NOTE!
This block has priority over any coil that is writing data in DO9.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example enables a PWM signal in DO9 output with frequency 500 Hz and duty cycle of
20%. The block ends with success, Q output is activated.
11.8.5.10.5 READENC
Block that continuously reads the pulse value of an encoder according to a type of reading chosen.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it gets the number of pulses counted in the encoder, as
selected in Source #, and transfers them to Value. At each leading edge, Value is reset to zero.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example, when identifying a leading edge on DI1, starts counting the number of pulses in
the encoder connected in quadrature conformation AB, storing the value in VALUE. The block ends
with success, ENO output is activated.
11.8.5.10.6 READENC2
Block that reads the pulse value of an encoder according to a type of reading chosen, interpreting it
as a fraction of revolutions.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it gets the number of pulses counted in the encoder, as
selected in Source #, and transfers them to Value. At each leading edge, Value is reset to zero.
When Value increases and reaches the value of Pulses, Value receives zero. When Value
decrements and tends to reach a value of -1, Value receives the value in Pulses. This way, Value
always displays the result in fraction of revolutions.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example, when identifying a leading edge on DI1, starts counting the number of pulses in
the encoder connected in quadrature conformation AB. PULSES_IN_TURN is the value of pulses to
complete a turn. If the value read is higher, the counting restarts from zero. If the value read is
negative, counting restarts from PULSES_IN_TURN. The resulting value is stored in VALUE. The
block ends with success, ENO output is activated.
11.8.5.10.7 READENC3
Block that reads the value of pulses from an encoder according to a chosen type of reading,
calculating differentials between calls to the block.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it gets the number of pulses counted in the encoder since
energizing of the PLC300, as selected in Source#, and transfers them to Value. The value of Delta is
the difference between the pulses counted in this run and the previous run.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above when identifying a leading edge on DI1, gets the number of pulses on input A
since the energizing of the equipment, storing the value in VALUE. The difference between the current
value and the value previously read is stored in DIFFERENCE. The block ends with success, ENO
output is activated.
11.8.5.10.8 READENC4
Block that reads the value of pulses from an encoder according to a chosen type of reading,
displaying to the user his current position in revolutions and the speed in RPM.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it gets the number of encoder pulses counted since
energization of the PLC300 as selected on SOURCE #, and calculates the number of absolute
revolutions through the PPR argument, inserting the result in POSITION. The value of SPEED is
calculated by means of an internal time base of the block. Further, the block allows filtering of the
signal with an output filter determined by FILTER.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
The example above when identifying a leading edge on DI1, gets the number of pulses of the encoder
connected in quadrature conformation in the fast inputs since energization equipment.
PULSES_IN_TURN is the value of pulses to complete a turn. TURNS stores the value of the pulses
interpreted as revolutions, according PULSES_IN_TURN, and SPEED stores the current speed of the
encoder. The block ends with success, ENO output is activated.
11.8.5.11 Logic
11.8.5.11.1 Logic Bit
11.8.5.11.1.1 RESETBIT
Logical block used to perform reset of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, resets the bit indicated in Position in the Data variable
that is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the reset of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above resets the bit of AUX zero position, whose initial value is 200 (1100 1000, in
binary). Since this bit already had FALSE value, nothing has changed.
The example above resets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above resets the bit in position nine of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.8.5.11.1.2 SETBIT
Logical block used to perform the set of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sets the bit indicated in Position in the Data variable that
is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the set of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit of AUX zero position, whose initial value is 153 (1001 1001, in binary).
Since this bit already had TRUE value, nothing has changed.
The example above sets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above sets the bit in position fifteen of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.8.5.11.1.3 TESTBIT
Logical block that revolutions the value of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sends to the output Q the bit value indicated in Position
in the Data variable.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit value of zero position of AUX, whose initial value is 74 (0100 1010 in
binary) to the output Q. Since this bit has value 0, the output is disabled.
The example above sets the value of the bit of position three of AUX to the output Q. Since this bit
has value 1, the output is enabled.
The example above sets the bit value of position ten of AUX to output Q. Since AUX is a variable of
BYTE type, it has only eight bits. Thus, the example above creates a runtime error in the block and
therefore the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “and” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "and" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.8.5.11.2.2 NOT
Block that performs a logical operation of boolean "not" in a variable, storing the result in another.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the denied Boolean value of
the Value input variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a boolean "not" operation in AUX, storing the result in AUX2.
11.8.5.11.2.3 OR
Logical block that performs an Boolean "or" operation between two variables, storing the result in a
third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “or” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "or" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.8.5.11.2.4 XNOR
Logical block that performs an Boolean "not exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “denied exclusive or”
Boolean operation of input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "denied exclusive or" Boolean operation between AUX and AUX2,
storing the result in AUX3.
11.8.5.11.2.5 XOR
Logical block that performs an Boolean "exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “xor” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "xor" Boolean operation between AUX and AUX2, storing the result in
AUX3.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical left shifts, according to the Shift value. The most significant bits
that are being discarded are returned to the least significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical left shift by one position in the VALUE variable whose initial
value is -100 (1001 1100 in binary). The discarded bits on the left are reinserted on the right. The final
result (0011 1001 in binary) is stored in RESULT.
The above example performs a logical left rotation by five positions in the VALUE variable whose initial
value is 21 (0001 0101 in binary). The discarded bits on the left are reinserted on the right. The final
result (1010 0010 in binary) is stored in RESULT.
11.8.5.11.3.2 ROR
Block that performs a logical right rotation operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical right shifts, according to the Shift value. The least significant bits
that are being discarded are returned to the most significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logic right shift by one position in the VALUE variable whose initial
value is -128 (1000 0000 in binary). The discarded bits on the right are reinserted on the left. The final
result (0100 0000 in binary) is stored in RESULT. Notice that the sign is not preserved in this
operation.
The above example performs a logical right rotation by one position in the VALUE variable whose
initial value is -127 (1000 0001 in binary). The discarded bits on the right are reinserted on the left. The
final result (1100 0000 in binary) is stored in RESULT.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic left shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
Description of exemple.
Description of exemple.
11.8.5.11.4.2 ASHR
Block that performs arithmetic left shift operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic right shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs an arithmetic right shift by three positions in the VALUE variable whose
initial value is 52 (0011 0100 in binary). The bits on the right are being discarded, and on the left new
zeros are inserted. The final result (0000 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by two positions in the VALUE variable whose
initial value is -79 (1011 0001 in binary). The bits on the right will be discarded and new ones on the
left are inserted, since the arithmetic right shifts preserve the sign of the variable. The final result
(1111 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by thirteen positions in the VALUE variable
whose initial value is -128 (1000 0000 in binary). The bits on the right are being discarded, and on the
left new ones are inserted. The final result (1111 1111 in binary) is stored in RESULT.
11.8.5.11.4.3 SHL
Block that performs a binary logical left shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts left, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is 56 (0011 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (0011 1000 0000 in binary) is stored in RESULT.
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is -56 (1100 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (1100 1000 0000 in binary) is stored in RESULT. Since RESULT is SINT
type, it only accepts the first eight bits (1000 0000).
11.8.5.11.4.4 SHR
Block that performs a binary logical right shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts right, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by two positions in the VALUE variable whose initial
value is 124 (0111 1100 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 1111 in binary) is stored in RESULT.
The above example performs a logical right shift by three positions in the VALUE variable whose initial
value is -98 (1001 1110 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 0011 in binary) is stored in RESULT.
11.8.5.12 Math
11.8.5.12.1 Math Basic
11.8.5.12.1.1 ABS
Block that calculates the Value module, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the absolute value of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the absolute value of the VALUE variable whose initial value is -45,
storing the final result, 45, in RESULT.
The above example calculates the absolute value of the VALUE variable whose initial value is -45. The
final result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by
SINT type. Therefore, RESULT remains unchanged and the output is disabled.
11.8.5.12.1.2 ADD
Block that calculates the sum of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sum of Value1 and Value2
variables. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT.
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the sum of VALUE1 and VALUE2 variables. The final result -170
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.8.5.12.1.3 DIV
Block that calculates the division of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the division of Value1 and
Value2 variables. The value stored will be the exact division if Result is REAL, or, in other cases, only
the quotient. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is of REAL type, the exact value of the division is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it. Notice that the block
accepts arguments of both signs.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains unchanged
and the output is disabled.
11.8.5.12.1.4 MOD
Block that calculates the remainder of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the remainder of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains
unchanged and the output is disabled.
11.8.5.12.1.5 MUL
Block that calculates the multiplication of the values of Value1 and Value2, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the multiplication of Value1
and Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT.
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the product of VALUE1 and VALUE2 variables. The final result 224
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.8.5.12.1.6 NEG
Block that calculates the opposite (i.e., the product with -1) of a value passed by Value, storing the
result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the opposite of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the opposite of the VALUE variable whose initial value is 21, storing
the final result, -21, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -56, storing
the final result, 56, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -128. The final
result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by SINT
type. Therefore, RESULT remains unchanged and the output is disabled.
11.8.5.12.1.7 SUB
Block that calculates the subtraction between the Value1 and Value2 values, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the subtraction of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the subtraction of VALUE1 and VALUE2 variables. The final result 141
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the antilogarithm of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the minimum input value for which the block revolutions a nonzero
result. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Below the minimum values cause the block to return a null value. The block ends with
success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the maximum input value for which the block revolutions a valid result.
The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Values higher than the maximum cause the block to generate an error, the RESULT output
remains unchanged and Done output is disabled.
11.8.5.12.2.2 EXP
Block that calculates the exponential of the Euler number "and" raised to the value of Value, storing
the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the exponent of the Euler
number "and" raised to the Value variable. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the minimum input value for which the block revolutions a nonzero result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values below the minimum cause the block to return to a null value. The block ends with success
and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the maximum input value for which the block revolutions a valid result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values higher than the maximum cause the block to generate an error, the RESULT output remains
unchanged and Done output is disabled.
11.8.5.12.2.3 LN
Block that calculates the natural logarithm of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the natural logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has value zero, and Done output is
disabled.
11.8.5.12.2.4 LOG10
Block that calculates the common logarithm (base 10) of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the common logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.8.5.12.2.5 POW
Block that calculates the value of Value raised to the exponent Power, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of Value raised to
the exponent Power. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. Since the result is higher than the maximum supported by REAL type, the block
generates an error and Done output is disabled.
11.8.5.12.2.6 ROUND
Block that rounds the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the rounded value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals less than 0.5 are discarded. The block ends with success and Done output is activated.
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals greater than or equal to 0.5 promote unity value immediately above. The block ends with
success and Done output is activated.
11.8.5.12.2.7 SQRT
Block that calculates the square root value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the square root value of
Value. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.8.5.12.2.8 TRUNC
Block that truncates the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the truncated value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example truncates the value of the VALUE variable, storing the final result in RESULT.
Decimals are discarded. The block ends with success and Done output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arccosine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block generates a runtime error, since VALUE has value inferior to 1, and
Done output is disabled.
11.8.5.12.3.2 ASIN
Block that calculates the arcsine of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arcsine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block generates a runtime error, since VALUE has value superior to 1, and
Done output is disabled.
11.8.5.12.3.3 ATAN
Block that calculates the arctangent of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for positive values, is always in the first quadrant. The block ends with
success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for negative values, is always in the fourth quadrant. The block ends
with success and Done output is activated.
11.8.5.12.3.4 ATAN2
Block that calculates the arctangent of Y/X, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Y/X. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and Y, is always in the first quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and positive values of Y, is always in the second
quadrant. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and Y, is always in the third quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and negative values of Y, is always in the fourth
quadrant. The block ends with success and Done output is activated.
11.8.5.12.3.5 COS
Block that calculates the cosine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the cosine of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
11.8.5.12.3.6 SIN
Block that calculates the sine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sine of Angle. If no errors,
the Done variable is set. If there is any error in the operation, Done is not set, staying in FALSE
status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts negative input values.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts values greater than one full turn.
11.8.5.12.3.7 TAN
Block that calculates the tangent of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the tangent of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the highest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is higher than the maximum supported by SINT type, the
block generates an error and Done output is disabled.
11.8.5.12.4.2 MIN
Block that compares the values of Value1 and Value2 and stores the lowest of them in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the lowest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is lower than the minimum supported by SINT type, the
block generates an error and Done output is disabled.
11.8.5.12.4.3 SAT
Block that performs a routine for saturation of the value found in Value in accordance with the limits
for Minimum and Maximum, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it performs a comparison between Value and Minimum and
Maximum. If Value is in the range between Minimum and Maximum, Result receives the value of
Value and Q remains FALSE. If Value is higher than Maximum, Result receives Maximum and Q
receives TRUE. If Value is lower than Minimum, Result receives Minimum and Q receives TRUE. If
there is any error in the operation, Q is not set, staying in FALSE status, while Result remains with
its value unchanged.
When EN has FALSE value, Result remains unchanged and Q remains in FALSE.
Block Flowchart
Example
The above example passes the VALUE value to RESULT, since it is not lower than MINIMUM or
higher than MAXIMUM. The block ends successfully and the Q output is disabled, since there was no
saturation.
The above example passes the MAXIMUM to RESULT, since VALUE is higher than MAXIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MINIMUM to RESULT, since VALUE is lower than MINIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MAXIMUM value to RESULT, since VALUE is higher than MAXIMUM.
The block ends successfully and the Q output is activated, since there was saturation.
11.8.5.13 Module
11.8.5.13.1 CALL
Block that loads a file and do a ladder call.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine loading the file and updates the values of the outputs after
completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 4.03 or higher
Block Flowchart
Example
In the example below, the POU 'Program2' will be executed through the 'Main Ladder'.
11.8.5.13.2 USERFB
Block that performs a subroutine programmed by the user.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine programmed by the user and updates the values of the outputs
after completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Refer to section Working with USERFBs for further information.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
11.8.5.14 RTC
11.8.5.14.1 INTIME
Block that performs a programmed enabling for a time based on RTC (Real Time Clock).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it has two modes of operation. If Q_OPTION# is Normal, Q
is enabled when the internal clock's time is equal to that defined by the parameters TIMEON and
disabled when the internal clock's time is equal to the parameters set by TIMEOFF. If Q_OPTION# is
Inverted, Q is disabled when the internal clock's time is equal to that defined by the parameters
TIMEON and enabled when the internal clock's time is equal to the parameters set by TIMEOFF.
Block Flowchart
Example
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is lower than the registered enabling
inputs of the block (HOUR_ON, MINUTE_ON and SECOND_ON). This way, the Q output is disabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is equal to the registered in the
enabling inputs of the block (HOUR_ON, MINUTE_ON and SECOND_ON). This way, the Q output is
disabled.
In the above example, the INTIME block is disabled. This way, regardless of the input, the Q output is
disabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is equal to the registered in the
disabling inputs of the block (HOUR_OFF, MINUTE_OFF and SECOND_OFF). This way, the Q
output is enabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is superior to the registered in the
disabling inputs of the block (HOUR_OFF, MINUTE_OFF and SECOND_OFF). Thus, the Q output is
disabled.
11.8.5.14.2 INWEEKDAY
Block that performs a programmed enabling for weekdays based on RTC (Real Time Clock).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it has two modes of operation. If Q_OPTION# is Normal, Q
is enabled if the day of week of the internal clock has Enabled parameter in the block. If Q_OPTION#
is Inverted, Q is disabled if the day of week of the internal clock has Enabled parameter in the block.
NOTE!
The weekdays are identified by numbers, with Sunday being day 0 and Saturday day 6.
Block Flowchart
Example
In the above example, the INWEEKDAY block is disabled. This way, regardless of the input, the Q
output is disabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
NORMAL operation. The current day of the week of the device's internal clock is Wednesday (value
3), which has ENABLED status in the programming. This way, the Q output is enabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
NORMAL operation. The current day of the week of the device's internal clock is Thursday (value 4),
which has DISABLED status in the programming. Thus, the Q output is disabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
INVERTED operation. The current day of the week of the device's internal clock is Thursday (value 4),
which has DISABLED status in the programming. This way, the Q output is enabled.
11.8.5.15 Screen
11.8.5.15.1 SETSCREEN
Block that displays a particular screen in the HMI.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on EN, it displays the screen represented by the HMI
NUMBER.
Q receives TRUE for one scan cycle if the screen number is valid.
Block Flowchart
Example
In the beginning, it is considered TELA_3 with FALSE value, activating the input
SETSCREEN_INST_0 block that displays the HOME.
By identifying a pulse in DI1, TELA_3 receives TRUE value, activating the input SETSCREEN_INST_1
block that displays screen 3.
Even with the signal DI1 removed, TELA_3 continues with the TRUE value, that is, the screen 3
remains displayed.
After the four seconds if DI1 is still TRUE, the HOME screen is still displayed. Screen 3 will only be
displayed when there is a new leading edge in DI1.
11.8.5.16 String
11.8.5.16.1 STR_COMPARE
Block that performs the comparison between STRINGs.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level by updating the value of COMP according to
the input STRINGs. The SENSITIVE input with value TRUE forces the comparison to consider
uppercase and lowercase letters, while a FALSE value ignores this differentiation. The values that
COMP can take are:
0, if both are the same;
-1, if STR1 comes first in alphabetical order;
1, if STR1 comes after in alphabetical order.
The comparison takes into account the values of the ASCII table for the characters.
The DONE value forwards to the next Ladder block the EN value when the operation is completed.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, the ASCII code for 'a', first character of STR1, is smaller than that of 'c', first
character of STR2. Thus, COMP receives the value -1. When the block is finished successfully, the
DONE output is activated.
In the above example, the ASCII code for 'a', first character of STR1, is greater than that of '.', first
character of STR2. Thus, COMP receives the value 1. When the block is ended successfully, the
DONE output is activated.
In the example above, STR1 and STR2 are the same. Therefore, COMP receives the value of 0. When
the block ends successfully, Done output is activated.
In the example above, STR1 and STR2 are the same, disregarding uppercase and lowercase
(SENSITIVE with FALSE value). Therefore, COMP receives the value of 0. When the block ends
successfully, Done output is activated.
In the example above, STR1 and STR2 are the different, considering uppercase and lowercase
(SENSITIVE with FALSE value). The ASCII code for 'a', first character of STR1, is greater than that of
'A', first character of STR2. Thus, COMP receives the value 1. When the block is ended successfully,
the DONE output is activated.
11.8.5.16.2 STR_CONCAT
Block that performs concatenation of STR1 and STR2, storing the result in DST.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of DST according to the
input STRINGs. DST receives STR1 value concatenated with STR2 value at its end.
The DONE value forwards to the next Ladder block the EN value when the operation is completed.
NOTE!
If the size of DST is less than the sum of the number of characters STR1 and STR2, the resulting
value will be truncated.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, STR1 and STR2 are concatenated, and the result is sent to DST_10. When the
block is ended successfully, the DONE output is activated.
In the above example, STR1 and STR2 are concatenated, and the result is sent to DST_6. Since the
size of DST_6 is 6, the last two characters of the concatenation are discarded. The block ends
successfully, Done output is activated.
11.8.5.16.3 STR_COPY
Block that performs a copy of a section of STR, storing the result in DST.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of DST according to the
input parameters. DST receives a number of characters from STR1 defined by LEN from the inserted
position in POS.
If POS is outside the allowable range of values (between 1 and the size of STR), DONE receives
FALSE and DST remains unchanged.
If successful, the DONE value forwards to the next Ladder block the EN value when the operation is
completed.
NOTE!
POS is treated with index "based one". That is, POS = 1 references the first position of STR.
NOTE!
If the size of DST is less than the number of characters copied from STR, the resulting value will
be truncated.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, as the value of POS is invalid, the block is not completed successfully, and the
DONE output is disabled.
In the example above, two characters are copied from position 1 of STR1, and the result is sent to
DST_2. When the block is ended successfully, the DONE output is activated.
In the example above, zero characters are copied from position 1 of STR1, and the result is sent to
DST_2. When the block is ended successfully, the DONE output is activated. Note that, when LEN is
zero, the output is always built as a null STRING.
In the example above, two characters are copied from position 4 of STR1, and the result is sent to
DST_2. When the block is ended successfully, the DONE output is activated. Note that if POS + LEN
is greater than the size of STR1, only the remaining characters from STR1 are copied, without
generating an error.
In the example above, three characters are copied from position 2 of STR1, and the result is sent to
DST_2. Since the size of DST_2 is 2, the last character copied is discarded. The block ends
successfully, Done output is activated.
11.8.5.16.4 STR_COPY_LAST
Block that performs a copy of a final section of STR, storing the result in DST.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of DST according to the
input parameters. DST receives a number of characters from STR1 defined by LEN from the final
position of STR, returning toward the beginning.
The DONE value forwards to the next Ladder block the EN value when the operation is completed.
NOTE!
If the size of DST is less than the number of characters copied from STR, the resulting value will
be truncated.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the example above, zero characters are copied from final position STR1, and the result is sent to
DST_6. When the block is ended successfully, the DONE output is activated. Note that, when LEN is
zero, the output is always built as a null STRING.
In the example above, two characters are copied from final position STR1, and the result is sent to
DST_6. When the block is ended successfully, the DONE output is activated.
In the example above, four characters are copied from final position of STR1, and the result is sent to
DST_6. When the block is ended successfully, the DONE output is activated.
In the example above, eight characters are copied from final position STR1, and the result is sent to
DST_6. When the block is ended successfully, the DONE output is activated. Note that if LEN is
greater than the size of STR1, STR1 is copied in full, without generating an error.
In the example above, four characters are copied from final position of STR1, and the result is sent to
DST_2. Since the size of DST_2 is 2, the last two characters copied are discarded. The block ends
successfully, Done output is activated.
11.8.5.16.5 STR_DELETE
Block that deletes part of a section of STR, storing the remainder in DST.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of DST according to the
input parameters. A section defined by the POS initial position is removed from STR and a LEN size,
and the final result is stored in DST.
If POS is outside the allowable range of values (between 1 and the size of STR), DONE receives
FALSE and DST remains unchanged.
If successful, the DONE value forwards to the next Ladder block the EN value when the operation is
completed.
NOTE!
POS is treated with index "based one". That is, POS = 1 references the first position of STR.
NOTE!
If the size of DST is less than the sum of the number of remaining characters in STR, the
resulting value will be truncated.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, as the value of POS is invalid, the block is not completed successfully, and the
DONE output is disabled.
In the example above, two characters are deleted from position 2 of STR1, and the remaining
characters are sent to DST_6. When the block is ended successfully, the DONE output is activated.
In the example above, two characters are deleted from position 4 of STR1, and the remaining
characters are sent to DST_6. When the block is ended successfully, the DONE output is activated.
Note that if POS + LEN is greater than the size of STR1, only the remaining characters are deleted
from STR1, without generating an error.
In the example above, five characters are deleted from position 3 of STR1, and the remaining
characters are sent to DST_6. When the block is ended successfully, the DONE output is activated.
Note that if POS + LEN is greater than the size of STR1, only the remaining characters are deleted
from STR1, without generating an error.
In the example above, one character is deleted from position 1 of STR1, and the remaining characters
are sent to DST_2. Since the size of DST_2 is 2, the last character copied is discarded. The block
ends successfully, Done output is activated.
11.8.5.16.6 STR_FIND
Block that searches for the first occurrence of one STRING in another, returning the position of this
occurrence.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of POS according to the
input parameters.
A search in STR1 is performed, from the START position, by an occurrence of STR2.
If it is found, it inserts into the POS the occurrence of this position, while DONE forwards to the next
Ladder block the value of EN when ending the operation.
If it is not found or START receives value zero, DONE remains FALSE and POS remains unchanged.
NOTE!
POS is treated with index "based one". That is, POS = 1 references the first position of STR.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, a search for STR2 in STR1 from position 1 is done. Since STR2 is found in
position 1, POS receives 1. The block ends successfully, the DONE output is activated.
In the above example, as the value of START is invalid, the block is not completed successfully, and
the DONE output is deactivated.
In the above example, a search for STR2 in STR1 from position 2 is done. Since STR2 is found in
position 3, POS receives 3. The block ends successfully, the DONE output is activated.
In the above example, a search for STR2 in STR1 from position 2 is done. Since STR2 is found in
position 3, POS receives 3. The block ends successfully, the DONE output is activated.
In the above example, a search for STR2 in STR1 from position 2 is done. Since STR2 is not found,
POS remains unchanged and the DONE output is activated.
11.8.5.16.7 STR_FIND_LAST
Block that searches for the last occurrence of one STRING in another, returning the position of this
occurrence.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of POS according to the
input parameters.
A search in STR1 is performed, from its last position, by an occurrence of STR2.
If it is found, it inserts into the POS the occurrence of this position, while DONE forwards to the next
Ladder block the value of EN when ending the operation.
NOTE!
POS is treated with index "based one". That is, POS = 1 references the first position of STR.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the example above, a search is done by STR2 in STR1 from its final position. Since STR2 is found
in position 4, POS receives 4. The block ends successfully, the DONE output is activated.
In the example above, a search is done by STR2 in STR1 from its final position. Since STR2 is found
in position 2, POS receives 4. The block ends successfully, the DONE output is activated.
In the example above, a search is done by STR2 in STR1 from its final position. Since STR2 is not
found, POS remains unchanged and the DONE output is disabled.
11.8.5.16.8 STR_INSERT
Block that inserts a STRING in certain position of another, returning the resulting STRING.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of DST according to the
input parameters.
An insertion in STR1 from the defined position POS of the STR2 content is performed.
If POS is outside the allowable range of values (between 1 and the size of STR plus one), DONE
receives FALSE and DST remains unchanged.
If successful, the DONE value forwards to the next Ladder block the EN value when the operation is
completed.
NOTE!
POS is treated with index "based one". That is, POS = 1 references the first position of STR.
NOTE!
If the size of DST is less than the sum of the number of characters STR1 and STR2, the resulting
value will be truncated.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, as the value of POS is invalid, the block is not completed successfully, and the
DONE output is disabled.
In the above example, as the value of POS is invalid, the block is not completed successfully, and the
DONE output is disabled.
In the example above, an insertion of STR2 into STR1 from position 2 is done, and the result is sent
to DST_10. When the block is ended successfully, the DONE output is activated.
In the example above, is done of an insertion of STR2 into STR1 from position 4, and the result is sent
to DST_6. Since the size of DST_6 is 6, the last two characters copied are discarded. The block ends
successfully, Done output is activated.
11.8.5.16.9 STR_LENGTH
Block that calculates the size of a STRING.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of LEN according to the
identified size of STR.
The DONE value forwards to the next Ladder block the EN value when the operation is completed.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, the length of STRING in STR is calculated and the result is sent to LEN. The
block ends successfully, Done output is activated.
In the above example, the length of STRING in STR is calculated and the result is sent to LEN. The
block ends successfully, Done output is activated. Note that null STRINGS have length zero.
11.8.5.16.10 STR_REPLACE
Block that replaced a section of a STRING by another STRING, returning the resulting STRING.
Ladder Representation
Block Structure
Operation
This block remains active as long as EN is at TRUE level, updating the value of DST according to the
input parameters.
From the position defined in POS a number of characters defined by LEN are deleted. After that, in
this position, the content of STR2 is inserted.
If POS is outside the allowable range of values (between 1 and the size of STR plus one), DONE
receives FALSE and DST remains unchanged.
If successful, the DONE value forwards to the next Ladder block the EN value when the operation is
completed.
NOTE!
POS is treated with index "based one". That is, POS = 1 references the first position of STR.
NOTE!
If the size of DST is less than the sum of the number of remaining characters of STR1 and STR2,
the resulting value will be truncated.
Compatibility
Device Version
PLC300 2.10 or higher
Block Flowchart
Example
In the above example, as the value of POS is invalid, the block is not completed successfully, and the
DONE output is disabled.
In the above example, as the value of POS is invalid, the block is not completed successfully, and the
DONE output is disabled.
In the example above, a replacement of zero characters from the position 5 of STR1 is done by the
contents of STR2, and the result is sent to DST_10. When the block is ended successfully, the
DONE output is activated. Note that this block acted as a STR_INSERT.
In the example above, a replacement of zero characters from the position 2 of STR1 is done by the
contents of STR2, and the result is sent to DST_10. When the block is ended successfully, the
DONE output is activated. Note that this block acted as a STR_INSERT.
In the example above, a replacement of one character from the position 3 of STR1 is done by the
contents of STR2, and the result is sent to DST_10. When the block is ended successfully, the
DONE output is activated.
In the example above, a replacement of eight characters from the position 2 of STR1 is done by the
contents of STR2, and the result is sent to DST_10. When the block is ended successfully, the
DONE output is activated. Note that if POS + LEN is greater than the size of STR1, only the
remaining characters from STR1 are replaced, without generating an error.
11.8.5.17 Timer
11.8.5.17.1 TOF
Timer block that, when energized, disables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is TRUE, the Q output is also TRUE and ET also receives the value zero.
On the negative transition edge in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state FALSE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example disables the DO1 output to identify a low level in DI1 for 12 seconds, remaining
disabled until DI1 again be TRUE.
11.8.5.17.2 TON
Timer block that, when energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is FALSE, the Q output is FALSE and ET also receives the value zero.
On the edge positive transition in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state TRUE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of the block and of the routine variables.
When activated the IN input, counting is triggered. Since ET equals PT, the Q output is enabled.
Note that a change in PRESET variable is not forwarded to the PT field while the IN entry remains
enabled.
Disabling the IN input, the value of PT is updated and the Q output is disabled. When activating it
again, counting is triggered.
When ET reaches the value PT, the Q is output enabled and remains so while IN is at TRUE level.
11.8.5.17.3 TP
Timer block that, when identifies it is energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
On the edge positive transition in IN, Q receives TRUE value, counting is triggered and ET is
incremented according to TIMEBASE. When ET equals PT, the Q output goes to state FALSE until
IN revolutions to FALSE. At that moment, if IN is at TRUE level, nothing happens. On the edge
positive transition in IN, ET is automatically reset.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example enables the DO1 output for six seconds at each DI1 positive transition.
11.8.5.18 Tasks
Overview
A task is a scheduling mechanism very useful in real time systems to periodically control the performance of
programs, or whenever triggered by events.
Task configuration is carried out by adding task files to the Task folders, inside the resource. When the task
becomes enabled, programs that perform the logic of these task files are associated to them. A watchdog
(see Watchdog section) may be configured for every task. Every task has an associated system marker that
can be enabled or disabled through the program.
Inside a resource, there is a single task called Main that cannot be deleted, in which the main program (Main
Ladder) is run.
In the task folder option menu, it is possible to perform the following actions:
Add a new task: in order to add a new task, it is necessary to select the New file option in the Task
folder.
Configuring the transition edge of digital inputs (DIs): digital inputs DI9 and DI10 have the option of
triggering events through a rising, falling, or rising and falling transition edge. The configuration of these
transition edges is made through the DI configuration window, which is accessed by selecting the DI Edge
Configuration option in the Task folder.
These DIs are used in tasks of the external event and count types.
Through the task folder option menu, it is possible to perform the following actions:
Configuring tasks: in order to configure the task, it is necessary to select the Open option in the task file
to be configured. For further information on how to configure the tasks, see the Task configuration section.
Add, remove, or order task programs: in order to add, remove, or order programs of a certain task, it is
necessary to select the Select programs option in the task file to be configured. For further information on
how to select the programs, see Task configuration section in item List of programs.
Task Configuration
Priority: configured with a number between 0 and 30 (0 - higher priority, 30 - lower priority) which defines the
priority in which the task will be performed. In case a task with a higher priority than that of the running task
is activated, it will immediately start running. Otherwise, in case a task with a lower priority than that of the
current one is activated, it waits for the current task to stop running before it starts running.
List of programs: the selection window in the sequence of programs serves to add, remove, or change the
sequence of programs associated to a certain task. All programs available in the resource are included in
the left side list, and the programs selected for this task are on the right side. The order in which the
programs will start running will be the same order as the one defined in this list.
Types of Tasks: The tasks are divided in: system, interval, single, external event, count, and freewheeling.
o System: This task may be of the Initialization or Stop type. When the Initialization option is selected,
the task will start running as soon as the user program runs for the first time. In case the Stop option is
selected, programs associated to this task will start running right after the user program stops.
o Interval: Programs associated to this task run repeatedly within the time interval defined in the Time
interval field, being the delay time for the first performance defined in the Initial delay field. This task is
associated to a system variable that allows the task to be disabled through the program.
o Single: Programs associated to this task run one single time whenever the selected variable undergoes a
positive transition, i.e. from zero to some other value. This task is associated to a system variable that
allows the task to be disabled through the program.
o External Event: Programs associated to this task run one single time whenever event DI9, DI10, or Pulse
Z is enabled. Events DI9 and DI10 have the option to select the transition that enables the task (see item
Configuring the transition edge of digital inputs in the Overview section). This task is associated to a
system variable that allows the task to be disabled through the program.
NOTE!
The options DI1 a DI8 are available from version 2.10.
o Count: The programs associated to this task are executed every time the pulse count on the selected
input (DI9, DI10, Pulse A, Pulse B, Pulse Z, Quadrature AB, Quadrature DI9/DI10, Dir/Pulse DI9/DI10) is
greater than the value of the variable defined in the Predefined field. The pulse count value is stored in
the Count variable. The pulse count value is reset when this value exceeds the value defined in the
Restart field. The variables configured in these fields can be of the DWORD and UDINT type for inputs
DI9, DI10, Pulse A, Pulse B and Pulse Z, and DINT for inputs quadrature AB. A system variable is
associated to this task which allows the task to be disabled through the program. The Dir/Pulse_DI9/DI10
option can be used as fast count up to 100 KHz.
Important:
The Quadrature_DI9/DI10 and Dir/Pulse_DI9/DI10 functions cannot be used simultaneously in tasks or in
tasks and blocks;
The Quadrature_DI9/DI10 and Dir/Pulse_DI9/DI10 functions can be used in different blocks, provided that they
are not used in tasks.
NOTE!
Those options, after selected, will not cause error in case the others (DI9, DI10, Pulse A...) are
also selected.
NOTE!
The Quadrature_DI9/DI10 and Dir/Pulse_DI9/DI10 options are available from version 2.0 up.
NOTE!
The options DI1 a DI8 are available from version 2.10.
o Freewheeling: Programs associated to this task run in a cyclic form. When the list of programs stops
running, the list of programs is reinitialized until the user program stops. The main program (Main Ladder)
is associated to this task, and it is not possible to remove it or associate it with another task.
Watchdog: When the watchdog option is activated, the user program stops with an error alarm in case the
task running time is longer than the time defined in the Time field for a higher number of times than that
defined in the Sensitivity field.
Compatibility
Device Version
PLC300 1.20 or higher
11.8.5.19 Structures
Structure is a data grouping used to define a recipe or an object.
In the Ladder program, it is possible to create variables of the structure type and use them in the blocks. To
access the internal members of the structure, the '.' is used followed by its respective member.
Creating a structure
1. With the right button of the mouse on the folder Structure, click on New file.
3. Configure the structure using the buttons presented in the figure below.
4. After finishing the edition of the structure, click on the button Finish.
Editing a structure
Just double click on the desired structure, as shown in figure 4, and a window will open as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
11.8.5.20 Recipes
A recipe is a data set organized in the memory which define certain configurations for a process, such as:
time of each step, minimum and maximum values, setpoint, number of repetitions, etc.
In order to create a recipe table, first it is necessary to define the data that will compose it through a data
structure. To create a data structure, see the content Structures.
Creating a recipe
1. With the right button of the mouse on the folder Recipe, click on New file.
3. Configure the recipe by configuring the fields as shown in the figure below.
Storage
o RAM Memory: the recipe data are stored in the RAM memory, making its handling faster, but with
storage capacity limited to the memory of the PLC300.
o SD card: the recipe data are stored in files in the memory card, making its handling much slower, but
with storage capacity according to the capacity of the SD card.
Type
o It allows to select all the structures that were defined by the user in the project.
Data Table
o The columns represent the structure elements. Note that besides the member name, the respective data
type is also presented after the ‘:’;
o The lines represent each recipe.
4. After finishing the edition of the structure, click on the Finish button.
Editing a recipe
Just double click on the desired structure, as shown in figure 4, and a window will open, as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
Using Recipes
To use de recipe data, you must create a variable of the desired structure type:
After creating the variable, the block ReadRecipe should be used to load the recipe data for the variable or
WriteRecipe to record the data contained in the variable.
11.8.6 Screen
11.8.6.1 Alarms
Overview
Alarms are important tools in the automation of processes, allowing the user to monitor their plant by checking
critical points and signaling to the operator.
Configurable alarms in PLC300 are programmed by the user, being activated by a bit marker that can be
enabled by the Ladder program.
Internal alarms are relative to some hardware components that occupy the internal memory.
The alarms are configured through the Alarm Config screen accessed by the project folders:
Alarm Configuration
Internal alarms
The internal alarms are alarms generated by the device that can be enabled or disabled by the user. In order to
access the internal alarm configuration window it is necessary to press the button in the alarm window.
The PLC 300 has six internal alarms, five o which can be enabled by the user:
Digital Output Fault: Indicates that some problem is occurring in some of the outputs DO1 and DO8.
Broken Wire: Current below 2 mA, when the AI1 analog input is in current mode 4 to 20mA.
Encoder Fault: One of the signals of the encoder is missing.
Supply of CAN: Power supply missing in the CAN interface.
SD card: This alarm occurs when there is a problem in the writing or reading of the SD card. The most
common problems are: SD card missing, card protected against writing and formatting of the file system
different from FAT32 .
Limits
In the field limits, the maximum area taken by the user’s alarms and by the alarm history is configured. The
button , in the limit field, opens the memory area configuration window. In this window you can configure
the size of the memory area that the user’s alarms and the user’s history must take.
The size that the user’s alarm takes in the memory is calculated through the formula:
The size that the alarm history takes in the memory is calculated through the formula:
SD Card
The SD card option, when enabled, configures the storage characteristics of the alarms in the SD card. The
storage of alarm files has the following options:
File extension: Format in which the alarms will be stored in the SD card. The options are:
o csv (comma separated value): comma separated values, generally used in spreadsheets.
The values stored are date, time, alarm (0 – internal, 1 – user’s alarm), action (A – actuated and N –
standardized) and description.
Interval: In the interval field, it is configured the duration time of the recording of the data in a single file. The
options of this field are the following:
o Single: The data will be recorded in a single file.
o Daily: The data are recorded in a file a day. The recording of a new file begins whenever the day on the
clock of the device changes. The file is recorded with a suffix containing the day, month and year on
which its recording began.
o Monthly: The data are recorded in a file a month. The recording of a new file begins whenever the month
on the clock of the device changes. The file is recorded with a suffix containing the month and year in
which its recording began.
o Annual: The data are recorded in a file a year. The recording of a new file begins whenever the year on
the clock of the device changes. The file is recorded with a suffix containing the year in which its recording
began.
Alarm type: Alarm values that will be stored in the SD card. They can be of the User type to store only the
alarms configured by the user or User+Internal to store the alarms configured by the user and the internal
alarms.
Remove: When this option is selected, the dialog box Number of files is enabled, allowing to input a
whole number. This number represents the number of files that will be maintained in the SD card. Whenever
a file is created daily, monthly or annually, the number of files created for this alarm is checked and then the
older files are removed.
In the user’s alarm table, the alarms activated are configured through variables of the devices with texts edited
by the user. The alarm table has four fields to be filled out:
Marker: Bit marker that activates the alarm. Global variable of the Boolean type.
Enable: Enable/Disable alarm option.
Edge: Transition edge in which the alarm will be activated. The possible values are positive (from 0 to 1) or
negative (from 1 to 0).
Text 1: Text for the alarm message. This field can contain at most 15 characters. This text will be viewed in
the active alarm list and alarm history.
Text 2: Text for alarm message description. This field can contain at most 20 characters. This text will be
viewed in the detailed description of the active alarms and alarm history.
The screen editor allows the user configuring the screens by adding and removing components, so that values
will be read and written in the program or showed on the display of the device.
The editor has function keys that allow browsing the screens or manipulating bits. A level of access can be
configured for each screen, so that only authorized users will see the content.
NOTE!
The PLC300 allows editing at most 512 screens.
Function Keys
The browsing of screens and the manipulation of bits are done by means of the configuration of the function
keys.
Bit Manipulation
The bit manipulation function allows turning a Boolean variable on, off, inverting its status or turning it off
temporarily.
The options available for selection are the following:
MomentaryOn: Turns on a selected Boolean variable (writes value 1) while the key is pressed. When you
release the key, the marker returns to zero.
Toggle: Inverts the status of the selected Boolean variable;
On: Turns on a selected Boolean variable (writes value 1);
Off: Turns off a selected Boolean variable (writes value 0).
The browsing through the screens is done by means of the edition of the Screen option.
In the example below, screen 2 will be accessed when F1 key is pressed.
The PLC300 has ten password levels (0 - 9). Level zero (default value) is chosen when you wish free access to
the screen. Except for the zero screen (Home), which always has zero access level, the other screens can be
set with an access level. The password configuration window is opened when the options of the Screen editor
folder are selected.
In order to configure the screen access level, it is necessary to configure this option in the screen options.
Screen options
In the screen options, you can configure the current screen number and the properties of the screen password.
In order to open those options, it is necessary to select the options of the screen file in the resource.
current level, the device access level becomes the same as the current screen level. If the auto logoff option
is enabled, after the access to the screen, the device access level will not change.
Level: Selects the screen access level. The higher the level of access, the greater the privilege. Up to nine
access levels can be programmed to allow different kinds of users accessing certain screens. Zero access
level means that the screen will not require a password in order to be accessed.
Screen edition
The screens are composed of components, such as Bargraph, Numeric Input, Numeric Output, Text, Message
and Text Output. For the setting of the screens, the components are entered in the display by dragging the
components from the pallete to the display or by right clicking the mouse on the display.
The components used to edit the screens are the following:
Bargraph
The Bargraph component shows a bargraph on the display with block-type characters proportional to the value
of the selected variable.
Numeric Input
The Numeric Input component allows the user entering a numeric value within a certain range. The entered
content is stored in a variable.
Numeric Output
The Numeric Output component presents the formatted value (decimal places, leading zeros or flashing) of the
variable selected on the display.
Text
Message
The Message component shows configured texts on a table, selected by means of an index.
Text Output
NOTE!
A BYTE variable was used instead of STRING in firmware versions below 2.10. The array size
was defined by the component size.
Text Input
Variable: STRING type variable used as storage for the text entered.
NOTE!
A BYTE variable was used instead of STRING in firmware versions below 2.10. The array size
was defined by the component size.
The event log is a set of variable values that are stored, with date and time, in the SD card of the device in the
csv (comma separated value) format. Those values are recorded after the occurrence of events that may be of
the following types: time, change of state or trigger. For each event log file, the file recording interval is
configured and a Boolean variable, which is responsible for enabling or disabling the log through the program,
is associated to it.
A text may be associated to each log configuration file, which will be presented together with the variables as
soon as the upload of the event log is performed (see Text Field Configuration section).
In the option menu of the event log, it is possible to carry out the following actions:
Add a new event log: in order to add a new event log, it is necessary to select the New file option from
the folder Event log. For further information on how to configure the event log, see Event log configuration
section.
Upload SD card files: after the download of the event log files configured for the equipment, it is possible to
upload these files to view the events occurred. For more details, see Upload SD card files section.
Create log file: This functionality allows the user to create a log file within a defined period with the log files
loaded in the project. For more details see Creation of log files section.
In the event log configuration window, you configure: the recording interval of the event log file, the type of event
log, the Boolean variable that enables the event log and the text to be displayed in the event log.
File interval: In the file interval field , the duration time of the recording of the data in a single file is
configured. The options of this field are the following:
o Single: The data will be recorded in a single file.
o Daily: The data will be recorded in a file a day. The recording of a new file begins whenever the day on the
clock of the device changes. The file is recorded with a suffix containing the day, month and year on
which its recording began.
o Monthly: The data will be recorded in a file a month. The recording of a new file begins whenever the
month on the clock of the device changes. The file is recorded with a suffix containing the month and year
in which its recording began.
o Annual: The data will be recorded in a file a year. The recording of a new file begins whenever the year on
the clock of the device changes. The file is recorded with a suffix containing the year in which its recording
began.
The event log can be of time, change of state and trigger type.
Time
The event log is recorded in time intervals defined in the field Period. The value configured in the field Period
must be a whole value greater than zero and smaller than 4294967295 s. The time unit can be selected from
seconds, minutes or hours.
In the field Variables you select the variables that will be sampled in the configured period.
Change of State
The event log is recorded after a change in the value of the selected variable. Only the value of the selected
variable is recorded in the event log.
In the field Variables you select the variables that will be sampled after the change of state.
NOTE!
The list of variables is possible only in firmware versions higher than 3.30. For these versions, the
variable that triggers the event log is not written in the event log, unless the variable is added to
the list.
Trigger
As in the Time event, the event log is recorded in time intervals defined in the field Period, but only when the
value of the configured variable in the field Trigger is within the limits selected in the variables of the Upper
limit and Lower limit fields. The value configured in the Period field must be a whole value greater than zero
and smaller than 4294967295 s. The time unit can be selected from seconds, minutes or hours.
In the field Variables you select the variables that will be sampled in the configured period.
In the Text field, it is possible to add a text to be shown together with the variables. This text will be added as
soon as the event log file is loaded (through the upload of log files) to the WPS.
For the variable values to be inserted in any position of the text, markers will be added to the text which will be
replaced by the variables.
According to the type of event log selected, the markers must be added the following way:
Time: the first variable of the list is represented by the marker {0}, the second by the marker {1} and thus
successively.
Change of State: the only variable selected will be represented by the marker {0}.
Trigger: the Trigger variable is represented by the marker {0}, the Upper limit by the marker {1}, the
Lower limit by the marker {2}, the first variable of the list by the marker {3}, the second by the marker {4}
and thus successively. As an example, below is the configuration of an event log of the Trigger type and its
log file.
There are two ways to upload the log files: upload all the project files or upload the files individually.
In order to upload all the log files configured in the project, it is necessary to select the folder Event log with
the right button and select the option Upload SD card files.
In order to upload the files associated to only one event log configuration file, it is necessary to click the right
button on the event log configuration file and select the option Upload SD card files.
ATTENTION!
When uploading files, the previous files (with the same name) will be overwritten.
Through the log file creation tool, it is possible to create new event log files using the log files previously loaded
on the project. Thus, it is possible to define the initial and final log interval and which log files must be used. In
order to begin the creation of a new log file, it is necessary to click the right button of the mouse on the folder
Event log and select the option Create log file. The configuration options for the new file are the following:
File name: Name that will be used in the log file created. If the name already exists, the data will be
overwritten.
Initial interval: It determines the initial day and time of the file logs. If the Unlimited option is selected,
there will not be a minimum value for the date.
Final interval: It determines the final day and time of the file logs. If the option Unlimited is selected, there
will not be a maximum value for the date.
Files: It selects the log files that will be used to generate the new log file.
11.8.8 Setup
11.8.8.1 Configuration
Overview
The setup configuration of the PLC300 is accessed by double clicking the shortcut available in the resource as
shown in the following figure.
ATTENTION!
When creating a new resource in the WPS, the setup configuration values will be the standard
values of the PLC300. We recommend to review these values according to the requirements of
the application and to send these adjustments according to the following explanation.
The setup configuration window is divided into tabs and has two buttons to access the PLC300 as shown in
the following figure.
The Write Configuration and Read Configuration buttons are only active when the WPS is connected to
Write Configuration: It sends all configurations adjusted in the setup configuration screens to the
equipment.
Read Configuration: It receives all the configurations adjusted in the equipment and configures the
screens according to the received values.
Password: It allows to change the password of the setup function of the PLC300. The standard password is
‘0000’. The new password must be a number with four digits.
LCD Contrast: It adjusts the LCD contrast of the PLC300.
Keyboard Beep: It enables the beep of the keys of the PLC300.
11.8.8.2.2 Analog
Analog Inputs: It selects one of the three operation modes of the AI1 analog input of the PLC300: ‘Voltage
0 to 10 V’, ‘Current 0 to 20 mA’ or ‘Current 4 to 20 mA’.
NOTE!
In the option 4 to 20 mA, the value that the Ladder sees is a proportional, standardized value,
that is, 4 to 20 mA - 0 to 32767.
Analog Outputs: It selects one of the four operation modes of the analog outputs (AOs) of the IOA
accessories installed in the PLC300, seeing that the AOs 101 and 102 are the AOs 1 and 2 of the IOA card
installed in the slot 1 of the PLC300, and the AOs 201 and 202 are the AOs 1 and 2 of the IOA card
installed in slot 2.
11.8.8.2.3 Encoder
It selects the power supply of the encoder of the PLC300 between 5 or 12V.
11.8.8.2.4 RS232
It is possible to configure the baud rate, parity and number of stop bits of the serial interface of the RS232 of
the PLC300.
11.8.8.2.5 RS485
It is possible to configure the baud rate, the parity and the number of stop bits, the mode (master/slave) and
the address of the PLC300 in a Modbus RTU network by means of the serial interface RS485 of the PLC300.
11.8.8.2.6 CAN
It is possible to configure the baud rate and the address of the PLC300 in a CANopen network by means of the
CAN interface of the PLC300.
11.8.8.2.7 LAN
It is possible to configure the IP address, subnet mask, default gateway, DHCP, speed and duplex mode of
the PLC300 in an Ethernet network.
IP Address: Four bytes of address that identify the PLC300 in the IP network;
Subnet Mask: Four bytes that identify the subnet to which the PLC300 belong in the IP network;
Gateway: Four address bytes that identify the default gateway to access other subnets in the IP network;
DHCP: Disabled, Enabled;
Speed/Duplex: Auto, 10MBps Full Duplex, 10MBps Half Duplex, 100MBps Full Duplex, 100MBps Half
Duplex.
It is possible to configure the TCP, Unit ID, IP authentication and timeout of the Gateway Modbus TCP/RTU of
the PLC300 in an Ethernet network by using the ModbusTCP protocol.
IP Authentication: Four bytes of the address that identify the single remote IP address that can connect to
the PLC300. All the fields in zero disable the IP authentication and any remote address can connect to the
PLC300;
TCP Port: 0 to 65535,
Unit ID: 1 to 255,
Gateway Timeout: 20 to 5000 ms
The clock settings are only active when the WPS is connected to the PLC300 through the command Connect
Device.
11.8.8.2.10 Language
11.8.8.2.11 Watchdog
1. Time of Watchdog (ms): waiting time of the watchdog. Minimum value: 200ms.
2. Reset the PLC in case of Watchdog: if checked, this option resets the PLC300 in case of watchdog and
runs the user application again after restart. By checking this option, options 3 and 4 are disabled
automatically;
3. Watchdog Output: allows selecting an output for the exclusive use as a flag from the watchdog.
3.1.The selected output (DO8 or DO9) cannot be written via Ladder. It will remain at a high level after
configured for this option and, in the event of watchdog, it will turn off.
4. Output Status: allows selecting if the digital outputs maintain their status in case of activation of the
watchdog or if they will be turned off.
4.1.This option will have no action on the selected output in option 3. For example: if in option 2 DO9 is
selected, even if in option 3 ‘Keeping the status’ is checked, at the moment of watchdog it will be
switched off.
Compatibility
Device Version
PLC300 2.30 or higher
11.8.9 Communication
11.8.9.1 Online Commands
Overview
The online commands are commands performed when the device is communicating with the application (online
monitoring active).
To perform the commands for recording and loading the resource, setup and firmware files.
To configure the device number.
To stop and run the program and delete the resource.
The commands for recording the resource, setup and firmware files make a copy of the device binary files to
the SD card. The loading of the files make the copy of the binary files from the SD card to the device.
For the security of the files, it is possible to configure a protection password. It is also possible to configure
the number of devices so that backup files will be copied to different folders.
To perform the commands for recording and loading the resource, setup and firmware, it is necessary to select
the menu Communication > Online commands > choose one of the options listed Save/Load and then
Resource/Setup/Firmware.
If a password has been configured for the resource, a dialog window prompting the password will show. The
password has one to eight decimal digits.
Password configuration
The password configuration for the online commands is done trough the configuration of the resource
properties, in the password option.
After entering the password (with one to eight decimal digits), it is necessary to build the resource and send it
to the device. The password will be stored on the equipment and, when one of the online commands is
performed, the password is requested. The password will not be requested again until that the online
monitoring is completed.
Device number
The device number is configured to record the backup of different devices on the same SD card. When
selecting the functions for recording resource, setup or firmware, the files will be recorded on the following
folders, according to the device number (1 in the example).
\PLC300\0001\Resource
\PLC300\0001\Setup
\PLC300\0001\Firmware
ATTENTION!
Existing files in the destination folder will be overwritten when you perform recording functions.
Run program
Stop program
Erase resource
The force inputs and outputs window is used for the values of the digital and analog inputs to be read by the
program, by values manipulated by the user, regardless their physical state. It also allows the manipulation of
the physical states of the digital and analog outputs by the user independently of the values calculated by the
program.
In order to force the device inputs and outputs, it is necessary that the online monitoring be active and the
option Run cyclically be enabled. The data are sent to the device every 2 seconds.
The values can be edited with the device disconnected. The configurations are stored in the resources and
recorded whenever the main resource selection is changed.
The data displayed on the force I/O window contain the values belonging to the resource (and configuration)
selected as main.
The force I/O window is open trough the menu Online > Force I/O:
Toolbar
The toolbar of the force window has the options to run cyclically, upload the device force configuration, enable
all and disable all:
Run cyclically: Sends the user's configurations to the device and updates the state of the inputs and
outputs in a cyclic way.
Upload configuration: Allows the current configuration of the device to be read. For this option to be
enabled, it is necessary that the online monitoring be active and the option run cyclically be disabled.
Enable all: Enables the force I/O of all of the inputs and outputs of the device.
Disable all: Disables the force I/O of all of the inputs and outputs of the device.
For each digital and analog input and output there is a selection box linked to enable the force, a status field
and an edition field.
Digital:
3. Current status of the I/O: It has three statuses: 1. light green LED: activated; 2. dark green LED:
deactivated; 3. gray LED: the value is not being read.
4. Enable/disable the input/output
Analog:
NOTE!
The analog signal scale has 15 bits plus 1 bit for signal, except for SSW900 which it has only 10
unsigned bits.
11.8.9.3 Download
Overview
The resource download downloads the memory area configuration files, volatile data, retentive data, programs,
screens, alarms, source code (optionally) and recipes (optionally) to the device internal memory.
It is also possible to perform the following operations during the download of the resource:
Initialize variables: Initializes the variables with the values configured in the initial values.
Clean alarm history: Excludes alarm history data stored. It is recommended to clean this area whenever
the memory areas or the alarm configuration are changed.
Source code download: Downloads the resource source code.
Download recipe in internal memory: Downloads the file containing the recipe data configured with the
storage option in the RAM.
Disable CANopen master during download: Disables the CANopen master during the download:
Stop/Run the program automatically: Disables the warning windows informing that the program will be
stopped (Figure 2) and the prompting window asking if you wish to execute the program (Figure 3).
Setup configuration: Performs setup configuration data download.
CANopen configuration: Performs CANopen network configuration download.
If the user configured one or more recipes with the option of storage in the SD card, the confirmation window of
download of files in the SD card will show (Figure 4). For the window to show, it is necessary that the SD card
be connected to the equipment.
On the Hot Download, the logic changes and configurations must be realized off-line, in other words, with the
monitoring disabled, being transfer to the equipment in one single step. This requires that every and any
modification realized needs to be sent to the equipment through a command realized by the user itself,
avoiding then that incomplete changes can cause a different operation than expected.
ATTENTION!
Take care during Hot Download realization: mistakes can result in damage to the people involved
and to the equipment. Before realizing Hot Download, evaluate the consequences of your
changes and notify the involved.
Compatibility
Equipment Version
PLC300 2.30 or superior
1. Open the context menu of the resource and select the option Resource Options.
2. Select the option Hot Download on the sidebar menu, it will open a window with the Hot Download
configurations.
3. On the Hot Download configuration window just select the option Enable Hot Download Features and
confirm.
4. The option Force Hot Download is used when it's wished that the system re-enables the Hot Download to
the resource, after the user having realized one operation that disables it.
Example: The user create a local variable after the system having informed him that the creation of the same
will disable Hot Download, in case the user regrets and excludes this variable he can then use the option
Force Hot Download so the system will keep allowing Hot Download in the same way it was allowing before
the creation of this variable.
11.8.9.4.3 Restrictions
For being possible to realize the Hot Download on the equipment, it's necessary that after the full resource
download, some restrictions don't be violated.
Restrictions are limitations imposed to the operations that the user can execute in a resource, because such
operations unfeasible the Hot Download routine.
Memory areas
o Any memory area can't be changed;
Programs
o Can't be removed;
o Can't be added to the execution list of tasks;
Tasks
o Can't be edited;
o Can't be removed;
o Can't have their execution list changed. Also the execution order of the programs can't be changed.
Variables
o Variables with LOCAL scope can't be created, excluded or edited.
o Variables with GLOBAL scope without address and from the group GLOBAL_RETAIN without address
can't be created, excluded or edited.
o Variables with GLOBAL scope with address and CONSTANT can be created, excluded or edited.
o Variables from USERFB from types VAR_IN, VAR_OUT, VAR_IN_OUT, LOCAL, LOCAL_RETAIN can't
be created, excluded or edited.
USERFB's
o Can't be added and removed from programs.
Structures
o Can't be edited or removed.
Recipes
o Can't be transferred to the equipment.
Screens
o No restrictions.
o During the loading of the changes to the equipment will be displayed a screen indicating this operation. In
cases where the current screen changes, will be called the HOME screen.
Alarm
o No restrictions.
o Case any alarm stored in the alarm history be removed, the alarm history become than invalid.
Event Log
o No restrictions.
NOTE!
The alerts displayed during the edition aren't guaranty that the Hot Download will be disabled
when the user call it. Those alerts serve only as a parameter in order that the user have the
consciousness that the change he is realizing will disable the Hot Download in case that its don´t
be reverted.
11.8.9.4.4 Operation
The Hot Donwload function is enabled when:
1. A complete download of the compiled resource has been done previously;
2. Have sufficient resource memory space.
After compiling, the output window indicates a warning (W4002) if the Hot Download function is disabled due to
lack of memory.
Figure 1 - Warnings of insufficient memory for Hot Download displayed on the compilation window
After realizing the desired changes on the resource, the beginning of the download routine will verify if the
resource edited is the same as the resource executing on the equipment.
Case both be equal, is then displayed a dialog window for selection between Full Download or Hot Download.
Case the option Hot Download be selected, then is realized a verification to know if any restriction has been
violated. Case it was, a message of error will be displayed informing the cause.
Validated the verification, is then realized a comparison of the memory areas, the files that were changed are
displayed in red.
NOTE!
The variables map is presented on the gray color, since its download is obligatory in case of
changes.
Case any file be sent to the equipment without the source code, this will become invalid, thus disabling your
upload.
This procedure is realized because the source code don't represent anymore the files presented in the
memory areas.
NOTE!
The source code becomes invalid even that it be equal to the previously saved on the equipment.
11.8.9.5 Upload
Overview
Uploads the resource source code. For this, it is necessary that the source code be previously recorded
(during the download) in device memory. In order to initialize the upload, it is necessary to access the menu
Communication > Upload resource.
If the upload was performed successfully, the window to select the configuration name will open.
NOTE!
The comparison of resource and device works only as from firmware version 1.50.
The comparison of resource and device (binary files) allows the user compare the main resource of the
application with the resource that is running on the device. To begin the comparison, it is necessary to access
the menu Communication > Compare resource device.
After selected the comparison option, it is checked whether the resource is compiled to read the information of
size and CRC of the binary files. Then, the comparison of all memory areas is performed.
If the memory areas have changed, cannot be possible to perform the comparison and a file system
comparison error is shown:
Observations:
- The information and source code files are updated every build.
- The volatile, retain, source code and recipe are download options. If the download of these files were not
done, the comparison will be flagged as false.
The modbus file manager of the PLC300 is accessed through the communication menu as shown in the
following figure.
The window of the modbus file manager is composed of the following parts as shown in the following figure.
It is only possible to view the files and folders of the SD Card when the WPS is connected to the PLC300
Toolbar
Popup menu
In order to access the popup menu, just click the right button on a folder or on a file and it will be displayed as
shown in the following figure.
In a serial interface, the data bits are sent in sequence through a communication channel or link. Several
technologies use the serial communication for data transfer, including interfaces RS232.
Configuration
Some parameters need to be configured to perform the RS232 communication; to do so, check the item
RS232.
NOTE!
Modes 1 and 3 are reserved.
The ASCII protocol, via RS232, was developed for bar code reading.
Involved Variables:
RS232_MODE: BYTE system marker which defines the operating mode of the RS232:
o 2: ASCII protocol;
RS232_RX_CLEAR: BIT marker; clears the data buffer (RS232_ ASCII_ BYTEBUFFER) and the
RS232_RX_FINISHED flag;
RS232_RX_FINISHED: BIT marker; indicates that a data package is available in the
RS232_ASCII_BYTEBUFFER buffer;
RS232_ASCII_BYTEBUFFER: 256-byte buffer which stores the received characters;
RS232_ASCII_STRING: STRING buffer, which can be shown on the screen of the PLC300 by the ‘Text
Output’ component.
NOTE!
Even without turning on RS232_RX_CLEAR, the system can receive another reading, placing the
data over the previous reading.
NOTE!
The end of the package is executed when the CR/LF characters (0x0d/0x0a) are received.
NOTE!
The CR/LF characters are not stored in the buffer.
NOTE!
The buffer is terminated with NULL character (0x00).
The configuration of the RS232 must be done according to the default configuration of the PLC300;
On the screens, the 'Text Output' component, which only accepts the STRING type, was added to show
RS232_ASCII_STRING, which is the string that shows the value read by the protocol, limited to 20 characters
(limit of the output function = 1 line).
Functionality developed to send and receive telegrams by means of serial communication RS232.
1. Select Send and receive telegrams via RS232 by setting RS232_MODE = 4 in the Ladder;
2. Configure the initial address of the telegrams to be sent and received in, respectively,
RS232_TX_ADDRESS and RS232_RX_ADDRESS;
3. Specify the size (in bytes) of the telegram to be sent by means of marker RS232_TX_LENGTH;
4. Specify the maximum size (in bytes) of the telegram that can be received by means of RS232_RX_LENGTH
marker;
5. Specify the timeout in RS232_TIMEOUT;
6. If applicable, configure the telegram end characters of the markers respectively in: RS232_ENABLE
END_CHARACTER and RS232_END_CHARACTER;
7. Reset the RS232_RX_TELEGRAM_FINISHED flag to be ready to receive a telegram;
8. Give a pulse in RS232_START_TX to send a telegram.
NOTE!
It will be considered the end of receipt of telegram, the receipt of the special character when
configured in RS232_END_CHARACTER with the RS232_ENABLE_END_CHARACTER flag
enabled or, also, when the timeout is equal to twice the transmission time of a byte.
Compatibility
Device Version
Mode 0: 1.00 or higher
PLC300 Mode 2: 1.11 or higher
Mode 4: 1.50 or higher
In a serial interface, the data bits are sent in sequence through a communication channel or link. Several
technologies use the serial communication for data transfer, including interfaces RS485.
Configuration
Some parameters need to be configured to perform the RS485 communication; to do so, check the item
RS485.
NOTE!
Modes 2 and 3 are reserved.
Functionality developed to send and receive telegrams by means of serial communication RS485.
1. Select Send and receive telegrams via RS485 by setting RS485_MODE = 4 in the Ladder;
2. Configure the initial address of the telegrams to be sent and received in, respectively,
RS485_TX_ADDRESS and RS485_RX_ADDRESS;
3. Specify the size (in bytes) of the telegram to be sent by means of marker RS485_TX_LENGTH;
4. Specify the maximum size (in bytes) of the telegram that can be received by means of RS485_RX_LENGTH
marker;
5. Specify the timeout in RS485_TIMEOUT;
6. If applicable, configure the telegram end characters of the markers respectively in: RS485_ENABLE
END_CHARACTER and RS485_END_CHARACTER;
7. Reset the RS485_RX_TELEGRAM_FINISHED flag to be ready to receive a telegram;
8. Give a pulse in RS485_START_TX to send a telegram.
NOTE!
It will be considered the end of receipt of telegram, the receipt of the special character when
configured in RS485_END_CHARACTER with the RS485_ENABLE_END_CHARACTER flag
enabled or, also, when the timeout is equal to twice the transmission time of a byte.
Compatibility
Device Version
Mode 0: 1.00 or higher
PLC300 Mode 1: 1.00 or higher
Mode 4: 1.50 or higher
11.9 PSRW
11.9.1 Description
PSRW is a configurable safety relay which can be configured using the WPS graphic interface, it has 4 (four)
double channel safety inputs and 2 (two) OSSDs (Safety double channel safety outputs).
Refer to the user's manual of the PSRW for further details about the product.
11.10SCA06
11.10.1Description
The SCA06 servo drive is a high-performance product which allows controlling the speed, torque and position
of three-phase, alternate-current servomotors. The main characteristic of this product is the high performance
and high precision of movement control of the servomotor due to the operation in closed loop by means of the
position feedback given by a sensor inside the servomotor.
The SCA06 features independent control supply and power supply, allowing, for instance, that the product
communication networks keep on working normally even if the power circuit must be turned off for some
reason.
The use of braking resistors provides greatly reduced braking times, optimizing the processes that require high
performance. Several special functions are available, such as programming in Ladder with positioning blocks
which provides extreme flexibility and integration to the drive.
The SCA06 can be used in different applications with many options of cables, both for simple applications and
complex applications like handling, environments with oil, etc.
NOTE!
SCA06 versions below V2.00 do not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.10.2System Markers
The following variables contained in the GLOBAL_SYSTEM group of the variables table, have the fixed tag.
The tag of system markers were divided into groups and subgroups, where:
Groups:
SCA: reading and writing variables of the SCA06 servo drive;
CO: reading and writing variables of the CANopen network.
Subgroups:
STS: reading variable (status);
CMD: writing variable (command).
Ladder
Real Axis
Virtual Axis
Current
Counters
%SB6100 0 800 CO_STS_MASTER_CONTACTED The CANopen master contacted all the slaves
CANopen
%CB6001 0 8 CO_CMD_NMT_TOGGLE NMT command transmission by the CANopen master: toggle bit
NOTE!
Below description of the real axis and virtual status:
0. Disabled.
1. Errorstop.
2. Standstill.
3. Stopping.
4. Homing.
5. Continuous Motion.
6. Discrete Motion.
7. Synchronized Motion.
Note 1: When the drive is in "Stopping" on "Errorstop" every block can be called, but only MC_Reset block is
executed;
Note 2: Attempt to enable the drive, but the drive is in fault;
Note 3: Enabling the drive and the drive is not in fault;
Note 4: MC_Stop.Done is true and MC_Stop.Execute is false;
Note 5: MC_StepDirect, MC_StepRefPulse or MC_FinishHoming.
11.10.3Oriented Start-Up
The function Oriented Start-Up is utilized to realize the minimal required configuration to put SCA-06 into
operation.
The Oriented Start-Up can be executed during the resource creation, or throught the context menu off the
resource by selecting the option Oriented Start-Up.
1. On the Start-Up screen the main options that require configuration are the parameters P385 (Servomotor
Model) and P202 (Operation Mode).
2. According to the operation mode selected the configurator will be adjusted enabling or disabling other
options, below is a example of the options enabled when the operation mode is 5 - CANopen.
3. After the definition of the operation mode and other options, is only necessary to click on Execute Start-Up
, if it is executed properly a message informing success will be displayed otherwise a message informing
4. After the successfull execution of the Start-Up during the resource creation, the system will enable a step
named Auto-Tuning in the wizard, this step is up to the user to perform or not.
11.10.4Auto-Tuning
The function Auto-Tuning is utilized to realize automatic adjusts on SCA-06 to obtain a better performance of
the equipment.
The Auto-Tuning can be executed during the resource creation, or throught the resource context menu by
selecting the option Auto-Tuning.
1. On the Auto-Tuning screen the options that require configuration are P582 (Rotation Direction) and if the
user program should be stopped before execution and started again after the Auto-Tuning conclusion.
2. After choosing the options is only necessary to click on Execute Auto-Tuning to start the process that
takes less than a minute. if it is executed properly a message informing success will be displayed
otherwise a message informing fail will be displayed.
The import from WLP can be executed during the resource creation.
1. To execute the import WLP function click the Import from WLP button and select the WLP project folder or
the WLP BKP file.
2. After import from WLP completed successfully click the Finish button to copy the imported files to new
resource.
11.10.6Parameters
11.10.6.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.10.6.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.10.7Ladder
11.10.7.1 Coil
11.10.7.1.1 DIRECTCOIL
Logical block used to assign direct values of the output variables.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example keeps the digital output DO9 permanently connected, because the value of A in
this case is the value of the left bus which is always considered high logic level (TRUE).
11.10.7.1.2 IMMEDIATECOIL
Logical block used for assigning values to standard digital outputs instantly.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the digital output corresponding to O1.
Unlike the direct coil, this block does not wait until the end of the scan cycle so that the output value
is updated; this is done at the same time the block is activated.
NOTE!
This block only works with standard digital outputs of the product.
Compatibility
Device Version
PLC300 1.20 or higher
SCA06 2.00 or higher
Diagram
Block Flowchart
Example
The above example immediately activates the internal buzzer when it detects that the power of the
CANopen bus was stopped and remains on until the power is restored.
11.10.7.1.3 INVERTEDCOIL
Logical block used for assigning values denied to output variables.
Ladder Representation
Block Structure
Operation
The block transfers the denied value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example disables the digital output DO3 when some of the digital inputs DI1 and DI2 are
with FALSE value. When both inputs are with a TRUE value, DO3 activates.
11.10.7.1.4 RESETCOIL
Logical block used for indefinite disabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers a FALSE value to the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI5.
11.10.7.1.5 SETCOIL
Logical block used for indefinite enabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers the value of A for the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI6.
11.10.7.1.6 TOGGLECOIL
Logical block used for output variables alternance.
Ladder Representation
Block Structure
Operation
When identifying a transition from FALSE to TRUE (leading edge) on A, the block reverses the status
of O1.
Diagram
Block Flowchart
Example
The above example inverts the state of the digital output DO6 to each disabling the internal buzzer.
Besides the operation as a slave, the PLC300 programmable controller also allows operation as a master for
the CANopen network. PLC300 characteristics and functions as a master for the CANopen network will be
described as follows.
By default, PLC300 programmable controller is programmed to operate as a slave for the CANopen network.
Programming the equipment as a master for the network must be done by using the WSCAN software that
also allows the configuration of the whole CANopen network. A detailed description of the WSCAN software
windows and functions must be obtained in the menu "Help" in the software itself.
After the master configuration has been created, it is necessary to download the configurations by using one
of the product's programming interfaces - refer to the user manual for further information. Once programmed as
a master for the network, in case it is necessary to delete said configurations, the function to delete the user
program - available in the Setup menu - also deletes the CANopen master configurations.
NOTE!
CANopen network is a flexible network that allows several different ways of configuring and
operating. Nonetheless, such a flexibility requires the user to have a good knowledge of the
communication functions and objects used to configure the network, as well as knowledge of the
WSCAN programming software.
PLC300 programmable controller allows the control of a group of up to 63 slaves, using the following
communication tasks and resources:
Physical characteristics - installation, connector, cable, etc. - are the same for PLC300 operating both as a
master and a slave. Address configurations and communication rate are also necessary for the operation as a
master, but these configurations are programmed by the WSCAN software according to the properties defined
for the master in the software itself.
NOTE!
Input network markers are used to map data in RPDOs, while output network markers are used
to map data in TPDOs. They can be accessed in Byte (%IB or %QB), Word (%IW or %QW), or
Double Word (%ID or %QD). Nonetheless, their function is not pre-defined and depends on the
Ladder application developed for the PLC300 controller.
Master Operation
Once programmed to operate as a master, the PLC300 programmable controller will perform the following
steps in order to perform the sequential initialization for each one of the slaves.
1. By sending the communication reset command to the whole network, so that the slaves initialize with
values known for the communication objects.
2. Equipment identification in the network, through the reading via SDO of the 1000h/00h object - Object
Identification.
3. Writing via SDO of all objects programmed for the slave, which usually include the configuration and
mapping of TPDOs and RPDOs, node guarding, heartbeat, besides the manufacturer's specific objects, in
case they are programmed.
4. Error control task initialized - node guarding or heartbeat - in case they are programmed.
5. Sending of the slave to the operating mode.
If one of these steps fails, communication error with the slave will be indicated. Depending on the
configurations, the initialization of slaves will be aborted, and the master will initialize the following slave,
returning to the slave presenting error, after trying to initialize all other slaves in the network.
Similarly, if during the operation of a slave, an error in the error control task is identified, depending on the
configurations made for the master, the slave will be automatically reset and the initialization procedure will be
performed over.
NOTE!
The communication state and the state of each slave can be observed in input system markers.
Besides the communication and configuration objects made in the WSCAN software, blocks for the monitoring
and sending of commands, which can be used during the creation of the application in Ladder for the PLC300
programmable controller, are also available. It is not necessary to use said blocks during the equipment
operation, but its use provides more flexibility and facilitates the diagnosis of communication problems during
the PLC300 programmable controller operation.
11.10.7.2.1.2 CO_SDORead
Block that performs a reading of data via SDO from a remote slave in CANopen network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute it checks whether the SDO client in the specified
NodeID # address is free to send data (Busy variable at FALSE level). If so, it sends the reading
request to the object of Size# size located in Index# and SubIndex# and sets the Active output,
resetting it when receiving the response from the slave. The received data is stored in the Value
variable. If the slave is not free, the block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to Size#. It is important to check this compatibility not to generate
errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Card cannot execute the function
2 Timeout in slave response
3 Slave returned error
Block Flowchart
Example
The example above requests reading of the data size SIZE, located in INDEX - SUBINDEX, of the
NODEID device. This data is forwarded to VALUE. The block ends successfully, Done output is
activated.
11.10.7.2.1.3 CO_SDOWrite
Block that performs a writing of data via SDO from a remote slave in CANopen network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute it checks whether the SDO client in the specified
NodeID # address is free to send data (Busy variable at FALSE level). If so, it sends the writing
request to the object of Size# size located in Index# and SubIndex# and sets the Active output,
resetting it when receiving the response from the slave. If the slave is not free, the block waits Busy
go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to Size#. It is important to check this compatibility not to generate
errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Card cannot execute the function
2 Timeout in slave response
3 Slave returned error
Block Flowchart
Example
The example above requests writing of the data size VALUE, located in INDEX - SUBINDEX, of the
NODEID device. The block ends successfully, Done output is activated.
11.10.7.3 Compare
11.10.7.3.1 COMPEQ
Block that compares the values of Value1 and Value2, enabling the output Q if both are equal.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the output Q the TRUE value if Value1 and
Value2 are the same. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated. Notice that the types of the input variables can be different
without causing execution problems.
The example above checks equality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is disabled.
11.10.7.3.2 COMPGE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
or equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN it sends the Q output to the TRUE value if Value1 is higher
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is disabled.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is activated.
11.10.7.3.3 COMPGT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is higher
than Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is activated.
11.10.7.3.4 COMPLE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than or
equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is disabled.
11.10.7.3.5 COMPLT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks minority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is activated.
The example above checks the minority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the minority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is disabled.
11.10.7.3.6 COMPNE
Block that compares the values of Value1 and Value2, enabling the Q output if Value1 is different from
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is
different from Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks inequality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is disabled.
11.10.7.4 Contact
11.10.7.4.1 NCCONTACT
Normally closed contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the opposite value of digital input DI1 to the digital output
DO2.
11.10.7.4.2 NOCONTACT
Normally open contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the value of digital input DI1 to the digital output DO2.
11.10.7.4.3 NTSCONTACT
Falling edge transition contact.
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from TRUE to FALSE (falling edge or negative edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed or a positive pulse on
the digital input DI2 is given.
11.10.7.4.4 PTSCONTACT
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from FALSE to TRUE (leading edge or positive edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed and a positive pulse on
the digital input DI2 is given.
11.10.7.5 Control
11.10.7.5.1 PID
Block that performs the function of a discrete PID controller. From the input variables, it calculates the
corresponding controller output.
Ladder Representation
Block Structure
Operation
On the positive transition edge in EN, Output receives zero value, and the block executes its
functionality as EN is at TRUE level.
When enabled, this block performs a routine PID control with the Kp, Ki and Kd parameters chosen.
The PID topology used may be the Academic or Parallel, depending on what is chosen in Type#.
Academic Form:
Parallel Form:
The levels of the output signal of the controller are saturated at value MinimumOutput and
MaximumOutput. The SelectSetPoint input level FALSE causes the SetPoint reference be adopted,
allowing the controller maintains control over the process. When SelectSetPoint goes to TRUE level,
the controller has no more domain, and ManualSetPoint becomes to be considered the output signal
of the controller.
Action# will define the feedback operation. If Action# is DIRECT, the operation will be SetPoint –
Feedback. If Action# is REVERSE, the operation will be Feedback – SetPoint.
Feedback receives the process variable considered as the plant output. Ts# receives the sampling
time for the controller and # TauSetPoint receives the time constant for the input filter of the automatic
reference.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Effects of the alteration of gains on the process
If Kp decreases, the process becomes slower; generally more stable or less oscillating; it has
less overshoot.
If Kp increases, the process responds faster; it may become more unstable or more
oscillating; it has more overshoot.
If Ki decreases, the process becomes slower, lagging to reach the "SetPoint"; it becomes
more stable or less oscillating; it has less overshoot.
If Ki increases, the process becomes faster, quickly reaching the "SetPoint"; it becomes more
unstable or more oscillating; it has more overshoot.
If Kd decreases, the process becomes slower; it has less overshoot.
If Kd increases, it has more overshoot.
NOTE!
How to improve the performance of the process through the adjustment of gains (valid for the
Academic PID)
If the performance of the process is almost good, but the overshoot is a bit high, try to: (1)
decrease Kp 20%, (2) decrease Ki 20% and/or (3) decrease Kd 50%.
If the performance of the process is almost good, but it does not have overshoot and lags to
reach the "SetPoint", try to: (1) increase Kp 20%, (2) increase Ki 20% and/or (3) increase Kd
50%.
If the performance of the process is good, but the process output is varying too much, try to:
(1) increase Kd 50%, (2) decrease Kp 20%.
If the performance of the process is bad, i.e. after start up, the transitory lasts several periods
of oscillation that reduce very slowly or never reduce at all, try to: (1) decrease Kp 50%.
If the performance of the process is bad, i.e. after start up it slowly moves towards the
"SetPoint" without overshoot, but is still very far and the process output is less than the rated
value, try to: (1) increase Kp 50%, (2) increase Ki 50%, (3) increase Kd 70%.
Block Flowchart
Example
The above example creates a loop of a digital PID form with sampling time 50 ms, using the
constants KP, KI and KD for control. Automatic reference SETPOINT, filtered by a first order filter with
time constant of 0:01 is used. The error signal is calculated as the difference between the filtered
reference and variable SAIDA_PLANTA. The controller output is saturated between the values 0.1 and
2.5 and sent to the variable ENTRADA_PLANTA.
11.10.7.6 Conversion
11.10.7.6.1 BCD
11.10.7.6.1.1 BCD_TO_WORD
Block that performs the conversion of a BCD code into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BCD and converts it to
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example converts the VALUE variable, in BCD, into a WORD value storing the final result
in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.1.2 WORD_TO_BCD
Block that performs the conversion of a WORD value into a BCD code.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BCD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BCD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.2 BOOL
11.10.7.6.2.1 BYTE_TO_BOOL
Block that performs the conversion of a BYTE value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BYTE, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.2.2 DWORD_TO_BOOL
Block that performs the conversion of a DWORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in DWORD, into a BOOL value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.2.3 LREAL_TO_BOOL
Block that performs the conversion of a LREAL value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as LREAL and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.2.4 REAL_TO_BOOL
Block that performs the conversion of a REAL value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in REAL, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice in the
last example that the values very close to the machine epsilon may result in an interpretation of the
FALSE value.
11.10.7.6.2.5 WORD_TO_BOOL
Block that performs the conversion of a WORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.3 BYTE
11.10.7.6.3.1 BOOL_TO_BYTE
Block that performs the conversion of a BOOL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.3.2 DWORD_TO_BYTE
Block that performs the conversion of a DWORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.10.7.6.3.3 DWORD_TO_BYTES
Block that performs the conversion of a 32 bits (DWORD) value into four 8 bits (4 BYTES) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
four BYTE values (from Result1 to Result4, where Result 1 is LSB), storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into four BYTE value
storing the final result in RESULT1, RESULT2, RESULT3 and RESULT4. The block ends with
success and ENO output is activated.
11.10.7.6.3.4 LREAL_TO_BYTE
Block that performs the conversion of a LREAL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as LREAL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.3.5 REAL_TO_BYTE
Block that performs the conversion of a REAL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that the
results are truncated in decimal and only the eight least significant bits are taken into account.
11.10.7.6.3.6 WORD_TO_BYTE
Block that performs the conversion of a WORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.10.7.6.3.7 WORD_TO_BYTES
Block that performs the conversion of a 16 bits (WORD) value in two 8 bits (2 BYTES) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it in
two BYTE variables, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE "VAL_IN", in WORD, in two BYTE
values storing the final result in RESULT1 and RESULT2. The block ends with success and ENO
output is activated.
11.10.7.6.4 DWORD
11.10.7.6.4.1 BOOL_TO_DWORD
Block that performs the conversion of a BOOL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a DWORD value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.4.2 BYTE_TO_DWORD
Block that performs the conversion of a BYTE value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.4.3 BYTES_TO_DWORD
Block that performs the conversion of four 8 bits (BYTE) values into a 32 bits (DWORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value1, Value2, Value3 and Value4 values
as BYTE and converts it into a DWORD variable, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of four variables VALUE1..4, in BYTE, into a DWORD
value storing the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.4.4 LREAL_TO_DWORD
Block that performs the conversion of a LREAL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as LREAL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.4.5 REAL_TO_DWORD
Block that performs the conversion of a REAL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated. Note that the
results are truncated in decimal and only the thirty-two least significant bits are taken into account.
11.10.7.6.4.6 WORD_TO_DWORD
Block that performs the conversion of a WORD value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in WORD, into a DWORD value storing the final
result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.4.7 WORDS_TO_DWORD
Block that performs the conversion of two 16 bits (WORD) values into a 32 bits (DWORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value1 and Value2 values as WORD and
converts it into a DWORD variable, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of two variable VALUE1 and VALUE2, in WORD, into a
DWORD value storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.10.7.6.5 LREAL
11.10.7.6.5.1 BOOL_TO_LREAL
Block that performs the conversion of a BOOL value into a LREAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
LREAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.5.2 BYTE_TO_LREAL
Block that performs the conversion of a BYTE value into a LREAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
LREAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.5.3 DWORD_TO_LREAL
Block that performs the conversion of a DWORD value into a LREAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
LREAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.5.4 REAL_TO_LREAL
Block that performs the conversion of a REAL value into a LREAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
LREAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.5.5 WORD_TO_LREAL
Block that performs the conversion of a WORD value into a LREAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
LREAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.6 Rad-Deg
11.10.7.6.6.1 DEG_TO_RAD
Block that performs the conversion of a value in degrees into a value in radians.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as in degrees and converts it
into radians, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in degrees, into a corresponding value
in radians storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.10.7.6.6.2 RAD_TO_DEG
Block that performs the conversion of a value in radians into a value in degrees.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as in radians and converts it
into degrees, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in radians, into a corresponding value
in degrees storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.10.7.6.7 REAL
11.10.7.6.7.1 BOOL_TO_REAL
Block that performs the conversion of a BOOL value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.7.2 BYTE_TO_REAL
Block that performs the conversion of a BYTE value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.7.3 DWORD_TO_REAL
Block that performs the conversion of a DWORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.7.4 LREAL_TO_REAL
Block that performs the conversion of a LREAL value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as LREAL and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.7.5 WORD_TO_REAL
Block that performs the conversion of a WORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.8 WORD
11.10.7.6.8.1 BOOL_TO_WORD
Block that performs the conversion of a BOOL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.8.2 BYTE_TO_WORD
Block that performs the conversion of a BYTE value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.10.7.6.8.3 BYTES_TO_WORD
Block that performs the conversion of two 8 bits (BYTE) values into a 16 bits (WORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value1 and Value2 values as BYTE and
converts it into a WORD variable, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of two variable VALUE1 and VALUE2, in BYTE, into a
WORD value storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.10.7.6.8.4 DWORD_TO_WORD
Block that performs the conversion of a DWORD value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Notice that only the
sixteen least significant bits are taken into account.
11.10.7.6.8.5 DWORD_TO_WORDS
Block that performs the conversion of a 32 bits (DWORD) value in two 16 bits (2 WORD) value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the value as DWORD and converts it in two
WORD variables (Result1 and Result2), storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of a variable VALUE, in DWORD, in two WORD values
storing the final result in RESULT1 and RESULT2. The block ends with success and ENO output is
activated.
11.10.7.6.8.6 LREAL_TO_WORD
Block that performs the conversion of a LREAL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as LREAL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
11.10.7.6.8.7 REAL_TO_WORD
Block that performs the conversion of a REAL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Note that the results
are truncated in decimal and only the sixteen least significant bits are taken into account.
11.10.7.7 Counter
11.10.7.7.1 CTD
Countdown block of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it decrements the CV variable until it is zero. While
CV equals zero, the output Q remains at TRUE level. By detecting high-level LD, the block loads the
PV value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. As CV has a value of zero, the Q output is
enabled.
The value of the PV variable was changed to 20, but not yet loaded.
By identifying TRUE level in LD, the block loads the PV value to CV. Since this value is greater than
zero, the Q output is disabled.
At each leading edge identified in CD, the value of COUNT is decremented until it reaches zero, when
the Q output is enabled.
11.10.7.7.2 CTU
Block for gradual count of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it increments the CV variable until it is equal to PV.
While CV equals PV, the output Q remains at TRUE level. By detecting high-level R, the block loads
the zero value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. Since CV has a lower value than of PV, the
Q output is disabled.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the Q output is enabled.
By identifying TRUE level in R, the block loads the zero value to CV. Since this value is lower than of
PV, the Q output is disabled.
11.10.7.7.3 CTUD
Block for gradual count and countdown of input pulses.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it acts as a CTD block and block CTU at the same time
acting on the same CV counter. That is: increments CV until it reaches PV to the leading edges in
CU and decrements CV until it reaches zero to the leading edges in CD. A positive transition in R
carries zero in CV, while a leading edge in LD loads the PV value in CV. If CV has zero value, QD
receives TRUE, and if CV has value equal to PV, QU receives TRUE.
The ENO value forwards to the next Ladder block the EN value.
Block Flowchart
Operation Diagram
Example
The example above shows the disabled block, with all its internal variables zeroed. Although the
external controls are activated, these values are not forwarded to the instance of the block.
When activated, the block identifies the value of PRESET, loading it in PV, and identifies that the
output is at zero, enabling the QD output. When execution is completed, the ENO output is activated.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the QU output is enabled. When execution is completed, the ENO output is activated.
At each leading edge detected in CD, the CV value is decremented. When CV is a value between
zero and PV, both QD and QU outputs are deactivated. When execution is completed, the ENO
output is activated.
A TRUE value in R resets CV, while a TRUE value in LD loads the value of PV to CV. As we can see,
R prevails over LD, leaving CV and enabling the QD output. When execution is completed, the ENO
output is activated.
Ladder Representation
Block Structure
Operation
This block, when it has a value of TRUE in EN, copies LEN values from the POS_SRC position from
the input array (VAR_SRC) to the position POS_DST into the destination array (Result).
Comments:
- POS_SRC, POS_DST and LEN input variables only accept positive integers. If a negative value is
assigned to any of them, the value zero will be considered.
- The Input Array can be repeated on the output without worrying about data being overwritten.
- If the amount of data to be copied defined by LEN exceeds the last position of the input array, only
valid data will be copied to the last position of the input array, thus avoiding any garbage being
assigned to the output array.
- If the amount of data to be copied defined by LEN exceeds the last position of the output array, only
the data required to complete it will be copied, preventing subsequent memory from receiving
unwanted values.
- The block will not execute if LEN has a value greater than the size of the input array.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
It is important to notice that not only LEN but also POS_SRC will not exceed the
VAR_SRC array's size. The same must be noticed when setting values to POS_DST,
related to the output array Result.
To learn how to create arrays please go to: Ladder > Editor > Variables > Editing in
the Rung
Block Flowchart
Example
In the examples above the value of the variable SRC is copied to DST array, according to source
position (POS_SRC), destination (POS_DST) and the lenght to be copied (LEN). The block ends with
success and ENO output is activated.
11.10.7.8.2 DEMUX
Block that creates 16 new BOOL variables from the decomposition of a WORD variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in Word 15 Boolean
values stored in Bit0 to Bit15 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYWORD in Boolean values, which are stored in the
output variables BIT0 to Bit15. The block ends successfully and the ENO output is activated.
11.10.7.8.3 DEMUX2
Block that creates 32 new BOOL variables from the decomposition of a DWORD variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in DWord 32 Boolean
values stored in Bit0 to Bit31 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYDWORD in Boolean values, which are stored in the
output variables BIT0 to Bit31. The block ends successfully and the ENO output is activated
11.10.7.8.4 ILOAD
Block which indirectly loads the value of a variable and transfers it to Value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the of the Address variable belonging to
the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of the address 40 of group 2 (GLOBAL_SYSTEM%S), which
represents the status of ESC key in UINT format for the VALUE variable. The block ends with
success and ENO output is activated.
11.10.7.8.5 ILOADBOOL
Block that indirectly loads the value of a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the Bit contents of the Address variable
belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of bit 1 of the address 24 of group 2 (S GLOBAL_SYSTEM%),
which represents the status of ESC key for the VALUE variable. The block ends with success and
ENO output is activated.
11.10.7.8.6 ISTORE
Block that indirectly loads the Value value in a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the contents of the Address
variable belonging to the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the VALUE value in WORD format in address 444 of group 3
(GLOBAL_SYSTEM% C), which represents the index of the communication port Modbus TCP. The
block ends with success and ENO output is activated.
11.10.7.8.7 ISTOREBOOL
Block that indirectly loads the Value value in a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the Bit contents of the Address
variable belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of VALUE in bit 7 of the address 121 in group 3
(GLOBAL_SYSTEM% C), which represents the disable command of CANopen communication. The
block ends with success and ENO output is activated.
11.10.7.8.8 MUX
Block that creates a new WORD variable from the concatenation of 16 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable Word. Bit0 corresponds to LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYWORD. The block ends with success and ENO output is activated.
11.10.7.8.9 MUX2
Block that creates a new DWORD variable from the concatenation of 32 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable DWord. Bit0 corresponds to LSB (least significant bit) and Bit31
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYDWORD. The block ends with success and ENO output is activated.
11.10.7.8.10 SCALE
Block that converts a value from a scale to another one.
Ladder Representation
Block Structure
Operation
This block, when it has a TRUE value in EN, by setting the minimum and maximum values of the
variable to be converted and the minimum and maximum values of the new scale variable, defined by
the user, performs the Scale function for the conversion of the variable according to equation:
Where:
and
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
- The value in MAXin must be greater than value in MINin;
- The value in MAXout must be greater than value in MINout ;
- Value in Value according to: MINin = Value = MAXin.
Block Flowchart
Example
The example above stores the value of the variable VALUE in Result. The block considers the
equation described above and ends with success and ENO output is activated.
11.10.7.8.11 SEL
Block that replicates to the output the value of an input variable (Value0 or Value1) according to the
Selector selection.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it replicates to the Result variable the Value0 value if
selector is FALSE or the Value1 value if Selector is TRUE.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
TRUE level, the RESULT output gets the value of VALUE1. The block ends successfully and the ENO
output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
11.10.7.8.12 STORE
Block that performs direct storage of data from a source to a destination.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it stores the contents from SRC into DST.
NOTE!
SRC and DST must have data types of the same size.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated.
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated. Note that the binary pattern is maintained between variables of different
types.
11.10.7.8.13 SWAP
Block that performs a swap between the odd bytes and consecutive even bytes into Value and sends
the value to Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it changes the values of the odd bytes (1, 3, 5 and 7) and
the consecutive even bytes (2, 4, 6 and 8, respectively) of the Value variable, storing the result in
Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTA!
Caution when using in Result a variable of REAL type, because the block does not
perform type conversion, that is, it only reverses the bytes in memory.
Block Flowchart
Example
The example changes the position of byte 1 value of VALUE (0x44) with byte 2 of VALUE (0x3D),
storing the final result (0x44_3D) in RESULT. The block ends with success and ENO output is
activated.
The example changes the position of byte 1 value of VALUE (0x96) with byte 2 of VALUE (0xA8) and
byte 3 of VALUE (0x0D) with byte 4 of VALUE (0x00), storing the final result (0x0D_00_96_A8) in
RESULT. The block ends with success and ENO output is activated.
11.10.7.8.14 SWAP2
Block that rearranges the bytes of a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it rearranges the bytes from Value variable, storing the
result in Result.
Type defines how the bytes will be rearranged, as shown in Table 2.
Note that for 16-bit variables, only options 0 and 1 are valid.
For 32-bit variables the options 0, 1, 2, and 3 are valid.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Invalid TYPE options assigns FALSE to ENO, and Result value is not changed.
NOTA!
Caution when using in Result a variable of REAL type, because the block does not
perform type conversion, that is, it only reverses the bytes in memory.
Block Flowchart
Example
The example rearranges the position of value VALUE_IN according to the type set in TYPE_IN = 1
(AB->BA), storing the final result in RESULT. The block ends with success and ENO output is
activated.
11.10.7.8.15 USERERR
Block that generates an alarm or fault with the number programmed by the user.
Ladder Representation
Block Structure
NOTE!
(*) USERERR_INST_0 instance must be configurated to SCA06 and LDW900 .
Operation
When this block has a TRUE value in EN, it generates an alarm or equipment failure, depending on
the type defined in TYPE with CODE code.
The value of ENO informs if the generation of alarm or fault has been executed successfully.
Block Flowchart
Example
The above example, when identifying TRUE level in DI1, generates a fault with the code 974 and sets
the DO1 output.
On devices that have text-based HMI, messages can be configured through an editor. To access the
editor, right click on the USERERR block and select the "Edit USERERR Table" option.
The texts configured in the table will be displayed on the HMI when the block USERERR is enabled.
After editing the table, select the argument CODE of the block equal to the CODE column of the
table.
11.10.7.9 Filter
11.10.7.9.1 LOWPASS
Block that filters the input using a low pass filter of first order and inserts the result in the output.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, filters the input value of Input using a low pass first order
filter described by Tau and Ts#, inserting the result in Output. On the leading edge of EN, Output
receives zero.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example causes OUTPUT, by identifying a leading edge in EN, to display a behavior of first
order with time constant equal to Tau and the sampling time of 2 ms, in order to achieve the reference
set to INPUT. At each calculation completed successfully, the ENO output is activated.
11.10.7.10 Hardware
11.10.7.10.1 IMMEDIATE_INPUT
Block that performs an instantaneous reading of the selected input value, without changing the value
of images (GLOBAL_IO variables).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it gets the immediate value of the selected input in
Source#. If selected the analog input AI1, its value is passed on to Destination. If the digital input is
selected, its bits are concatenated so that DI1 be the least significant bit and DI10 be the most
significant bit and the result is sent to Destination.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 1.20 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The example above is an immediate reading of the signs of the digital inputs DI1 to DI10 of the
PLC300. This reading is then interpreted as a binary sequence with DI1 being the least significant bit
and the result is sent to the DESTINATION variable. The block ends with success, ENO output is
activated.
11.10.7.10.2 IMMEDIATE_OUTPUT
Block that performs an instantaneous reading of the selected output port, without changing the value
of images (GLOBAL_IO variables).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it writes immediately in the selected output the value of
Source. If selected analog output AO1, the Source value is passed on to it. If the digital outputs are
selected, DO1 will receive the zero bit of Source, DO2 bit one, DO3 bit two, and so on.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 1.20 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example is for immediate SOURCE written value, interpreted as a binary sequence, the
digital outputs DO1 to DO9 of the PLC300 and DO1 receives the value of the least significant bit. The
block ends with success, ENO output is activated. Note that the immediate writing does not prevail
over direct coil DO1 or over enabling coils in DO2, DO3 and DO4.
11.10.7.10.3 READENC5
Block that performs counting of encoder pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in EN, it resets its outputs and counts the pulses from the
encoder specified in COUNT_SRC while enabled. This count value is stored in CV.
The specified control in RESET# resets the counter when enabled, while the specified control in
SAVE#, when activated, stores the value of CV in SV. Each of these controls sets its respective flag
(RESET_OCC or SAVE_OCC) for one scan cycle.
The block also allows you to configure an automatic reset when CV reaches the RESTART value.
The value of Q is activated by one scan cycle when CV reaches the value of REF_CNT.
Block Flowchart
Example
The above example reads the encoder 1 and stores its value in COUNTER, with count reference set in
REF and RESET and SAVE control done by the variables LOAD_ZERO and SAVE_COUNT,
respectively. When COUNTER is equals to REF, the output Q is set for one scan cycle.
11.10.7.11 Logic
11.10.7.11.1 Logic Bit
11.10.7.11.1.1 RESETBIT
Logical block used to perform reset of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, resets the bit indicated in Position in the Data variable
that is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the reset of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above resets the bit of AUX zero position, whose initial value is 200 (1100 1000, in
binary). Since this bit already had FALSE value, nothing has changed.
The example above resets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above resets the bit in position nine of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.10.7.11.1.2 SETBIT
Logical block used to perform the set of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sets the bit indicated in Position in the Data variable that
is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the set of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit of AUX zero position, whose initial value is 153 (1001 1001, in binary).
Since this bit already had TRUE value, nothing has changed.
The example above sets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above sets the bit in position fifteen of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.10.7.11.1.3 TESTBIT
Logical block that revolutions the value of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sends to the output Q the bit value indicated in Position
in the Data variable.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit value of zero position of AUX, whose initial value is 74 (0100 1010 in
binary) to the output Q. Since this bit has value 0, the output is disabled.
The example above sets the value of the bit of position three of AUX to the output Q. Since this bit
has value 1, the output is enabled.
The example above sets the bit value of position ten of AUX to output Q. Since AUX is a variable of
BYTE type, it has only eight bits. Thus, the example above creates a runtime error in the block and
therefore the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “and” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "and" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.10.7.11.2.2 NOT
Block that performs a logical operation of boolean "not" in a variable, storing the result in another.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the denied Boolean value of
the Value input variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a boolean "not" operation in AUX, storing the result in AUX2.
11.10.7.11.2.3 OR
Logical block that performs an Boolean "or" operation between two variables, storing the result in a
third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “or” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "or" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.10.7.11.2.4 XNOR
Logical block that performs an Boolean "not exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “denied exclusive or”
Boolean operation of input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "denied exclusive or" Boolean operation between AUX and AUX2,
storing the result in AUX3.
11.10.7.11.2.5 XOR
Logical block that performs an Boolean "exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “xor” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "xor" Boolean operation between AUX and AUX2, storing the result in
AUX3.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical left shifts, according to the Shift value. The most significant bits
that are being discarded are returned to the least significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical left shift by one position in the VALUE variable whose initial
value is -100 (1001 1100 in binary). The discarded bits on the left are reinserted on the right. The final
result (0011 1001 in binary) is stored in RESULT.
The above example performs a logical left rotation by five positions in the VALUE variable whose initial
value is 21 (0001 0101 in binary). The discarded bits on the left are reinserted on the right. The final
result (1010 0010 in binary) is stored in RESULT.
11.10.7.11.3.2 ROR
Block that performs a logical right rotation operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical right shifts, according to the Shift value. The least significant bits
that are being discarded are returned to the most significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logic right shift by one position in the VALUE variable whose initial
value is -128 (1000 0000 in binary). The discarded bits on the right are reinserted on the left. The final
result (0100 0000 in binary) is stored in RESULT. Notice that the sign is not preserved in this
operation.
The above example performs a logical right rotation by one position in the VALUE variable whose
initial value is -127 (1000 0001 in binary). The discarded bits on the right are reinserted on the left. The
final result (1100 0000 in binary) is stored in RESULT.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic left shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
Description of exemple.
Description of exemple.
11.10.7.11.4.2 ASHR
Block that performs arithmetic left shift operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic right shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs an arithmetic right shift by three positions in the VALUE variable whose
initial value is 52 (0011 0100 in binary). The bits on the right are being discarded, and on the left new
zeros are inserted. The final result (0000 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by two positions in the VALUE variable whose
initial value is -79 (1011 0001 in binary). The bits on the right will be discarded and new ones on the
left are inserted, since the arithmetic right shifts preserve the sign of the variable. The final result
(1111 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by thirteen positions in the VALUE variable
whose initial value is -128 (1000 0000 in binary). The bits on the right are being discarded, and on the
left new ones are inserted. The final result (1111 1111 in binary) is stored in RESULT.
11.10.7.11.4.3 SHL
Block that performs a binary logical left shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts left, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is 56 (0011 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (0011 1000 0000 in binary) is stored in RESULT.
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is -56 (1100 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (1100 1000 0000 in binary) is stored in RESULT. Since RESULT is SINT
type, it only accepts the first eight bits (1000 0000).
11.10.7.11.4.4 SHR
Block that performs a binary logical right shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts right, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by two positions in the VALUE variable whose initial
value is 124 (0111 1100 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 1111 in binary) is stored in RESULT.
The above example performs a logical right shift by three positions in the VALUE variable whose initial
value is -98 (1001 1110 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 0011 in binary) is stored in RESULT.
11.10.7.12 Math
11.10.7.12.1 Math Basic
11.10.7.12.1.1 ABS
Block that calculates the Value module, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the absolute value of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the absolute value of the VALUE variable whose initial value is -45,
storing the final result, 45, in RESULT.
The above example calculates the absolute value of the VALUE variable whose initial value is -45. The
final result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by
SINT type. Therefore, RESULT remains unchanged and the output is disabled.
11.10.7.12.1.2 ADD
Block that calculates the sum of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sum of Value1 and Value2
variables. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT.
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the sum of VALUE1 and VALUE2 variables. The final result -170
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.10.7.12.1.3 DIV
Block that calculates the division of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the division of Value1 and
Value2 variables. The value stored will be the exact division if Result is REAL, or, in other cases, only
the quotient. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is of REAL type, the exact value of the division is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it. Notice that the block
accepts arguments of both signs.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains unchanged
and the output is disabled.
11.10.7.12.1.4 MOD
Block that calculates the remainder of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the remainder of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains
unchanged and the output is disabled.
11.10.7.12.1.5 MUL
Block that calculates the multiplication of the values of Value1 and Value2, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the multiplication of Value1
and Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT.
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the product of VALUE1 and VALUE2 variables. The final result 224
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.10.7.12.1.6 NEG
Block that calculates the opposite (i.e., the product with -1) of a value passed by Value, storing the
result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the opposite of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the opposite of the VALUE variable whose initial value is 21, storing
the final result, -21, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -56, storing
the final result, 56, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -128. The final
result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by SINT
type. Therefore, RESULT remains unchanged and the output is disabled.
11.10.7.12.1.7 SUB
Block that calculates the subtraction between the Value1 and Value2 values, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the subtraction of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the subtraction of VALUE1 and VALUE2 variables. The final result 141
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the antilogarithm of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the minimum input value for which the block revolutions a nonzero
result. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Below the minimum values cause the block to return a null value. The block ends with
success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the maximum input value for which the block revolutions a valid result.
The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Values higher than the maximum cause the block to generate an error, the RESULT output
remains unchanged and Done output is disabled.
11.10.7.12.2.2 EXP
Block that calculates the exponential of the Euler number "and" raised to the value of Value, storing
the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the exponent of the Euler
number "and" raised to the Value variable. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the minimum input value for which the block revolutions a nonzero result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values below the minimum cause the block to return to a null value. The block ends with success
and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the maximum input value for which the block revolutions a valid result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values higher than the maximum cause the block to generate an error, the RESULT output remains
unchanged and Done output is disabled.
11.10.7.12.2.3 LN
Block that calculates the natural logarithm of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the natural logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has value zero, and Done output is
disabled.
11.10.7.12.2.4 LOG10
Block that calculates the common logarithm (base 10) of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the common logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.10.7.12.2.5 POW
Block that calculates the value of Value raised to the exponent Power, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of Value raised to
the exponent Power. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. Since the result is higher than the maximum supported by REAL type, the block
generates an error and Done output is disabled.
11.10.7.12.2.6 ROUND
Block that rounds the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the rounded value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals less than 0.5 are discarded. The block ends with success and Done output is activated.
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals greater than or equal to 0.5 promote unity value immediately above. The block ends with
success and Done output is activated.
11.10.7.12.2.7 SQRT
Block that calculates the square root value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the square root value of
Value. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.10.7.12.2.8 TRUNC
Block that truncates the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the truncated value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example truncates the value of the VALUE variable, storing the final result in RESULT.
Decimals are discarded. The block ends with success and Done output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arccosine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block generates a runtime error, since VALUE has value inferior to 1, and
Done output is disabled.
11.10.7.12.3.2 ASIN
Block that calculates the arcsine of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arcsine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block generates a runtime error, since VALUE has value superior to 1, and
Done output is disabled.
11.10.7.12.3.3 ATAN
Block that calculates the arctangent of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for positive values, is always in the first quadrant. The block ends with
success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for negative values, is always in the fourth quadrant. The block ends
with success and Done output is activated.
11.10.7.12.3.4 ATAN2
Block that calculates the arctangent of Y/X, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Y/X. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and Y, is always in the first quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and positive values of Y, is always in the second
quadrant. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and Y, is always in the third quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and negative values of Y, is always in the fourth
quadrant. The block ends with success and Done output is activated.
11.10.7.12.3.5 COS
Block that calculates the cosine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the cosine of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
11.10.7.12.3.6 SIN
Block that calculates the sine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sine of Angle. If no errors,
the Done variable is set. If there is any error in the operation, Done is not set, staying in FALSE
status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts negative input values.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts values greater than one full turn.
11.10.7.12.3.7 TAN
Block that calculates the tangent of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the tangent of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the highest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is higher than the maximum supported by SINT type, the
block generates an error and Done output is disabled.
11.10.7.12.4.2 MIN
Block that compares the values of Value1 and Value2 and stores the lowest of them in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the lowest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is lower than the minimum supported by SINT type, the
block generates an error and Done output is disabled.
11.10.7.12.4.3 SAT
Block that performs a routine for saturation of the value found in Value in accordance with the limits
for Minimum and Maximum, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it performs a comparison between Value and Minimum and
Maximum. If Value is in the range between Minimum and Maximum, Result receives the value of
Value and Q remains FALSE. If Value is higher than Maximum, Result receives Maximum and Q
receives TRUE. If Value is lower than Minimum, Result receives Minimum and Q receives TRUE. If
there is any error in the operation, Q is not set, staying in FALSE status, while Result remains with
its value unchanged.
When EN has FALSE value, Result remains unchanged and Q remains in FALSE.
Block Flowchart
Example
The above example passes the VALUE value to RESULT, since it is not lower than MINIMUM or
higher than MAXIMUM. The block ends successfully and the Q output is disabled, since there was no
saturation.
The above example passes the MAXIMUM to RESULT, since VALUE is higher than MAXIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MINIMUM to RESULT, since VALUE is lower than MINIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MAXIMUM value to RESULT, since VALUE is higher than MAXIMUM.
The block ends successfully and the Q output is activated, since there was saturation.
11.10.7.13 Module
11.10.7.13.1 CALL
Block that loads a file and do a ladder call.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine loading the file and updates the values of the outputs after
completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Compatibility
Device Version
PLC300 4.03 or higher
Block Flowchart
Example
In the example below, the POU 'Program2' will be executed through the 'Main Ladder'.
11.10.7.13.2 USERFB
Block that performs a subroutine programmed by the user.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine programmed by the user and updates the values of the outputs
after completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Refer to section Working with USERFBs for further information.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
In these blocks, the inputs and outputs are defined by the user, who handles them in the Ladder diagram
associated with the block. Here's how to create your USERFB.
1. In the Projects window, locate the resource in which you want to create the USERFB, right-click in User
Function Block and click in New Folder.
2. In the wizard, insert a name for the library to which the USERFB will belong and click Next.
4. If you want to insert a password to protect the block code, check the Encrypt binary checkbox and type a
password. Otherwise, uncheck it. Click Finish.
That's it! The USERFB has been succesfully created. You should see the following in the Projects window.
1. In the Projects window, double click the USERFB file in order to open its Ladder editor.
Analysing the following figure, we see that the USERFB Variables window is different from other Ladder files.
It has only volatile and retain variables in LOCAL scope, which are the internal variables of the block, used in
its subroutine. Besides these, it has three more groups: VAR_IN, VAR_OUT and VAR_IN_OUT.
VAR_IN: internal variables that repersent the input arguments for that block.
VAR_OUT: internal variables that repersent the output arguments for that block.
VAR_IN_OUT: internal variables that repersent the input/output arguments for that block.
3. In order to create an input, click in the VAR_IN tab and click in the symbol. In the window, set a name
and a datatype to this variable and click OK.
4. In order to create an output, click in the VAR_OUT tab and click in the symbol. In the window, set a
name and a datatype to this variable and click OK.
5. In order to create an input/output, click in the VAR_IN_OUT tab and click in the symbol. In the window,
set a name and a datatype to this variable and click OK.
1. In the Projects window, double click the USERFB file in order to open its Ladder editor.
The Ladder Editor will open, like any other Ladder diagram. Any block may be inserted in it, including other
USERFBs. Remember that only local variables may be used in it.
1. In the Projects window, double click the USERFB file in order to open its Ladder editor.
2. In the Pallete window, select the USERFB block from the Module category and drag it to the position
where you want to use it in the Ladder diagram.
3. Double click the question marks (???) above the block in order to insert a instance variable for the
USERFB. Type in the variable name and click Edit. In the confirmation dialog, click Yes to create the new
variable.
4. In the Add dialog, type in a name for the variable and select its parameters. In the Datatype field, choose
the name of the desired USERFB (if there is only one, the field will not be enabled).
For example, if your USERFB name is MYUSERFB, the correct datatype to be selected is
$USERFB_MYUSERFB.
That's it! Your very own USERFB is inserted in the diagram and ready to work!
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it sends a command for the drive to execute a
defined positioning by CamTableID.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
85 CamTableID not valid.
Example
In the up transition of CAMCALC_EXECUTE, the MW_CamCalc block is executed and the cam table
of NUM_OF_TABLE will be calculated according to the block arguments.
When the calculation of cam table 11 is finished, the InSync output is set while the Execute input
remains set.
If it is necessary to adjust the cam table of the CAM curve, just make the adjustment in MASTER_PT
[0], MASTER_PT[1], SLAVE_PT[0] and SLAVE_PT[1], change the content of NUM_OF_TABLE to 12
and execute the MW_CamCalc block again.
In the transition of CAMIN2_EXECUTE, the second MC_CamIn block will be executed (without losing
the position of the master axis) as soon as the first MC_CamIn block finishes executing the curve in
execution.
11.10.7.14.1.2 MC_CamOut
Block responsible for the completion of a synchronization established by a block MC_CamIn.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute it concludes the existing synchronism for the last
execution of a block MC_CamIn. The axis will keep the speed of the moment in which the block is
executed.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
67 Drive in the "Disabled" or “Errorstop” status.
71 P202 different from 4.
73 Drive is not in the “Synchronized Motion” status
78 MC block not executed – Internal fault.
Example
In the up transition of CAMOUT_EXECUTE, the MC_CamOut block is executed. With this, the Busy
and Active signals of this block are set and synchronism started by other CAM blocks ends. When
the process finishes, the Done output of the block is set and remains TRUE while the Execute input
is set.
11.10.7.14.1.3 MC_CamTableSelect
Block that selects a cam table of a CAM curve previously programmed through the tool CAM Profiles.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it searches the specified table in CamTable so
that it can be used by the MC_CamIn block.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
83 Invalid file of the CAM curve cam table.
84 Invalid Cam Table. Cam Table must be from 1 to 10.
Example
In the up transition of CAMSEL_EXECUTE the MC_CamTableSelect block is executed and, thus, the
cam table selected in CAM_INDEX can be used by the MC_CamIn block.
To execute the block, the Done output and CAMSEL_DONE are set and remain at TRUE level while
the Execute input is set.
In this example, CAMSEL_DONE ensures that the MC_CamIn block will not be activated before the
MC_CamTableSelect block is executed successfully.
11.10.7.14.1.4 MW_CamCalc
This block calculates a cam table of the CAM curve.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it builds the specified table in CamTable with the
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
83 Invalid file of the CAM curve cam table.
84 Invalid Cam Table. Cam Table must be from 11 to 20.
Number of points above the programmed in the CAM
86
PROFILES configurator.
Invalid position of the master axis. The position of the
87 master axis must be greater than the position of the
previous point.
MW_CamCalc block in execution. Is only allow ed the
88
execution of an MW_CamCalc block at a time.
89 Cam table in use by the MC_CamIn block.
Double marker w ith position of the nonexistent
90
master axis.
Double marker w ith position of the nonexistent slave
91
axis.
92 Word marker w ith nonexistent curve type.
Example
In the transition from 0 to 1 of bit marker CAMCALC_EXECUTE, the MW_CamCalc block is executed
and the cam table of TABLE will be calculated according to the block arguments.
In this example, the number of points of the curve will be contents of the NUM_POINTS, the position
of the master axis will be in accordance with the contents of MASTER_POINTS [0] and
MASTER_POINTS [1], the position of the slave axis will be in accordance with the contents of
SLAVE_POINTS [0] and SLAVE_POINTS [1] and the type of curve will be in accordance with the
contents of CURVE_TYPE [0] and CURVE_TYPE[1].
Entering the same values in the tool, we can observe the curve below:
When the calculation of the cam table 11 is finished, the InSync output is set while the Execute input
remains set.
With the CAMCALC_DONE set, the MC_CamIn block can be executed.
Ladder Representation
Execution Features
Block Structure
Operation
This block performs an Enable/Disable command of the Axis axis according to the Enable input,
disabling it Enable is FALSE and enabling if Enable is TRUE.
NOTE!
When the MC_Power block is used to enable/disable the real axis, no digital inputs must be
programmed for the Enable function (option 1), or an Alarm A0120 may occur.
When enabling the real axis for the first time, the drive may operate in grid position, depending on the
value of parameter P0773. The position proportional gain (P0159) must be set to obtain a better drive
performance.
When the real axis is disabled, the axis status will be Disabled. When enabling the real axis, the axis
status will change to Standstill.
When EN has FALSE value, Status remains FALSE. The Status output is activated when the block
finishes the execution successfully, remaining at TRUE level until Enable receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
66 Drive in the "ErrorStop" status.
71 P202 different from 4.
Example
On the leading edge of POWER_COMMAND, the real axis is enabled and its status, the system
marker REAL_AXIS_STATUS (%SW6004), is changed to Standstill (%SW6004 = 2). The Status
output is set.
After the transition from 0 to 1 of MOTION_COMMAND, the MC_MotionAbsolut block is executed and
the positioning for the position 10 revolutions starts. The axis status is changed to “Discrete
Motion” (%SW3406 = 6).
While positioning is executed, POWER_COMMAND is reset. Since the BufferMode of the MC_Power
is set to Buffered, the axis will be disabled only in the positioning completion.
When the positioning is finished, the Done output of the MC_MotionAbsolut block is set for 1 scan
cycle and the axis is disabled (MC_Power.Enable = 0). The axis status changes to “Disable” (%
SW6004 = 0).
11.10.7.14.2.2 MC_Reset
Block responsible for cleaning up the failure status of drive.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it performs cleanliness in the drive status,
changing it from Errorstop to Disabled.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
71 P202 different from 4.
Example
If a fault occurs on the drive, the axis status will change to “Errorstop” (%SW6004 = 1).
When an up transition of RESET_COMMAND occurs, the MC_Reset block will be executed and axis
status will change to Disabled (SW6004 = 0%). The Done output will remain set while the Execute
input is TRUE level.
11.10.7.14.2.3 MC_Stop
Block responsible for executing a controlled stop.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it sends a command for a controlled stop of the
axis. While Execute has TRUE level, no other MC block is executed.
When the MC_Stop block is executed, the drive will star operating in grid position and remain this
way even after the conclusion of the block. The position proportional gain must be set (P0159) so as
to obtain a better drive performance.
In the execution of the block, the axis status will change to Stopping. When the stop is ended and
the block is no longer active, the axis status will change to Standstill.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Deceleration programmed below the minimum
64
allow ed.
Deceleration programmed above the maximum
65
allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
71 P202 different from 4.
78 MC block not executed – Internal fault.
93 Jerk programmed below the minimum allow ed.
94 Jerk programmed above the maximum allow ed.
Example
In the up transition of MOTION_COMMAND, the MC_MotionVelocity block is executed. With this, the
Busy and Active signals of this block are set and the motion to reach the speed of 200 RPM starts.
The axis status (%SW6004) changes from Standstill (2) to Continuous Motion (5).
At the moment the speed reaches 200 rpm, MOTION_RESULT is set.
With the up transition of STOP_COMMAND, the MC_Stop block is instantly executed; thus, the
Busy and Active signals of this block are set and the stop starts. At the same time, the Busy, Active
and InVelocity signals of the MC_MotionVelocity block are reset and the CommandAborted signal is
set for 1 scan. The axis status (%SW6004) changes from Continuous Motion (5) to Stopping (3).
At the end of the stop, the Done output MC_Stop block is set and remains until Execute input is
reset. The axis status (%SW6004) remains equal to Stopping (3) and no other MC block will be
executed.
With the transition of rising of MOTION_COMMAND, the MC_MotionVelocity block is started, but as
the MC_Stop block is active, an error occurs and the Error signal will be set by entering the value 69
in ErrorID.
When the Execute input of the MC_Stop block is reset, the Busy, Active and Done signal are reset.
The axis status (%SW6004) changes from Stopping (3) to Standstill (2) and other MCs blocks can be
executed.
11.10.7.14.2.4 MW_IqControl
Block conducting the Iq control programmed.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute, it sends an execution command of the lq control
according to the programmed parameters.
In the execution of the block the axis status will change to Continuous Motion. It order to finish the
block, it is necessary to execute another block or the changing of the drive to the Disable or Errorstop
status.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
80 Iq programmed above the maximum allow ed.
81 IqRamp programmed below the minimum allow ed.
82 IqRamp programmed above the maximum allow ed.
Example
In the up transition of IQCONTROL_EXECUTE, the MW_IqControl block is executed. With this, the
Busy and Active signals of this block are set and starts the execution of Iq control according to
parameters set. When the process finishes, the Done output of the block is set and remains TRUE
while the Execute input is set.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute, it sends a command for synchronism in speed
between the programmed axes.
For the slave axis to reach the speed of the master axis, a motion will be performed with an
acceleration/deceleration configured in the “Acceleration” and “Deceleration” arguments. The motion
direction will depend on the signal of the RatioNumerator. If RatioNumerator is greater than zero, the
motion will be in the same direction as the master axis, and if the RatioNumerator is smaller than
zero, the motion will be in the opposite the direction of the master axis.
The InGear output is activated when the sync is achieved. It order to finish the block, it is necessary
to execute another block or the changing of the drive to the Disabled or Errorstop status.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
Acceleration programmed below the minimum
62
allow ed.
Acceleration programmed above the maximum
63
allow ed.
Deceleration programmed below the minimum
64
allow ed.
Deceleration programmed above the maximum
65
allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
72 Invalid synchronism ratio.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
Example
In the up transition of GEARIN1_EXECUTE, the first MC_GearIn block is executed. With this the
Busy Active and this block signals are set and the search of synchronization with the configured
acceleration begins. As the ratio configured is 1:2 and the master axis is at 200 RPM, the slave axis
must reach 100 RPM to establish the synchronism.
At the moment in which the speed reaches 100 RPM, the InGear output is set.
With the transition of rising GEARIN2_EXECUTE, the second MC_GearIn block is instantly executed.
With this the Busy Active signals of this block are set and the search of synchronization with the
configured acceleration begins. As the ratio configured is 1:4 and the master axis is at 200 RPM, the
slave axis must reach 50 RPM to establish the synchronism. At the same time, the Busy, Active
and InGear signals of the first block are reset and the CommandAborted signal is set for 1 scan.
When the speed of 50 RPM is reached, the InGear output of the second block is set and remains
until the execution of other block.
11.10.7.14.3.2 MC_GearInPos
Block responsible for execution of the synchronism in position between the programmed axes.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute, it sends a command for synchronism in position
between the programmed axes.
For the slave axis to reach the speed of the master axis, a motion will be performed with an
acceleration/deceleration configured in the “Acceleration” and “Deceleration” arguments. The motion
direction will depend on the signal of the RatioNumerator. If RatioNumerator is greater than zero, the
motion will be in the same direction as the master axis, and if the RatioNumerator is smaller than
zero, the motion will be in the opposite the direction of the master axis.
When the MC_GearInPos block is executed, the drive will start operating in grid position and remain
this way even after the conclusion of the block. The position proportional gain must be set (P0159) so
as to obtain a better drive performance.
In the execution of the block, the axis status will change to Synchronized Motion.
The InSync output is activated when the sync is achieved. It order to finish the block, it is necessary
to execute another block or the changing of the drive to the Disabled or Errorstop status.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
Acceleration programmed below the minimum
62
allow ed.
Acceleration programmed above the maximum
63
allow ed.
Deceleration programmed below the minimum
64
allow ed.
Deceleration programmed above the maximum
65
allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
72 Invalid synchronism ratio.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
Example
In the up transition of GEARINPOS_EXECUTE, the MC_GearInPos block is executed. With this the
Busy Active and this block signals are set and the search of synchronization with the configured
acceleration begins. As the ratio configured is 79:121 and the master axis is at 200 RPM, the slave
axis must reach 131 RPM to establish the synchronism.
At the moment in which the speed reaches 131 RPM, the InSync output is set.
11.10.7.14.3.3 MC_GearOut
Block responsible for finalizing of the synchronism in position between the programmed axes.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute it concludes the synchronism of MC_GearIn
MC_GearInPos or blocks the programmed axis. The axis will keep the speed of the moment in which
the block is executed.
When the MC_GearOut block is executed, the drive does not operate in grid position. In the execution
of the block the axis status will change to ContinuousMotion.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
67 Drive in the "Disabled" or “Errorstop” status.
71 P202 different from 4.
73 Drive is not in the “Synchronized Motion” status.
78 MC block not executed – Internal fault.
Example
In the up transition of GEAROUT_EXECUTE, the MC_GearOut block is executed. With this, the Busy
and Active signals of this block are set and synchronism concluded by other blocks of synchronism
between master and slave. When the process finishes, the Done output of the block is set and
remains TRUE while the Execute input is set.
11.10.7.14.3.4 MC_PhasingRelative
Block responsible for execution of a phase difference in position between the programmed axes.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute, it checks the synchronism between master and
slave and sends a command to motion the master axis in order to let it out-of-phase of the slave axis
in the magnitude of PhaseShift.
When the MC_PhasingRelative block is executed, the drive does not change the current operating
mode. In the execution of the block, the axis status will not change.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
67 Drive in the "Disabled" or “Errorstop” status.
71 P202 different from 4.
73 Drive is not in the “Synchronized Motion” status.
78 MC block not executed – Internal fault.
79 Master axis is not in synchronism.
96 MC_PhasingRelative block in execution.
Example
With the position synchronism of the Real Axis with the Quick Counter through the MC_GearInPos
block, and with the occurrence of an up transition in PHASING_EXECUTE, the MC_PhasingRelative
block is executed and a shift of 0.05 turn is applied to the master axis, resulting in a pulse in the
speed. The Done output is set while the Execute input is set.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, if the axis status is Homing, the axis status
changes to the Standstill.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
71 P202 different from 4.
75 Status of the Drive different from “Homing”.
Example
In the up transition of FINISH_EXECUTE, the MC_FinishHoming block is executed. With this, the
Busy and Active signals of this block are set and the status of the selected axis changes to
Standstill. When the process finishes, the Done output of the block is set and remains TRUE while
the Execute input is set.
11.10.7.14.4.2 MC_HomeDirect
Block responsible for changing the reference position of the user.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute, it makes the reference position of the user
(P0051, P0052 and P0053) to be changed to the value of the SetPosition argument.
In the execution of the block, if the axis status is Homing, the axis status changes to the Standstill.
Otherwise, it will remain in its current status.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
71 P202 different from 4.
Status of the Drive different from “Standstill” or
76
“Homing”.
Example
In case 1, when executing the block, the AbsoluteSwitch is not activated. Since the Direction
argument is set to MC_SwitchNegative, the motion is in the negative direction. When a leading edge
occurs in AbsoluteSwitch (SwitchMode = MC_EdgeOn), the motor stops and revolutions to the
position in which the edge occurred.
In case 2, when executing the block, the AbsoluteSwitch is activated. Since the argument Direction
is set to MC_SwitchPositive, the motion is in the positive direction, when exiting the AbsoluteSwitch,
the motor stops and changes to motion in the negative direction. When a leading edge occurs in
AbsoluteSwitch (SwitchMode = MC_EdgeOn), the motor stops and revolutions to the position in
which the edge occurred.
All the motions are performed with an acceleration/deceleration programmed in P0100 and P0101.
When returning to the leading edge position of AbsoluteSwitch, the Done output of the block is set
and remains TRUE while the Execute input is set.
In the up transition of STEPABSSW_DONE, the MC_StepDirect block is executed and the user’s
reference position (P0051, P0052 and P0053) is changed to 3.5 revolutions (P0051 = 8192, P0052 =
3 and P0053 = 0). The axis status is changed to Standstill.
11.10.7.14.4.3 MC_StepAbsoluteSwitch
Block responsible for searching the position of AbsoluteSwitch.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it sends a command to search the position of
AbsoluteSwitch.
The AbsoluteSwitch can only be connected to digital inputs 1, 2 or 3, seeing that the programmed
function of the digital input must be in accordance with the SwitchMode argument. If SwitchMode is
configured as MC_EdgeOn (leading edge), the function of the digital input (P0300, P0301 or P0302)
must be “store position - leading edge" (option 8). If the SwitchMode is configured as MC_EdgeOff
(falling edge), the function of the digital input (P0300, P0301 or P0302) must be “store position - falling
edge” (option 9). AbsoluteSwitch will be considered the first digital input configured according to
SwitchMode from digital input 1. If no digital inputs are configured according to SwitchMode, error 77
will occur in the block and it will not be executed.
If when searching the AbsoluteSwitch position, the LimitSwitch position is reached, the motion will
change direction up to the AbsoluteSwitch position.
The search will be executed with the speed configured in the “Velocity” argument and an acceleration/
deceleration configured in the General Profile.
With the execution of the MC_StepAbsoluteSwitch block, the user’s reference position (P0051,
P0052 and P0053) is not changed. The drive will start operating in grid position and remain this way
even after the conclusion of the block. The position proportional gain must be set (P0159) so as to
obtain a better drive performance.
In the execution of the block, the will change to Homing and will remain this way until the execution of
the MC_StepRefPulse, MC_StepDirect or MC_FinishHoming blocks.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
60 Speed programmed below the minimum allow ed.
61 Speed programmed above the maximum allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
71 P202 different from 4.
Status of the Drive different from “Standstill” or
76
“Homing”.
Digital inputs 1, 2 and 3 not configured according to
77
“Siw itchMode”.
Example
In case 1, when executing the block, the AbsoluteSwitch is not activated. Since the Direction
argument is set to MC_SwitchNegative, the motion is in the negative direction. When a falling edge in
AbsoluteSwitch (SwitchMode = MC_EdgeOff) occurs, the motor stops and revolutions to the position
in which the edge occurred.
In case 2, when executing the block, the AbsoluteSwitch is activated. Since the argument Direction
is set to MC_SwitchPositive, the motion is in the positive direction, when exiting the AbsoluteSwitch,
the motor stops and changes to motion in the negative direction. When a falling edge in
AbsoluteSwitch (SwitchMode = MC_EdgeOff) occurs, the motor stops and revolutions to the position
in which the edge occurred.
In case 3, when executing the block the AbsoluteSwitch is not activated. Since the Direction
argument is set to MC_SwitchNegative, the motion is in the negative direction. But when the
LimitSwitch is found, the motor stops and changes the motion to the positive direction. When leaving
the AbsoluteSwitch, the motor stops again and changes the motion to the negative direction. When a
falling edge in AbsoluteSwitch (SwitchMode = MC_EdgeOff) occurs, the motor stops and revolutions
to the position in which the edge occurred.
All the motions are performed with an acceleration/deceleration programmed in P0100 e P0101,
except when the LimitSwitch is found, case in which the motor stops instantly.
When returning to the falling edge position of the AbsoluteSwitch, the Done output of the block is set
and the Busy and Active signals of this block are reset. The Done output remains TRUE while the
Execute input is set.
11.10.7.14.4.4 MC_StepLimitSwitch
Block responsible for searching the position of LimitSwitch.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a rising edge in Execute, it sends a command to search the position of
LimitSwitch.
The LimitSwitch can only be connected to digital inputs 1, 2 or 3, seeing that the programmed
function of the digital input must be in accordance with the "LimitSwitchMode" argument and the
“Direction” argument. It will be considered LimitSwitch the first digital input configured according to the
table, from digital input 1. If no digital inputs are configured according to LimitSwitchMode and
Direction, error 77 in the block will occur and it will not be executed:
The search will be executed with the speed configured in the “Velocity” argument and an acceleration/
deceleration configured in the General Profile.
With the execution of the MC_StepLimitSwitch block, the user’s reference position (P0051, P0052
and P0053) is not changed. The drive will start operating in grid position and remain this way even
after the conclusion of the block. The position proportional gain must be set (P0159) so as to obtain a
better drive performance.
In the execution of the block, the will change to Homing and will remain this way until the execution of
the MC_StepRefPulse, MC_StepDirect or MC_FinishHoming blocks.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
60 Speed programmed below the minimum allow ed.
61 Speed programmed above the maximum allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
71 P202 different from 4.
76 Status of the Drive different from “Standstill” or “Homing”.
Digital inputs 1, 2 and 3 not configured according to
77
“Siw itchMode”.
97 Position feedback not allow ed. Please check P290 and P360.
Example
In the up transition of HOME_EXECUTE the MC_StepLimitSwitch block is executed. With this, the
Busy and Active signals of this block are set and the search for LimitSwitch begins.
In case 1, when executing the block, the LimitSwitch is not activated. Since the Direction argument is
set to MC_Negative, the motion is in the negative direction. When the leading edge in LimitSwitch
(LimitSwitchMode = MC_EdgeOn) occurs, the motor stops and revolutions to the position in which
the edge occurred.
In case 2, when executing the block, the LimitSwitch is activated. Even with the "Direction” argument
configured as MC_Negative, the motion will be in the positive direction and, when leaving the
LimitSwitch, the motor stops and changes the motion to the negative direction. When the leading
edge in LimitSwitch (SwitchMode = MC_EdgeOn) occurs, the motor stops and revolutions to the
position in which the edge occurred.
All the motions are performed with an acceleration/deceleration programmed in P0100 e P0101,
except when the LimitSwitch is found, case in which the motor stops instantly.
When returning to the leading edge position of the LimitSwitch, the Done output of the block is set
and the Busy and Active signals of this block are reset. The Done output remains TRUE while the
Execute input is set.
11.10.7.14.4.5 MC_StepReferencePulse
Block responsible for searching the position of the zero pulse.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a rising edge in Execute, it sends a command to search the position of zero
pulse.
The search will be executed with the speed configured in the “Velocity” argument and an acceleration/
deceleration configured in the General Profile.
With the execution of MC_StepReferencePulse block, the reference position of the user (P0051,
P0052 and P0053) is changed to the value of the SetPosition argument. The drive will start operating
in grid position and remain this way even after the conclusion of the block. The position proportional
gain must be set (P0159) so as to obtain a better drive performance.
In the execution of the block, the axis status will change to Homing. When concluding the search, the
axis status will change to Standstill.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
60 Speed programmed below the minimum allow ed.
61 Speed programmed above the maximum allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
71 P202 different from 4.
Status of the Drive different from “Standstill” or
76
“Homing”.
Example
In case 1, when executing the block, the LimitSwitch is not activated. Since the Direction argument is
set to MC_Negative, the motion is in the negative direction. When the leading edge in LimitSwitch
(LimitSwitchMode = MC_EdgeOn) occurs, the motor stops and revolutions to the position in which
the edge occurred.
In case 2, when executing the block, the LimitSwitch is activated. Even with the "Direction” argument
configured as MC_Negative, the motion will be in the positive direction and, when leaving the
LimitSwitch, the motor stops and changes the motion to the negative direction. When the leading
edge in LimitSwitch (SwitchMode = MC_EdgeOn) occurs, the motor stops and revolutions to the
position in which the edge occurred.
All the motions are performed with an acceleration/deceleration programmed in P0100 e P0101,
except when the LimitSwitch is found, case in which the motor stops instantly.
When returning to the leading edge position of the LimitSwitch, the Done output of the block is set
and the Busy and Active signals of this block are reset. The Done output remains TRUE while the
Execute input is set.
In the up transition of STEPLIMSW_DONE, the MC_SteoRefPulse block is executed and the search
of the null pulse starts.
The motion will be in the positive direction and when the null pulse is found, the motor stops and
revolutions to the null pulse position.
All the motions are performed with an acceleration/deceleration programmed in P0100 and P0101.
When returning to the null pulse position, the Done output of the block is set and remains in TRUE
while the Execute input is set. The user’s reference position (P0051, P0052 and P0053) is changed to
10.5 revolutions (P0051 = 8192, P0052 = 10 and P0053 = 10).
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge on Execute, it will perform a positioning into the absolute
position configured in the Position argument with a maximum speed configured in the Velocity
argument and acceleration/deceleration set in Acceleration and Deceleration arguments. Depending
on the distance of the positioning and the acceleration and deceleration values, the motor speed will
not reach the maximum configured speed.
NOTE!
If the Jerk argument value is not zero:
1) the value of the deceleration will be the same as the configured value in the acceleration;
2) the ContinuousUpdate On-line argument will have no effect and the argument values are
considered at the time of positive transition Execute;
3) it is not allowed to perform positioning with another active block, occurring ErrorID 95.
When the MC_MotionAbsolute block is executed, the drive will start operating in grid position and
remain this way even after the conclusion of the block. The position proportional gain must be set
(P0159) so as to obtain a better drive performance.
In the execution of the positioning, the axis status will change to Discrete Motion. When the
positioning is concluded, the axis status will change to Standstill.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
60 Speed programmed below the minimum allow ed.
61 Speed programmed above the maximum allow ed.
Acceleration programmed below the minimum
62
allow ed.
Acceleration programmed above the maximum
63
allow ed.
Deceleration programmed below the minimum
64
allow ed.
Deceleration programmed above the maximum
65
allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
93 Jerk programmed below the minimum allow ed.
94 Jerk programmed above the maximum allow ed.
It is not allow ed to execute positioning w ith Jerk
95
w hen another block is active.
Example
When the position 15 revolutions is reached, the Done output of the second block is set and the Busy
and Active signals of this block are reset. The Done output remains TRUE while the Execute input is
set.
11.10.7.14.5.2 MC_MoveRelative
Block responsible for performing one positioning to the relative position programmed.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it will perform a positioning according to the
relative distance to the current position, configured in the Distance argument, with a maximum speed
configured in the Velocity argument and acceleration/deceleration configured in Acceleration and
Deceleration arguments. Depending on the distance of the positioning and the acceleration and
deceleration values, the motor speed will not reach the maximum configured speed.
NOTE!
If the Jerk argument value is not zero:
1) the value of the deceleration will be the same as the configured value in the acceleration;
2) the ContinuousUpdate On-line argument will have no effect and the argument values are
considered at the time of positive transition Execute;
3) it is not allowed to perform positioning with another active block, occurring ErrorID 95.
When the MC_MotionRelative block is executed, the drive will start operating in grid position and
remains this way after the conclusion of the block. The position proportional gain must be set (P0159)
so as to obtain a better drive performance.
In the execution of the positioning, the axis status will change to Discrete Motion. When the
positioning is concluded, the axis status will change to Standstill.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block
finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
60 Speed programmed below the minimum allow ed.
61 Speed programmed above the maximum allow ed.
Acceleration programmed below the minimum
62
allow ed.
Acceleration programmed above the maximum
63
allow ed.
Deceleration programmed below the minimum
64
allow ed.
Deceleration programmed above the maximum
65
allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
93 Jerk programmed below the minimum allow ed.
94 Jerk programmed above the maximum allow ed.
It is not allow ed to execute positioning w ith Jerk
95
w hen another block is active.
Example
When the positioning is finished, the first block is completed. With this, the Busy and Active signals
of this block are reset and Done output is set for 1 scan cycle.
When the positioning of 5 revolutions finishes, the Done output of the second block is set and the
Busy and Active signals of this block are reset. The Done output remains TRUE while the Execute
input is set.
When the positioning of 5 revolutions finishes, the Done output of the second block is set and the
Busy and Active signals of this block are reset. The Done output remains TRUE while the Execute
input is set.
11.10.7.14.5.3 MC_MoveVelocity
Block responsible for making a motion to the programmed speed.
Ladder Representation
Execution Features
Block Structure
Operation
When this block detects a leading edge in Execute, it will perform a motion into the configured speed
in the Velocity argument with acceleration/deceleration configured in Acceleration and Deceleration
arguments. The motion direction will depend on the speed signal: If the speed is greater than zero,
the motion will be in the positive direction (clockwise) and if the speed is less than zero, the motion
will be in the negative direction (counterclockwise).
NOTE!
If the Jerk argument is different from zero, the ContinuousUpdate On-line argument will have no
effect and the argument values are considered at the time of positive transition Execute.
When the MC_MotionVelocity block is executed, the drive does not operate in grid position.
In the execution of the motion the axis status will change to Continuous Motion.
When Execute has FALSE value, InVelocity remains FALSE. The InVelocity output is activated when
the programmed speed is achieved successfully, remaining TRUE level while the block is active. It
order to conclude the block, it is necessary the execution of another block or the changing of the drive
to the Disable or Errorstop status.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
Attempt to execute block w ith BufferMode in Single
52
w hen another block is active.
60 Speed programmed below the minimum allow ed.
61 Speed programmed above the maximum allow ed.
Acceleration programmed below the minimum
62
allow ed.
Acceleration programmed above the maximum
63
allow ed.
Deceleration programmed below the minimum
64
allow ed.
Deceleration programmed above the maximum
65
allow ed.
67 Drive in the "Disabled" or “Errorstop” status.
69 Drive in the "Stopping" status.
Attempt to execute block w ith BufferMode in
70 Buffered w hen another block is active and another
block is w aiting.
71 P202 different from 4.
74 Drive in the "Homing" status.
78 MC block not executed – Internal fault.
93 Jerk programmed below the minimum allow ed.
94 Jerk programmed above the maximum allow ed.
It is not allow ed to execute positioning w ith Jerk
95
w hen another block is active.
Example
In the up transition of MOTION1_EXECUTE, the first MC_MotionVelocity block is executed. With this,
the Busy and Active signals of this block are set and the motion to reach the speed of 200 RPM
starts.
At the moment in which the speed reaches 200 RPM, the InVelocity output is set.
When the speed of 100 RPM is reached, the InVelocity output of the second block is set and remains
until the execution of another block.
Since the ContinuousUpdate argument is configured as Online, with the change of the
MOTION2_VELOCITY value to 80, the speed immediately changes to 80 RPM, without executing an
acceleration/deceleration ramp.
11.10.7.15 RTC
11.10.7.15.1 INTIME
Block that performs a programmed enabling for a time based on RTC (Real Time Clock).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it has two modes of operation. If Q_OPTION# is Normal, Q
is enabled when the internal clock's time is equal to that defined by the parameters TIMEON and
disabled when the internal clock's time is equal to the parameters set by TIMEOFF. If Q_OPTION# is
Inverted, Q is disabled when the internal clock's time is equal to that defined by the parameters
TIMEON and enabled when the internal clock's time is equal to the parameters set by TIMEOFF.
Block Flowchart
Example
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is lower than the registered enabling
inputs of the block (HOUR_ON, MINUTE_ON and SECOND_ON). This way, the Q output is disabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is equal to the registered in the
enabling inputs of the block (HOUR_ON, MINUTE_ON and SECOND_ON). This way, the Q output is
disabled.
In the above example, the INTIME block is disabled. This way, regardless of the input, the Q output is
disabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is equal to the registered in the
disabling inputs of the block (HOUR_OFF, MINUTE_OFF and SECOND_OFF). This way, the Q
output is enabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is superior to the registered in the
disabling inputs of the block (HOUR_OFF, MINUTE_OFF and SECOND_OFF). Thus, the Q output is
disabled.
11.10.7.15.2 INWEEKDAY
Block that performs a programmed enabling for weekdays based on RTC (Real Time Clock).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it has two modes of operation. If Q_OPTION# is Normal, Q
is enabled if the day of week of the internal clock has Enabled parameter in the block. If Q_OPTION#
is Inverted, Q is disabled if the day of week of the internal clock has Enabled parameter in the block.
NOTE!
The weekdays are identified by numbers, with Sunday being day 0 and Saturday day 6.
Block Flowchart
Example
In the above example, the INWEEKDAY block is disabled. This way, regardless of the input, the Q
output is disabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
NORMAL operation. The current day of the week of the device's internal clock is Wednesday (value
3), which has ENABLED status in the programming. This way, the Q output is enabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
NORMAL operation. The current day of the week of the device's internal clock is Thursday (value 4),
which has DISABLED status in the programming. Thus, the Q output is disabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
INVERTED operation. The current day of the week of the device's internal clock is Thursday (value 4),
which has DISABLED status in the programming. This way, the Q output is enabled.
11.10.7.16 Timer
11.10.7.16.1 TOF
Timer block that, when energized, disables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is TRUE, the Q output is also TRUE and ET also receives the value zero.
On the negative transition edge in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state FALSE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example disables the DO1 output to identify a low level in DI1 for 12 seconds, remaining
disabled until DI1 again be TRUE.
11.10.7.16.2 TON
Timer block that, when energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is FALSE, the Q output is FALSE and ET also receives the value zero.
On the edge positive transition in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state TRUE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of the block and of the routine variables.
When activated the IN input, counting is triggered. Since ET equals PT, the Q output is enabled.
Note that a change in PRESET variable is not forwarded to the PT field while the IN entry remains
enabled.
Disabling the IN input, the value of PT is updated and the Q output is disabled. When activating it
again, counting is triggered.
When ET reaches the value PT, the Q is output enabled and remains so while IN is at TRUE level.
11.10.7.16.3 TP
Timer block that, when identifies it is energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
On the edge positive transition in IN, Q receives TRUE value, counting is triggered and ET is
incremented according to TIMEBASE. When ET equals PT, the Q output goes to state FALSE until
IN revolutions to FALSE. At that moment, if IN is at TRUE level, nothing happens. On the edge
positive transition in IN, ET is automatically reset.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example enables the DO1 output for six seconds at each DI1 positive transition.
Description
The cam tables from 1 to 10 are tables of fixed points, which are transmitted at the moment of the download of
the application. In order to use the tables 1 to 10, first the MC_CamTableSelect block must be executed with
the desired table and then the MC_CamIn block.
The cam tables 11 to 20 are tables of variable points. In order to use the tables 11 to 20, first the
MC_CamCalc block must be executed with the desired table and then the MC_CamIn block.
For the SCA06 equipment, it is allowed programming at most 200 fixed points and 100 variable points, seeing
that the maximum number of variable points of each table must be configured in the Max Points column, as
shown below:
In order to edit the cam table, click on the Edit button, and the cam profile editor will open, as in the figure
below:
Cam table:
NOTE!
The CAM block is always relative, so the first point of the cam table will always be master= 0 and
slave = 0.
Master speed:
Speed used to calculate the speed, acceleration and jerk of the slave.
NOTE!
The speed, acceleration and jerk of the slave must be used as reference to develop the cam
profile, where they are calculated numerically, not taking into account load, inertia, torque and
dynamics of the drive.
A point can be added by means of the add or insert point buttons or by double clicking the graphic in the
position where you wish to add the point. You can double click any region of the graphic. In case an
interpolation already exists in this region, the editor will insert this point between the two points of the
interpolation.
The point is always added as linear interpolation.
When a point is added or inserted by means of the respective buttons, the master and slave values come
zeroed. In case of point insertion, that may cause an interruption of the profile, because the master position
must always grow in relation to the origin; therefore, the value of the master and slave must be edited by
clicking on their cells in the cam table.
On the figure below, a point was inserted by double clicking:
In order to change the type of interpolation, click on the type cell in the line corresponding to the origin of the
interpolation and select the desired type.
In the figure below, the point was changed for cubic interpolation.
Now, in this curve, it is already possible to see other magnitudes besides the position, such as speed,
acceleration and jerk. For a better view of all magnitudes, we can use the Set Zoom All button according to
the figure below.
The same way, we can choose one of the magnitudes and use the Apply Selected Zoom button. In the
example below, a zoom was applied to the speed.
Another interesting tool is the cursor. In the example below, we will place the cursor in point of maximum
speed.
You must bear in mind that the speed, acceleration and jerk of the slave depend on the master speed;
therefore, it is interesting to change them so as to simulate something really close to the effective values. In
the figure below, the master speed will be changed to 1000 rpm and we will analyze the same position of the
cursor.
During the project of the cam profile, all those magnitudes must be observed, because they may be
accomplished or not due to mechanical, electrical and electronic limitations of the involved equipment.
Since the acceleration and jerk graphics are calculated taking into account the interpolation between two
points, the acceleration and jerk will be shown as equal to zero in the junctions between linear interpolations.
Although in theory we know that in a speed step the acceleration and jerk are infinite, in practice the
acceleration and jerk at this moment will also depend on the mechanical, electrical and electronic limitations
of the involved equipment. Those speed steps must be observed and considered in the project of the cam
profile. The figure below shows an example of this situation.
The CAM block offers two types of interpolation: linear and cubic. The following equations are used:
Linear:
Cubic:
where:
pe = slave position
ve = slave speed
ae = slave acceleration
je = slave jerk
pm = master position
vm = master speed
pim = master initial position
pfm = master final position
pie = slave initial position
pfe = slave final position
a = coefficient calculated by the CAM editor
b = coefficient calculated by the CAM editor
c = coefficient calculated by the CAM editor
A point can be changed by means of the cam table by using direct edition or moving the point in the graphic.
In order to move the point in the graphic, place the cursor on the point, which is marked with a red square,
click and hold it, and drag it to the new position.
When you click on the point, the cam table will move to this point, selecting the related cell.
The operation of moving the point in the graphic is interactive and calculates all the profile each time the point
is changed. The new point can be seen in the cam table.
The point is removed directly in the cam table. In order to do so, select one of the cells referring to the point
and click on the Remove Point button.
Click on one of the corners of the region you wish to zoom and hold it, and move the mouse so as to mark a
region. Then a rectangle will show on the graphic; release the button. The figure below shows an example of
this zoom.
Graphic menu
In order to access the graphic menu, right click on the graphic area, and the following menu will show.
11.10.7.18 Structures
Structure is a data grouping used to define a recipe or an object.
In the Ladder program, it is possible to create variables of the structure type and use them in the blocks. To
access the internal members of the structure, the '.' is used followed by its respective member.
Creating a structure
1. With the right button of the mouse on the folder Structure, click on New file.
3. Configure the structure using the buttons presented in the figure below.
4. After finishing the edition of the structure, click on the button Finish.
Editing a structure
Just double click on the desired structure, as shown in figure 4, and a window will open as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
11.10.8Diagnostic
11.10.8.1 Monitoring Panel
Main Signals
11.10.8.2 Log
Overview
Configuration
11.10.8.2.1 Overview
The log function allows viewing the present alarms/faults and also the last alarms/faults in a more friendly and
centralized way than on the equipment HMI, showing the data in tabular form.
All downloaded alarms/faults are saved in a file in order to keep a record for future reference; it is also possible
to export the saved data as a csv file.
11.10.8.2.2 Configuration
In order to create a new log file, just execute the operation below:
1. Create a new log file by selecting the Read Logs option; it is necessary to be connected to the device to
execute this operation.
2. After the read logs step is completed, the log file will be automatically created with a name composed of the
present data and time and with all the alarms and faults present on the equipment read.
11.10.8.3 Trace
11.10.8.3.1 Overview
The trace function is used to register variables* of interest of the device (such as current, voltage, speed, etc.)
when a certain event occurs in the system. Since it triggers the storage of the variables, in the system this
event is called trigger, and the user can define up to three trigger conditions and the logic to be used in them
(AND or OR logic).
The stored variables can be seen as graphics by using the WPS running on a PC connected via USB or via
serial to the device.
Below is an overview of the configuration screen of the trace function (example using SCA06).
1. Graphic Zoom. This bar contains the options to control the graphic, such as export to image file, zoom in,
zoom out, set width, set height, se all and show or not show the graphic lettering.
2. Trace Status. This item shows the present status of the trace function: not started, trigger occurred and
concluded.
3. Parameters. In this part are all the parameters that can be configured in the trace routine, such as triggers,
conditions, channels to be monitored and sampling period.
4. Graphic. In this area is the graphic after the conclusion of trace. In the lower part is the time line and on the
right are the values separated by unit of measurement.
5. Markers. The markers are within the graphic area. After the graphic is set, just click on the black marker to
create red markers (fixed). It is possible to add two fixed markers. Those fixed markers are used to
calculate the average and effective values between the two points.
6. Trace command. Below is the description of the command functions:
6.1.Read configuration: It reads the trace configuration parameters and updates the parameters on the
screen (item 3).
6.2.Save configuration: It sends the trace configuration parameters (item 3) to the equipment.
6.3.Read Data: Command used only when the trace status is concluded, that is, there is already a
concluded trace on the equipment, and you just wish to download the data without starting a new trace.
6.4.Force Trigger: Forces the trigger regardless the conditions.
6.5.Start Trace: It starts the trace function.
7. Channel Table. This table shows the data of the chosen channels, besides the possibility to hide
channels (Visible), change the channel color (Color) and set the graphic limits per unit of measurement
(Maximum).
11.10.8.3.2 Configuration
Below is a list of the necessary steps to create a trace configuration:
2. After the creation of the trace file, it is necessary to set the desired configurations in the part of parameters.
3. After making the desired configurations, just click on save configuration to send them to the equipment.
Notice that it is necessary to be connected to the equipment with the option Connect Device of the WPS.
4. After the configurations are saved, just click on Start Trace. Notice that the status of the trace function
changed to Waiting, that is, the tool is now waiting for the trigger execution to set the graphic and show the
trace values.
5. After trigger occurs, the graphic and the values will be shown in the table and the trace function status will
be Concluded.
6. If you wish, you can click on the black cursor of the graphic and add fixed cursors so that the calculation of
the average and effective values will be performed for the channels in the defined ranges.
11.11SSW-06
Enter topic text here.
11.11.1Description
Soft-Starters are static starters that accelerate, decelerate and protect three-phase induction motors. The
control of the voltage applied to the motor by means of adjustments to the firing angle of thyristors allows the
soft-starter to start and stop an electric motor smoothly.
The SSW-06, with DSP (Digital Signal Processor) control was designed for high performance on motor starts
and stops with an excellent cost-benefit ratio. Easy to set up, it simplifies start-up activities and daily
operation.
The SSW-06 is compact optimizing space in electric panels. It already incorporates electric motor protection.
It adapts to customer needs through its easy-to-install optional accessories.
The SSW-06 adapts to customer needs through its easy-to-install optional accessories. Thus, a keypad, a
communication interface or a motor PTC input can be added to the product.
Refer to the user's manual of the SSW-06 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.11.2Parameters
11.11.2.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
change the values and the modification will occur on-line.
5. Modified parameters: Whenever a parameter value in the User column is different from the Monitored
column, it will be shown in red.
6. Output. This screen shows error information in case they occur during the writing or reading of the
parameters.
11.11.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.12SSW-07
Enter topic text here.
11.12.1Description
Soft-Starters are static starters that accelerate, decelerate and protect three-phase induction motors. The
control of the voltage applied to the motor by means of adjustments to the firing angle of thyristors allows the
soft-starter to start and stop an electric motor smoothly.
The SSW-07, with DSP (Digital Signal Processor) control was designed for high performance on motor starts
and stops with an excellent cost-benefit ratio. Easy to set up, it simplifies start-up activities and daily
operation.
The SSW-07 is compact optimizing space in electric panels. It already incorporates electric motor protection.
It adapts to customer needs through its easy-to-install optional accessories.
The SSW-07 adapts to customer needs through its easy-to-install optional accessories. Thus, a keypad, a
communication interface or a motor PTC input can be added to the product.
Refer to the user's manual of the SSW-07 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.12.2Parameters
11.12.2.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.12.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.13SSW-08
Enter topic text here.
11.13.1Description
WEG soft starters are fitted with micro processors. They are high-tech and were designed to ensure the
highest performance during starts and stops of induction motors. WEG Soft-Starters are static starting
switches, intended for the acceleration, deceleration and protection of three-phase, induction motors. The
voltage control applied to the motor, by setting the thyristor firing angle, allows smooth starts and stops.
With proper variable settings, the torque produced is set to the requirement of the load, ensuring that the
demanded current of the start is the lowest actually required.
Refer to the user's manual of the SSW-08 for further details about the product.
NOTE!
This product does not have the Ladder tool available in WPS.
You can use the WLP application if this feature is required.
11.13.2Parameters
11.13.2.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.13.2.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.14SSW900
11.14.1Description
The "Soft-Starter WEG 900" is a high-performance product that allows the starting/stopping control and
protection of three-phase induction motors. Thus it prevents mechanical shocks on the load, current peaks in
the supply line and damage to the motor.
Refer to the user's manual of the SSW900 for further details about the product.
11.14.2I/O's
Hardware information can be found in the Manual of the SSW900 at the website www.weg.net.
Digital Inputs
Digital Outputs
Analog Outputs
11.14.3System Markers
The following variables contained in teh GLOBAL_SYSTEM group of the variables table, have the fixed tag.
The tag of system markers were divided into groups and subgroups, wher:do:
Grupos:
SSW: reading and writing variables of the SSW900 soft-starter.
Subgroups:
STS: reading variable (status);
CMD: writing variable (command).
Addres
Bit Modbus Tag Description
s
Ladder
%
0 0 SYS_FREQ_2HZ Oscilator w ith frequency of 2 Hz
SB6000
%
1 1 SYS_PULSE_1SCAN Pulse during the first scan cycle
SB6000
%
2 2 SYS_FALSE Alw ays in 0
SB6000
%
3 3 SYS_TRUE Alw ays in 1
SB6000
Addres
Bit Modbus Tag Description
s
Logical Status
% SSW_STS_MOTOR_RUNN
0 16 The soft-starter is turning the motor
SB6002 ING
% SSW_STS_GENERAL_EN
1 17 The soft-starter is general enabled and ready to run motor
SB6002 ABLED
%
2 18 SSW_STS_JOG_ACTIVE The JOG function is active
SB6002
%
3 19 SSW_STS_INITIAL_TEST Executing initial tests before starting the engine
SB6002
%
4 20 SSW_STS_ACCEL_RAMP Motor in acceleration ramp
SB6002
% SSW_STS_FULL_VOLTA
5 21 Full voltage is being applied to the motor
SB6002 GE
%
6 22 SSW_STS_BYPASS The bypass contactor is closed
SB6002
%
7 23 SSW_STS_DECEL_RAMP Motor in deceleration ramp
SB6002
% SSW_STS_LOC_REM_MO
0 24 Soft-starter is in local or remote mode (0-Local, 1-Remote)
SB6003 DE
%
1 25 SSW_STS_BRAKING Braking is active
SB6003
% SSW_STS_REVERSING_D
2 26 The motor is reversing the direction of rotation
SB6003 IRECTION
% SSW_STS_FWD_REV_DIR
3 27 Motor running in reverse or direct direction (0-Reverse, 1-Direct)
SB6003 ECTION
% SSW_STS_START_DELA
4 28 Time before startin the motor
SB6003 Y
% SSW_STS_RESTART_DEL
5 29 Time after motor stop
SB6003 AY
% SSW_STS_ALARM_ACTI
6 30 Soft-starter has an active alarm
SB6003 VE
% SSW_STS_FAULT_ACTIV
7 31 Soft-starter is in fault state
SB6003 E
Addres
Bit Modbus Tag Description
s
HMI keys
%
0 32 SSW_STS_KEY_BACK BACK key pressed
SB6004
%
1 33 SSW_STS_KEY_UP UP key pressed
SB6004
%
2 34 SSW_STS_KEY_HELP HELP key pressed
SB6004
% SSW_STS_KEY_DIRECTIO
3 35 DIRECTION key pressed
SB6004 N
%
4 36 SSW_STS_KEY_DOWN DOWN key pressed
SB6004
% SSW_STS_KEY_LOC_RE
5 37 LOC/REM key pressed
SB6004 M
%
6 38 SSW_STS_KEY_START START (I) key pressed
SB6004
%
7 39 SSW_STS_KEY_JOG JOG key pressed
SB6004
%
0 40 SSW_STS_KEY_STOP STOP (0) key pressed
SB6005
%
1 41 SSW_STS_KEY_RIGHT RIGHT key pressed
SB6005
%
2 42 SSW_STS_KEY_ENTER ENTER key pressed
SB6005
%
3 43 SSW_STS_KEY_LEFT LEFT key pressed
SB6005
Addres
Bit Modbus Tag Description
s
Logical Command
%
0 0 SSW_CMD_RUN_STOP Run the motor (0-Stop, 1-Run)
CB6006
% SSW_CMD_GENERAL_EN
1 1 Enables the soft-starter allow ing the motor operation (0-Disable, 1-Enable)
CB6006 ABLE
%
2 2 SSW_CMD_JOG Enables the JOG function (0-Disable, 1-Enable)
CB6006
%
3 3 SSW_CMD_DIRECTION Reverses the direction of rotation of motor
CB6006
%
4 4 SSW_CMD_LOC_REM Selects the soft-starter operation mode (0-Local, 1-Remote)
CB6006
% SSW_CMD_FAULT_RESE
7 7 Executes the fault reset command
CB6006 T
11.14.4Volatile Markers
Only the variables created in the GLOBAL group of the variables table, called Global Volatile Markers, and
that have a user-specified address, will be accessible by modbus protocol, when their are within the following
range:
Address
TYPE Modbus Map Description
Range
40000 - 49999 Each modbus address represents 1 bit of the address content.
%MB: BOOL
(Coil) After address 1250, the bit is not accessible via modbus.
%MB: BYTE, SINT, USINT 0 - 7343
8000 - 11671 Each modbus address represents 2 bytes of the address content.
%MW: WORD, INT, DINT
(Register) After address 7344, the data is not accessible via modbus.
%MD: DWORD, DINT, UDINT, REAL
Modbus functions with access to volatile global markers with address defined:
1. Read - Modbus Function 01 "Read Coils"
2. Read - Modbus Function 03 "Read Holding Registers"
3. Write - Modbus Function 05 "Write Single Coil"
4. Write - Modbus Function 06 "Write Single Register"
5. Write - Modbus Function 15 "Write Multiple Coils"
6. Write - Modbus Function 16 "Write Multiple Registers"
Example of volatile global markers declaration with address defined in variables table of the ladder editor:
The import from WLP can be executed during the resource creation.
1. To execute the import WLP function click the Import from WLP button and select the WLP project folder or
the WLP BKP file.
2. After import from WLP completed successfully click the Finish button to copy the imported files to new
resource.
11.14.6Parameters
11.14.6.1 Overview
The parameter configuration screen is used to configure and monitor all the parameters of the equipment,
including the user parameters.
NOTE!
The reading and writing of such parameters is done on this screen; only the user parameter
configuration must be sent the first time or whenever modified by means of the resource
download routine.
1. Parameter files. In this part are all the parameter configuration files created by the user. Notice that when
the file features a person figure on the table, it means this parameter table contains hidden parameters/
group of parameters.
2. Group of parameters. This tree shows all the group of parameters. Notice that the same parameter can be
in more than one group, and when its value is modified, it will be modified in all the groups to which it
belongs.
3. Modified group of parameters. Group of parameters which contain the figure of a person on the table
means they have hidden parameters.
4. Commands. The commands are described below in the order they appear:
4.1.Unhide parameter: In case some parameter has been hidden, this button allows making it visible
again.
4.2.Hide parameter: Just select one or more parameters on the table and trigger this command to hide
them.
4.3.Save table: It saves the values of the parameters shown on the equipment screen; the sent values are
the ones in the User column. The flow is User -> Monitored (equipment)
4.4.Read table: It reads the parameters of the equipment shown in the Monitored column and saves them
in the parameter file in the User column. The flow is Monitored (equipment) -> User
4.5.User parameters: It opens a screen to edit the user parameters.
4.6.Filter: It opens a parameter filter option, and it can filter by parameter number or description.
4.7.User Parameters and Monitored Parameters. These two columns show the off-line and on-line
parameters, so to speak. The User column shows the values contained in the file located on the
computer and the Monitored column shows the values that are effectively saved on the equipment.
Whenever you use the Save Parameter option, the sent values will be from the User column to the
Monitored column, that is, File -> Equipment. In case of reading, the flow is the opposite, from the
Monitored column to the User column, that is, Equipment -> File. In case you wish to change the
values directly on the equipment without changing it in the file, just click on the monitored column,
11.14.6.2 Configuration
Below is the list of the required steps to create a parameter file.
4. After performing the steps above, the parameter file will be created and the equipment can be
parameterized.
1. Table writing. The table writing command will send all visible parameters on the equipment screen. If and
error occurs during the sending of some specific parameter, a message will be shown on the output window
informing the error. It is important to notice that only visible parameters will be sent; therefore, it is necessary
attention to which node of the group of parameters tree you are viewing. Example: If you wish to write all of
them without filtering per group, just select the tree root.
2. Table reading. The table reading command will read all the parameters of the equipment. If a error occurs
during the reading of some specific parameter, a message will be shown on the output window informing the
error. It is important to notice that only visible parameters will be read; therefore, it is necessary attention to
which node of the group of parameters tree you are viewing. Example: If you wish to read all of them without
filtering per group, just select the tree root.
3. Reading/writing of specific parameters. In order to read/write one or more specific parameters, just
select them on the table, right click and choose the desired option: read or write parameter.
4. Reading/writing of group of parameters. In order to read/write only one group of parameters, just select
it on the group tree, right click and choose the desired option: read or write group.
1. Hide parameters. In order to hide a parameter individually, just right click on the desired parameters and
select the Hide Parameter option. You can also press the Delete key.
2. Unhide Parameters. In order to show hidden parameters, right click and choose the Unhide Parameters
or press the Insert key. Then, a window will open and show the hidden parameters. Now, you just have to
select the desired parameters and confirm.
Note: The parameters shown on this new window are only those which belong to the current filter according to
the selection on the parameter group tree. In the figures below, the CAN group is selected; that means that
only the hidden parameters of this group will be shown.
3. Hide Group of Parameters. In order to hide a group of parameters, just select the group on the tree and
use the Hide Group option.
4. Unhide Group of Parameters. In order to show a hidden group of parameters, just select the root of the
group tree and select the Unhide Group option. A window will open showing the groups that are hidden; then
just select the group you wish to unhide.
5. Hide and Show Parameters and Groups of Parameters. By means of this option, you have full control
of the parameters and groups of parameters. It is possible to hide and unhide individual parameters, multiple
parameters, individual groups and multiple groups in the same action.
Configuration Table.
On the user parameter configuration table, it is possible to define several attributes to the parameters, such as
description, minimum and maximum values, unit, digits, data type, etc.
NOTE!
These settings will be automatically displayed in the parameter table. However, to be sent to the
device, you need to download the resource.
Table fields:
Description: Description of the user parameter in the parameter table. On devices that have text-based
HMIs, the description is sent to the machine and displayed on the HMI.
Read only: It does not allow the writing of values in the parameter by the communication network or the HMI.
Writing is done only by the ladder application.
Help: On devices that have text-based HMI, you can edit a help text for the parameter.
In the parameter table, the user parameters will be shown as they are configured on the configuration screen.
11.14.7Ladder
11.14.7.1 Coil
11.14.7.1.1 DIRECTCOIL
Logical block used to assign direct values of the output variables.
Ladder Representation
Block Structure
Operation
The block transfers the value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example keeps the digital output DO9 permanently connected, because the value of A in
this case is the value of the left bus which is always considered high logic level (TRUE).
11.14.7.1.2 INVERTEDCOIL
Logical block used for assigning values denied to output variables.
Ladder Representation
Block Structure
Operation
The block transfers the denied value of A for the memory address corresponding to O1.
Diagram
Block Flowchart
Example
The above example disables the digital output DO3 when some of the digital inputs DI1 and DI2 are
with FALSE value. When both inputs are with a TRUE value, DO3 activates.
11.14.7.1.3 RESETCOIL
Logical block used for indefinite disabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers a FALSE value to the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI5.
11.14.7.1.4 SETCOIL
Logical block used for indefinite enabling of output variables.
Ladder Representation
Block Structure
Operation
When identifying a TRUE value in A, this block transfers the value of A for the memory address
corresponding to O1.
When identifying a FALSE value in A, this block performs no operation.
Diagram
Block Flowchart
Example
The example above activates permanently the system control marker that enables end-of-message
character in RS232 communication to identify a TRUE level at the digital input DI6.
11.14.7.1.5 TOGGLECOIL
Logical block used for output variables alternance.
Ladder Representation
Block Structure
Operation
When identifying a transition from FALSE to TRUE (leading edge) on A, the block reverses the status
of O1.
Diagram
Block Flowchart
Example
The above example inverts the state of the digital output DO6 to each disabling the internal buzzer.
The CFW300 allows operation as a master for the Modbus RTU network. For this operation, it is necessary to
observe the following points:
The following functions are available for the sending of requisitions by the Modbus master:
o Function 01: Read Coils
o Function 02: Read Discrete Inputs
o Function 03: Read Holding Registers
o Function 04: Read Input Registers
o Function 05: Write Single Coil
o Function 06: Write Single Register
o Function 15: Write Multiple Coils
o Function 16: Write Multiple Registers
In order to control and monitor the Modbus RTU communication using the CFW300, the following blocks were
developed, and they must be used when programming in Ladder.
11.14.7.2.1.2 MB_MasterControlStatus
Block that allows monitoring various statuses of the Modbus RTU network master.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
monitoring of the master and input requests. When Execute receives FALSE level, the inputs are
ignored and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE
level and block finished its execution.
A TRUE level DisableComm disables the Modbus RTU communication and resets the status counters
and markers of the master. These markers and counters are displayed in the output block each
having some data corresponding to its description. Their values are also cleared at shutdown of the
master.
Block Flowchart
Example
The example above requests status data of the Modbus RTU network master, and allows disabling
communication through DISABLE. The block ends successfully, Done output is activated.
11.14.7.2.1.3 MB_ReadBinary
Block that performs a reading of up to 128 binary data (via Read Coils or Read Discrete Inputs) of a
slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus slave RTU in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT Modbus RTU slave of SLAVE address through the Read Discrete Input function.
These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.14.7.2.1.4 MB_ReadRegister
Block that performs a reading of up to 64 16-bit registers (via Read Holding Registers or Read Input
Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the reading request of a number of registers indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting them when receiving the
response from the slave. The received data is stored in the Value variable. If the slave is not free, the
block waits Busy go to FALSE level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The above example requests reading of a number of binary data described by DATA_COUNT
positioned in the INIT in the Modbus RTU slave of SLAVE address through the Read Input Register
function. These data are forwarded to VALUE. The block ends successfully, Done output is activated.
11.14.7.2.1.5 MB_SlaveStatus
Block that allows monitoring the status of 4 slaves of the Modbus RTU network.
Ladder Representation
Block Structure
Operation
This block remains active while Execute is at TRUE level, updating its outputs according to the
number of errors recorded for each slave. When Execute receives FALSE level, the inputs are ignored
and the outputs are zeroed. The Done output receives TRUE level when Execute has TRUE level and
block finished its execution.
The ErrorsToSetOffline # input allows registering the number of errors identified in a slave that will
feature an offline communication. AddressSlave inputs allow inserting four slave addresses to be
monitored. When this monitored slave reports the programmed number of errors, its corresponding
SlaveOffline output is set to TRUE level. If any of SlaveOffline outputs is at TRUE level, GeneralOffline
also receives TRUE level.
Block Flowchart
Example
The above example checks the number of error responses sent by the slaves 2, 4, 6 and 8 of the
Modbus RTU. If any of them is greater than 5, its SX_OFF status is led to TRUE level. The block ends
successfully, Done output is activated.
11.14.7.2.1.6 MB_WriteBinary
Block that performs a writing of up to 128 binary data (via Write Single Coil or Write Multiple Coils) in
a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of a number of bits indicated by NumberOfData in InitialDataAddress address
using chosen function in Function# and sets the Active output, resetting it when receiving the
response from the slave. If the slave is not free, the block waits Busy go to FALSE level to resubmit
the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of size equal to NumberOfData. It is important to check this compatibility not to
generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Coil. The block ends successfully, Done output is activated.
11.14.7.2.1.7 MB_WriteRegister
Block that performs a reading of up to sixteen 16-bit registers (via Write Single Register or Write
Multiple Registers) of a slave on the Modbus RTU network.
Ladder Representation
Block Structure
Operation
When this block detects a leading edge on Execute, it checks whether the Modbus RTU slave in
specified address in SlaveAddress is free to send data (Busy variable at FALSE level). If so, it sends
the writing request of Value values in a number of registers indicated by NumberOfData in
InitialDataAddress address using chosen function in Function# and sets the Active output, resetting it
when receiving the response from the slave. If the slave is not free, the block waits Busy go to FALSE
level to resubmit the request.
NOTE!
If Execute goes to FALSE level and Busy is still at TRUE level, the request is canceled.
NOTE!
Value is an array of number of bits NumberOfData multiplied by 16. That is, if NumberOfData is
16, Value can be an array of 32 BYTE positions, 16 WORD positions or 8 DWORD positions. It
is important to check this compatibility not to generate errors in the block.
When Execute has FALSE value, Done remains FALSE. The Done output is only activated when the
block finishes executing successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code
according to the table below.
Code Description
0 Executed successfully
1 Invalid input data
2 Master not enabled
4 Timeout in slave response
5 Slave returned error
Block Flowchart
Example
The example above requests written data contained in VALUE, with size described by DATA_COUNT,
at addresses positioned from INIT on Modbus RTU slave at address SLAVE using the function Write
Single Register. The block ends successfully, Done output is activated.
11.14.7.3 Compare
11.14.7.3.1 COMP_EQ
Block that compares the values of Value1 and Value2, enabling the output Q if both are equal.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the output Q the TRUE value if Value1 and
Value2 are the same. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is activated. Notice that the types of the input variables can be different
without causing execution problems.
The example above checks equality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is disabled.
11.14.7.3.2 COMP_GE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
or equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN it sends the Q output to the TRUE value if Value1 is higher
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is disabled.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or majority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is activated.
11.14.7.3.3 COMP_GT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is higher than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is higher
than Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the majority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is activated.
11.14.7.3.4 COMP_LE
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than or
equal to Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has lower value than VALUE2, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since both
variables have the same value, the Q output is activated.
The example above checks equality or minority of VALUE1 in relation to VALUE2. Since VALUE1
has higher value than VALUE2, the Q output is disabled.
11.14.7.3.5 COMP_LT
Block that compares the values of Value1 and Value2, enabling the output Q if Value1 is lower than
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is lower
than or equal to Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks minority of VALUE1 in relation to VALUE2. Since VALUE1 has lower
value than VALUE2, the Q output is activated.
The example above checks the minority of VALUE1 in relation to VALUE2. Since both variables have
the same value, the Q output is disabled.
The example above checks the minority of VALUE1 in relation to VALUE2. Since VALUE1 has higher
value than VALUE2, the Q output is disabled.
11.14.7.3.6 COMP_NE
Block that compares the values of Value1 and Value2, enabling the Q output if Value1 is different from
Value2.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Q output the TRUE value if Value1 is
different from Value2. Otherwise, Q receives FALSE.
Block Flowchart
Example
The example above checks inequality between VALUE1 and VALUE2. Since both variables have
different values, the Q output is activated.
The example above checks equality between VALUE1 and VALUE2. Since both variables have the
same value, the Q output is disabled.
11.14.7.4 Contact
11.14.7.4.1 NCCONTACT
Normally closed contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the opposite value of digital input DI1 to the digital output
DO2.
11.14.7.4.2 NOCONTACT
Normally open contact.
Ladder Representation
Block Structure
Operation
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example performs the transfer of the value of digital input DI1 to the digital output DO2.
11.14.7.4.3 NTSCONTACT
Falling edge transition contact.
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from TRUE to FALSE (falling edge or negative edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed or a positive pulse on
the digital input DI2 is given.
11.14.7.4.4 PTSCONTACT
Ladder Representation
Block Structure
Operation
At the instant the variable I1 transitions from FALSE to TRUE (leading edge or positive edge
transition), B receives the value of A for a scan cycle.
At all other times, B receives the FALSE value.
NOTE!
Watch out for series and parallel associations of contacts. Refer to section Contact Logic for
further information.
Diagram
Block Flowchart
Example
The above example resets the digital output DO1 if the SHIFT key is pressed and a positive pulse on
the digital input DI2 is given.
11.14.7.5 Control
11.14.7.5.1 PID
Block that performs the function of a discrete PID controller. From the input variables, it calculates the
corresponding controller output.
Ladder Representation
Block Structure
Operation
On the positive transition edge in EN, Output receives zero value, and the block executes its
functionality as EN is at TRUE level.
When enabled, this block performs a routine PID control with the Kp, Ki and Kd parameters chosen.
The PID topology used may be the Academic or Parallel, depending on what is chosen in Type#.
Academic Form:
Parallel Form:
The levels of the output signal of the controller are saturated at value MinimumOutput and
MaximumOutput. The SelectSetPoint input level FALSE causes the SetPoint reference be adopted,
allowing the controller maintains control over the process. When SelectSetPoint goes to TRUE level,
the controller has no more domain, and ManualSetPoint becomes to be considered the output signal
of the controller.
Action# will define the feedback operation. If Action# is DIRECT, the operation will be SetPoint –
Feedback. If Action# is REVERSE, the operation will be Feedback – SetPoint.
Feedback receives the process variable considered as the plant output. Ts# receives the sampling
time for the controller and # TauSetPoint receives the time constant for the input filter of the automatic
reference.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Effects of the alteration of gains on the process
If Kp decreases, the process becomes slower; generally more stable or less oscillating; it has
less overshoot.
If Kp increases, the process responds faster; it may become more unstable or more
oscillating; it has more overshoot.
If Ki decreases, the process becomes slower, lagging to reach the "SetPoint"; it becomes
more stable or less oscillating; it has less overshoot.
If Ki increases, the process becomes faster, quickly reaching the "SetPoint"; it becomes more
unstable or more oscillating; it has more overshoot.
If Kd decreases, the process becomes slower; it has less overshoot.
If Kd increases, it has more overshoot.
NOTE!
How to improve the performance of the process through the adjustment of gains (valid for the
Academic PID)
If the performance of the process is almost good, but the overshoot is a bit high, try to: (1)
decrease Kp 20%, (2) decrease Ki 20% and/or (3) decrease Kd 50%.
If the performance of the process is almost good, but it does not have overshoot and lags to
reach the "SetPoint", try to: (1) increase Kp 20%, (2) increase Ki 20% and/or (3) increase Kd
50%.
If the performance of the process is good, but the process output is varying too much, try to:
(1) increase Kd 50%, (2) decrease Kp 20%.
If the performance of the process is bad, i.e. after start up, the transitory lasts several periods
of oscillation that reduce very slowly or never reduce at all, try to: (1) decrease Kp 50%.
If the performance of the process is bad, i.e. after start up it slowly moves towards the
"SetPoint" without overshoot, but is still very far and the process output is less than the rated
value, try to: (1) increase Kp 50%, (2) increase Ki 50%, (3) increase Kd 70%.
Block Flowchart
Example
The above example creates a loop of a digital PID form with sampling time 50 ms, using the
constants KP, KI and KD for control. Automatic reference SETPOINT, filtered by a first order filter with
time constant of 0:01 is used. The error signal is calculated as the difference between the filtered
reference and variable SAIDA_PLANTA. The controller output is saturated between the values 0.1 and
2.5 and sent to the variable ENTRADA_PLANTA.
11.14.7.6 Conversion
11.14.7.6.1 BOOL
11.14.7.6.1.1 BYTE_TO_BOOL
Block that performs the conversion of a BYTE value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BYTE, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.1.2 DWORD_TO_BOOL
Block that performs the conversion of a DWORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in DWORD, into a BOOL value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.1.3 REAL_TO_BOOL
Block that performs the conversion of a REAL value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in REAL, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice in the
last example that the values very close to the machine epsilon may result in an interpretation of the
FALSE value.
11.14.7.6.1.4 WORD_TO_BOOL
Block that performs the conversion of a WORD value into a BOOL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BOOL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in WORD, into a BOOL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.2 BYTE
11.14.7.6.2.1 BOOL_TO_BYTE
Block that performs the conversion of a BOOL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.2.2 DWORD_TO_BYTE
Block that performs the conversion of a DWORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.14.7.6.2.3 REAL_TO_BYTE
Block that performs the conversion of a REAL value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that the
results are truncated in decimal and only the eight least significant bits are taken into account.
11.14.7.6.2.4 WORD_TO_BYTE
Block that performs the conversion of a WORD value into a BYTE value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
BYTE, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a BYTE value storing
the final result in RESULT. The block ends with success and ENO output is activated. Notice that
only the eight least significant bits are taken into account.
11.14.7.6.3 DWORD
11.14.7.6.3.1 BOOL_TO_DWORD
Block that performs the conversion of a BOOL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a DWORD value
storing the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.3.2 BYTE_TO_DWORD
Block that performs the conversion of a BYTE value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.3.3 REAL_TO_DWORD
Block that performs the conversion of a REAL value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in REAL, into a DWORD value storing
the final result in RESULT. The block ends with success and ENO output is activated. Note that the
results are truncated in decimal and only the thirty-two least significant bits are taken into account.
11.14.7.6.3.4 WORD_TO_DWORD
Block that performs the conversion of a WORD value into a DWORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
DWORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in WORD, into a DWORD value storing the final
result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.4 REAL
11.14.7.6.4.1 BOOL_TO_REAL
Block that performs the conversion of a BOOL value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BOOL, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.4.2 BYTE_TO_REAL
Block that performs the conversion of a BYTE value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.4.3 DWORD_TO_REAL
Block that performs the conversion of a DWORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in DWORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.4.4 WORD_TO_REAL
Block that performs the conversion of a WORD value into a REAL value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as WORD and converts it into
REAL, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in WORD, into a REAL value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.5 WORD
11.14.7.6.5.1 BOOL_TO_WORD
Block that performs the conversion of a BOOL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BOOL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of VALUE variable, in BOOL, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.5.2 BYTE_TO_WORD
Block that performs the conversion of a BYTE value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as BYTE and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above perform the conversion of variable VALUE, in BYTE, into a WORD value storing
the final result in RESULT. The block ends with success and ENO output is activated.
11.14.7.6.5.3 DWORD_TO_WORD
Block that performs the conversion of a DWORD value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as DWORD and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Notice that only the
sixteen least significant bits are taken into account.
11.14.7.6.5.4 REAL_TO_WORD
Block that performs the conversion of a REAL value into a WORD value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it interprets the Value value as REAL and converts it into
WORD, storing in Result.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The examples above convert the VALUE variable, in DWORD, into a WORD value storing the final
result in RESULT. The block ends with success and ENO output is activated. Note that the results
are truncated in decimal and only the sixteen least significant bits are taken into account.
11.14.7.7 Counter
11.14.7.7.1 CTD
Countdown block of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it decrements the CV variable until it is zero. While
CV equals zero, the output Q remains at TRUE level. By detecting high-level LD, the block loads the
PV value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. As CV has a value of zero, the Q output is
enabled.
The value of the PV variable was changed to 20, but not yet loaded.
By identifying TRUE level in LD, the block loads the PV value to CV. Since this value is greater than
zero, the Q output is disabled.
At each leading edge identified in CD, the value of COUNT is decremented until it reaches zero, when
the Q output is enabled.
11.14.7.7.2 CTU
Block for gradual count of input pulses.
Ladder Representation
Block Structure
Operation
When this block identifies a leading edge in CD, it increments the CV variable until it is equal to PV.
While CV equals PV, the output Q remains at TRUE level. By detecting high-level R, the block loads
the zero value in CV.
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of routine. Since CV has a lower value than of PV, the
Q output is disabled.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the Q output is enabled.
By identifying TRUE level in R, the block loads the zero value to CV. Since this value is lower than of
PV, the Q output is disabled.
11.14.7.7.3 CTUD
Block for gradual count and countdown of input pulses.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it acts as a CTD block and block CTU at the same time
acting on the same CV counter. That is: increments CV until it reaches PV to the leading edges in
CU and decrements CV until it reaches zero to the leading edges in CD. A positive transition in R
carries zero in CV, while a leading edge in LD loads the PV value in CV. If CV has zero value, QD
receives TRUE, and if CV has value equal to PV, QU receives TRUE.
The ENO value forwards to the next Ladder block the EN value.
Block Flowchart
Operation Diagram
Example
The example above shows the disabled block, with all its internal variables zeroed. Although the
external controls are activated, these values are not forwarded to the instance of the block.
When activated, the block identifies the value of PRESET, loading it in PV, and identifies that the
output is at zero, enabling the QD output. When execution is completed, the ENO output is activated.
At each leading edge identified in CU, the value of CV is incremented until it reaches the PV value,
when the QU output is enabled. When execution is completed, the ENO output is activated.
At each leading edge detected in CD, the CV value is decremented. When CV is a value between
zero and PV, both QD and QU outputs are deactivated. When execution is completed, the ENO
output is activated.
A TRUE value in R resets CV, while a TRUE value in LD loads the value of PV to CV. As we can see,
R prevails over LD, leaving CV and enabling the QD output. When execution is completed, the ENO
output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it decomposes the input variable in Word 15 Boolean
values stored in Bit0 to Bit15 variables. Bit0 corresponds to the LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above decomposes the value of MYWORD in Boolean values, which are stored in the
output variables BIT0 to Bit15. The block ends successfully and the ENO output is activated.
11.14.7.8.2 ILOAD
Block which indirectly loads the value of a variable and transfers it to Value.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the of the Address variable belonging to
the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of the address 40 of group 2 (GLOBAL_SYSTEM%S), which
represents the status of ESC key in UINT format for the VALUE variable. The block ends with
success and ENO output is activated.
11.14.7.8.3 ILOADBOOL
Block that indirectly loads the value of a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads, in Value, the Bit contents of the Address variable
belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example loads the value of bit 1 of the address 24 of group 2 (S GLOBAL_SYSTEM%),
which represents the status of ESC key for the VALUE variable. The block ends with success and
ENO output is activated.
11.14.7.8.4 ISTORE
Block that indirectly loads the Value value in a variable.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the contents of the Address
variable belonging to the Group# group, as the selected DataType#.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the VALUE value in WORD format in address 444 of group 3
(GLOBAL_SYSTEM% C), which represents the index of the communication port Modbus TCP. The
block ends with success and ENO output is activated.
11.14.7.8.5 ISTOREBOOL
Block that indirectly loads the Value value in a bit in a global variable address.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it loads the Value value in the Bit contents of the Address
variable belonging to the Group# group.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of VALUE in bit 7 of the address 121 in group 3
(GLOBAL_SYSTEM% C), which represents the disable command of CANopen communication. The
block ends with success and ENO output is activated.
11.14.7.8.6 MUX
Block that creates a new WORD variable from the concatenation of 16 BOOL variables.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it concatenates Boolean values of the input variables and
stores this value in the variable Word. Bit0 corresponds to LSB (least significant bit) and Bit15
corresponds to the MSB (most significant bit).
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example concatenates the Boolean values of the input bits of the block to form the output
word stored in MYWORD. The block ends with success and ENO output is activated.
11.14.7.8.7 SEL
Block that replicates to the output the value of an input variable (Value0 or Value1) according to the
Selector selection.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it replicates to the Result variable the Value0 value if
selector is FALSE or the Value1 value if Selector is TRUE.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
FALSE level, the RESULT output gets the value of VALUE0. The block ends successfully and the
ENO output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
The above example uses the SELECTOR variable as multiplexing channel selector. When it is at
TRUE level, the RESULT output gets the value of VALUE1. The block ends successfully and the ENO
output is activated. Note that the binary pattern has been maintained even though the decimal
representation is corrupted, since DWORD does not accept negative values.
11.14.7.8.8 STORE
Block that performs direct storage of data from a source to a destination.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it stores the contents from SRC into DST.
NOTE!
SRC and DST must have data types of the same size.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated.
The example above stores the value of the variable SRC in DST. The block ends with success and
ENO output is activated. Note that the binary pattern is maintained between variables of different
types.
11.14.7.8.9 USERERR
Block that generates an alarm or fault with the number programmed by the user.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it generates an alarm or equipment failure, depending on
the type defined in TYPE with CODE code.
The value of ENO informs if the generation of alarm or fault has been executed successfully.
Block Flowchart
Example
The above example, when identifying TRUE level in DI1, generates a fault with the code 774 and sets
the DO1 output.
11.14.7.9 Filter
11.14.7.9.1 LOWPASS
Block that filters the input using a low pass filter of first order and inserts the result in the output.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, filters the input value of Input using a low pass first order
filter described by Tau and Ts#, inserting the result in Output. On the leading edge of EN, Output
receives zero.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example causes OUTPUT, by identifying a leading edge in EN, to display a behavior of first
order with time constant equal to Tau and the sampling time of 2 ms, in order to achieve the reference
set to INPUT. At each calculation completed successfully, the ENO output is activated.
11.14.7.10 Logic
11.14.7.10.1 Logic Bit
11.14.7.10.1.1 RESETBIT
Logical block used to perform reset of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, resets the bit indicated in Position in the Data variable
that is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the reset of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above resets the bit of AUX zero position, whose initial value is 200 (1100 1000, in
binary). Since this bit already had FALSE value, nothing has changed.
The example above resets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above resets the bit in position nine of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.14.7.10.1.2 SETBIT
Logical block used to perform the set of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sets the bit indicated in Position in the Data variable that
is forwarded to the output already with its updated value.
The DONE variable receives the same EN value, except when there is an error in the set of the bit,
then getting a FALSE value.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit of AUX zero position, whose initial value is 153 (1001 1001, in binary).
Since this bit already had TRUE value, nothing has changed.
The example above sets the bit in position three of AUX by changing its binary value and, therefore,
its decimal representation.
The example above sets the bit in position fifteen of AUX. Since AUX is a variable BYTE type, it has
only eight bits. Thus, the example above creates a runtime error in the block and therefore the output
is not enabled.
11.14.7.10.1.3 TESTBIT
Logical block that revolutions the value of a specific bit in a field.
Ladder Representation
Block Structure
Operation
This block when it has a TRUE value in EN, sends to the output Q the bit value indicated in Position
in the Data variable.
NOTE!
It is important to notice that Position is within the range of values of bits corresponding to variable
type in Data. For example: if Data is a BYTE, it has 8 bits, and Position must contain a value
between 0 and 7.
Block Flowchart
Example
The example above sets the bit value of zero position of AUX, whose initial value is 74 (0100 1010 in
binary) to the output Q. Since this bit has value 0, the output is disabled.
The example above sets the value of the bit of position three of AUX to the output Q. Since this bit
has value 1, the output is enabled.
The example above sets the bit value of position ten of AUX to output Q. Since AUX is a variable of
BYTE type, it has only eight bits. Thus, the example above creates a runtime error in the block and
therefore the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “and” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "and" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.14.7.10.2.2 NOT
Block that performs a logical operation of boolean "not" in a variable, storing the result in another.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the denied Boolean value of
the Value input variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a boolean "not" operation in AUX, storing the result in AUX2.
11.14.7.10.2.3 OR
Logical block that performs an Boolean "or" operation between two variables, storing the result in a
third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “or” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs an "or" Boolean operation between AUX and AUX2, storing the result in
AUX3.
11.14.7.10.2.4 XNOR
Logical block that performs an Boolean "not exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “denied exclusive or”
Boolean operation of input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "denied exclusive or" Boolean operation between AUX and AUX2,
storing the result in AUX3.
11.14.7.10.2.5 XOR
Logical block that performs an Boolean "exclusive or" operation between two variables, storing the
result in a third one.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the “xor” Boolean operation of
input variables Value1 and Value2.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The example above performs a "xor" Boolean operation between AUX and AUX2, storing the result in
AUX3.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical left shifts, according to the Shift value. The most significant bits
that are being discarded are returned to the least significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical left shift by one position in the VALUE variable whose initial
value is -100 (1001 1100 in binary). The discarded bits on the left are reinserted on the right. The final
result (0011 1001 in binary) is stored in RESULT.
The above example performs a logical left rotation by five positions in the VALUE variable whose initial
value is 21 (0001 0101 in binary). The discarded bits on the left are reinserted on the right. The final
result (1010 0010 in binary) is stored in RESULT.
11.14.7.10.3.2 ROR
Block that performs a logical right rotation operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical right shifts, according to the Shift value. The least significant bits
that are being discarded are returned to the most significant bits, characterizing the rotation.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logic right shift by one position in the VALUE variable whose initial
value is -128 (1000 0000 in binary). The discarded bits on the right are reinserted on the left. The final
result (0100 0000 in binary) is stored in RESULT. Notice that the sign is not preserved in this
operation.
The above example performs a logical right rotation by one position in the VALUE variable whose
initial value is -127 (1000 0001 in binary). The discarded bits on the right are reinserted on the left. The
final result (1100 0000 in binary) is stored in RESULT.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic left shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
Description of exemple.
Description of exemple.
11.14.7.10.4.2 ASHR
Block that performs arithmetic left shift operation in a value passed by Value, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of arithmetic right shifts, according to the Shift value.
NOTE!
All arithmetic shifts implemented maintain the sign of the variable.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs an arithmetic right shift by three positions in the VALUE variable whose
initial value is 52 (0011 0100 in binary). The bits on the right are being discarded, and on the left new
zeros are inserted. The final result (0000 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by two positions in the VALUE variable whose
initial value is -79 (1011 0001 in binary). The bits on the right will be discarded and new ones on the
left are inserted, since the arithmetic right shifts preserve the sign of the variable. The final result
(1111 0110 in binary) is stored in RESULT.
The above example performs an arithmetic right shift by thirteen positions in the VALUE variable
whose initial value is -128 (1000 0000 in binary). The bits on the right are being discarded, and on the
left new ones are inserted. The final result (1111 1111 in binary) is stored in RESULT.
11.14.7.10.4.3 SHL
Block that performs a binary logical left shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts left, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is 56 (0011 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (0011 1000 0000 in binary) is stored in RESULT.
The above example performs a logical right shift by four positions in the VALUE variable whose initial
value is -56 (1100 1000 in binary). The bits on the left are being discarded, and on the left new zeros
are inserted. The final result (1100 1000 0000 in binary) is stored in RESULT. Since RESULT is SINT
type, it only accepts the first eight bits (1000 0000).
11.14.7.10.4.4 SHR
Block that performs a binary logical right shift operation in a value passed by Value, storing the result
in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of the Value variable
after performing a number of logical shifts right, according to the Shift value.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
Block Flowchart
Example
The above example performs a logical right shift by two positions in the VALUE variable whose initial
value is 124 (0111 1100 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 1111 in binary) is stored in RESULT.
The above example performs a logical right shift by three positions in the VALUE variable whose initial
value is -98 (1001 1110 in binary). The bits on the right are being discarded, and on the left new zeros
are inserted. The final result (0001 0011 in binary) is stored in RESULT.
11.14.7.11 Math
11.14.7.11.1 Math Basic
11.14.7.11.1.1 ABS
Block that calculates the Value module, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the absolute value of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the absolute value of the VALUE variable whose initial value is -45,
storing the final result, 45, in RESULT.
The above example calculates the absolute value of the VALUE variable whose initial value is -45. The
final result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by
SINT type. Therefore, RESULT remains unchanged and the output is disabled.
11.14.7.11.1.2 ADD
Block that calculates the sum of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sum of Value1 and Value2
variables. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT.
The above example calculates the sum of VALUE 1 and VALUE2 variables, storing the final result in
RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the sum of VALUE1 and VALUE2 variables. The final result -170
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.14.7.11.1.3 DIV
Block that calculates the division of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the division of Value1 and
Value2 variables. The value stored will be the exact division if Result is REAL, or, in other cases, only
the quotient. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is of REAL type, the exact value of the division is stored in it.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since RESULT is SINT type, only the quotient is stored in it. Notice that the block
accepts arguments of both signs.
The above example calculates the division of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains unchanged
and the output is disabled.
11.14.7.11.1.4 MOD
Block that calculates the remainder of the values of Value1 and Value2, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the remainder of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the remainder of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Since VALUE2 is zero, the block generates a runtime error, RESULT remains
unchanged and the output is disabled.
11.14.7.11.1.5 MUL
Block that calculates the multiplication of the values of Value1 and Value2, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the multiplication of Value1
and Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT.
The above example calculates the product of VALUE 1 and VALUE2 variables, storing the final result
in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the product of VALUE1 and VALUE2 variables. The final result 224
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
11.14.7.11.1.6 NEG
Block that calculates the opposite (i.e., the product with -1) of a value passed by Value, storing the
result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the opposite of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the opposite of the VALUE variable whose initial value is 21, storing
the final result, -21, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -56, storing
the final result, 56, in RESULT.
The above example calculates the opposite of the VALUE variable whose initial value is -128. The final
result, 128, cannot be stored in RESULT, because it is outside the limits of accepted values by SINT
type. Therefore, RESULT remains unchanged and the output is disabled.
11.14.7.11.1.7 SUB
Block that calculates the subtraction between the Value1 and Value2 values, storing the result in
Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the subtraction of Value1 and
Value2 variables. If no errors, the Done variable is set. If there is any error in the operation, Done is
not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT.
The above example calculates the subtraction of VALUE 1 and VALUE2 variables, storing the final
result in RESULT. Notice that the block accepts arguments of both signs.
The above example calculates the subtraction of VALUE1 and VALUE2 variables. The final result 141
cannot be stored in RESULT, because it is outside the limits of accepted values by SINT type.
Therefore, RESULT remains unchanged and the output is disabled.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the antilogarithm of the Value
variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the minimum input value for which the block revolutions a nonzero
result. The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Below the minimum values cause the block to return a null value. The block ends with
success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. The indicated value is the maximum input value for which the block revolutions a valid result.
The block ends with success and Done output is activated.
The above example calculates the antilogarithm of the VALUE variable, storing the final result in
RESULT. Values higher than the maximum cause the block to generate an error, the RESULT output
remains unchanged and Done output is disabled.
11.14.7.11.2.2 EXP
Block that calculates the exponential of the Euler number "and" raised to the value of Value, storing
the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the exponent of the Euler
number "and" raised to the Value variable. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the minimum input value for which the block revolutions a nonzero result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values below the minimum cause the block to return to a null value. The block ends with success
and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
The indicated value is the maximum input value for which the block revolutions a valid result. The
block ends with success and Done output is activated.
The above example calculates the exponent of the VALUE variable, storing the final result in RESULT.
Values higher than the maximum cause the block to generate an error, the RESULT output remains
unchanged and Done output is disabled.
11.14.7.11.2.3 LN
Block that calculates the natural logarithm of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the natural logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the natural logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has value zero, and Done output is
disabled.
11.14.7.11.2.4 LOG10
Block that calculates the common logarithm (base 10) of the Value value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the common logarithm of the
Value variable. If no errors, the Done variable is set. If there is any error in the operation, Done is not
set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the common logarithm of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.14.7.11.2.5 POW
Block that calculates the value of Value raised to the exponent Power, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the value of Value raised to
the exponent Power. If no errors, the Done variable is set. If there is any error in the operation, Done
is not set, staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the value of VALUE raised to the POWER variable, storing the final
result in RESULT. Since the result is higher than the maximum supported by REAL type, the block
generates an error and Done output is disabled.
11.14.7.11.2.6 ROUND
Block that rounds the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the rounded value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals less than 0.5 are discarded. The block ends with success and Done output is activated.
The above example rounds the value of the VALUE variable, storing the final result in RESULT.
Decimals greater than or equal to 0.5 promote unity value immediately above. The block ends with
success and Done output is activated.
11.14.7.11.2.7 SQRT
Block that calculates the square root value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the square root value of
Value. If no errors, the Done variable is set. If there is any error in the operation, Done is not set,
staying in FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block ends with success and Done output is activated.
The above example calculates the square root value of the VALUE variable, storing the final result in
RESULT. The block generates a runtime error, since VALUE has negative value, and Done output is
disabled.
11.14.7.11.2.8 TRUNC
Block that truncates the value of Value, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the truncated value of Value. If
no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Compatibility
Device Version
PLC300 2.10 or higher
SCA06 2.00 or higher
Block Flowchart
Example
The above example truncates the value of the VALUE variable, storing the final result in RESULT.
Decimals are discarded. The block ends with success and Done output is activated.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arccosine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose cosine is the VALUE variable, storing the
final result in RESULT. The block generates a runtime error, since VALUE has value inferior to 1, and
Done output is disabled.
11.14.7.11.3.2 ASIN
Block that calculates the arcsine of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arcsine of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final
result in RESULT. The block generates a runtime error, since VALUE has value superior to 1, and
Done output is disabled.
11.14.7.11.3.3 ATAN
Block that calculates the arctangent of Value, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Value. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for positive values, is always in the first quadrant. The block ends with
success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the VALUE variable, storing the
final result in RESULT. The arc, for negative values, is always in the fourth quadrant. The block ends
with success and Done output is activated.
11.14.7.11.3.4 ATAN2
Block that calculates the arctangent of Y/X, storing the result in Angle.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Angle output the arctangent of Y/X. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Angle remains with its value unchanged.
When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and Y, is always in the first quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and positive values of Y, is always in the second
quadrant. The block ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for negative values of X and Y, is always in the third quadrant. The block
ends with success and Done output is activated.
The above example calculates the arc, in radians, whose tangent is the Y/X variable, storing the final
result in RESULT. The arc, for positive values of X and negative values of Y, is always in the fourth
quadrant. The block ends with success and Done output is activated.
11.14.7.11.3.5 COS
Block that calculates the cosine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the cosine of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the cosine of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
11.14.7.11.3.6 SIN
Block that calculates the sine of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the sine of Angle. If no errors,
the Done variable is set. If there is any error in the operation, Done is not set, staying in FALSE
status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts negative input values.
The above example calculates the sine of the VALUE variable, interpreted in radians, storing the final
result in RESULT. The block ends with success and Done output is activated. Notice that the block
accepts values greater than one full turn.
11.14.7.11.3.7 TAN
Block that calculates the tangent of Angle, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the tangent of Angle. If no
errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in
FALSE status, while Result remains with its value unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the tangent of the VALUE variable, interpreted in radians, storing the
final result in RESULT. The block ends with success and Done output is activated. Notice that the
block accepts negative input values and greater than one turn.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the highest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the maximum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is higher than the maximum supported by SINT type, the
block generates an error and Done output is disabled.
11.14.7.11.4.2 MIN
Block that compares the values of Value1 and Value2 and stores the lowest of them in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it sends to the Result output the lowest value in the
comparison between Value1 and Value2. If no errors, the Done variable is set. If there is any error in
the operation, Done is not set, staying in FALSE status, while Result remains with its value
unchanged.
When EN has FALSE value, Result remains unchanged and Done remains in FALSE.
Block Flowchart
Example
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. The block ends with success and Done output is activated. Notice that the
types of the input variables can be different without causing execution problems.
The above example calculates the minimum value between VALUE 1 and VALUE2 variables, storing
the final result in RESULT. Since the result is lower than the minimum supported by SINT type, the
block generates an error and Done output is disabled.
11.14.7.11.4.3 SAT
Block that performs a routine for saturation of the value found in Value in accordance with the limits
for Minimum and Maximum, storing the result in Result.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it performs a comparison between Value and Minimum and
Maximum. If Value is in the range between Minimum and Maximum, Result receives the value of
Value and Q remains FALSE. If Value is higher than Maximum, Result receives Maximum and Q
receives TRUE. If Value is lower than Minimum, Result receives Minimum and Q receives TRUE. If
there is any error in the operation, Q is not set, staying in FALSE status, while Result remains with
its value unchanged.
When EN has FALSE value, Result remains unchanged and Q remains in FALSE.
Block Flowchart
Example
The above example passes the VALUE value to RESULT, since it is not lower than MINIMUM or
higher than MAXIMUM. The block ends successfully and the Q output is disabled, since there was no
saturation.
The above example passes the MAXIMUM to RESULT, since VALUE is higher than MAXIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MINIMUM to RESULT, since VALUE is lower than MINIMUM. The
block ends successfully and the Q output is activated, since there was saturation.
The above example passes the MAXIMUM value to RESULT, since VALUE is higher than MAXIMUM.
The block ends successfully and the Q output is activated, since there was saturation.
11.14.7.12 Module
11.14.7.12.1 USERFB
Block that performs a subroutine programmed by the user.
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it updates the values of internal fields with the input
variables, performs the Ladder routine programmed by the user and updates the values of the outputs
after completing routine.
The ENO value forwards to the next Ladder block the EN value after the operation is completed.
NOTE!
Refer to section Working with USERFBs for further information.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
11.14.7.13 Timer
11.14.7.13.1 TOF
Timer block that, when energized, disables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is TRUE, the Q output is also TRUE and ET also receives the value zero.
On the negative transition edge in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state FALSE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example disables the DO1 output to identify a low level in DI1 for 12 seconds, remaining
disabled until DI1 again be TRUE.
11.14.7.13.2 TON
Timer block that, when energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
While the IN input is FALSE, the Q output is FALSE and ET also receives the value zero.
On the edge positive transition in IN, counting is triggered and ET is incremented according to
TIMEBASE. When ET equals PT, the Q output goes to state TRUE until IN revolutions to FALSE.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example shows the initial conditions of the block and of the routine variables.
When activated the IN input, counting is triggered. Since ET equals PT, the Q output is enabled.
Note that a change in PRESET variable is not forwarded to the PT field while the IN entry remains
enabled.
Disabling the IN input, the value of PT is updated and the Q output is disabled. When activating it
again, counting is triggered.
When ET reaches the value PT, the Q is output enabled and remains so while IN is at TRUE level.
11.14.7.13.3 TP
Timer block that, when identifies it is energized, enables the output after a delay set by PT.
Ladder Representation
Block Structure
NOTE!
In CFW300, the PT e ET fields can only be WORD ou UINT type.
Operation
On the edge positive transition in IN, Q receives TRUE value, counting is triggered and ET is
incremented according to TIMEBASE. When ET equals PT, the Q output goes to state FALSE until
IN revolutions to FALSE. At that moment, if IN is at TRUE level, nothing happens. On the edge
positive transition in IN, ET is automatically reset.
Compatibility
Device Version
PLC300 1.50 or higher
SCA06 2.00 or higher
Block Flowchart
Operation Diagram
Example
The above example enables the DO1 output for six seconds at each DI1 positive transition.
11.14.7.14 RTC
11.14.7.14.1 INTIME
Block that performs a programmed enabling for a time based on RTC (Real Time Clock).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it has two modes of operation. If Q_OPTION# is Normal, Q
is enabled when the internal clock's time is equal to that defined by the parameters TIMEON and
disabled when the internal clock's time is equal to the parameters set by TIMEOFF. If Q_OPTION# is
Inverted, Q is disabled when the internal clock's time is equal to that defined by the parameters
TIMEON and enabled when the internal clock's time is equal to the parameters set by TIMEOFF.
Block Flowchart
Example
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is lower than the registered enabling
inputs of the block (HOUR_ON, MINUTE_ON and SECOND_ON). This way, the Q output is disabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is equal to the registered in the
enabling inputs of the block (HOUR_ON, MINUTE_ON and SECOND_ON). This way, the Q output is
disabled.
In the above example, the INTIME block is disabled. This way, regardless of the input, the Q output is
disabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is equal to the registered in the
disabling inputs of the block (HOUR_OFF, MINUTE_OFF and SECOND_OFF). This way, the Q
output is enabled.
In the example above, the INTIME block is enabled, the Q_OPTION# input is enabled for NORMAL
operation and the current time of the internal clock of the device is superior to the registered in the
disabling inputs of the block (HOUR_OFF, MINUTE_OFF and SECOND_OFF). Thus, the Q output is
disabled.
11.14.7.14.2 INWEEKDAY
Block that performs a programmed enabling for weekdays based on RTC (Real Time Clock).
Ladder Representation
Block Structure
Operation
When this block has a TRUE value in EN, it has two modes of operation. If Q_OPTION# is Normal, Q
is enabled if the day of week of the internal clock has Enabled parameter in the block. If Q_OPTION#
is Inverted, Q is disabled if the day of week of the internal clock has Enabled parameter in the block.
NOTE!
The weekdays are identified by numbers, with Sunday being day 0 and Saturday day 6.
Block Flowchart
Example
In the above example, the INWEEKDAY block is disabled. This way, regardless of the input, the Q
output is disabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
NORMAL operation. The current day of the week of the device's internal clock is Wednesday (value
3), which has ENABLED status in the programming. This way, the Q output is enabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
NORMAL operation. The current day of the week of the device's internal clock is Thursday (value 4),
which has DISABLED status in the programming. Thus, the Q output is disabled.
In the example above, the INWEEKDAY block is enabled and Q_OPTION# input is enabled for
INVERTED operation. The current day of the week of the device's internal clock is Thursday (value 4),
which has DISABLED status in the programming. This way, the Q output is enabled.
11.14.7.15 Structures
Structure is a data grouping used to define a recipe or an object.
In the Ladder program, it is possible to create variables of the structure type and use them in the blocks. To
access the internal members of the structure, the '.' is used followed by its respective member.
Creating a structure
1. With the right button of the mouse on the folder Structure, click on New file.
3. Configure the structure using the buttons presented in the figure below.
4. After finishing the edition of the structure, click on the button Finish.
Editing a structure
Just double click on the desired structure, as shown in figure 4, and a window will open as shown in figure 3,
allowing to insert new data, erase or move the position of the data.
11.14.8Communication
11.14.8.1 Force I/O
Overview
The force inputs and outputs window is used for the values of the digital and analog inputs to be read by the
program, by values manipulated by the user, regardless their physical state. It also allows the manipulation of
the physical states of the digital and analog outputs by the user independently of the values calculated by the
program.
In order to force the device inputs and outputs, it is necessary that the online monitoring be active and the
option Run cyclically be enabled. The data are sent to the device every 2 seconds.
The values can be edited with the device disconnected. The configurations are stored in the resources and
recorded whenever the main resource selection is changed.
The data displayed on the force I/O window contain the values belonging to the resource (and configuration)
selected as main.
The force I/O window is open trough the menu Online > Force I/O:
Toolbar
The toolbar of the force window has the options to run cyclically, upload the device force configuration, enable
all and disable all:
Run cyclically: Sends the user's configurations to the device and updates the state of the inputs and
outputs in a cyclic way.
Upload configuration: Allows the current configuration of the device to be read. For this option to be
enabled, it is necessary that the online monitoring be active and the option run cyclically be disabled.
Enable all: Enables the force I/O of all of the inputs and outputs of the device.
Disable all: Disables the force I/O of all of the inputs and outputs of the device.
For each digital and analog input and output there is a selection box linked to enable the force, a status field
and an edition field.
Digital:
3. Current status of the I/O: It has three statuses: 1. light green LED: activated; 2. dark green LED:
deactivated; 3. gray LED: the value is not being read.
4. Enable/disable the input/output
Analog:
NOTE!
The analog signal scale has 15 bits plus 1 bit for signal, except for SSW900 which it has only 10
unsigned bits.
12 WComm
12.1 Introduction
The WComm (Communication Manager) configures the communication channels of the USB interfaces,
communication ports (COM) and Ethernet, providing such connections via Modbus TCP protocol and data
12.2 Configuration
12.2.1 Menus
The WComm offers the configuration options available in this menu:
Menu File:
Option to activate or deactivate the communication with the applications (standard: active);
Configuration… presents a dialogue box with options.
The dialogue box has the options: Communication, Miscellaneous and FTP Config.
Communication
- Checkbox: when checked, it enables the WComm for remote connection via TCP/IP;
- Port Number: number of the TCP/IP communication port the WComm uses for communication with
applications that communicate with the devices through it;
- IP Authentication: list of the IP addresses that can access the WComm . An empty list indicates that any IP
address can access the WComm .
Miscellaneous
- Language: allows selecting the language of the WComm from the options available in the menu.
FTP Config
The FTP server (File Transfer Protocol) allows the files contained in the PLC300 SD card to be handled by
an FTP client. In order to start the FTP server, see the information below:
- Host: presents the hostname to access the FTP service;
- Button to enable or disable the FTP service (default: disabled);
- Button to modify the administrator's password.
- FTP Status:
The image below presents the FTP service enabled (Enable button pressed):
NOTE: The FTP service will be available using any FTP client.
- Hostname: indicated in the window above as "BR08080808".
- Port: 2221.
- Username: admin.
- Password: default: weg, or defined by the user.
Other configurations of the FTP service will be available in the Configuration File.
WComm is a WPS's module and its standard configuration allows to access PLC300 device through USB
port, giving access since root folder /PLC300/ on SD Card (connected to PLC300).
The FTP service starts enabled, because of that is necessary to activate it at first use: the instructions are
available in session Configuration.
Once enabled, the WComm's FTP service uses the standard configuration.
To change the configuration, please follow the steps below.
If the WComm's configuration file was damaged/corrupted during edition, it may be necessary to uninstall and
reinstall WPS.
Thus, if necessary to change configuration file, it is recommended to only change the connection type line.
Leave another changes to a next file edition.
- Using an regular text editor (Notepad), edit the configuration file located in folder where WPS is installed,
usually C:\WEG\WPS 2.50\wps\modules\gateway\conf\users.properties.
- In WComm, click the button to check communication, making sure that PLC300 is accessible:
- Select and copy the connection type line as shown in image above (text in blue highlight).
- In users.properties file, change the connection´s variable, changing by text copied in previous step:
From: ftpserver.user.admin.connection=USB/@0
To: ftpserver.user.admin.connection=Ethernet/Modbus-TCP/192.168.0.10\:502/@1
This instruction sets the communication type will be used to access the FTP service when logged as
administrator (admin).
There are samples in configuration file for all possibilities of connections: USB, Serial and Ethernet.
These samples starts with character #, therefore changing it does not affects the software operation (since
the # character being kept at line start).
- After that, open * WPS. It will load the WComm new configuration.
Accessing data.
Also is possible to login as anonymous user. To do that, please follow steps above, using the folder ftp://
anonymous@localhost:2221.
- Using an regular text editor (Notepad), edit the configuration file located in folder where WPS is installed,
usually C:\WEG\WPS 2.50\wps\modules\gateway\conf\users.properties.
- After that, open * WPS. It will load the WComm new configuration.
- Using an regular text editor (Notepad), edit the configuration file located in folder where WPS is installed,
usually C:\WEG\WPS 2.50\wps\modules\gateway\conf\users.properties.
- It is also possible to change this configuration for anonymous user. To use the same path as shown in
- After that, open * WPS. It will load the WComm new configuration.
- Informations about the procedure to change password (and another configurations) are available in chapter
Configuration.
NOTE!
* It is possible to execute just the WComm module, which is available at the WPS's install folder,
usually at C:\WEG\WPS 2.50\wps\modules\gateway\CommunicationGateway.exe.
At this condition, when necessary to close the WComm, click the right mouse button over icon
The FTP service configuration file allows customizing the following data:
Serial
USB
Ethernet
Configuration file structure with example information (setting up anonymous and admin profiles):
NOTE: Additional information to configure WComm, in a first utilization to read SD Card data, is
available in Quickstart Guide for FTP.
NOTE: Any change in this file requires the reset of the WPS in order to implement the new
configuration of WComm module.
* Changing the password in the users.properties file compromises the access of the user to
the application FTP service.
In order to add a new connection, select one of the available connections: Communication Ports (COM),
USB and Ethernet.
In case the COM port is not listed, select “Manage Serial Ports” in the “Communication Port” item, and
choose the used port.
Change the baud rate, data bits, stop bits and parity settings according to the equipment configuration.
Transmission delay(ms): waits for this time before sending the next telegram.
- Adjustable range: 0 ... 20000;
- Default: 0.
Response delay (ms): waits for this time before trying to receive the response from the sent
telegram.
- Adjustable range: 0 ... 20000;
- Default: 0.
Timeout (ms): waits for this time before indicating that the response was not
received.
- Adjustable range: 100 ... 20000;
- Default: 5000.
USB Interface
Response delay (ms): waits for this time before trying to receive the response from the sent
telegram.
- Adjustable range: 0 ... 20000;
- Default: 0.
Timeout (ms): waits for this time before indicating that the response was not
received.
- Adjustable range: 100 ... 20000;
- Default: 1000.
Ethernet
Response delay (ms): waits for this time before trying to receive the response from the sent
telegram.
- Adjustable range: 0 ... 20000;
- Default: 0.
Timeout (ms): waits for this time before indicating that the response was not received.
- Adjustable range: 100 ... 20000;
- Default: 5000.
-A- -S-
At; Direct Representation 120 SD Card 1160
setup 1136, 1137, 1138, 1139, 1140, 1141
-C-
-T-
Cam Table Select 1432, 1437, 1439, 1441
Config; Configuration 120 Task 120
configuration 1136, 1137, 1138, 1139, 1140, 1141
-U-
-D-
upload 1157
Data Type 120
download 1147 -V-
-F- Variable 120
-M-
MC_CamTableSelect 1432, 1437, 1439, 1441
MC_Power 1446
MC_Reset 1449, 1451, 1455, 1457, 1462, 1465,
1466, 1469, 1470, 1473, 1477, 1480, 1483, 1489, 1495
modbus 1160
-O-
----OLD_KEYWORDS----files 1160
online commands 1142
-P-
Program; Application 120