MqttRpcDeviceReadDouble 方法 (String) |
读取双浮点的数据
Read double floating point data
命名空间:
HslCommunication.MQTT
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public OperateResult<double> ReadDouble(
string address
)
Public Function ReadDouble (
address As String
) As OperateResult(Of Double)
public:
virtual OperateResult<double>^ ReadDouble(
String^ address
) sealed
abstract ReadDouble :
address : string -> OperateResult<float>
override ReadDouble :
address : string -> OperateResult<float>
参数
- address
- 类型:SystemString
起始地址
返回值
类型:
OperateResultDouble带有成功标识的double数据
实现
IReadWriteNetReadDouble(String)示例
以下为三菱的连接对象示例,其他的设备读写情况参照下面的代码:
MelsecMcNet melsec_net = new MelsecMcNet( "192.168.0.100", 6000 );
double d100 = melsec_net.ReadDouble( "D100" ).Content;
OperateResult<double> R_d100 = melsec_net.ReadDouble( "D100" );
if (R_d100.IsSuccess)
{
double value = R_d100.Content;
}
else
{
}
参见