static void processor_KeySwitchChanged(LogixProcessor sender, LogixKeyChangedEventArgs e) { //This function will be called when the key switch changes position. The key switch is on the front of //the processor and can either be in Run, Program or Remote mode. There is an additional member of the //ProcessorKeySwitch enumeration called "Unknown" which is used when the value hasn't been read yet or //can't be obtained. Console.WriteLine("Processor Key Position Changed from " + e.OldPosition.ToString() + " to " + e.NewPosition.ToString()); }