Documente Academic
Documente Profesional
Documente Cultură
Page
Training Center
for Automation and Drives
Page 1
5
6
7
9
10
13
17
21
ST-7PRO1
Test Functions
Monitor
You can activate the Monitor" ("Status") test mode for the block which is currently
open by
b clicking
li ki th
the S
Spectacles
t l iicon with
ith th
the mouse or b
by selecting
l ti th
the menu
options Debug -> Monitor.
In the test mode, the elements in LAD / FBD are displayed in different colors. You
define these by selecting the menu options Options -> Customize.
E.g.: Status fulfilled
-> "Element is displayed in green"
Status not fulfilled
-> "Element is displayed in blue"
Notes
1. When the Monitor" test mode is activated, yyou cannot make any
y changes
g to
the program.
You cannot change the view of the block (LAD, STL, FBD) either.
2. The status can only be displayed when the instructions are being executed.
The status is not displayed when the CPU is in the STOP mode or when the
block is not called.
Training Center
for Automation and Drives
Page 2
ST-7PRO1
Test Functions
Debug-> Operation
There are two modes of operation for the test mode, which differ in their effect on
th scan cycle
the
l titime off the
th user program:
Process operation and
Test operation.
Process Operation
In process operation, the test functions are restricted so that the permissible scan
cycle time increase that you select is not exceeded.
The status of programmed loops is only determined the first time they are executed.
The test functions Breakpoint
p
and Single-step
g
p (p
(program
g
execution)
) cannot be
executed.
Test Operation
P
Parameter
t
Assignment
Th above
The
b
iinformation
f
ti only
l applies
li if th
the mode
d off operation
ti h
has nott already
l d
been defined in the hardware configuration.
The mode of operation can be defined on the Protection tab page when assigning
the CPU parameters. This setting can then no longer be changed in the Operation
dialog box.
Training Center
for Automation and Drives
Page 3
ST-7PRO1
Test Functions
Trigger Points
After you have selected the menu options Debug -> Call Environment, a dialog box
pops up (see
(
slide
lid above).
b
) Here
H
you can enter
t a Call
C ll path.
th This
Thi iis h
helpful
l f l if a bl
block
k
is called several times in a program and you want to monitor only one specific call.
You can also specify data blocks as trigger conditions.
The status display of the block begins from the point when the specified DB is
opened.
Call Path
In the example, FC 1 is called three times (see program structure). So that you can
specifically monitor a call, enter the three blocks that are found immediately before
the status block. A requirement for this is that the call takes place through different
bl k S
blocks.
So th
thatt you can monitor
it the
th third
thi d call,
ll enter
t iin th
the example
l
FC 30 at 3rd Block.
In the example, FB 1 is called several times by the same FC 40 block. In this case,
the Call path cannot be used for testing. Here you use the opened data block as a
trigger for testing. Since, as a rule, an instance DB is also used with an FB, you can
use this instance DB in the DB2-number field as the trigger condition. In the
example, DB 1 was used for the first call, DB 2 for the second call and DB 3 for the
third call. You have to enter DB 2 in order to see the second call.
Note
The "Test Operation" mode is a prerequisite for testing with the Call path.
Training Center
for Automation and Drives
Page 4
ST-7PRO1
Test Functions
Introduction
In the block status, you can select which information is to be displayed on the
screen. By
B d
default,
f lt you see St
Status
t Bit,
Bit RLO,
RLO and
d Standard
St d d status.
t t
If you want to display additional information, select the menu options Options ->
Customize -> STL.
Dialog Box
In the screen you can see the dialog box for putting together the information.
In addition to the information displayed by default, the following is also possible:
Note
Training Center
for Automation and Drives
With a running program status, you can hide and show additional information, you
can change the representation (decimal, hexadecimal, real) or display separators.
To do so, click with the right mouse button on the title RLO, STA .. and choose the
menu option
ti you wantt (see
(
screen).
)
Page 5
ST-7PRO1
Test Functions
General
Monitor/Modify Variables" is another STEP 7 tool which enables you to monitor the
variables
i bl off a program iin selectable
l t bl fformats.
t
It also allows you to modify the status or contents of variables in the CPU.
Toolbar
You can change the toolbar by selecting the menu options View -> Toolbar. There
are three different toolbars which you can activate/deactivate:
View
Training Center
for Automation and Drives
Standard
View
Variable
You can adjust the number of columns in the variable table by selecting the menu
options
Vi
View
->
> Symbol
S b l/S
Symbol
b lC
Commentt / M
Monitor
it F
Formatt / Monitor
M it Value
V l / Modify
M dif Value
V l
or by using the View" toolbar.
Page 6
ST-7PRO1
Test Functions
Creating a VAT
Table
Each address to be monitored or modified takes up one line of the variable table.
The meanings of the columns of the variable table are as follows:
Address
Symbol
The variables symbolic name (identifier) is found here. It is identical to the name
entered in the symbol table.
Symbol Comment
The symbol comment from the symbol table is displayed in this column.
M it Format
Monitor
F
t
This column
Thi
l
contains
t i a standard
t d d setting,
tti
e.g. HEX.
HEX
You can change the format as follows:
click an entry in the format column with the right mouse button. The list of
formats pops up.
or keep clicking on the entry in the format column with the left mouse button
until the format you want appears.
Monitor Value
Modify Value
You enter the new value for the variable (the modify value) in this column.
Training Center
for Automation and Drives
Page 7
->
ST-7PRO1
Test Functions
Monitor
The monitor values can be updated once by selecting the menu options
Variable -> Update Monitor Values or by clicking on the
icon.
Modify
The monitor values can be updated every cycle by selecting the menu
options Variable -> Monitor or by clicking on the
icon
To activate the modify values every cycle, select the menu options
Variable -> Modify or click the
icon.
4.
Use the Monitor test function to check whether the modify value has been
entered in the variable.
You can make the modify value entered in the table invalid by clicking on the
icon.
The invalid value is optically displayed like a comment. You make the modify
value valid again by clicking on the icon again.
O l valid
Only
lid modify
dif values
l
can b
be activated.
ti t d
Training Center
for Automation and Drives
Page 8
ST-7PRO1
Test Functions
Trigger
You set the trigger points in the Monitoring and Modifying Variables tool by
selecting
l ti th
the menu options
ti
V i bl ->
Variable
> Set
S t Trigger...
Ti
or by
b clicking
li ki th
the
icon.
Trigger Points
The Monitor Trigger Point specifies when the values of the variables being
monitored are to be updated.
The Modify Trigger Point specifies when fixed values are to be assigned to the
variables being modified.
Trigger Frequency
The Monitor
Monitor Trigger Frequency
Frequency specifies whether the values are to be updated
once only when the trigger point is reached or every cycle (every time the trigger
point is reached).
The Modify Trigger Frequency specifies whether the new values are to be
assigned to the variables being modified once only or every cycle.
Attention !
When the Monitor Trigger Frequency is set to Once, a click on the icons
or
has the same effect: the values are updated once.
When the Modify Trigger Frequency is set to Once, a click on the icons
or
has the same effect: the values are activated once.
When the trigger frequencies are set to Every Cycle, the above-mentioned icons
have the different effects previously described.
Note
Training Center
for Automation and Drives
When the same trigger points are set for Monitor and Modify, Monitor has priority,
that is, monitoring is done first.
For some CPU versions (e.g. CPU 314-1AE03), the modify function is not carried
out with every cycle when the Modify Trigger Frequency" is set to Every cycle".
Remedy: Using the test function "Force".
Page 9
ST-7PRO1
Test Functions
Save
Training Center
for Automation and Drives
When you cancel or finish a test phase, you can save the variable table.
The name of a variable table consists of the letters "VAT" followed by a number
from 0 to 65535 (with no space in between), e.g. "VAT5".
Page 10
ST-7PRO1
Test Functions
What to Do
Training Center
for Automation and Drives
Page 11
ST-7PRO1
Test Functions
PLC
Configured CPU
The variables of the CPU, in whose S7 program (H/W Station) the variable table is
stored, are displayed.
Direct CPU
The variables of the CPU, which are directly connected to the PG, are displayed.
Accessible CPU
The variables of the CPU, which are selected in the dialog box, are displayed.
You select the menu options PLC -> Connect To -> Accessible CPU... to establish
a connection to an accessible CPU.
Thus, you can establish a connection to every CPU in the network.
Training Center
for Automation and Drives
Page 12
ST-7PRO1
Test Functions
Overview
The Enable Peripheral Outputs" function switches off the output disable of the
peripheral outputs (PQ).
(PQ) This enables you to modify the peripheral output when the
CPU is in the STOP mode.
Selection
Note
Training Center
for Automation and Drives
If the CPU changes its operating mode and goes from STOP to RUN or
STARTUP, for example, a message pops up.
If the CPU is in the RUN mode and the Enable Peripheral Outputs" function
selected, a message also pops up.
Page 13
is
ST-7PRO1
Test Functions
Forcing
You can establish predefined values for user program variables with the Force
f
function.
ti
With the
th S7-400,
S7 400 iinputs,
t outputs,
t t bit memories
i and
d peripherals
i h l can b
be
forced. With the S7-300, only inputs and outputs.
You can only open one Force Values window for a CPU.
You will find the name of the variable table for the current online connection
the titlebar of the Force Values window.
You will find the date and time of the current force task in the CPU in the
statusbar.
You cannot monitor and modify variables when the Force Values window is
active.
in
Before you start the "Force" function, you should make sure that no one else is
carrying out this function at the same time on the same CPU. You can only cancel
or end a force job by selecting the menu options Variable > Stop Forcing.
You cannot cancel the force task by closing the Force Values window or by exiting
the Monitor/Modify Variables" application.
You cannot undo "Forcing" with the menu options Edit -> Undo. Take the time to
find out about the differences between forcing variables and modifying variables.
Attention!
Please note, that incorrect handling when executing the "Force" function can
Note
Training Center
for Automation and Drives
Page 14
ST-7PRO1
Test Functions
Breakpoints
With the help of this test function, you can test a program you have created in the
STL programming
i llanguage iin single-step
i l t mode.
d This
Thi iis only
l necessary iin program
creation so that you can, for example, test programmed loops.
You can set several breakpoints, depending on the CPU.
Breakpoint
Functions
You can choose the breakpoint functions in the Program Editor by selecting the
menu option "Test" or through the Breakpoint Bar.
Breakpoint Bar
You can activate the breakpoint bar by selecting the menu options View ->
Breakpoint Bar in the Program Editor
Editor.
Note
In order to carry out these test functions, you must have fulfilled the following
requirements:
Attention!
If a breakpoint
p
is activated, the CPU stops
p at this statement. The outputs
p
are
deactivated for safety reasons.
!
Note
Training Center
for Automation and Drives
Page 15
ST-7PRO1
Test Functions
Breakpoint Bar
S t/D l t B
Set/Delete
Breakpoint
k i t
B
Breakpoints
k i t A
Active
ti
Show Next Breakpoint
Execute Call
Delete All Breakpoints
Resume
Next Statement
Set/Delete Breakpoint With Set/Delete Breakpoint" you determine where the program execution is to be
halted. The breakpoints statement is not executed.
Breakpoints Active
With Breakpoints Active" you activate all breakpoints; not only those already set but
also those still to be set.
Show Next
Breakpoint
p
With Show Next Breakpoint, the Editor jumps to the next selected breakpoint,
without executing
g the p
program.
g
Resume
With Resume, the program runs until the next active breakpoint.
Next Statement
With "Next Statement, you execute the program in single-step. If you reach a block
call, you jump to the first statement after the block call with "Next Statement".
Execute Call
Here, when you reach a block call you branch into the block with Execute Call". At
the end of the block you jump back to the next statement after the block call.
Training Center
for Automation and Drives
Page 16
ST-7PRO1
Test Functions
Goal
You have already worked with the conveyor model. Now you are to check all the
sensors and
d actuators
t t
on the
th conveyor model.
d l
What to Do
Note: to save typing, you can use the menu options Insert -> Block, to enter eight
lines for e.g. the inputs I 8.0 to I 8.7 in the table.
Save the variable table.
Establish a connection to the CPU.
As the trigger point for monitor and modify select Start of cycle" and as the
trigger frequncy select Every cycle".
Activate the Monitor Variable function.
Check all the sensors on the conveyor model.
Exit the monitor function.
With th
the outputs,
t t enter
t "1" one after
ft th
the other
th iin th
the M
Modify
dif V
Value
l column.
l
Activate the Modify function. Now you have checked all actuators on the
conveyor model.
Result
Training Center
for Automation and Drives
You now know if your conveyor model is fully functional. If it is not, please let your
instructor know.
Page 17
ST-7PRO1
Test Functions
Goal
The CPU has gone into the Stop mode because of a fault. Now, your system is to
b ttransitioned
be
iti
d iinto
t ad
defined
fi d state.
t t You
Y are to
t move the
th conveyor model
d l up tto th
the
light barrier by using the modify function while in the Stop mode.
What to Do
Result
You can carry out the modify function in the Stop state
state.
Training Center
for Automation and Drives
Page 18
ST-7PRO1
Test Functions
Goal
You are to understand the meanings of the trigger points while using Modify
V i bl
Variables.
What to Do
Result
You now know how the trigger points operate with the Modify Variable function.
Training Center
for Automation and Drives
Page 19
ST-7PRO1
Test Functions
Goal
Sensor signals have failed in the system. You are to simulate these using the
"F
"Force"
" ttestt function.
f
ti
What to Do
Result
Training Center
for Automation and Drives
In the Monitor and Modify Variable" tool select the menu options Variable ->
Display Force Values.
In the "Force Values" window, enter the addresses I 0.0 to I 0.2 with the
force values (see slide).
Trigger the force function by selecting the menu options Variable -> Force.
Close the "Force Values window.
Determine how the CPU behaves.
Page 20
ST-7PRO1
Test Functions
Goal
You are to carry out several test functions at the same time.
What to Do
Result
Training Center
for Automation and Drives
In one window, open the Monitor and Modify Variable" tool and in another
window open the LAD/STL/FBD Editor (with an open FC 1 block, S7
program "My Program").
Arrange the two windows so that they are both visible at the same time.
In the Monitor and Modify Variable" window add the addresses I 0.0 to I0.2.
Activate the Monitor Variable function.
In the LAD/STL/FBD Editor" window activate the p
program
g
status.
Determine what effect the "Force" test function has on the program in the
FC 1 block.
Cancel the force task by selecting the menu options Variable -> Display
Force Values and then Variable -> Stop Forcing.
You have now become familiar with working with several windows. This could be
helpful in troubleshooting.
Page 21
ST-7PRO1
Test Functions