RapidData "hidden GeneralException" on FP SDK 5.14
Hi,
I have found a "hidden ABB.Robotics.GeneralException" by console connection to controller when I try to get a RapidData that is not present in a specific system module. I need to know if this RapidData is present to do some things or if not present to do other...
If RapidData is present there aren't "hidden exception" and "[Fp]: ...." message from console.
now a piece of my code:
...
Task[] tasks = controller.Rapid.GetTasks();
try
{
Trace.WriteLine(string.Format("DataController() -> getting RapidData _EFdo"));
RapidData _EFdo = tasks[0].GetRapidData("SM_CONF", "EFDoButtons");
//"SM_CONF" is my system module and always is present, "EFDoButtons" if present is a CONS string
if(_EFdo != null)
{
// do some things...
}
else
{
// do other things...
}
}
catch(ArgumentNullException ex) //as wrote on FP SDK about working with RapidData in "Using the FlexPendant SDK - Using the Controller API - Rapid domain"
{
Trace.Fail(string.Format("DataController() Error: -> RapidData EFDoButtons is not present in SM_CONF " + ex.Message));
}
I tryed also with "ABB.Robotics.GeneralException" instead of "ArgumentNullException" in catch statement but on HyperTeminal always I can read this message from FP:
[fpsdk]: DataController() -> getting RapidData _EFdo
[fp]: -------------------------------------------
We have a hidden exception:
ExceptionType: ABB.Robotics.GeneralException
Caught at GetRapidData2 in ABB.Robotics.Controllers/Rapid.cs
Message: SYS_CTRL_E_NO_SUCH_SYMBOL: RAPID symbol was not found.
Error Code: (0xc0049000)
SYS_CTRL_E_NO_SUCH_SYMBOL: RAPID symbol was not found.
ERROR: rapid.c[1954]: org_code: -1162 new_code: 0xc0049000; RobSymbolSearchImpl.
cpp[160]; AdaptRapidCommon.h[1929]; AdaptRapid.cpp[996]; ABB.Robotics.GeneralEx
ception at GetRobSymbolDynamic in Dcl.rapid/AdaptRapid.cs
at ABB.Robotics.Dcl.ExceptionHelp.GenerateExceptionBasedOnHResult(String objS
tr, String method, ReturnCodeRobAPI hRes, String info)
at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(String objStr, String met
hod, ReturnCodeRobAPI hRes, ReturnCodeRobAPI[] expectedErrors, String lastErrorD
esc, String[] additionalinfo)
at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(String objStr, String met
hod, ReturnCodeRobAPI hRes, ReturnCodeRobAPI[] expectedErrors, String lastErrorD
esc)
at ABB.Robotics.Dcl.Rapid.AdaptRapid.GetRobSymbolDynamic(Int32 rapidClient, S
tring symbolUrl, RobSymbolDynamic& symData)
at ABB.Robotics.Dcl.Rapid.Rapid.GetRobSymbolDynamic(String Url)
at ABB.Robotics.Controllers.RapidDomain.Rapid.GetRapidData2(Rapid dclRapid, S
tring blockUrl, String[] rapidData)
at ABB.Robotics.Controllers.RapidDomain.Task.GetRapidData(String[] rapidData)
at EasyFlex.DataController..ctor(EasyFlex _gui)
at EasyFlex.EasyFlex.ABB.Robotics.Tps.Taf.ITpsViewSetup.Install(Object sender
, Object data)
at ABB.Robotics.Tps.SDK.Base.SDKViewWrapper.Install(Object tafSite, Object in
itData)
at ABB.Robotics.SDK.Views.EasyFlex.Install(Object tafSite, Object initData)
at ABB.Robotics.WinCore.TPAppFwk.Runtime.TacController.SetupItem(Object& item
, Object initData)
at ABB.Robotics.WinCore.TPAppFwk.Runtime.TafMaster.CreateItem(TacLaunchInfo&
launchInfo, TacContext& context, Boolean setAsActiveCtrl, Boolean sysItem)
at ABB.Robotics.WinCore.TPAppFwk.Runtime.TafMaster.ABB.Robotics.WinCore.TPApp
Fwk.Runtime.ITafMaster.CreateItem(TacLaunchInfo& launchInfo, TacContainerContext
& containerContext)
at ABB.Robotics.WinCore.TPAppFwk.SiteServices.ABB.Robotics.WinCore.TPAppFwk.B
ase.ITafSite.LaunchTPAppControl(TacLaunchInfo& launchInfo, TacContainerContext&
containerContext)
at ABB.Robotics.Tps.Controls.TpsABBMenu.ListView_ItemActivated(Object sender,
EventArgs e)
at ABB.Robotics.Tps.Windows.Forms.ListView.OnItemActivate(EventArgs e)
at ABB.Robotics.Tps.Windows.Forms.ListView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.ContainerControl.WnProc(WM wm, Int32 wParam, Int32 lP
aram)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lP
aram)
at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
at System.Windows.Forms.Application.Run(Form fm)
at ABB.Robotics.WinCore.TPAppFwk.MainFrame.Start()
at ABB.Robotics.WinCore.TPAppFwk.TafApp.Start()
at ABB.Robotics.WinCore.TPAppFwk.TafApp.Main(String[] args)
END (at 615684)
-------------------------------------------
[fpsdk]: DataController() -> ..........
[fpsdk]: DataController() -> ..........
[fpsdk]: DataController() -> ..........
- Is normal this message also if my get statement is in try/catch block?? where is wrong?
- This hidden exception ban create some problems for the proper execution of the application? (yes, I'm always verify if my variabile if "null" before using it).
Regards
Emanuele
I have found a "hidden ABB.Robotics.GeneralException" by console connection to controller when I try to get a RapidData that is not present in a specific system module. I need to know if this RapidData is present to do some things or if not present to do other...
If RapidData is present there aren't "hidden exception" and "[Fp]: ...." message from console.
now a piece of my code:
...
Task[] tasks = controller.Rapid.GetTasks();
try
{
Trace.WriteLine(string.Format("DataController() -> getting RapidData _EFdo"));
RapidData _EFdo = tasks[0].GetRapidData("SM_CONF", "EFDoButtons");
//"SM_CONF" is my system module and always is present, "EFDoButtons" if present is a CONS string
if(_EFdo != null)
{
// do some things...
}
else
{
// do other things...
}
}
catch(ArgumentNullException ex) //as wrote on FP SDK about working with RapidData in "Using the FlexPendant SDK - Using the Controller API - Rapid domain"
{
Trace.Fail(string.Format("DataController() Error: -> RapidData EFDoButtons is not present in SM_CONF " + ex.Message));
}
I tryed also with "ABB.Robotics.GeneralException" instead of "ArgumentNullException" in catch statement but on HyperTeminal always I can read this message from FP:
[fpsdk]: DataController() -> getting RapidData _EFdo
[fp]: -------------------------------------------
We have a hidden exception:
ExceptionType: ABB.Robotics.GeneralException
Caught at GetRapidData2 in ABB.Robotics.Controllers/Rapid.cs
Message: SYS_CTRL_E_NO_SUCH_SYMBOL: RAPID symbol was not found.
Error Code: (0xc0049000)
SYS_CTRL_E_NO_SUCH_SYMBOL: RAPID symbol was not found.
ERROR: rapid.c[1954]: org_code: -1162 new_code: 0xc0049000; RobSymbolSearchImpl.
cpp[160]; AdaptRapidCommon.h[1929]; AdaptRapid.cpp[996]; ABB.Robotics.GeneralEx
ception at GetRobSymbolDynamic in Dcl.rapid/AdaptRapid.cs
at ABB.Robotics.Dcl.ExceptionHelp.GenerateExceptionBasedOnHResult(String objS
tr, String method, ReturnCodeRobAPI hRes, String info)
at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(String objStr, String met
hod, ReturnCodeRobAPI hRes, ReturnCodeRobAPI[] expectedErrors, String lastErrorD
esc, String[] additionalinfo)
at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(String objStr, String met
hod, ReturnCodeRobAPI hRes, ReturnCodeRobAPI[] expectedErrors, String lastErrorD
esc)
at ABB.Robotics.Dcl.Rapid.AdaptRapid.GetRobSymbolDynamic(Int32 rapidClient, S
tring symbolUrl, RobSymbolDynamic& symData)
at ABB.Robotics.Dcl.Rapid.Rapid.GetRobSymbolDynamic(String Url)
at ABB.Robotics.Controllers.RapidDomain.Rapid.GetRapidData2(Rapid dclRapid, S
tring blockUrl, String[] rapidData)
at ABB.Robotics.Controllers.RapidDomain.Task.GetRapidData(String[] rapidData)
at EasyFlex.DataController..ctor(EasyFlex _gui)
at EasyFlex.EasyFlex.ABB.Robotics.Tps.Taf.ITpsViewSetup.Install(Object sender
, Object data)
at ABB.Robotics.Tps.SDK.Base.SDKViewWrapper.Install(Object tafSite, Object in
itData)
at ABB.Robotics.SDK.Views.EasyFlex.Install(Object tafSite, Object initData)
at ABB.Robotics.WinCore.TPAppFwk.Runtime.TacController.SetupItem(Object& item
, Object initData)
at ABB.Robotics.WinCore.TPAppFwk.Runtime.TafMaster.CreateItem(TacLaunchInfo&
launchInfo, TacContext& context, Boolean setAsActiveCtrl, Boolean sysItem)
at ABB.Robotics.WinCore.TPAppFwk.Runtime.TafMaster.ABB.Robotics.WinCore.TPApp
Fwk.Runtime.ITafMaster.CreateItem(TacLaunchInfo& launchInfo, TacContainerContext
& containerContext)
at ABB.Robotics.WinCore.TPAppFwk.SiteServices.ABB.Robotics.WinCore.TPAppFwk.B
ase.ITafSite.LaunchTPAppControl(TacLaunchInfo& launchInfo, TacContainerContext&
containerContext)
at ABB.Robotics.Tps.Controls.TpsABBMenu.ListView_ItemActivated(Object sender,
EventArgs e)
at ABB.Robotics.Tps.Windows.Forms.ListView.OnItemActivate(EventArgs e)
at ABB.Robotics.Tps.Windows.Forms.ListView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.ContainerControl.WnProc(WM wm, Int32 wParam, Int32 lP
aram)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lP
aram)
at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
at System.Windows.Forms.Application.Run(Form fm)
at ABB.Robotics.WinCore.TPAppFwk.MainFrame.Start()
at ABB.Robotics.WinCore.TPAppFwk.TafApp.Start()
at ABB.Robotics.WinCore.TPAppFwk.TafApp.Main(String[] args)
END (at 615684)
-------------------------------------------
[fpsdk]: DataController() -> ..........
[fpsdk]: DataController() -> ..........
[fpsdk]: DataController() -> ..........
- Is normal this message also if my get statement is in try/catch block?? where is wrong?
- This hidden exception ban create some problems for the proper execution of the application? (yes, I'm always verify if my variabile if "null" before using it).
Regards
Emanuele
0
Comments
-
Sorry that I don't have the time to make a proper test+answer. So I can't answer why you get the error you do.
Now as a workaround you can check if the data is there using SearchRapidSymbol before using it. Since you know where its location, name and type it shouldn't even be a drain on any resources.
But why do you use the tasks instead of direct access? Is it a multimove system?
For the lurkers; direct access is like this:
RapidData rd = aController.Rapid.GetRapidData("T_ROB1", "USER", "reg1");John
Developer Center0 -
Hi John,
tank you for you answer and suggestion. Don't worry if you haven't time to try it, mee too and with too many things to do..
About your questions:
The system is not a multi move, I probably made ?_<?_<a</span> misuse of "tasks[..].GetRapidData(..)" method.
So I'll try to use first "SearchRapidSymbol" and after "...Rapid.GetRapidData(..)" to see the other any "new" messange by console connection with controller, and I'll get to you a right feedback about it.
Tank you very much
regards Emanuele
0 -
Hello,
I have tried with direct access "acontroller.Rapid.GetRapidData("T_ROB1", "MyModule", "MyVar");" but the problem it's same..
0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings