New Functions in Version V4.02
16
Supplement to the STEP 7 User Manual V4.0
C79000-Z7076-C552-01
9 Debugging User Programs
Programming LAD/STL/FBD S7 Blocks: Test Environment for Debugging in
Program Status
The execution of test functions is dependent on the mode of operation set (process
operation or test operation). The mode determines whether test functions are
permitted and determines the increase in the scan cycle time caused by test
functions.
“Process operation”: test functions restricted (see Chapter 3, new CPU
parameters).
“Test operation”: all test functions can be used without restriction; greater
increases in the CPU scan cycle time are possible.
You must be in “test operation” before you can set breakpoints and execute the
program step-by-step.
You can use the menu command Debug
Operation to display the mode of
operation set. The following situations may arise:
The settings cannot be changed in the dialog box. You must change the
relevant CPU parameters in the “Protection” tab.
The settings can be changed in the dialog box. In this case, you can set the
required mode of operation in the dialog box (in other words, the mode cannot
be set for the CPU).
Debugging in Program Status: Procedure
Blocks programmed in STL, FBD, or LAD can only be debugged online in program
status. The block must be available online. Proceed as follows:
1. If necessary, select the menu command File
Open to open the logic block to
be tested and display it in a window.
2. (Optional) Select the menu command Debug
Call Environment and set the
trigger conditions in the dialog box displayed. The program status is then only
recorded if the set conditions occur.
3. Use the menu command Debug
Operation to display the test environment
which has been set. If the mode of operation was selected when parameters
were assigned to the CPU, you can only change the mode by modifying the
parameters. If not, you can change the mode in the dialog box (test operation /
process operation).
4. Open the “Customize” dialog box using the menu command Options
Customize In the “STL” tab or “LAD/FBD” tab, select which information should
be displayed in the program status.
5. Start the recording of the program status using the menu command Debug
Monitor (check mark in front of the menu command).
The STL program status is displayed in the form of a table in the code section of
the block. You can deactivate the display by selecting the menu command Debug
Monitor again.