03/03
Example
CP 243-1 IT
J31069-D0429-U001-A0-7618
125
NETWORK 4
The local S7-200 station sends data from the VB500 (data length of 5 Byte) on the
Ethernet connection to another S7-200 station. There the data are stored in
VB500.
The read/write command only takes place after a positive edge at the "START" pa-
rameter, if the "Done" bit of any preceding read command is set. The "Done" bit is
carried over in the "ch0_done_read" variable. The outputs of the read and write
command are linked in such a manner, that only one command per channel can be
processed at any one time. Thus, a new command is only initiated after the pre-
ceding command is finished.
The "Chan_ID" parameter specifies the number of the channel through which the
data access is to take place. In the present case, this would be the channel with
the number 0. The "Data" parameter specifies the number of the channel-specific
data block. A command that has been initiated can be aborted using the "Abort"
parameter. To do so, the M7.0 flag must be set. In this example, this flag also acts
on the read command from Network 5.
After flag M7.0 is cleared, read/write commands are again issued since the "Done"
bit is always set along with the "Error" bit after a command is aborted.
Applying special flag SM0.0 ensures that the ETH0_XFR subroutine is always en-
abled.
As soon as the write command is finished, a 1 is returned in the "Done" return pa-
rameter. Any errors that occurred are returned by the "Error" parameter. Otherwise,
a 0 is returned in this parameter.
LD
Always_On
=
L60.0
LD
ch0_done_read
EU
U
ch0_ready
LD
start
EU
OLD
=
L63.7
LD
L60.0
CALL
ETH0_XFR, L63.7, Connection0_0, Write_1,
Connection_abort, ch0_done_write, ch0_error_write
Symbol
Address
Comment
Always_On
SM0.0 Always
ON
ch0_done_read
M5.0
Done bit of the read command
ch0_done_write
M5.1
Done bit of the write command
ch0_error_write
MB14
Error flag of channel 0, "write" command
ch0_ready
M8.0
Bit for channel 0 in the CH_READY return value of the
ETH0_CTRL subroutine
Connection0_0
VB233
Connection_abort
M7.0 Transmission
aborted
Summary of Contents for CP 243-1 IT
Page 46: ...Installation and Commissioning 03 03 CP 243 1 IT J31069 D0429 U001 A0 7618 46 ...
Page 94: ...Programming 03 03 CP 243 1 IT J31069 D0429 U001 A0 7618 94 ...
Page 106: ...Diagnosis 03 03 CP 243 1 IT J31069 D0429 U001 A0 7618 106 ...
Page 120: ...Technical Data 03 03 CP 243 1 IT J31069 D0429 U001 A0 7618 120 ...
Page 130: ...Example 03 03 CP 243 1 IT J31069 D0429 U001 A0 7618 130 ...