您现在所在的是:

西门子SIEMENS

回帖:1个,阅读:4415 [上一页] [1] [下一页]
2210
ylsw
文章数:436
年度积分:50
历史总积分:2210
注册时间:2001/3/24
发站内信
发表于:2001/8/12 23:08:00
#0楼
input: - block number
output: - initial address of DW0 in AG


PG AS
(hex) (hex)
---------------------- function start --------
02 ----> STX
<---- 10 DLE
<---- 06 ACK
1A ----> B_INFO function code = 1Ah
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 16 AG answer=16h
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK
---------------------- header info --------
01 ----> ID=01h for Datablock
XX ----> DB number (0..255)
10 ----> DLE
04 ----> EOT
<---- 10 DLE
<---- 06 ACK
---------------------- data --------
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 00 NUL
<---- XX DB initial address
<---- XX
<---- 70 synchronization code: 70 70
<---- 70
<---- 41 block ID and DB number : 41 XX
<---- XX
<---- XX PG ID code: XX XX
<---- XX
<---- XX library number: XX XX
<---- XX
<---- XX block length (words): XX XX
<---- XX
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK
---------------------- terminate --------
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 12 AG "end of transmission" code: 12h
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK

//////////////////////////////////////////////////////////////////////////////

DB_READ
input: - initial address in AG
- final address in AG
output: - contents of datawords



PG AS
(hex) (hex)
---------------------- function start --------
02 ----> STX
<---- 10 DLE
<---- 06 ACK
04 ----> DB_READ function code = 04h
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 16 AG answer=16h
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK
---------------------- header info --------
XX ----> initial address in AG: XX XX
XX ---->
XX ----> final address in AG: XX XX
XX ---->
10 ----> DLE
04 ----> EOT
<---- 10 DLE
<---- 06 ACK
---------------------- data --------
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 00 NUL
<---- 00 NUL
<---- 00 NUL
<---- 00 NUL
<---- 00 NUL
<---- XX first byte of data
<---- XX
<---- XX
. . .
. . .
<---- XX
<---- XX
<---- XX last byte of data
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK
---------------------- terminate --------
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 12 AG "end of transmission" code: 12h
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK


//////////////////////////////////////////////////////////////////////////////

DB_WRITE
input: - initial address in AG
- contents of datawords
output: - none



PG AS
(hex) (hex)
---------------------- function start --------
02 ----> STX
<---- 10 DLE
<---- 06 ACK
03 ----> DB_WRITE function code = 03h
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 16 AG answer=16h
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK
---------------------- header info --------
XX ----> initial address in AG: XX XX
XX ---->
---------------------- data --------
XX ----> first byte of data
XX ---->
XX ---->
. . .
. . .
XX ---->
XX ---->
XX ----> last byte of data
10 ----> DLE
04 ----> EOT
<---- 10 DLE
<---- 06 ACK
---------------------- terminate --------
<---- 02 STX
10 ----> DLE
06 ----> ACK
<---- 12 AG "end of transmission" code: 12h
<---- 10 DLE
<---- 03 ETX
10 ----> DLE
06 ----> ACK
匿名用户
文章数:N/A
年度积分:0
历史总积分:0
注册时间:2013/6/23
发站内信
发表于:2013/6/24 12:53:15
#1楼
该用户被锁定,回复内容不予显示!

关于我们 | 联系我们 | 广告服务 | 本站动态 | 友情链接 | 法律声明 | 非法和不良信息举报

工控网客服热线:0755-86369299
版权所有 工控网 Copyright©2024 Gkong.com, All Rights Reserved

46.8003