| OmronHostLinkHelperWrite 方法 (IHostLink, String, Boolean) | 
 
            向PLC中位软元件写入bool数组,返回是否写入成功,比如你写入D100,values[0]对应D100.0,地址格式为"D100.0","C100.0","W100.0","H100.0","A100.0"
            Write the bool array to the PLC's median device and return whether the write was successful. For example, if you write D100, values [0] corresponds to D100.0 
            and the address format is "D100.0", "C100.0", "W100. 0 "," H100.0 "," A100.0 "
            
 
        命名空间: 
     HslCommunication.Profinet.Omron.Helper
        程序集:
     HslCommunication (在 HslCommunication.dll 中) 版本:12.5.1.0 (12.5.1.0)
 语法
语法public static OperateResult Write(
	IHostLink hostLink,
	string address,
	bool[] values
)
Public Shared Function Write ( 
	hostLink As IHostLink,
	address As String,
	values As Boolean()
) As OperateResult
public:
static OperateResult^ Write(
	IHostLink^ hostLink, 
	String^ address, 
	array<bool>^ values
)
static member Write : 
        hostLink : IHostLink * 
        address : string * 
        values : bool[] -> OperateResult 
参数
- hostLink
- 类型:HslCommunication.Profinet.Omron.HelperIHostLink
 [缺少 "M:HslCommunication.Profinet.Omron.Helper.OmronHostLinkHelper.Write(HslCommunication.Profinet.Omron.Helper.IHostLink,System.String,System.Boolean[])" 的 <param name="hostLink"/> 文档] 
- address
- 类型:SystemString
 要写入的数据地址
- values
- 类型:SystemBoolean
 要写入的实际数据,可以指定任意的长度
返回值
类型:
OperateResult返回写入结果
 示例
示例OmronFinsNet omronFinsNet = new OmronFinsNet( "192.168.1.110", 9600 );
omronFinsNet.Write( "D100.1", true );
omronFinsNet.Write( "D100.1", new bool[] { true, false, true, false } );
OperateResult write1 = omronFinsNet.Write( "D100.1", true );
if (write1.IsSuccess)
{
    
}
else
{
    
}
OperateResult write2 = omronFinsNet.Write( "D100.1", new bool[] { true, false, true, false } );
if (write2.IsSuccess)
{
    
}
else
{
    
} 参见
参见