DeviceCommunicationReadInt64 方法 (String) |
读取64位的有符号整型
Read 64-bit signed integer
命名空间:
HslCommunication.Core.Device
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public OperateResult<long> ReadInt64(
string address
)
Public Function ReadInt64 (
address As String
) As OperateResult(Of Long)
public:
virtual OperateResult<long long>^ ReadInt64(
String^ address
) sealed
abstract ReadInt64 :
address : string -> OperateResult<int64>
override ReadInt64 :
address : string -> OperateResult<int64>
参数
- address
- 类型:SystemString
起始地址
返回值
类型:
OperateResultInt64带有成功标识的long数据
实现
IReadWriteNetReadInt64(String)示例
以下为三菱的连接对象示例,其他的设备读写情况参照下面的代码:
MelsecMcNet melsec_net = new MelsecMcNet( "192.168.0.100", 6000 );
long d100 = melsec_net.ReadInt64( "D100" ).Content;
OperateResult<long> R_d100 = melsec_net.ReadInt64( "D100" );
if (R_d100.IsSuccess)
{
double value = R_d100.Content;
}
else
{
}
参见