Unhandled exception. libplctag.LibPlcTagException: ErrorNotFound

234 views
Skip to first unread message

Cory Podojil

unread,
Oct 28, 2021, 2:11:47 PM10/28/21
to libplctag
Unhandled exception. libplctag.LibPlcTagException: ErrorNotFound
at libplctag.NativeTagWrapper.ThrowIfStatusNotOk(Nullable`1 status)
at libplctag.NativeTagWrapper.Dispose()
at libplctag.NativeTagWrapper.Finalize()

Not sure how to fix this?? Using C# library, I have try/catches around EVERYTHING that uses the library -- including LibPlcTagException and generic Exceptions. What the hell am I doing wrong here?

Cory Podojil

unread,
Oct 28, 2021, 3:14:46 PM10/28/21
to libplctag
Well, guess I'm just the dummy -- updated to most recent package and no longer getting these errors. :)

Kyle

unread,
Oct 28, 2021, 8:15:01 PM10/28/21
to libplctag
You should probably update again.  Tim just updated the .Net library to include the latest 2.4.2 core C DLL.  That DLL has an important bug fix for listing tags.

Best,
Kyle

Ashfaq Ahamed

unread,
Jun 19, 2022, 11:18:27 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
Reply all
Reply to author
Forward
0 new messages