public VarTabRowWithConnection GetNextRow() { var rw = new VarTabRowWithConnection(); rw.LibNoDaveValue = new PLCTag(LibNoDaveValue); rw.ConnectionName = ConnectionName; if (rw.LibNoDaveValue.TagDataType == DotNetSiemensPLCToolBoxLibrary.DataTypes.TagDataType.Bool) { if (rw.LibNoDaveValue.BitAddress < 7) { rw.LibNoDaveValue.BitAddress++; } else { rw.LibNoDaveValue.BitAddress = 0; rw.LibNoDaveValue.ByteAddress++; } } else { rw.LibNoDaveValue.ByteAddress += rw.LibNoDaveValue.ReadByteSize; } return(rw); }
public static void RefreshSymbol(VarTabRowWithConnection varTabRowWithConnection) { string akConn = DefaultConnectionStatic; if (!string.IsNullOrEmpty(varTabRowWithConnection.ConnectionName)) { akConn = varTabRowWithConnection.ConnectionName; } if (akConn != null) { var symTab = _dictonaryConnectionSymboltables[akConn]; if (symTab == null) { varTabRowWithConnection.Symbol = null; } else { if (varTabRowWithConnection.S7FormatAddress != null) { var entry = symTab.GetEntryFromOperand(varTabRowWithConnection.S7FormatAddress); if (entry != null) { varTabRowWithConnection.Symbol = entry.Symbol; } else { varTabRowWithConnection.Symbol = null; } } else { varTabRowWithConnection.Symbol = null; } } } else { varTabRowWithConnection.Symbol = null; } }
public VarTabRowWithConnection GetNextRow() { var rw = new VarTabRowWithConnection(); rw.LibNoDaveValue = new PLCTag(LibNoDaveValue); rw.ConnectionName = ConnectionName; if (rw.LibNoDaveValue.TagDataType == DotNetSiemensPLCToolBoxLibrary.DataTypes.TagDataType.Bool) { if (rw.LibNoDaveValue.BitAddress < 7) rw.LibNoDaveValue.BitAddress++; else { rw.LibNoDaveValue.BitAddress = 0; rw.LibNoDaveValue.ByteAddress++; } } else { rw.LibNoDaveValue.ByteAddress += rw.LibNoDaveValue.ReadByteSize; } return rw; }
public static void RefreshSymbol(VarTabRowWithConnection varTabRowWithConnection) { string akConn = DefaultConnectionStatic; if (!string.IsNullOrEmpty(varTabRowWithConnection.ConnectionName)) akConn = varTabRowWithConnection.ConnectionName; if (akConn != null) { var symTab = _dictonaryConnectionSymboltables[akConn]; if (symTab == null) varTabRowWithConnection.Symbol = null; else { if (varTabRowWithConnection.S7FormatAddress != null) { var entry = symTab.GetEntryFromOperand(varTabRowWithConnection.S7FormatAddress); if (entry != null) varTabRowWithConnection.Symbol = entry.Symbol; else varTabRowWithConnection.Symbol = null; } else varTabRowWithConnection.Symbol = null; } } else varTabRowWithConnection.Symbol = null; }