示例#1
0
 /// <summary>
 /// 写float信号
 /// </summary>
 /// <param name="address"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private bool Write(string address, float value)
 {
     if (!local_PLC_ERR)
     {
         return(S7_COM_FUN.Write_Req(cp_descr, cref, orderid, address, value) == 0);
     }
     Console.WriteLine("导轨Local_PLC_ERR故障,请排除故障并复位." + startAddress.ToString());
     return(false);
 }
示例#2
0
 /// <summary>
 /// 写bool信号
 /// </summary>
 /// <param name="address"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private bool write(string address, bool value)
 {
     return(S7_COM_FUN.Write_Req(cp_descr, cref, orderid, address, value) == 0);
 }
示例#3
0
 /// <summary>
 /// 写通讯成功标志位--以PLC验证通讯是否成功
 /// </summary>
 public bool SetComOK()
 {
     return(S7_COM_FUN.Write_Req(cp_descr, PLCsys.Cref2, PLCsys.Orderid2, PC_Communication_OK_Address, true) == 0);
 }