4 ASCII protocol communication
CP340/CP341/CP440/CP441 Communication and Programming
Entry-ID: 88867653, V1.0, 02/2014
18
S
ie
m
e
n
s
A
G
2014
A
ll r
ig
h
ts
r
e
s
e
rv
e
d
Fig. 27: Send Data block DB1
3. Invoke Send Function block
The parameters of the send function block FB8 P_SND_RK of CP341 are set as in
the table below:
LADDR
Start logic address in hardware configuration, which is 256 in this example
DB_NO
Send Data block number, which is 1(DB1) in this example
DBB_NO
Start address of Send Data, which is 0(DB1.DBB0) in this example
LEN
Length of send data, which is 10 in this example
REQ
trigger bit of Send Data, rising edge trigger, which is M0.0 in this example
R
Cancel communication
DONE
send complete bit, which is TRUE if Send completes and has no error
ERROR
error bit, TRUE indicating that it has an error
STATUS
status word, ID error code. See CP341 manual for related descriptions
Other
parameters
Irrelevant to ASCII communication protocol, and not available in this
example
Table 5: Parameter definition of FB8 P_SND_RK
Fig. 28: Invoke FB8 P_SND_RK from OB1