EasyManua.ls Logo

Siemens CP 243-1 - Page 132

Siemens CP 243-1
142 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Sample program
CP 243-1
132 Operating Instructions, 03/2012, C79000-G8976-C244-02
Symbol Address Comment
Always_On
SM0.0 Due the system, always 1
ch_ready
MW8
cp_error
MW2
cp_ready
M0.0
ETH0_CTRL
SBR1 This POU was generated by the
Ethernet wizard for use with CP 243-1
NETWORK 2
As soon as channel 0 is ready for the transfer and "ch0_ready" is set, the "start" variable is
set. This may take several cycles.
LD ch0_ready
Sstart, 1
Symbol Address Comment
ch0_ready
M8.0 Bit for channel 0 in the CH_READY
return value of the ETH0_CTRL
subroutine
start
M4.0 Flip flop for automatic start of the data
transfer
NETWORK 3
For an S7-200, the "First_Scan_ON" bit is only set in the first cycle for system-related
reasons. This resets the "start" variable. This is necessary so that the "start" variable always
generates a signal edge for the start of the ETHx_XFR subroutine, even when the CPU
starts and stops repeatedly.
LD First_Scan_On
Rstart, 1
Symbol Address Comment
First_Scan_On
SM0.1 Due to the system, 1 in the first cycle,
otherwise always 0
start
M4.0 Flip flop for automatic start of the data
transfer
NETWORK 4
The local S7-200 station sends data from VB500 (data length of 5 bytes) via the Ethernet
connection to another S7-200 station. There the data is stored starting at VB500.

Table of Contents

Related product manuals