MemobusHelperWrite 方法 (IMemobus, String, Int16, FuncString, Int16, OperateResult) |
命名空间: HslCommunication.Profinet.YASKAWA.Helper
public static OperateResult Write( IMemobus memobus, string address, short value, Func<string, short, OperateResult> writeShort )
[缺少 "M:HslCommunication.Profinet.YASKAWA.Helper.MemobusHelper.Write(HslCommunication.Profinet.YASKAWA.Helper.IMemobus,System.String,System.Int16,System.Func{System.String,System.Int16,HslCommunication.OperateResult})" 的 <param name="memobus"/> 文档]
[缺少 "M:HslCommunication.Profinet.YASKAWA.Helper.MemobusHelper.Write(HslCommunication.Profinet.YASKAWA.Helper.IMemobus,System.String,System.Int16,System.Func{System.String,System.Int16,HslCommunication.OperateResult})" 的 <param name="writeShort"/> 文档]
MelsecMcNet melsec_net = new MelsecMcNet( "192.168.0.100", 6000 ); // 简单的写入 melsec_net.Write( "D100", (short)123 ); // 如果想要判断是否写入成功 OperateResult write = melsec_net.Write( "D100", (short)123 ); if (write.IsSuccess) { // success } else { // failed }