Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mopo

Pages: [1]
1
Open Discussion / Re: Console Application
« on: October 04, 2016, 11:22:29 PM »
Thanks Guys,
That worked great!
I found that the Subscribe event handler didn't fire so I just added a SubscriptionDataReceived handler and that fired.

Happy days!

All I need now is time to write some apps with this cool library!

2
Open Discussion / Console Application
« on: October 03, 2016, 03:57:08 AM »
Hey Guys,
Great software! This could make my life so much easier.

I have the test app working great. I was wondering if anyone is able to point me in the right direction for using the library with a console app. The code below never fires an event.

Code: [Select]
        static void Main(string[] args)
        {

           
            AdvancedHMIDrivers.EthernetIPforSLCMicroCom SLC = new AdvancedHMIDrivers.EthernetIPforSLCMicroCom();
            SLC.IPAddress = "192.168.76.12";
            DataSubscriber ds = new DataSubscriber();
            ds.BeginInit();
            ds.PLCAddressValue = new PLCAddressItem("N9:3");
           
            ds.ComComponent = SLC;
           
            ds.EndInit();
            ds.DataChanged += Ds_DataChanged;
            ds.SuccessfulSubscription += Ds_SuccessfulSubscription;
            while (true)
            {
                Thread.Sleep(10);
            }
        }

        private static void Ds_SuccessfulSubscription(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        private static void Ds_DataChanged(object sender, MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs e)
        {
            throw new NotImplementedException();
        }
    }

Pages: [1]