从西门子的PLC中读取数据信息,地址为"M100","AI100","I0","Q0","V100","S100"等
Read data information from Siemens PLC with addresses "M100", "AI100", "I0", "Q0", "V100", "S100", etc.
命名空间:
HslCommunication.Profinet.Siemens.Helper
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static OperateResult<byte[]> Read(
IReadWriteDevice plc,
string address,
ushort length,
byte station,
Object communicationLock
)
Public Shared Function Read (
plc As IReadWriteDevice,
address As String,
length As UShort,
station As Byte,
communicationLock As Object
) As OperateResult(Of Byte())
public:
static OperateResult<array<unsigned char>^>^ Read(
IReadWriteDevice^ plc,
String^ address,
unsigned short length,
unsigned char station,
Object^ communicationLock
)
static member Read :
plc : IReadWriteDevice *
address : string *
length : uint16 *
station : byte *
communicationLock : Object -> OperateResult<byte[]>
参数
- plc
- 类型:HslCommunication.CoreIReadWriteDevice
PLC的通信对象 - address
- 类型:SystemString
西门子的地址数据信息 - length
- 类型:SystemUInt16
数据长度 - station
- 类型:SystemByte
当前的站号信息 - communicationLock
- 类型:SystemObject
当前的同通信锁
返回值
类型:
OperateResultByte带返回结果的结果对象
参见