Fault Handling

SUMMARY

This document describes the fault handling of the SoftPLC7.

CONTENTS

  1. Introduction
  2. Program errors
  3. Masking / Unmasking

Introduction

When starting a new project, or after converting STEP7-Programs it is very likely SoftPLC7-Programs does not behave as expected.
Possible reasons are wrong or unfavourable parameters in the configuration files, there should be checked very carefully.
Also a real program error may cause the CPU to stop. The source of the error might not be obvious right away.
The SoftPLC7 therefore offers a variety of comfortable debugging facilities to support the programmer localising the error.

Program errors

On implementing SoftPLC7 it was taken care that in case of a fault condition its behavior is similar to an original SIMATIC S7.
First it is checked whether the synchronic Programming-Fault OB (OB 121) in the STEP7-Program is available and if so, whether it nests there like into an FC.
After execution of OB 121 the program continues behind the faulty instruction.
If no OB 121 is projected, the CPU enters STOP condition. The indicator INTF on the panel turns red, indicating a program fault.
Nevertheless, when working on OB 121 a program error may occur; in that case the CPU of the SoftPLC7 enters STOP condition, just like the original.



On stopping, the CPU saves the actual B-Stack, L-Stack and Nesting-Stack. Those data can be displayed using the PG-Interface of the SIMATIC Manager.
A faster approach is via the internal debugger, select pull-down menu 'view -> test mode'.
Stacks may be investigated directly in the enlarged window. Trigger conditions as well as breakpoints may be defined here to force the CPU into stop mode on a defined program segment.

Masking / Unmasking

SFC 36 'MSK_FLT' and SFC 37 'DMSK_FLT' may control program nesting into OB 121. Depending on the class of programming errors, execution of OB121 may be permitted or not. For details consult HELP of the SIMATIC Manager.