示例#1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public App_ETH_BK_DI8_DO4()
        {
            this.ExceptionList = new Queue <Exception>();

            // Create the controller with a name
            this.Controller = new Controller_IBS_ETH("ETH BK DI8 DO4");

            // Settings of the controller
            this.Controller.Description = "ETH BK DI8 DO4 for Demonstaration";
            this.Controller.Connection  = "10.250.130.105";

            this.Controller.Startup = ControllerStartup.PhysicalConfiguration;

            this.Controller.UpdateProcessDataCycleTime = 20;
            this.Controller.UpdateMailboxTime          = 50;

            // The Controller Configuration property contains special configurations for the controller
            //Controller.Configuration.DNS_NameResolution     = true;
            //Controller.Configuration.EnableIBS_Indications  = true;
            //Controller.Configuration.GetRevisionInfo        = false;
            //Controller.Configuration.Read_IBS_Cycletime     = false;
            //Controller.Configuration.UpdateControllerState  = 100;

            // Add input variables to the controller
            this.Controller.AddObject(this.InBit_0);
            this.Controller.AddObject(this.InBit_1);
            this.Controller.AddObject(this.InVariable);
            this.Controller.AddObject(this.InByteArray);

            this.Controller.AddObject(this.InRS232_1);

            // Add output variables to the controller
            this.Controller.AddObject(this.OutBit_0);
            this.Controller.AddObject(this.OutBit_1);
            this.Controller.AddObject(this.OutVariable);
            this.Controller.AddObject(this.OutByteArray);

            this.Controller.AddObject(this.OutRS232_1);

            // Add PCP objects to the controller
            this.Controller.AddObject(this.PcpRS232_1.ControllerConnection);

            // Callbacks for the controller

            // Called once for each bus cycle
            this.Controller.OnUpdateProcessData += this.Controller_OnUpdateProcessData;
            // Called once for each mailbox cycle
            this.Controller.OnUpdateMailbox += this.Controller_OnUpdateMailbox;

            // Called whenever an error occurs in the controller object
            this.Controller.OnException += this.Controller_OnException;

            // Events from PCP_2
            this.PcpRS232_1.OnEnableReady += this.PCP_RS232_1_OnEnableReady;
            this.PcpRS232_1.OnReadConfirmationReceived  += this.PCP_RS232_1_ReadConfirmationReceived;
            this.PcpRS232_1.OnWriteConfirmationReceived += this.PCP_RS232_1_WriteConfirmationReceived;
            this.PcpRS232_1.OnException += this.PCP_RS232_1_OnException;
        }
示例#2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public HFI_Appl()
        {
            this.ExceptionList = new Queue <Exception>();

            // Create the controller
            this.Controller = new Controller_IBS_ETH("ETH BK DI8 DO4");

            // Settings for the controller
            this.Controller.Description = "ETH BK DI8 DO4 for Demonstaration";

            this.Controller.Startup = ControllerStartup.PhysicalConfiguration;
            //this.Controller.Connection = "192.168.0.1";
            this.Controller.Connection = "192.168.0.1";

            this.Controller.UpdateProcessDataCycleTime = 20;
            this.Controller.UpdateMailboxTime          = 50;

            // The Controller.Configuration property contains special configurations for the controller
            //Controller.Configuration.DNS_NameResolution     = true;
            //Controller.Configuration.EnableIBS_Indications  = true;
            //Controller.Configuration.Read_IBS_Cycletime     = false;
            //Controller.Configuration.UpdateControllerState  = 100;

            #region *** Add Input variables

            Controller.AddObject(MODULE_2_IN);

            #endregion

            #region *** Add output variables

            Controller.AddObject(MODULE_1_OUT);
            Controller.AddObject(MODULE_3_OUT);

            #endregion

            #region *** Add PCP variables


            #endregion

            // Callbacks from the controller

            // Called once for each bus cycle
            this.Controller.OnUpdateProcessData += this.Controller_OnUpdateProcessData;

            // Called once for each mailbox cycle
            this.Controller.OnUpdateMailbox += this.Controller_OnUpdateMailbox;

            // Called whenever an error occurs in the controller object
            this.Controller.OnException += this.Controller_OnException;

            #region *** Create PCP callbacks


            #endregion
        }
示例#3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public HFI(string ipAddress)
        {
            ExceptionList = new Queue <Exception>();

            Controller             = new Controller_IBS_ETH("ETH BK DI8 DO4");
            Controller.Description = "ETH BK DI8 DO4";
            Controller.Startup     = ControllerStartup.PhysicalConfiguration;
            Controller.Connection  = "192.168.1.50";
            Controller.UpdateProcessDataCycleTime = 20;
            Controller.UpdateMailboxTime          = 50;

            // The Controller.Configuration property contains special configurations for the controller
            //Controller.Configuration.DNS_NameResolution     = true;
            //Controller.Configuration.EnableIBS_Indications  = true;
            //Controller.Configuration.Read_IBS_Cycletime     = false;
            //Controller.Configuration.UpdateControllerState  = 100;

            //Controller.AddObject(MODULE_2_IN);
            Controller.AddObject(IN_Bit_0);
            Controller.AddObject(IN_Bit_1);
            Controller.AddObject(IN_Bit_2);
            Controller.AddObject(IN_Bit_3);
            Controller.AddObject(IN_Bit_4);
            Controller.AddObject(IN_Bit_5);
            Controller.AddObject(IN_Bit_6);
            Controller.AddObject(IN_Bit_7);

            Controller.AddObject(MODULE_3_IN);
            Controller.AddObject(MODULE_4_IN);


            //Controller.AddObject(MODULE_1_OUT);
            Controller.AddObject(OUT_Bit_0);
            Controller.AddObject(OUT_Bit_1);
            Controller.AddObject(OUT_Bit_2);
            Controller.AddObject(OUT_Bit_3);

            Controller.AddObject(MODULE_3_OUT);
            Controller.AddObject(MODULE_4_OUT);

            Controller.OnUpdateProcessData += Controller_OnUpdateProcessData;
            Controller.OnUpdateMailbox     += Controller_OnUpdateMailbox;
            Controller.OnException         += Controller_OnException;

            Controller.Enable();
        }
示例#4
0
        /// <summary>
        /// Constructor
        /// </summary>
        public HFI_Appl18()
        {
            // Create the controller
            Controller = new Controller_IBS_ETH("FL IL 24 BK");

            // Settings for the controller
            Controller.Description = "FL BK for Demonstaration";

            Controller.Startup    = ControllerStartup.WithoutConfiguration;
            Controller.Connection = "192.168.17.18";

            Controller.UpdateProcessDataCycleTime = 20;
            Controller.UpdateMailboxTime          = 50;

            Controller.WatchdogDeactivate = true;
            Controller.WatchdogTimeout    = WatchdogMonitoringTime.Intervall_1048ms;

            // The Controller Configuration property contains special configurations for the controller
            //         Controller.Configuration.DNS_NameResolution     = true;
            //         Controller.Configuration.EnableIBS_Indications  = true;
            Controller.Configuration.ExpertModeActivate = false;
            //         Controller.Configuration.Read_IBS_Cycletime     = false;
            //         Controller.Configuration.UpdateControllerState  = 100;

            #region *** Add Input variables

            //         Controller.AddObject(MODULE_1_IN);
            //        Controller.AddObject(MODULE_2_IN);
            //         Controller.AddObject(MODULE_3_IN);
            //         Controller.AddObject(MODULE_4_IN);
            //         Controller.AddObject(MODULE_5_IN);
            //         Controller.AddObject(MODULE_6_IN);
            //         Controller.AddObject(MODULE_7_IN);
            //         Controller.AddObject(MODULE_8_IN);
            //         Controller.AddObject(MODULE_9_IN);
            //         Controller.AddObject(MODULE_10_IN);
            //         Controller.AddObject(MODULE_11_IN);
            //         Controller.AddObject(MODULE_12_IN);
            //         Controller.AddObject(MODULE_13_IN);
            //         Controller.AddObject(MODULE_14_IN);

            Controller.AddObject(Module_1_2_In);
            Controller.AddObject(Module_1_1_In);
            Controller.AddObject(Module_2_2_In);
            Controller.AddObject(Module_2_1_In);
            Controller.AddObject(Module_3_2_In);
            Controller.AddObject(Module_3_1_In);
            Controller.AddObject(Module_4_2_In);
            Controller.AddObject(Module_4_1_In);
            Controller.AddObject(Module_5_2_In);
            Controller.AddObject(Module_5_1_In);
            Controller.AddObject(Module_6_2_In);
            Controller.AddObject(Module_6_1_In);
            Controller.AddObject(Module_7_2_In);
            Controller.AddObject(Module_7_1_In);
            Controller.AddObject(Module_8_2_In);
            Controller.AddObject(Module_8_1_In);
            Controller.AddObject(Module_9_2_In);
            Controller.AddObject(Module_9_1_In);
            Controller.AddObject(Module_10_2_In);
            Controller.AddObject(Module_10_1_In);
            Controller.AddObject(Module_11_2_In);
            Controller.AddObject(Module_11_1_In);
            Controller.AddObject(Module_12_2_In);
            Controller.AddObject(Module_12_1_In);
            Controller.AddObject(Module_13_2_In);
            Controller.AddObject(Module_13_1_In);

            #endregion

            #region *** Add output variables



            //         Controller.AddObject(MODULE_1_OUT);
            //          Controller.AddObject(MODULE_2_OUT);
            //         Controller.AddObject(MODULE_3_OUT);
            //         Controller.AddObject(MODULE_4_OUT);
            //         Controller.AddObject(MODULE_5_OUT);
            //         Controller.AddObject(MODULE_6_OUT);
            //         Controller.AddObject(MODULE_7_OUT);
            //         Controller.AddObject(MODULE_8_OUT);
            //         Controller.AddObject(MODULE_9_OUT);
            //         Controller.AddObject(MODULE_10_OUT);
            //         Controller.AddObject(MODULE_11_OUT);
            //         Controller.AddObject(MODULE_12_OUT);
            //         Controller.AddObject(MODULE_13_OUT);

            Controller.AddObject(Module_1_2_Out);
            Controller.AddObject(Module_1_1_Out);
            Controller.AddObject(Module_2_2_Out);
            Controller.AddObject(Module_2_1_Out);
            Controller.AddObject(Module_3_2_Out);
            Controller.AddObject(Module_3_1_Out);
            Controller.AddObject(Module_4_2_Out);
            Controller.AddObject(Module_4_1_Out);
            Controller.AddObject(Module_5_2_Out);
            Controller.AddObject(Module_5_1_Out);
            Controller.AddObject(Module_6_2_Out);
            Controller.AddObject(Module_6_1_Out);
            Controller.AddObject(Module_7_2_Out);
            Controller.AddObject(Module_7_1_Out);
            Controller.AddObject(Module_8_2_Out);
            Controller.AddObject(Module_8_1_Out);
            Controller.AddObject(Module_9_2_Out);
            Controller.AddObject(Module_9_1_Out);
            Controller.AddObject(Module_10_2_Out);
            Controller.AddObject(Module_10_1_Out);
            Controller.AddObject(Module_11_2_Out);
            Controller.AddObject(Module_11_1_Out);
            Controller.AddObject(Module_12_2_Out);
            Controller.AddObject(Module_12_1_Out);
            Controller.AddObject(Module_13_2_Out);
            Controller.AddObject(Module_13_1_Out);


            #endregion

            this.SetInOutList();

            #region *** Add PCP variables


            #endregion

            // Callbacks from the controller

            // Called once for each bus cycle
            Controller.OnUpdateProcessData += new UpdateProcessDataHandler(Controller_OnUpdateProcessData);

            // Called once for each mailbox cycle
            Controller.OnUpdateMailbox += new UpdateMailboxHandler(Controller_OnUpdateMailbox);

            // Called whenever an error occurs in the controller object
            Controller.OnException += new PhoenixContact.PxC_Library.Util.ExceptionHandler(Controller_OnException);

            #region *** Create PCP callbacks


            #endregion
        }