Functional Overview
S3964R
♦
ProLinx Gateway
Driver Manual
Siemens 3964R Protocol
ProSoft Technology, Inc.
Page 43 of 64
April 14, 2009
Port 0 Receive Database (Results of DB-Send)
Word
Value
Description:
0
X
No change in Receive Sequence Number because no data is returned
from a DB-SEND.
1
7
Transmit Sequence number. This number will update to the Transmit
Sequence Number that triggered the DB-SEND. When this value
updates to the transmit sequence number it does not mean that the
data has been sent out of the 3864R port. It only means that the 3964R
driver has read the DB-SEND command from the transmit database
and it is now safe to start writing the next transmit command to the
transmit database.
2
0
Reserved.
3
0
Error Code. This error code should be monitored continuously because
sometimes it might take awhile for a communication error to occur
depending on timeout values and the type of error.
5.4.2 Example Modbus TCP/IP DB-FETCH of data from 3964R device
Use a Modbus Function Code 16 to write header data to the
P
RO
L
INX
T
RANSMIT
BUFFER
,
TO GIVE IT THE
DB-FETCH
COMMAND
. The 3964R device will be sent a
3964R telegram from the ProLinx, and will respond with the DB-FETCH response
telegram. You will set up the Modbus TCP/IP device by using a Modbus Function
Code 3 to continually poll the
R
ECEIVE BUFFER
for indication of new data.
1
Start by setting B to the value in G.
2
Then write the data count and the data header in E and F.
3
Now set the trigger, A, to tell the ProLinx to begin. Set it to the value already
in A, plus 1.
4
Watch A and H. When A = H, then you know the ProLinx module has read
the data you just wrote.
5
Watch B and G. When B <> G, then you know the ProLinx has new data for
you.
o
You will want to verify the Job Code, to make sure this is new data in
response to the DB-FETCH command, as it could possibly be a DB-
SEND or DB-FETCH initiated from the 3964R device.
o
If the Job Code is 0x0045, then read the
R
ECEIVE BUFFER
.
C
HECK
J
FOR
ERRORS
,
AND
K
AND
L
FOR DATA
.
6
Continually poll the error code, J to verify no errors.
7
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