New Functions in Version V4.02

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 commandOptions  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.

16

Supplement to the STEP 7 User Manual V4.0

C79000-Z7076-C552-01

Page 16
Image 16
Siemens C79000-Z7076-C552-01 user manual Debugging User Programs, Debugging in Program Status Procedure