/// <summary> /// 添加变量 /// </summary> /// <param name="item"></param> /// <param name="plc"></param> public void Add(VariableItem item, PLCClient plc) { if (item == null) { throw new ArgumentNullException(nameof(item)); } if (plc == null) { throw new ArgumentNullException(nameof(plc)); } var v = new Variable(item, plc); _variables[v.Item.Name] = v; }
public ReadLoop(PLCClient pLCDevice, IPLCCommunicator comm, string thread) { PLC = pLCDevice; Communicator = comm; ThreadName = thread; }
public MergedVariable(VariableItem item, PLCClient plc) : base(item, plc) { }
public MergedVariable(PLCClient plc, string name) : base(new VariableItem(), plc) { Item.Name = name; }
/// <summary> /// 初始化Variable /// </summary> /// <param name="item">变量项目</param> /// <param name="plc">PLC设备</param> public Variable(VariableItem item, PLCClient plc) { Item = item; PLC = plc; }