发布于 2013-09-22 11:21:53
3楼
你的Item写的不对吧?
Receive variables
SR:[MyConnection]receive,w4,6
receive,w4,6
6 data words starting at offset 4 in the receive buffer.
SR:[MyConnection]receive,dword7
receive,dword7
A double word starting at offset 7 in the receive buffer
SR:[MyConnection]receive,REAL0,2
receive,REAL0,2
An array with 2 floating-point values starting at offset 0 in the receive buffer.
Example of transferring data that has not necessarily changed (see "receivedata"):
SR:[MyConnection]receivedata,w4,6
receivedata,w4,6
6 data words starting at offset 4 in the receive buffer.
OPC process variables for SIMATIC NET
2.7 Open communication services (SEND/ RECEIVE)
Industrial Communication with PG/PC Volume 2 - Interfaces
196 Programming Manual, Release 06/2011, C79000-G8976-C197-10
Send variables
SR:[MyConnection]send30,dword7
send30,dword7
A double word starting at byte 7 in a 30byte long send buffer. If the default for the size of the
send buffer is not 30, the variable accesses a separate buffer.
SR:[MyConnection]send,B20,6
send,B20,6
An array with 20 bytes starting at offset 6 in a send buffer with default size. The default size
of the send buffer is specified in the configuration.
SR:[MyConnection]send8,DINT0
send8,DINT0
A signed double word starting at address 0 in a send buffer with the size 8.