Author Topic: Subscribe - EIPTransport.SendData Error, No Callback  (Read 2039 times)

timryder

  • Jr. Member
  • **
  • Posts: 83
  • Still trying to figure it out
    • View Profile
Re: Subscribe - EIPTransport.SendData Error, No Callback
« Reply #15 on: February 27, 2020, 10:34:59 AM »
Why not just create a function which reads the tag data directly from the PLC and stores their values in your own variable?

REALLY rough example, i write VB.net mostly.
Code: [Select]
try
            {
                //Create a new Driver instance
                var plcDriver = new AdvancedHMIDrivers.EthernetIPforCLXCom();
               
                plcDriver.IPAddress = "192.168.1.1";
                plcDriver.PollRateOverride = 150;


                string _testTage = "Robot1:I.Data[0]";
                int _subscribeTotal = 32;
                int _subscribeCount = 0;

                //UnsubscribeTags();

                for (int i = 0; i < _subscribeTotal; i++)
                {
                    string tag = String.Format("{0}.{1}", _testTage, i.ToString());
                    Console.WriteLine(tag);
                    string _testTagData = plcDriver.Read(tag);
                    Console.WriteLine(_testTagData);
       
                    someDataContainer.Add(_testTagData);
                }
                _subscribeCount++;

                Console.WriteLine("Finished Subscribing.");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.TargetSite.Name);
            }
Still just trying to figure out this thing called Life.

PJonHar

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Subscribe - EIPTransport.SendData Error, No Callback
« Reply #16 on: February 28, 2020, 06:10:42 AM »
I already have a work around for the unknown issue with my subscription method.
I have a timer based on a given timespan that uses the same code.

Code: [Select]
private void tagTimer_Tick(object sender, EventArgs e)
        {
            string tag;
            PropertyInfo[] properties = typeof(K_AutoExternal).GetProperties();
            foreach (PropertyInfo property in properties)
            {
                tag = String.Format("{0}.{1}", AEXParentTag, property.Name);
                ParseData(tag, PLC.Read(tag));
            }
        }

I would still like to try and identify why my subscription does not work.

PJonHar

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Subscribe - EIPTransport.SendData Error, No Callback
« Reply #17 on: March 04, 2020, 05:01:07 AM »
Is there a way to enable logging on the comms driver?

Regarding the above, does anyone know?

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Subscribe - EIPTransport.SendData Error, No Callback
« Reply #18 on: March 04, 2020, 12:02:00 PM »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Subscribe - EIPTransport.SendData Error, No Callback
« Reply #19 on: April 06, 2020, 09:18:59 AM »
Beta 35 may possibly fix this

PJonHar

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Subscribe - EIPTransport.SendData Error, No Callback
« Reply #20 on: May 14, 2020, 10:33:20 AM »
Beta 35 may possibly fix this

I have just tested Beta 36, and i can confirm this is now working (i.e. the subscriptions are working as expected).
Thanks.