回复:求助(解释该程序段,特别是W#16#1002的含义)

xkqxwhz

  • 帖子

    1178
  • 精华

    10
  • 被关注

    40

论坛等级:奇侠

注册时间:2009-03-26

普通 普通 如何晋级?

发布于 2013-11-16 17:02:37

12楼

//Generate Pointer to Traversing Block Control Bits
LAR1 P##tSingleParmTaskPointer

L B#16#10 // 10 hex = S7 Data Type
T LB [AR1,P#0.0] // Transfer to Source pointer byte 0

L B#16#2 // 2 hex = byte data type
T LB [AR1,P#1.0] // Transfer to Source pointer byte 1

L 12 // How many bytes to move
T LW [AR1,P#2.0] // Transfer to Source pointer bytes 2-3

L #tDriveIntfcDBNum // Load DB Number
T LW [AR1,P#4.0] // Transfer to Source pointer bytes 4-5

L 14 // Load start address of data
SLD 3 // Shift data in AR1 3 bits to the left
T LD [AR1,P#6.0] // Trasfer to Source Pointer bytes 6-9

L B#16#84 // 84 hex = DB memory area
T LB [AR1,P#6.0] // Transfer to Source pointer byte 6

//Transfer Traversing Block Control Bits From Drive Interface DB To Local Copy
CALL SFC 20
SRCBLK :=#tSingleParmTaskPointer
RET_VAL:=#tRet
DSTBLK :=#tDriveIntfc.SingleParmTask


这是老外编的一个处理S120通信报文的程序块的一部分
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-300/400

共有54622条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。