7-8
Primer: S7-300 Programmable Controller, Quick Start
C79000-G7076-C500-01
You can test your LAD program by defining how you want to display the
signal flow within the networks of a block.
To display the signal flow, the following prerequisites must be fulfilled:
S You must have saved the block without errors and downloaded it to the
CPU.
S The CPU is in RUN and the user program is running.
S You must open the block to be tested online.
The table below shows you how to test a LAD program:
Step Procedure Result
1.
Select the “Blocks” container in your online
project “TLIGHT”.
In the right-hand window, select the block you
want to test (here FC1), and open it with the menu
command File → Open Object.
FC1 is opened online.
2.
Select the menu command Debug → Call
Environment... and click ‘No Condition’ as the
trigger condition in the dialog box which follows.
Close the dialog box with “OK”.
This means that you have selected no trigger
condition for the call environment of the block.
3.
Select the ‘Process’ test environment via the menu
command Debug → Test Environment →
Process.
This means that the status of the statements for
your program test will only be detected on the
first loop run.
4.
In the ‘STL/LAD/FBD’ dialog box, select the
‘LAD/FBD’ tab with the menu command
Options → Customize... and click here on the
settings you want for color and line thickness.
Exit the dialog box with “OK”.
This defines the options for the LAD program
test. Current flow is displayed in the colors and
line thicknesses selected.
5.
Start recording the program status with the menu
command Debug → Monitor
The LAD program status is displayed in the code
section of FC1 in the form of a signal flow.
6.
Stop recording the program status with the same
menu command Debug → Monitor.
Display of the LAD program status is switched
off again.
Introduction
Prerequisites
How Do You
Proceed?
Downloading and Testing Your User Program
How Do You Test Your LAD Program?