Sie sind auf Seite 1von 73

Soft PLC

CFW - 11

Introduction to Numbering Systems

1
Introduction to Numbering Systems

 To be able to program PLC / Soft PLC one must understand numbering


Systems

 Differences between Bits(Boolean) Bytes; Words and Double Words.

 Bit marker; Digital input; Digital output; User Parameter; Bit system
marker; Word marker

 Constants; Markers; Analog Inputs; Analog Outputs;

 Difference between Volatile and Non-Volatile.

Introduction to Numbering Systems

 KF - Float Constant
 MX - Bit Marker
 MW - Word Marker
 MF - Float Marker
 SX - Bit System Marker
 SW - System Marker
 IX - Digital Input
 QX - Digital Output
 IW - Analog Input
 QW - Analog Output
 UW - User Parameter
 PW - System Parameter
 PD - Drive Parameter

2
Number Systems

There are four different types of number systems:

 Decimal (Base 10) (XX10)


 Binary (Base 2) (XX2)
 Octal (Base 8) (XX8)
 Hexadecimal (Base 16) (XX16)

Comparing These Numbers

Decimal (10) Binary (2) Octal (8) Hexadecimal (16)

0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

3
The Weight of These Numbers

Breaking Down Decimal Numbers: 1234

1000 100 10 1

103 102 101 100

1 2 3 4

(1 x 103) + (2 x 102) + (3 x 101) + (4 x 100)

= 1000 + 200 + 30 + 4

= 1234

The Weight of These Numbers

Breaking Down Octal Numbers

512 64 8 1
83 82 81 80

1 2 3 48

= (1 x 83) + (2 x 82) + (3 x 81) + (4 x 80)

= 512 + 128 + 24 + 4

= 668

4
The Weight of These Numbers

Breaking Down Hexadecimal Numbers

4096 256 16 1
163 162 161 160
1 2 3 416

= (1 x 163) + (2 x 162) + (3 x 161) + (4 x 160)

= 4096 + 512 + 48 + 4

= 4660

The Weight of These Numbers

Breaking Down Binary Numbers

MSB LSB

8 4 2 1
23 22 21 20

1 1 0 1

= (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20)

= 8 + 4 + 0 + 1

= 13

5
Converting Number Systems

Use Sum Of Weights

Decimal

BINARY

Octal Hexadecimal

Make Groups of 3 (23=8) Make groups of 4 (24=16)

Convert Binary To Hexadecimal

0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 12
5 D F 1

STEP 1: Make groups of 4 starting at RHS (24 = 16 = HEX BASE)

STEP 2: Change the groups of 4 to Hexadecimal using your table

6
Convert Hex To Binary

5 D F 116

0101 1101 1111 0001

STEP 1: Change each number to a four bit binary number using your table

Convert Binary to Decimal

32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1

215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20

0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1

= 16384 + 256 + 128 + 4 + 1

= 16773

7
Hexadecimal to Decimal

CHANGE 2316 to DECIMAL

STEP1: First convert the Hexadecimal Number to Binary.


2 3

0010 0011
STEP2: Convert the Binary Number to Decimal.

128 64 32 16 8 4 2 1
0 0 1 0 0 0 1 1
1 + 2 + 32 = 3510

Decimal to Hexadecimal

CONVERT 2210 TO HEXADECIMAL

STEP1: First convert the Decimal Number to Binary.

32 16 8 4 2 1 22 – 16 = 6
6– 4=2
2– 2=0
0 1 0 1 1 0
STEP2: Convert the Binary Number To Hexadecimal.

0001 0 1 1 0

1 6

8
1’S Compliment

What is 1’s Compliment?

All Zero’s changes to One, and all One’s changes to Zero

EXAMPLE:

Change the following number to its One’s Compliment:


0101011111000011
1010100000111100

2’S Compliment

What is 2’s Compliment?

It is the 1’s Compliment of a number + 1


EXAMPLE:

Change the following number to its Two’s Compliment:

0101011111000011
1 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0 (One’s Compliment)
+ 1 (Add 1)
1 0 1 0 1 0 0 0 0 0 1 1 1 1 0 1 (Two’s Compliment)

9
Displaying Negative Numbers

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

•Bit Number 15 is called the sign bit.


•If it is a “0” , the number presented is positive
•If it is a “1”, the number presented is negative and in its 2’s Comp

Displaying Negative Numbers

1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 Sign bit is “1”, number is negative


and in 2’s compliment

0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 The obtain the real value of the


Number, calculate the 1’s Compliment

+ 1 Add “1” to the 1’s compliment


In order to get the 2’s compliment.

0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 Change the binary number to decimal.


The number presented was –15.

10
Displaying Negative Numbers

Word Structure

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 Nibble 1 Nibble 1 Nibble 1 Nibble

1 Byte 1 Byte

1 Word

11
Introduction

 Ladder diagram is a graphic presentation of Boolean equations, by


combining contacts (input arguments) with coils (output results) and
functional blocks.
 The Ladder program allows to test and change data by standard graphic
symbols.
 The symbols are positioned in the ladder program similar to a logic
diagram line with relays. The Ladder diagram is limited at the right and at
the left by bar lines.

Introduction

 GRAPHIC COMPONENTS
The basic graphic components of a Ladder Diagram:

A - Left power rail


B - Right power rail
C - Horizontal connection
D - Vertical connection
E - Contact
F - Coil
G - Power flow

12
Introduction

 Power rails
The Editor is left delimited by a vertical line known as left power rail and right
delimited by a vertical line known as right power rail.
 Connections, Elements and States
The connection elements may be horizontal or vertical. The status of the elements
can be denoted by 1 or 0, corresponding to true 1 or false 0, Boolean values,
respectively. The term Connection Status should be synonym of the term Power
Flow.
 The status of the left power rail can be considered always equal to 1.
 A horizontal line should indicate a horizontal connection element
 A horizontal connection element transmits its status to the elements
immediately to the right element.

Introduction

 A vertical connection element must consist of vertical lines intersected by one or


more horizontal connections at each side. The vertical connection status should
represent the OR of the 1 status of the horizontal connections of the left side, i.e.,
The status of the vertical connections should be:
1. 0, if all horizontal connections, including the left ones, are 0
2. 1 if the status of one or more horizontal connections, including the left,
ones, is 1
 The status of the vertical connections should be copied for all horizontal
connections associated to the right ones.
 The status of the vertical connections cannot be copied for all horizontal
connections associated to the left ones

13
Introduction
 EXECUTION CONTROL
Figure below shows how the Ladder program is executed. PLC1 executes
continuously one scan cycle. The cycle starts reading the values of the inputs and
outputs signals and saving them in the internal memory.

A- Inputs read to the memory


B - Memory write at the outputs
C - Ladder line scanning

The lines of the Ladder program are executed in a fixed order, by starting with the first line.
During the program scanning new values of the physical outputs, as determined by the logic of
the different Ladder lines, can be modified in the memory.
Finally, after Ladder program concluded the program execution (one scan cycle), the output
image is written to the physical outputs in a unique operation.

Introduction

 LOGIC CALCULATION FORM

The logics are calculated from top to bottom and from left to right, as
shown in the previous Ladder Diagram.

14
Introduction to the PLC

What is a PLC?

 The abbreviation PLC stands for Programmable Logic Controller.

 It is a electronic system that reacts on different type of inputs like


limit switches, proximity switches, level, switches, photo electric
switches, selector switches, digital switches etc.

 The system makes a decision according to a certain control program


and then control driving loads such as solenoid valves, motors,
electromagnetic clutches, indication loads such as lights, digital
indicators, sirens, etc.

Installing The Software

It is also possible to download the WLP software from the WEG website
http://www.weg.net

After downloading the WLP installer (a ZIP format file), extract the files to
a temporary folder before running the installation program.

Go to the temporary folder and run the WLP installer (SETUP.EXE) by


double-clicking it.

15
Introduction to the SoftPLC

 The SoftPLC is a feature that incorporates to the CFW-11 the functionalities


of a PLC, adding flexibility to the product and allowing the user to develop
applicative software (user programs).

Main Features are:


 Ladder language programming, by using the WLP software;
 Access to all the CFW-11 I/O’s and parameters;
 50 configurable user parameters;
 PLC Mathematical and Control blocks;
 Applicative software transfer and on-line monitoring via USB;
 Transfer of the installed applicative software to the PC conditioned to a password;
 Storage of the applicative software in the FLASH memory board;
 Execution directly in the RAM memory.

Symbols and Data Types

 %KW word type constants (16 bits)


 %KF float type constants (32 bits floating point)
 %MX bit marker
 %MW word marker (16 bits)
 %MF float marker (32 bits floating point)
 %SX system bit marker
 %SW system word marker (16 bits)
 %IX digital inputs
 %IW analog inputs (16 bits)
 %QX digital outputs
 %QW analog outputs (16 bits)

16
SoftPLC Memory

 The total size of the SoftPLC memory is 15360 bytes, between program
memory and data memory. This amount can be reduced depending on the
Trace function use.

3.1 Memory Division

NOTE!
 P0560 = “Trace Available Memory”, given in percentage. 100.0% is equal
to 15360 bytes, and its factory setting is 0%.

Data Memory

 The SoftPLC data memory area (user variables) is shared with the
programming memory. Therefore, the total size of an applicative may
vary as function of the amount of variables applied by the user.

 The bit, word and float markers are allocated according to the LAST
address used in the applicative, i.e., the higher the last address, the bigger
the allocated area. Therefore, it is recommended to use the markers in a
SEQUENTIAL manner.
 The word and float constants do also use program memory space.

17
Memory Map

Constants

Memory Map

I/O Physical Inputs and Outputs (Hardware)

The analog input (%IW) and analog output (%QW) values respectively read and
written via the SoftPLC, respect their gains (P0232, P0237, P0242, P0247:
%IW1−%IW4 and P0252, P0255, P0258, P0261: %QW1−%QW4) and offsets
(P0234, P0239, P0244, P0249: %IW1−%IW4).

18
Physical Inputs and Outputs (Hardware)
The values read or written via SoftPLC obey the following rules, respecting the
parameters related to the analog input and output signal types (P0233, P0238,
P0243, P0248: %IW1−%IW4 and P0253, P0256, P0259, P0262: %QW1−%QW4):

Memory Map (Internal memory)


Volatile Marker

 They consist of variables that can be applied by the user to execute the applicative
logics. They can be bit markers (1 bit), word markers (16 bit) or float markers (32
bit – IEEE).
In order to minimize the applicative size, use the markers in a sequential manner.
E.g.: Bit markers: %MX5000, %MX5001, %MX5002...
Word markers: %MW8000, %MW8001, %MW8002...
Float markers: %MF9000, %MF9001, %MF9002...

19
Memory Map (Internal memory)

Bit; Float and Word Markers

Memory Map
Odd System Bits

 They consist of special variables that allow the user to read and change inverter data that
may or not be available in the parameters. They can be: system bit markers (1 bit) or system
word markers (16 bits).

20
Memory Map for the Odd System Bits

Memory Map

Even System Bits

21
Memory Map

Even System Bits (continue)

Memory Map for the Even System Bits

22
Memory Map
System Word Markers

The system word markers %SW3300 and %SW3301 use a 13 bits resolution
(8192 → 0 to 8191), which represents the motor synchronous speed. Thus, if
for a 6 pole motor (this means a synchronous speed of 1000 rpm) the speed
reference via SoftPLC (%SW3301) is 4096; the motor will run at 500 rpm.

Equation for the calculation of the motor speed value in rpm:


Speed in rpm = Synchronous speed in rpm x 13 bits speed
8192

Memory Map for the System Word Markers

23
Parameters

The parameters from P1011 to P1049 appear on the keypad only when there
is a valid applicative (user program) in the memory, i.e., when P1000 > 0.

Parameter Memory Map

CFW-11 Configuration Parameters

 P0100 – Acceleration Time


 P0101 – Deceleration Time
 P0220 – LOCAL/REMOTE Selection Source
 P0221 – Speed Reference Selection – LOCAL option
 P0222 – Speed Reference Selection – REMOTE option
 P0223 – FORWARD/REVERSE Selection - LOCAL option
 P0226 – FORWARD/REVERSE Selection - REMOTE option
 P0224 – Run/Stop Selection – LOCAL option
 P0227 – Run/Stop Selection - REMOTE option
 P0225 – JOG Selection – LOCAL option
 P0228 – JOG Selection - REMOTE option

24
CFW-11 Configuration Parameters

 P0251 – AO1 Function


 P0254 – AO2 Function
 P0257 – AO3 Function
 P0260 – AO4 Function
 P0275 – DO1 Function (RL1)
 P0276 – DO2 Function (RL2)
 P0277 – DO3 Function (RL3)
 P0278 – DO4 Function
 P0279 – DO5 Function
 P0560 – Trace Avail. Memory

SoftPLC Exclusive Parameters


P1000 – SoftPLC Status
Adjustable 0 = No Application Factory Setting: 0
Range: 1 = Install. App..
2 = Incompat. App.
3 = App. Stopped
4 = App. Running
Properties: RO
Access groups via keypad:

01 PARAMETER GROUPS.
∟ 50 SoftPLC .

25
SoftPLC Exclusive Parameters

Description:
 It allows the user to visualize the SoftPLC status. If there is no installed
application, the parameters from P1001 to P1059 will not be showed on
the keypad.

 If this parameter presents the option 2 (“Incompat. App.”), it indicates


that the version that has been loaded in the flash memory board is not
compatible with the current CFW-11 firmware.

 In this case it is necessary to recompile the project in the WLP,


considering the new CFW-11 version, and to download it again. If this is
not possible, the upload of this application with the WLP can be done,
provided that the application password be known or that the password be
not enabled.

SoftPLC Exclusive Parameters


P1001 – SoftPLC Command
Adjustable 0 = Stop Program. Factory Setting: 0
Range: 1 = Run Program.
2 = Delete Program.
Properties: CFG
Access groups via keypad:
01 PARAMETER GROUPS.
∟ 50 SoftPLC .

Description:
It allows stopping, running or excluding the installed applicative, for that
reason, the motor must be disabled.

26
SoftPLC Exclusive Parameters
P1010 to P1059 – SoftPLC Parameters
Adjustable 0 to 65535 Factory Setting: 0
Range:
Properties: CFG
Access groups via keypad:
01 PARAMETER GROUPS.
∟ 50 SoftPLC .
Description:
They consist of parameters with functions defined by the user by means of the WLP
software. It is also possible for the user to configure these parameters
NOTE!
Parameters P1010 to P1019 can be visualized in the monitoring mode (P205 =[021 -
30] SoftPLC (Read Parameter Sel.1) (Normally option 0-20)
NOTE!
When P1011(Speed Reference) is a writing parameter and it is programmed in P0205,
P0206 or P0207, then its contents can be changed with the HMI up and down keys.

Inverter Parameter Settings

Only the parameters of the CFW-11 that are related to the SoftPLC will be presented.

Symbols for the Properties Description

RO Read-only parameter.
CFG Parameter that can be changed only with a stopped motor.
Net Parameter visible on the keypad if the inverter has a network interface
installed– RS232, RS485, CAN, Anybus-CC, Profibus – or if the USB interface
is connected.
Serial Parameters visible on the keypad if the inverter has the RS232 or the RS485
interface installed.
USB Parameters visible on the keypad if the inverter USB interface is connected.

27
SoftPLC Main Screen

Optional for PLC Board

Project Menu
Standard Bar
Communication Bar
Block Bar
Ladder elements Bar
Page Bar
Project tree
Status Bar

Project Menu

New... Creates new projects


Open... Opens existing projects
Save... Saves current project
Save As... Saves current project with a new name
Delete... Removes selected project
Print... Prints current project
Print Preview Visualizes printing of the current project
Printer Setup Opens window to configure printer

28
Project Menu Continue

Change Units Modifies the units of the constants used in the project
When clicking on this option, a box is opened to configure the constant
units used in the Project,

Edit Menu

Undo: Undoes the last modification done in the ladder.


Redo: Redoes the last modification undone in the ladder.
Copy: Copies the selected area in the ladder.
Cut: Cuts the selected area in the ladder.
Paste: Pastes the area previously copied or cut in the ladder.

29
Edit Menu

Find: Locates the selected variable through a specific box.

View Menu
Standard Bar: Displays/Hides the standard button toolbar.
Communication Bar Displays/Hides communication button toolbar.
Edition Bar: Displays/Hides edition button toolbar.
Block Bar: Displays/Hides function block edition toolbar.
Status Bar: Displays/Hides status toolbar.
Grid: Displays/Hides grid in the edition area.

Tag/Address: Switches the display mode of the variables in the edition area, between “symbolic tag” and
absolute address.
Compilation Errors: Displays a Box with the errors generated during the project compilation.
Find Compilation Errors: Enables the highlighted display of where the compilation errors are.
Compilation Information: Displays a box with the information about the compilation with generated files
and their sizes.
Address Tags: Displays a box with the variables used in the program with their respective addresses
and tags.
User Parameters Configuration: Displays a box where Tags and Min/Max values can be configure.

30
View – Compilation Info
View – Compilation Info
It allows the user to know the compiled applicative size in bytes
(<project name>.bin) to be sent to the equipment.

View – User Parameter Configuration

View – User Parameter Configuration


It opens an attribute visualization window for all the user parameters. With a double click on
the parameter, it is permitted the configuration of these attributes, which include:
 Parameter descriptive text on the keypad (up to 21 characters);
 Text for the units (up to 5 characters);
 Minimum and maximum limit;
 Number of decimal positions;
 Hexadecimal or normal format;
 Reading or writing only;
 Modifications only with a stopped motor, or online;
 With or without sign;
 Ignores the password (allows modification regardless of P0005) or normal;
 Visualizes or hides the parameter;
 Allows saving the parameter value (retentive), when it is used in some blocks
(PLC, Calculations and Transfers) on power down;
 Configuration parameter that allows modification with the motor running.

Those configurations can be transferred to the CFW-11 with the “Download” button.

31
View – User Parameter Configuration

Page Menu

Insert Page Before: Inserts a new page before the current page.
Insert Page After: Inserts a new page after the current page.
Delete Page: Deletes the current page from the project.
Previous Page: Goes to the previous page.
Next Page: Goes to the next page.
Go to Page: Goes to the selected page through a Box that will open on the screen.

32
Insert Menu

Select: Enables mouse with the pointer function used to mark edition areas and modify parameters
of the ladder blocks.
Delete Element: Enables mouse with the function of deleting elements already inserted in the ladder
edition area.
Comment: Enables mouse with the function of inserting comments in the ladder edition area.
Connection: Submenu to insert connections among ladder components.
Contacts: Submenu to insert contacts in the ladder edition area.
Coils: Submenu to insert coils in the ladder edition area.
Function Blocks: Submenu to insert function blocks in the ladder edition area.

Build Menu

Compile: Compiles the current project by checking errors and generating the binary
code that can be downloaded to the VSD in the future.

33
Communication Menu

Download : Download user’s program and/or user Parameters to the VSD.


Upload : Uploads function/units of the programmable parameters from the VSD.
On-line Monitoring: Activates/Deactivates on-line monitoring of the ladder program.
Monitoring Variable: Opens/Closes box for variable monitoring.
Trend Variables: Opens/Closes Box for graphic monitoring of variables through trend (trend graph).
Monitoring Input/output: Opens/Closes Box for monitoring digital input and outputs.
Parameter Table: Opens Box for reading/writing the values of the board parameters.
Config Serial: Opens box for configuring the serial communication between the PC and board.

Help Menu

In this menu, you can find all the functions related to the help of the WLP
software, according to;

Contents: Displays help topics of the WLP software.

About WLP: Displays information related to the WLP software.

34
Practical
Creating a New Project
1. Click on Project – New
2. Define the project name
3. Configure the equipment and the respective firmware version
4. Click on the "OK" button. Thus, the new project will be created blank and with only one
page. In this example, the Tutor1 project was created. In the path where the WLP projects
are saved C:\WEG\WLP VX.YZ\Projects, a folder was automatically created with the name of
the new project Tutor1, according to next figure.

Practical
Opening a existing Project
1. Click on Project – Open
This folder contains all the information and configurations that belong to the project. When it is
necessary either to copy the project to another computer or to save a safety copy, one should copy
this folder to a new target.

2. Close Project list after viewing.

35
Practical
1. Click on Project – Properties
It allows the user to redefine the equipment and the firmware version.
In this box it is also configured whether or not the project will have upload password.

2. Close Project list after viewing.

Practical
Creating a Program in Ladder

36
Practical
Creating a Program in Ladder
With a new blank project created and all the environment functionalities known,
one can create the program in ladder

1 - Select function insert contact Normally Opened

2 – Take the cursor up to the cell of line 0 and column 0

3 – Click this cell with the mouse

4 – Press the “ESC” key or select the pointer function

Practical
Creating a Program in Ladder
5 – Double click the contact. The following box will be displayed
In this box, the type of address used by the contact is defined.

This is the contact property box, one can redefine the type of contact in it, according to next figure.

In this box, the type of address used by the contact is also defined,

Figure – Type of address.

37
Practical
Creating a Program in Ladder
Once the type of address is defined, one should define the address
itself. Each type has a valid address range, which is always displayed
in its property box.

In this box, one defines either the “Tag” or symbol of the address
as well as a description about the address in question

When clicking on “OK”, this “Tag” will be saved in the Project and it will be used in
all places where the address in question is. The “Tag” button changes and an
asterisk is displayed at the front (“*Tag”) indicating that the address in question
already has a defined “Tag”.

Practical
Creating a Program in Ladder

If the “Tag” is not displayed on screen, click on the “Tag/Address”


button in the “Display” menu. Then, the contact name will appear

6 – Select insert coil function.


7 – Go to the cell of line 0 and column 9 with the cursor.
8 – Click this cell with the mouse.
9 – Press the “ESC” key or select the pointer function.

38
Practical

Do the same way as with the input, previously described on step (6), with the “Tag” = “Output_1”
and description = “Energize the run contactor” according to above.

10 – To connect digital input 1 with digital output 1, select “insert horizontal connection”.

Practical

11 – At this stage, one should compile the program. For such, click on the compile button.

During the compilation, the compilation status box will be


displayed, indicating the compilation process.

After the compilation, another box will be displayed,


indicating if some compilation error was generated.

39
Example of Compilation Error

If there is any edition error in the program, they will be displayed during the compilation. For
example, if a horizontal connection is missing, the following compilation error will be displayed
in the compilation.

The errors generated were the following:


c:\weg\wlp v4.01\projects\tutor1\tutor1.ldd (Page 01, Ln 00, Col 09) :Warning C201 : element
is not connected to the left.
c:\weg\wlp v4.01\projects\tutor1\tutor1.ldd (Page 01, Ln 00, Col 00) :Warning C203 : logic
incomplete.
Page, Line and column where the error was found are always displayed. If option “Error location”
of the “Display”menu is enabled, the cell where the error is will have a red border

Communicating With The Drive

40
Practical

Communication – Configuration
 The USB port is used for the CFW-11. Therefore, the USB driver must be
installed. The driver is found in the DRIVER_USB folder, inside the WLP
V7.2X.

Practical
Communicating With Drive

1. Connect the comms cable to the USB port at the front Panel of the VSD
2. Configure the serial communication by selecting the USB port.
(Shift+F8) or under Menu-Communication-Configurations.
3. Transfer the program (F8) or under Menu-Communication
Transfer User Program.

41
Practical

4. Click on the OK button to transfer the program

It displays the target equipment connected via serial; the file’s name to be transferred as
well as the date and time it was compiled.
The transfer will be started.
It should be very clear that during the program transference the board will not be active,
thus not executing any program. If there are linked outputs or the converter is enabled,
They will be unlinked and the converter will be disabled.

If the transfer was successfully, the board will start executing the new user’s program.

Practical

 Communication – Download
 This command allows downloading the applicative and/or the user
parameter configurations to the CFW-11.

42
Practical

 Construct – Compile
 It analyses the applicative and generates the code for the specified
equipment.

Practical
Online Monitor (F9)
Monitoring the Program
Monitor Variables (ShiftF9)
Monitor Inputs/Outputs (Alt+F9)
Monitor Parameters (Ctrl+Alt+F9)

Note: Parameter P1001 SoftPLC Command of the drive has 3 options for the user’s program.
0:Stop; 1:Run and 2:Delete program. Choose option 1:Run and monitor P1000 SoftPLC Status.
With the program running, it can be monitored on the computer’s screen by pressing the on-line
monitoring button. At this moment, the WLP will try to establish communication with the VSD by
testing the serial communication. If there is no, communication problem, it will be displayed on the
program’s status bar.

43
Practical
Monitoring the Program

Toggle button

Can also Insert numerical values

The internal input/output monitoring box can also be used through the button according to above
figure. It indicates the same thing as ladder monitoring, that is, when activating input 1, output 1
will also be activated.

Practical
Monitoring the Program

The digital input/output monitoring box can also be used through the button according to above
figure. It indicates the same thing as ladder monitoring, that is, when activating digital input 1,
digital output 1 will also be activated.

44
Binary Digit(Bit) Logic

Contacts / Inputs
Normally Open Contact (NO CONTACT)
%MX: Bit Marker
%IX: Digital Input
%QX: Digital Output
%UW: User Parameter
%SX: System Bit Marker - Reading

45
Contacts / Inputs
Normally Close Contact (NC CONTACT)

%MX: Bit Marker


%IX: Digital Input
%QX: Digital Output
%UW: User Parameter
%SX: System Bit Marker - Reading

AND Logic with Contacts

 When the contacts are in series, an AND logic is executed among them,
storing the result in the stack.

46
OR Logic with Contacts

 When the contacts are in parallel, an OR logic is executed among them,


storing the result in the stack.

Coils / Outputs

Coil

%MX: Bit Marker


%QX: Digital Output
%UW: User Parameter
%SX: System Bit Marker – Writing

47
Coils / Outputs

Negated Coil (Inverter)

%MX: Bit Marker


%QX: Digital Output
%UW: User Parameter
%SX: System Bit Marker – Writing

Coils / Outputs

Set Coil

The data type may be:


 Bit marker
 Digital output
 User parameter

If UW801 and the Dig-out 1 of the drive are 1, or the Dig-in 1 is 1 and UW800 is 0, its sets Dig-out 1 and maintain it

48
Coils / Outputs

Resets Coil
The data type may be:
 Bit marker
 Digital output
 User parameter

Coils / Outputs

Positive Transition Coil


The data type may be:
 Bit marker
 Digital output
 User parameter

49
Coils / Outputs

Negative Transition Coil


The data type may be:
 Bit marker
 Digital output
 User parameter

Movement Blocks

50
Movement Blocks
Speed and/or Torque Reference – REF
Menu: Insert - Function Blocks - Movement – REF
EN: Enables the block
ENO: Goes to 1 when EN ≠ 0 and without error.
Properties:
MODE: 0 = Speed mode, 1= Torque mode
SPEED: Speed reference [RPM or13 Bits]
TORQUE: Torque reference [13 Bits]

In the example above, if the EN input is active and the digital input 1 off, then the block will
generate a speed reference according to the user parameter 1010 in the 13 bit unit. If there is no
error (e.g., disabled inverter), the ENO output goes to 1.

Practical Example
Create new Project and call it REF Example

In the example above, if the EN input is active and the Gen Enable 1, then the block will generate
a speed reference according to the user parameter 1011 in the 13 bit unit. (Can choose RPM)

51
Information
 To monitor values in another numbering system
 Main Menu ; Communicate – enter
 Config Online Monitor – enter
 Choose numbering system (ex: Binary)

PLC Blocks

52
PLC BLOCKS

Timer – TON
Menu: Insert - Function Blocks – PLC-TON.
Input: IN: Enables the block.
Output: Q: Goes to 1 when IN ≠0 and ET ≥ PT.
Properties:
PT: Preset Time.(max value of 65535 minutes)
ET: Elapsed Time.

In the example above, if the IN input is active and the content of the word marker 8000 is
higher or equal than the content of the user parameter P1010, the output Q is set.

Practical Example
Create new Project and call it Timer Example

In the example above, if the IN input is active and the content of the word marker 8000 is higher
or equal than the content of the PT, the output Q is set.

53
PLC BLOCKS
Real Time Clock – RTC

Menu: Insert - Function Blocks - CLP - RTC


EN: Enables the block
Q: Goes to 1 when EN ≠ 0 and the current time is greater than
the turning on time and less then the turning off time.
Properties:
WEEK: Week days
H-T.ON: Turning on hour
M-T.ON: Turning on minute
S-T.ON: Turning on second
H-T.OFF: Turning off hour
M-T.OFF: Turning off minute
S-T.OFF: Turning off second
Q_OPT: 0: Normal Q output, 1: Inverted Q output
ON_ERROR: 0: Generates A700 alarm, 1: Generates F701 fault
ERROR: Goes to 1 when there is an error in the block.

PLC BLOCKS
Incremental Counter

Menu: Insert - Function Blocks – PLC-CTU.


Inputs:
CU: Captures the transitions from 0 to 1 at this input (Counter Up).
R: Resets CV.
Output:
Q: Goes to 1 when CV ≥ PV.
Properties:
PV: Preset Value.(Max 65535)
CV: Counter Value.

Ex: If the content of the word marker 8001 is higher or equal than 20, the output Q is set.

54
Practical Example
Create a new Project and call it Counter Example

Ex: If the content of the word marker 8000 is higher or equal than 5, the output Q is set.
The Counter can be reset with the reset contact MX 5002

PLC BLOCKS
PID – Controller
Menu: Insert - Function Blocks – PLC-PID.
Inputs: EN: Enables the block.
Output: ENO: EN Input image.
Properties:
SELREF: Automatic/manual reference.
REF: Automatic reference.
δREF: Automatic reference filter time constant.
REFMANUAL: Manual reference.
FEEDBACK: Process feedback.
KP: Proportional gain.
KI: Integral gain.
KD: Derivative gain.
MAX: Maximum output value.
MIN: Minimum output value.
TYPE: Academic/parallel.
OPT: Direct/reverse.
TS: Sampling Time.
OUT: Controller output.

55
PLC BLOCKS

PID – Controller

If the EN input is active, the controller starts its operation.


The content of the user parameter P1010 selects the reference that is active, i.e.,
whether it is %MF9001 (automatic reference) or the %MF9002 (manual reference).
There is a 0.05s filter for the automatic reference.
Since the derivative gain is fixed in 0, this indicates that the PID was converter into a PI.
The control output OUT, %MF9004, has the max and min limits of 100 and -100.

PLC BLOCKS

Low-pass or High-pass Filter – FILTER

Menu: Insert - Function Blocks – PLC-FILTER.


EN: Enables the block.
ENO: This is a copy of the value of the EN input.
Properties:
IN: Input data.
TIME CONST: Filter time constant.
TYPE: Low-pass/High-pass.
TS: Sampling time.
OUT: Input data filtered value.

In the example above, if the EN input is active, the content of %MF9000 will be filtered with a time
constant of 0.25s by means of a low-pass filter and will be transferred to %MF9001.

56
Calculation Blocks

Calculation Blocks
Comparator – COMP

Menu: Insert - Function Blocks – Calculation-COMP.


EN: Enables the block.
ENO: Goes to 1 when the comparison condition is fulfilled.
Properties:
FORMAT: Integer or floating point.
DATA 1: Comparison data 1.
OPERATOR: Comparison operator.
DATA 2: Comparison data 2.

If the EN input is active and the content of the float marker 9000 is higher than the
content of the float marker 9001, then the output ENO is set.

If the FORMAT is integer, all the numeric data are considered words of 15 bits + sign
(-32768 to 32767).

57
Calculation Blocks
Comparator – COMP

Operations

Practical Example
Create a new Project and call it Compare Example

If the EN input is active and the content of Data 1 is higher than the content of the Data 2,
then the output ENO is set.

If the FORMAT is integer, all the numeric data are considered words of 15 bits + sign
(-32768 to 32767).

58
Calculation Blocks

Math Operation – MATH


Menu: Insert - Function Blocks – Calculation-MATH.

Input: EN: Enables the block.


Output: ENO: Indicates if the calculation has been executed.
Properties:
FORMAT: Integer or floating point.
DATA1: Calculation data 1. It may also appear as DATA1H and DATA1L (representing the high and
low parts of the data 1).
OPERATOR: Mathematic operator (+, -, *, etc).
DATA2: Calculation data 2. It may also appear as DATA2H and DATA2L (representing the high and
low parts of the data 2).
RES: Calculation result. It may also appear as RESH and RESL (representing the high and low
parts of the result) and also as QUOC and REM (representing the quotient and the
reminder of a division).
OVER: Indicates if the result exceeded its limit.
SIGNAL: Result sign.
If the EN is active, the value of %MW8000 is incremented at each scan cycle. When %MX 5000
goes to 1, it indicates overflow and %MW8000 remains in 32767.

Practical Example
Create a new Project and call it Math Example

DATA1: It may also appear as DATA1H and DATA1L (the high and low parts of the data 1).
OPERATOR: Mathematic operator (+, -, *, etc).
DATA2: It may also appear as DATA2H and DATA2L (the high and low parts of the data 2).
RES: Calculation result. It may also appear as RESH and RESL (the high and low parts of the
result) and also as QUOC and REM (the quotient and the reminder of a division).
OVER: Indicates if the result exceeded its limit.
SIGNAL: Result sign.

59
Calculation Blocks

Math Function – FUNC Menu: Insert - Function Blocks – Calculation-FUNC.


EN: Enables the block.
ENO: Indicates if the calculation has been executed.
Properties:
FORMAT: Integer or floating point.
IN: Data to be calculated.
FUNCTION: Mathematic function (sin, cos, etc).
OUT: Calculation result.

If the EN input is active, %MF9001 presents the result of the %MF9000 sine calculation

If the FORMAT is integer, all the numeric data are considered words of 15 bits + sign
(-32768 to 32767).

Practical Example
Create a new Project and call it FUNC Example

During the transition from 0 to 1 at the input, the square root is calculated from the value
contained in the %MF9000, which is 10, and the result is saved in the %MF9001.

60
Calculation Blocks

Menu: Insert - Function Blocks – Calculation-SAT.


EN: Enables the block.
ENO: Indicates if saturation has occurred, if EN ≠ 0.
Properties:
FORMAT: Integer or floating point.
IN: Input data.
MAX: Maximum allowed value.
MIN: Minimum allowed value.
OUT: Output data.

When the EN input is active, the %MW 8000 contains the user parameter P1010 value,
limited however, between the maximum of 100 and the minimum of -100.
If the MIN value is higher than the MAX, the outputs OUT and ENO are reset to zero.
If the FORMAT is integer, all the numeric data are considered words of 15 bits + sign
(-32768 to 32767).

Practical Example

Create a new Project and call it SAT Example

The value contained at the input of the SAT Block is transferred to %MW8002. The value
read at the analog input is a value between 0 and 32767. The SAT block causes that the
%MW8002 stays between 0 and 1000 even if the input value exceeds a 1000

61
Transfer Blocks

Transfer Blocks

Data Transfer – TRANSFER

Menu: Insert - Function Blocks- Transfer-TRANSFER.


EN: Enables the block.
ENO: Indicates that the transfer has been done.
Properties:
SRC: Source data.
DST: Destination data.

If the EN input is active, the word constant 1 is transferred to %SX3001 (general enable).

62
Transfer Blocks

Data Transfer – TRANSFER


The source data type may be: The destination data type may be:
Constant Bit marker
Float constant Wordmarker
Bit marker Floatmarker
Word marker Systemmarker
Floatmarker Digital output
Systemmarker Analog output
User parameter
Digital input System parameter
Digital output Drive parameter
Analog input Writing word
Analog output Writing byte
User parameter Command writing word
System parameter
Drive parameter
Reading word
Writing word
Reading byte
Writing byte
Status reading word
Command writing word

Practical Example
Create a new Project and call it TRANSFER Example

The value contained at the analog input of the block is transferred to the %MW8000 which
is then converted to %MW8001. The value read at the analog input is a value between 0
and 32767. The SAT block causes that %MW8002 stays between 0 and 1000, which is
then transferred to Drive P121

63
Transfer Blocks

Conversion from Integer (16 bit) to Floating Point – INT2FL

Menu: Insert - Function Blocks- Transfer -INT2FL.


EN: Enables the block.
ENO: Indicates that the transfer has been done.
Properties:
INT: Integer data.
FLOAT: Data converted into floating point.

In the example above, if the EN input is active, the content of the word
marker 8153 (taking into account its sign) is converted into floating point to
the float marker 9005.

INT is treated as a word of 15 bit + sign (-32768 to 32767).

Transfer Blocks

Conversion from Floating Point to Integer (16 bit) – FL2INT

Menu: Insert - Function Blocks- Transfer -FL2INT.


EN: Enables the block.
ENO: Indicates that the transfer has been done.
Properties:
FLOAT: Floating point data.
INT: Data converted into integer.

In the example above, if the EN input is active, the float constant 4.54 x 10⁴ is converted into an
integer with sign via the %MW8000. However, after the conversion %MW8000 will remain with
the value of 32767, because this is the positive limit of a word.

64
Practical Example
Create a new Project and call it Conversion Example

During the transition from 0 to 1 at the digital input 1, the user parameters P1011 are converted to
float and put into %MF9000. Then the square root is calculated from the value contained in %MF9000
and the result is saved in %MF9001. The value of %MF9001 is then converted to integer and put into
the user parameters P1012

Transfer Blocks

User Fault or Alarm Generator – USERERR

Menu: Insert - Function Blocks - Transfer – USERERR


EN: Enables the block
ENO: It indicates 1 when EN = 1 and the alarm or error has been
effectively generated.
Properties:
CODE: Alarm or fault code
TYPE: 0: Generates alarm, 1: Generates fault
TEXTL1: HMI line 1 text
TEXTL2: HMI line 2 text

In the example above, if the EN input is active, then A750 with the text “Low Pressure” will appear
on the HMI.

If the block is configured for Fault, then it will be necessary to reset the drive in order to be able to
enable it again.

65
Practical Example
Create a new Project and call it USERERR Example

When the bit marker %MX5001 is 1, the alarm 750 will be generated
at the drive HMI with the message “Fan 1 Overload”.

Transfer Blocks

Indirect Data Transfer– IDATA


Menu: Insert - Function Blocks- Transfer -IDATA.
EN: Enables the block.
ENO: Indicates that the transfer has been done.
Properties:
CMD: Read/Write command
DATATYPE: Data type
ADDRESS: User address.
VALUE: Read content/Value to be written

If the EN input is active, the content of %MX5000 is written to the digital output whose
address is the content of %MW8000.

66
Practical Example
Create a new Project and call it IDATA Example

“P125” in P1011 Value=250

When the block is enabled and you select Drive Parameter as DATATYPE, the value of
the Parameter select in P1011 will be the output Ex. P125 has a value of 250

Transfer Blocks

Multiplexer – MUX

Menu: Insert - Function Blocks - Transfer – MUX


EN: Enables the mathematic operation.
ENO: Indicates that the transfer has been done.
Properties:
X0-X15: Binary data vector.
W: Resulting word.

When the EN input is active, the digital inputs 1, 2 and 3 transfer their content to the
bits 0, 1 and 2 of the user parameter P1010.

67
Transfer Blocks

Demultiplexer – DMUX

Menu: Insert - Function Blocks - Transfer – DMUX


EN: Enables the mathematic operation.
ENO: Indicates that the transfer has been done.
Properties:
W: Source word.
X0-X15: Resulting binary data vector.

When the EN input is active, the bits 1, 2, 5, 6, 11, 13 and 15 of %MW8000 are
transferred respectively to %MX5001, 5002, 5005, 5006, 5011, 5013 and 5015.

Practical Example
Create a new Project and call it Demultiplexer Example

The Timer output bits which is the input to the DEMUX, which will accordingly switch
bits 0 to 15. The word value was shared and transfer to the 16 outputs bits.

68
Faults, Alarms, and Possible Causes

To Upload an Existing Project

69
Communication – Upload

Communication – Upload
 This command makes it possible to upload and open the applicative that is
installed in the CFW-11, provided that the password is valid, if enabled.

END of Theory

70
Practical Tasks

Task 1

1. Enable Drive using Bit Marker %MX:5000 and Bit System Marker %SX:3001
(General Enabled)
2. Start Drive by using the next Bit Marker and choose appropriate Bit System Marker.

3. Use keypad to adjust speed on local setting (Min=100; Max=1500)

4. Make sure if you want to backup the speed (P120)

5. Display Motor-Volts on line1; RPM on line 2; Hz on line 3 on keypad

6. Test the Start and Stop function by using the Soft Toggle button

7. Rename the inputs to Gen_Enable and Start _Stop

8. Switch Tag/Address on and of to Test.(Standard Bar)

71
Task 2

1. Enable Drive as previously


2. Start and Stop Drive by using Set and Reset Coils (name them Start and Stop)

3. Use Ref block to control the Drive speed and set it to RPM

4. Use P1011 to adjust the speed and Name it Speed_Ref

5. Setup Drive accordingly

6. Notice that you cannot adjust speed via software but only on keypad

once you entered parameter P1011.

7. Put in a comment that “Speed Control is via REF block”

Task 3

1. Enable Drive

2. Use 1 pushbutton to start and stop the Drive


(Push once for Start, push again for Stop)
3. Use Soft-PLC for speed reference and adjust speed from Soft-PLC
parameter P1011(REF Block)
4. Limit the min and max speeds by using SAT block
5. Compare the max speeds by using Comp block. If speed exceeds
800RPM then output RL_1 must flash at 1hz by using Timers.
6. Insert the necessary comments

72
Task 4

1. Enable Drive
2. Start Drive using latching contact (pushbutton action) and run Forward for
10 seconds then auto stop.(Fail safe Start/Stop)
3. Auto reverse for 7 seconds

4. Repeat 5 times, then auto stop the drive


5. Use SoftPLC for speed reference be-able to adjust speed from SoftPLC
parameter P1011

Task 5

1. Enable Drive

2. Program and simulate a gate motor


3. Press pushbutton once, gate opens fast for 10 seconds, 800 RPM (forward)
then slows down to 200 RPM for 4 seconds , then stop.
4. Gate close automatically after 5 seconds. Gate closes fast for 10 seconds,
800 RPM (reverse) then slows down to 200 RPM until stop limit command.
(Simulate gate close with a input to stop the motor)

73

Das könnte Ihnen auch gefallen