示例#1
0
 /// <summary>
 /// 读取指定地址的byte数据 -> Reads the byte data for the specified address
 /// </summary>
 /// <param name="address">起始地址,格式为M100,I100,Q100,DB1.100 -> Starting address, formatted as M100,I100,Q100,DB1.100</param>
 /// <returns>byte类型的结果对象 -> Result object of type Byte</returns>
 /// <remarks>
 /// <note type="warning">
 /// 不适用于DB块,定时器,计数器的数据读取,会提示相应的错误,读取长度必须为偶数
 /// </note>
 /// </remarks>
 public OperateResult <byte> ReadByte(string address)
 {
     return(ByteTransformHelper.GetResultFromArray(Read(address, 1)));
 }
示例#2
0
 /// <summary>
 /// 读取设备的ulong类型的数据
 /// </summary>
 /// <param name="address">起始地址</param>
 /// <returns>带成功标志的结果数据对象</returns>
 /// <example>
 /// 以下为三菱的连接对象示例,其他的设备读写情况参照下面的代码:
 /// <code lang="cs" source="HslCommunication_Net45.Test\Documentation\Samples\Core\NetworkDeviceBase.cs" region="ReadUInt64" title="UInt64类型示例" />
 /// </example>
 public OperateResult <ulong> ReadUInt64(string address)
 {
     return(ByteTransformHelper.GetResultFromArray(ReadUInt64(address, 1)));
 }
示例#3
0
 /// <summary>
 /// 读取设备的int类型的数据
 /// </summary>
 /// <param name="address">起始地址</param>
 /// <returns>带成功标志的结果数据对象</returns>
 /// <example>
 /// 以下为三菱的连接对象示例,其他的设备读写情况参照下面的代码:
 /// <code lang="cs" source="HslCommunication_Net45.Test\Documentation\Samples\Core\NetworkDeviceBase.cs" region="ReadInt32" title="Int32类型示例" />
 /// </example>
 public OperateResult <int> ReadInt32(string address)
 {
     return(ByteTransformHelper.GetResultFromArray(ReadInt32(address, 1)));
 }
示例#4
0
 /// <summary>
 /// 读取设备的float类型的数据
 /// </summary>
 /// <param name="address">起始地址</param>
 /// <returns>带成功标志的结果数据对象</returns>
 /// <example>
 /// 以下为三菱的连接对象示例,其他的设备读写情况参照下面的代码:
 /// <code lang="cs" source="HslCommunication_Net45.Test\Documentation\Samples\Core\NetworkDeviceBase.cs" region="ReadFloat" title="Float类型示例" />
 /// </example>
 public OperateResult <float> ReadFloat(string address)
 {
     return(ByteTransformHelper.GetResultFromArray(ReadFloat(address, 1)));
 }
示例#5
0
 /// <summary>
 /// 读取设备的ushort数据类型的数据
 /// </summary>
 /// <param name="address">起始地址</param>
 /// <returns>带成功标志的结果数据对象</returns>
 /// <example>
 /// 以下为三菱的连接对象示例,其他的设备读写情况参照下面的代码:
 /// <code lang="cs" source="HslCommunication_Net45.Test\Documentation\Samples\Core\NetworkDeviceBase.cs" region="ReadUInt16" title="UInt16类型示例" />
 /// </example>
 public OperateResult <ushort> ReadUInt16(string address)
 {
     return(ByteTransformHelper.GetResultFromArray(ReadUInt16(address, 1)));
 }