User manual

S3964R ProLinx Gateway Functional Overview
Siemens 3964R Protocol Driver Manual
Page 46 of 64 ProSoft Technology, Inc.
April 14, 2009
5.4.3 Example 3964R DB-SEND of data to Modbus TCP/IP device
Now let's say the 3964R device needs to send data to the Modbus TCP/IP
device. The 3964R device issues a DB-SEND. The Modbus TCP/IP device
needs to continually poll the ProLinx for an indication of new data.
Use a Modbus Function Code 3 to read header data from the ProLinx R
ECEIVE
BUFFER
. The 3964R device issues a DB-SEND telegram to the ProLinx. The
ProLinx device will automatically respond with a DB-SEND Response telegram
back to the 3964R device. The ProLinx will copy the DB-SEND telegram into the
R
ECEIVE BUFFER. Use a Modbus Function Code 3 to read the data from the
ProLinx R
ECEIVE BUFFER
1 Continually watch G for a change in value.
2 Verify the Job Code in L, to make sure this is new DB-SEND data.
3 If the Job Code is 0x1141, then read the RECEIVE BUFFER. CHECK J FOR
ERRORS
, AND K AND L FOR DATA.
4 Continually poll the error code, J to verify no errors.
5 Set B to the value in G.
Transmit Buffer
Receive Buffer
Item Address Transmit Value
Item Address Receive Value
A (<port#> * 600) + 300 Sequence
Number
G <port#> * 600 Sequence Number
B ((<port#> * 600) + 300) + 1 Last Receive
Sequence
Number
H (<port#> * 600) + 1 Last Transmit
Sequence Number
C ((<port#> * 600) + 300) + 2 Blocks
Remaining
I (<port#> * 600) + 2 Blocks Remaining
D ((<port#> * 600) + 300) + 3 Reserved
J (<port#> * 600) + 3 Error Code
E ((<port#> * 600) + 300) + 4 Data Count
K (<port#> * 600) + 4 Data Count
F ((<port#> * 600) + 300) + 5
through ((<port#> * 600) +
300) + 299
Data
L (<port#> * 600) + 5
through (<port#> *
600) + 299
Data
Port 0 Receive Database (Results of DB-Fetch)
Here is an example of a RK512 DB-SEND initiated from the 3964R
Communication Partner on port 0. This example sends five words of data to the
Modbus TCP/IP device. The values for the five words of data are 11, 22, 33, 44,
and 55.
Word Value Description:
0 4
In this example, the Receive Sequence Number will increment from 3
to 4 when the DB-SEND message data has arrived. When this location
changes values, then it signals that new message data has been
received from the 3964R communication partner.
1 X
Transmit Sequence number. This number will not change when a DB-
SEND message has been received from the 3964R communication
partner.
2 0 Reserved.