static void Main(String[] args)
        {
            NSFTraceLog.PrimaryTraceLog.Enabled = true;

            CycleAB cycleABExample = new CycleAB("CycleABExample");
            cycleABExample.startStateMachine();

            NSFDebugUtility.PrimaryDebugUtility.writeLineToConsole("CycleABExample - Review trace file to see results.");

            // Illustrate a cycle
            // Wait until ready to cycle, cycle, wait until ready again
            while (!cycleABExample.isReadyToCycle())
            {
                Thread.Sleep(100);
            }
            cycleABExample.startCycle();
            while (!cycleABExample.isReadyToCycle())
            {
                Thread.Sleep(100);
            }

            // Save trace log
            NSFTraceLog.PrimaryTraceLog.saveLog("CycleABExampleTrace.xml");

            NSFDebugUtility.PrimaryDebugUtility.writeLineToConsole("Press Enter key to continue");
            Console.ReadKey();

            NSFEnvironment.terminate();
        }
        static void Main(String[] args)
        {
            NSFExceptionHandler.ExceptionActions += globalExceptionAction;

            NSFTraceLog.PrimaryTraceLog.Enabled = true;

            CycleAB cycleABExample = new CycleAB("CycleABExample");

            cycleABExample.startStateMachine();

            NSFDebugUtility.PrimaryDebugUtility.writeLineToConsole("CycleABExample - Review trace file to see results.");

            // Illustrate a cycle
            // Wait until ready to cycle, cycle, wait until ready again
            while (!cycleABExample.isReadyToCycle())
            {
                Thread.Sleep(100);
            }
            cycleABExample.startCycle();
            while (!cycleABExample.isReadyToCycle())
            {
                Thread.Sleep(100);
            }

            // Save trace log
            NSFTraceLog.PrimaryTraceLog.saveLog("CycleABExampleTrace.xml");

            NSFDebugUtility.PrimaryDebugUtility.writeLineToConsole("Press Enter key to continue");
            Console.ReadKey();

            NSFEnvironment.terminate();
        }