Beruflich Dokumente
Kultur Dokumente
CFW - 11
1
Introduction to Numbering Systems
Bit marker; Digital input; Digital output; User Parameter; Bit system
marker; Word marker
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
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
1000 100 10 1
1 2 3 4
= 1000 + 200 + 30 + 4
= 1234
512 64 8 1
83 82 81 80
1 2 3 48
= 512 + 128 + 24 + 4
= 668
4
The Weight of These Numbers
4096 256 16 1
163 162 161 160
1 2 3 416
= 4096 + 512 + 48 + 4
= 4660
MSB LSB
8 4 2 1
23 22 21 20
1 1 0 1
= 8 + 4 + 0 + 1
= 13
5
Converting Number Systems
Decimal
BINARY
Octal Hexadecimal
0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 12
5 D F 1
6
Convert Hex To Binary
5 D F 116
STEP 1: Change each number to a four bit binary number using your table
0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1
= 16773
7
Hexadecimal to Decimal
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
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
EXAMPLE:
2’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
10
Displaying Negative Numbers
Word Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 Byte 1 Byte
1 Word
11
Introduction
Introduction
GRAPHIC COMPONENTS
The basic graphic components of a Ladder Diagram:
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
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.
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
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?
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.
15
Introduction to the SoftPLC
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.
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
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):
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)
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
21
Memory Map
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.
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.
24
CFW-11 Configuration Parameters
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.
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.
Only the parameters of the CFW-11 that are related to the SoftPLC will be presented.
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
Project Menu
Standard Bar
Communication Bar
Block Bar
Ladder elements Bar
Page Bar
Project tree
Status Bar
Project Menu
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
29
Edit Menu
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.
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
Help Menu
In this menu, you can find all the functions related to the help of the WLP
software, according to;
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.
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.
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
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,
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
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.
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.
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
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
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)
When the contacts are in series, an AND logic is executed among them,
storing the result in the stack.
46
OR Logic with Contacts
Coils / Outputs
Coil
47
Coils / Outputs
Coils / Outputs
Set Coil
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
49
Coils / Outputs
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
PLC BLOCKS
Incremental Counter
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
PLC BLOCKS
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
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
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
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
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
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
If the EN input is active, the word constant 1 is transferred to %SX3001 (general enable).
62
Transfer Blocks
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
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.
Transfer Blocks
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
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
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
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
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
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
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.
6. Test the Start and Stop function by using the Soft Toggle button
71
Task 2
3. Use Ref block to control the Drive speed and set it to RPM
6. Notice that you cannot adjust speed via software but only on keypad
Task 3
1. Enable Drive
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
Task 5
1. Enable Drive
73