4 ASCII protocol communication
CP340/CP341/CP440/CP441 Communication and Programming
Entry-ID: 88867653, V1.0, 02/2014
17
S
ie
m
e
n
s
A
G
2014
A
ll r
ig
h
ts
r
e
s
e
rv
e
d
Fig. 24: Configuration interface parameters
7. After completing configuration, user may click
button to save and compile
the hardware configuration and download it to CPU after confirming that no error
exists. The whole hardware configuration process is completed by now.
Fig. 25: Compile and save hardware configuration
4.2.3
Write communication program
1. Double-click OB1 to open OB1 programming screen. Invoke Send Function
Block FB8 P_SND_RK from Libraries -> CP PtP -> CP341 and distribute instance
data block DB8 to it. Set the parameter LADDR as the start logic address 256 for
module CP340 in hardware configuration.
Fig. 26: Logic address of CP341
2. Create Send Data block DB1.