Hi,
I am using RoboDK C# API to create my project.
I met the problem shown in the attachment picture.
The code is here:
line1: if (!MainVM.Instance.mRobot.Valid()) return;
line2: if (!MainVM.Instance.mRoboDK.Connected()) return;
line3: if (MainVM.Instance.mRobot.Busy()) return;
The 'mRoboDK' is an instance of the interface IRoboDK;
The 'mRobot' is an instance of the interface IItem. In this case it is a robot loaded into the RoboDK.
It's weird that the line1 and line2 work fine. But the line3 has the error:"RoboDk.API.Exceptions.RdkException:“Invalid item provided: The item identifier provided is not valid or it does not exist.”"
In fact there are two threads in my project. I use the 'mRobot' in both threads. If I only leave one of these threads, everything works fine. If I use both, the same error will occur randomly.
Thanks for any advice or suggestion.
I am using RoboDK C# API to create my project.
I met the problem shown in the attachment picture.
The code is here:
line1: if (!MainVM.Instance.mRobot.Valid()) return;
line2: if (!MainVM.Instance.mRoboDK.Connected()) return;
line3: if (MainVM.Instance.mRobot.Busy()) return;
The 'mRoboDK' is an instance of the interface IRoboDK;
The 'mRobot' is an instance of the interface IItem. In this case it is a robot loaded into the RoboDK.
It's weird that the line1 and line2 work fine. But the line3 has the error:"RoboDk.API.Exceptions.RdkException:“Invalid item provided: The item identifier provided is not valid or it does not exist.”"
In fact there are two threads in my project. I use the 'mRobot' in both threads. If I only leave one of these threads, everything works fine. If I use both, the same error will occur randomly.
Thanks for any advice or suggestion.