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