public AddressingForm(LadderAddressing addressing) { InitializeComponent(); txtInput.Value = addressing.ListInputAddress.Count; txtInput.Enabled = false; txtOutput.Value = addressing.ListOutputAddress.Count; txtOutput.Enabled = false; txtMemory.Value = addressing.ListMemoryAddress.Count; txtMemory.Enabled = true; txtTimer.Value = addressing.ListTimerAddress.Count; txtTimer.Enabled = true; txtCounter.Value = addressing.ListCounterAddress.Count; txtCounter.Enabled = true; }
public Address ReadAddress(ref Int32 position, LadderAddressing addressing) { //Instruction instruction = new Instruction(ReadOperationCode(position)); Instruction instruction = InstructionFactory.createInstruction(ReadOperationCode(position)); switch (instruction.OpCode) { case OperationCode.None: break; case OperationCode.LineEnd: break; case OperationCode.NormallyOpenContact: case OperationCode.NormallyClosedContact: AddressTypeEnum addressType = GetAddressingType(position); position++; Int32 addressIndex = ReadInteger(position); position++; return(addressingServices.Find(addressType, addressIndex));; case OperationCode.OutputCoil: case OperationCode.Reset: break; case OperationCode.ParallelBranchBegin: case OperationCode.ParallelBranchEnd: case OperationCode.ParallelBranchNext: break; case OperationCode.Counter: break; case OperationCode.Timer: break; } return(null); }
public void SetAddressing(LadderAddressing value) { addressing = value; }
public void SetAddressing(LadderAddressing addressing) { this.addressing = addressing; }