![]() |
ALPHA-VISION® content: Testmode |
The SoftPLC7 offers a fast and simple method to inspect the flow of a running S7 Program
without connecting to a programming device. It is activated via the pull-down menu 'view'.
Hence internal the same mechanisms are used as the SIMATIC Manager does it is not possible
to use both at the same time.
The debugger is thought as addendum to the interface connection to SIMATIC Manager, therefore
it offers not the same functional scope. Also Assembler-Macros like the call command are not
decoded as such, but reflected as elementary Assembler-Commands.
First a short STEP7-Programm
The call-Command is divided into several lines:
The input fields 1st , 2nd, 3rd block , Global-DB and Instance-DB are used to define the trigger condition for recording internal values. Those values are queried cyclic and displayed in the window including the assembler commands. “Refresh rate” defines whether the values are updated and if so, on what interval.
The presentation is adapted to that of the SIMATIC Manager;
accumulator contents are presented in hex and Address-Registers as address or pointer,
whereby a mouse click onto the address field leaves the choice of hex- or decimal indication.
The fields for BStack, LStack(local data) and nesting stack are accessible only in case of a call stack.
The column ‘Operand’ on the very right is initially empty; a mouse click on the 'Operand' button opens a dialog window so any operand to watch may be inputted. That simplifies debugging of a newly created STEP7-Program. Global operand areas (M, I, O, PI, PO, DBn) may be defined as well as such depending on a situation (L,DB,DI). Repetitions to a total length of 8 bytes are allowed. (i.E. MB10,8 or DBD20,2)
The item ‘Set/Remove breakpoint’ in the pull-down menu 'Extras' sets a breakpoint “*BRK*” on the marked position within the code. (Selecting the item again removes the breakpoint) If the item ‘Trigger condition for break points’ is not set, the stop is an unconditional one, in case it is set(a hook in front of the item) the SoftPLC7 checks the trigger conditions (see 'Control Elements' above) and stops only on a match .
When the CPU has halted at a break point, the actual Callstack, LStack(local data) and
Nesting Stack may be inspected.
When halted the pull-down menu 'Extras' offers the following options:
'Remove all break points' deletes all break points.
'Continue' from pull-down menu 'Extras' or function key F5 has to be used to
continue in program execution.
At any time the program execution is interrupted the SoftPLC7 saves the BStack,
LStack and Nesting Stack are saved. Interruption can be caused by a break point
(condition=HALT) or by an error (condition=STOP)
Via the check box ‘BStack’ any desired module can be selected.
All local data of the selected module are listed with its values when calling
the next block. From an OB the start information is available, beside others.
The Nesting Stack is listed to a depth of 7 levels. The entry of any nesting
level is specified by the function identifier, that means U(, UN(, O(, ON(, X(, XN(,
by the VKE- and OR-Bit. The values of those bits are the result of the values of
the bits VKE, OR and /ER by executing a boolean operation.
For any module in the BStack the according STEP7-Code is listed;
the command, that would be jumped back to, is marked and in case the module is
changed it is visible in the window area.
To facilitate the search for commands on a large module the standard search functionality
was slightly modified. On a search blanks and tabs are ignored in the STEP7-Code as well
as in the search mask; it’s not case-sensitive either.
So the mask ‘cf C9’ would recognize the code line UC FC99.
Beside the function ‘search…’ the functions ‘ search forward’ and ‘search backwards’
are available via the pull-down menu ‘Extras’
By specifying operands, values and combination of valuation function a complex
conditional breakpoint can be defined.
If on program execution the defined conditions match, the CPU enters the HALT-State
and a corresponding message is displayed.
A conditional breakpoint may is a conjunction of up to 4 elementary qualifications.
An elementary qualification takes an operand as an unsigned digit and compares is
with an unsigned value. Multiple break points may be defined.
A plausibility check on the syntax is performed.
Valid operands are: M, I, O, PI, PO, L, DB, DI, DBn, T, C
Valid comparison operants: =, <>, <, <=, >, >=
To define a break condition press the ‘New’ button and input the wanted conditions in
the upper control fields.
The ‘Apply’ button writes the conditions for the breakpoint to the lower list.
The lower list holds any already defined breakpoints, one line for each.
Selecting a line allows to modify the conditions for that break point.
Prior to ‘Apply’ a modification may be neglect by the ‘Reset’ button.
The ‘Delete’ button deletes a selected break point.
The ‘OK’ button saves the list of conditional break points.