RobotStudio event

Is there any simple method to globally rename a task in the whole project?

Options
I have created some project that incorporates two tasks.
At first I didn't pay much attention to the names of these tasks, so I have T_ROB1 and T_ROB2.
I programmed lots of procedures, functions, targets, ... configured a template controller together with its options, I/O System, etc.
Now this decision has consequences as what I create will become a standard and a template for future applications/cells. 
I need to make a bit more systematic and clear naming standard.
I would like to force suppliers to use a template project and a specific naming convention.
For example task names:
Rx_T_p
x - robot number - 1, 2, 3, ...
y - task number - 1, 2, 3, ...
p - task purpose, M - motion, C - communication

So in the template project I have two tasks:
Rx_T_M
Rx_T_C

When some supplier receives this template they should use our standard naming convention and adjust the above names according to project specification.
So if for example there are 2 robots the names should be modified as follows:
In robot 1:
R1_T_M
R1_T_C

In robot 2:
R2_T_M
R2_T_C

Of course I can right-click Rx_T_M, use Rename Program to R1_T_M, then right-click again and Save Program As... R1_T_M and do the same with Rx_T_C but...

To change the task name I use ... -> Configuration -> Controller -> Task, right-click Rx_T_M select Edit Task(s)... and type R1_T_M And likewise for Rx_T_C
Now I restart the controller and firs problems appear. 
Controller doesn't start because there is wrong Main Entry set as - main.
Such a routine does not exist because the name of the task was changed and now the controller cannot load a proper program and modules.
OK 
Just temporarily I use ... -> Configuration -> Controller -> Task, right-click R1_T_C select Edit Task(s)... and change Main Entry from - main, to empty string.
Now restart the controller.
And another problem shows.
I forgot I set up System Output section of Configuration-> I/O System and connected the oFaultPresent output to Status - ExecutionError and Argument 2 - Rx_T_C so  I adjust it to R1_T_C and restart...

But wait, is it all???
Have I used Rx_T_C only in one place.
Lets suppose so...
So now I can finally load the previously saved programs to R1_T_M from ..\User Files\R1_T_M and to R1_T_C from ..\User Files\R1_T_C 

It doesn't look nice. What if I used task names in some other places or have more mechanical units and would like to change their names also?

Is there any feature which could overview this kind of adjustments globally?
So when you want to change the task name then this feature would tell you that you all other places it was used and help you modify them?

Answers

  • lemster68
    lemster68 ✭✭✭
    Options
    In a situation like this, I would make my own custom system parameters which would be loaded to the robot controller. Small example to follow: # CAB_TASKS: -Name "T_ROB1" -Type "NORMAL" -MotionTask -Name "T_FAULT" -Task_in_forground "T_ROB1" -TrustLevel "SysStop" -Name "T_UTIL" -Task_in_forground "T_ROB1" -TrustLevel "SysStop" -Name "T_SRVG" -TrustLevel "SysStop" -Name "T_GRIP" -TrustLevel "None" # There may be some others that you will need to address, as well.
    Lee Justice