AllenBradleyNetReadDouble 方法 (String, UInt16) |
命名空间: HslCommunication.Profinet.AllenBradley
MelsecMcNet melsec_net = new MelsecMcNet( "192.168.0.100", 6000 ); // 以下是简单的读取,没有仔细校验的方式 double[] d100_139 = melsec_net.ReadDouble( "D100", 10 ).Content; // 如果需要判断是否读取成功 OperateResult<double[]> R_d100_139 = melsec_net.ReadDouble( "D100", 10 ); if (R_d100_139.IsSuccess) { double value_d100 = R_d100_139.Content[0]; double value_d104 = R_d100_139.Content[1]; double value_d108 = R_d100_139.Content[2]; double value_d112 = R_d100_139.Content[3]; double value_d116 = R_d100_139.Content[4]; double value_d120 = R_d100_139.Content[5]; double value_d124 = R_d100_139.Content[6]; double value_d128 = R_d100_139.Content[7]; double value_d132 = R_d100_139.Content[8]; double value_d136 = R_d100_139.Content[9]; } else { // failed }