恭喜,你发布的帖子
发布于 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)
请填写推广理由:
分享
只看
楼主