Specifications
Example CP143 H1 / TCP/IP manual
6-14 Rev. 00/07
6.4.3 Programs for the PLCs
The programming of the PLCs does not depend on the protocol and may be used for H1 and
TCP/IP.
The following sample programs are provided for PLCs of the type AG135U and AG155U. These
programs may also be used on PLCs of the type 115U and 150U after the respective handler
modules have been changed.
6.4.3.1 Synchronization of the interfaces (program for PLC 1 and PLC 2)
When a PLC is started every interface of the CP must be synchronized by means of the handler
module SYNCHRON. Due to the fact that this is applicable to all types of start-up of the PLC, the
required number of SYNCHRON modules must be initiated in
• OB20 for a new start
• OB21 for manual re-start
• OB22 for a re-start after power failed
The function module NETZEIN (FB22) (POWERON) checks whether synchronization errors
occurred or not. When an error is detected the program will be terminated by means of a stop
command (STP).
The following modules must be transferred into PLC1 and PLC2.
Operational modules:
OB20, OB21, OB22
Network 1
; Restart after power on
00000 :
00002 :SPA FB 22 Delay time and synchron.
NAME #POWERON
00006 :
00008 :BE