回复:一个设置为不优化的数据块,占用的长度可以用程序获取吗?

已锁定

xxctjd

  • 帖子

    577
  • 精华

    3
  • 被关注

    38

论坛等级:侠圣

注册时间:2013-08-05

黄金 黄金 如何晋级?

发布于 2021-07-28 09:49:06

1楼

PLC本身好像没有这方面的指令,不过在Sharp7里面有几个函数还是挻好用的。


GetAgBlockInfo

Description

Returns some information about a given block.
This function is very useful if you need to read or write data in a DB which you do not know the size in advance (see MC7Size field).

This function is used internally by DBGet.

 

Declaration

public int GetAgBlockInfo(int BlockType, int BlockNumber,

  ref S7BlockInfo Block)


DBGet

Description

Read an entire DB from the PLC without the need of specifying its size. As output SizeRead will contain the size read.

 

This function is not subject to the security level set.

 

Declaration

public int DBGet(int DBNumber, byte[] usrData, ref int Size) 


评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-1200系列

共有15112条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

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

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

  • 分享

  • 只看
    楼主

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