Technical data

Programming with STEP 7
Manual, 05/2010, A5E02789666-01 467
21 Testing Using Program Status
You can test your program by displaying the program status (RLO, status bit) or the contents of the
corresponding registers for every instruction. You can define the scope of the information displayed
in the "LAD/FBD" tab in the "Customize" dialog box. You open this dialog box using the menu
command Options > Customize in the "LAD/STL/FBD: Programming Blocks" window.
!
Warning
Testing a program while a process is running can lead to serious damage to property or persons if
errors occur in the function or in the program.
Ensure that no dangerous situations can occur before you execute this function.
Requirements
To display the program status, the following requirements must be fulfilled:
You must have saved the block without errors and then downloaded it to the CPU.
The CPU must be in operation and the user program running.
Basic Procedure for Monitoring the Program Status
It is strongly recommended that you do not call the whole program and debug it, but call the blocks
one by one and debug them individually. You should start with the blocks in the last nesting level of
the call hierarchy, for example, by calling them in OB1 and creating the environment to be tested
for the block by monitoring and modifying variables.
To set breakpoints, and to execute the program in single-step mode, test operation mode must be
set (see menu command Debug > Operation). These test functions are not possible in process
operation mode.