RobotStudio event

RS 6.06 & 6.07 with RW5.61: Visual SafeMove error when tooldata array defined.

DenisFR
DenisFR ✭✭✭
Hello,

When using tooldata array greater than 5 aggregates, Visual SafeMove doesn't works.
To reproduce:
1. Create a new station with controller.
2. RW: 5.61.08, IRB6700 150Kg 3.2m
3. Check Customize options
4. Create
5. In DriveModule1, select option: 810-2 SafeMove, OK
6. In Controller tab, open Safety - Visual SafeMove
7. You get clean SafeMove parameters.
8. In Rapid tab, Module1 add tooldata array definition:
&nbsp;&nbsp;&nbsp; PERS tooldata taTool{5}:=[[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [0, 0, 0.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [0, 0, 0.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [0, 0, 0.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [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.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [0, 0, 0.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [0, 0, 0.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TRUE,[[0,0,0],[1,0,0,0]],[0.001, [0, 0, 0.001],[1, 0, 0, 0], 0, 0, 0]]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ];
12. You get an Unhandled exception, answer NO:
RobotStudio .NET exception: Object reference not set to an instance of an object.
============================================
Base exception: NullReferenceException
Object reference not set to an instance of an object.
   at SafeMove2AddIn.GUI.SafeMoveBase.ViewModels.ToolDataViewModel.GetInitialExpressionElements(String expression, Int32 numberElements)
   at SafeMove2AddIn.GUI.SafeMoveBase.ViewModels.ToolDataViewModel.ToolDataDeclToArray(String decl)
   at SafeMove2AddIn.GUI.SafeMoveBase.ViewModels.ToolDataViewModel.<GetTools>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SafeMove2AddIn.GUI.SafeMoveBase.ViewModels.MechanicalUnitGroupViewModel.<UpdateToolDataList>d__70.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SafeMove2AddIn.GUI.SafeMoveBase.ViewModels.MechanicalUnitGroupViewModel.<RapidChanged>d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
13. Return to Visual SafeMove, all seems OK.
14. Close SafeMove
15. Reopen it in Controller tab, Safety - Visual SafeMove
16. You get an empty SafeMove parameters list.
17. Save Station, close RobotStudio, open station.
18. Wait Controller started.
19. Open Visual SafeMove
20. You get an empty SafeMove parameters list without any error.

If you do that with a real controller, it's the same.
Tested with 6.xx RW, all works fine.

Comments