New: Unhandled exception. libplctag.LibPlcTagException: ErrorNotFound

145 views
Skip to first unread message

Ashfaq Ahamed

unread,
Jun 19, 2022, 11:20:57 PM6/19/22
to libplctag
Hi, I am getting this error -  Unhandled exception. libplctag.LibPlcTagException: ErrorNotFound - i'm using Visual Studio 2022, i'm dummy here. Can someone help what may be wrong in my code?

using libplctag;
using libplctag.DataTypes;
using System;
using System.Net;
using System.Threading;

namespace CSharpDotNetCore
{
    class SimpleExample
    {
        public static void Main(string[] args)
        {

            var myTag = new Tag<DintPlcMapper, int>()
            {
                Name = "PROGRAM:ROVITESTING.TEST_DINT",
                //Name = "ROVITESTING",
                Gateway = "192.168.1.110",
                Path = "1,0",
                PlcType = PlcType.ControlLogix,
                Protocol = Protocol.ab_eip,
                Timeout = TimeSpan.FromSeconds(10)
            };

            //Initialize the tag to set up structures and prepare for read/write
            //This is optional as an optimization before using the tag
            //If omitted, the tag will initialize on the first Read() or Write()
            myTag.InitializeAsync();

            //The value is held locally and only synchronized on Read() or Write()
            //myTag.Value = 3737;

            //Transfer Value to PLC
            //myTag.Write();

            //Transfer from PLC to Value
            myTag.Read();

            //Write to console
            int myDint = myTag.Value;
            Console.WriteLine(myDint);
            Console.ReadKey();
        }
    }
}
libplceerrornotfound.png

Kyle

unread,
Jun 20, 2022, 10:38:00 PM6/20/22
to libplctag
I think you need to raise this on the .Net wrapper issue list.   Have you tried one of the example programs from the .Net wrapper library to make sure everything is installing correctly and working before you try your own code?

Best,
Kyle
Reply all
Reply to author
Forward
0 new messages