Specifications
CP143 H1 / TCP/IP manual Software
Rev. 00/07 5-77
5.11.7 Accessing the PLC from the PC
The following flowcharts are intended as a guideline for programming WRITE and FETCH jobs.
Entries in [] refer to function calls to the TCP/IP stack provided by FTP.
WRITE job FETCH job
WRITE under TCP/IP
Start
Allocate network descriptor
[
net_getdesc
]
Define socket
(IP-address, ports)
Start active connection
[
net_connect
]
PLC header for
WRITE message
Writetodataarea
Transmit PLC header (16 bytes) +
data
[
net_write
]
Receive WRITE acknowledgement
message (16 bytes)
[
net_read
]
PLC header
error No. = 0 ?
N
Y
Error analysis
continue WRITE ?
Y
N
WRITE under TCP/IP
End
The declarations with [ ] are related
to function calls of the FTP software
Company.
FETCH under TCP/IP
Start
Allocate network descriptor
[
net_getdesc
]
Define socket
(IP-Adresse, Ports)
Start the connection
[
net_connect
]
PLC header for
FETCH request message
Transmit PLC header
(16 bytes)
[
net_write
]
Receive FETCH acknowledgement
message (16 bytes)
[
net_read
]
PLC header
error No. = 0 ?
N
Y
Error analysis
Data reception
(length from PLC header FETCH req.)
[
net_read
]
Analysis of data received
another FETCH ?
J
N
FETCH under TCP/IP
End
Entries in [ ] refer to function
calls of the TCP/IP
stack of the software company FTP