Hi, in short yes, it is programmer job to teach homing trajectory.
As for DCS CPC, it is used for safety robot detection and stopping. So it is not collision avoidance.
Apart from PLC you can use internal variables F or R to save state and then use it in logic
For homing there are multiple solutions>
1. In each point on trajectory set value to variable (GO or R), then you can jump in program based on value, or you can create separate program with trajectories for groups of values.
ex. J P5 .... DB 0, R10=5
and in homing you use JMP LBL[R10].
or IF R10==5 THEN JMP LBL 5
or IF R10>5 AND R10<8 THEN trajectory ENDIF
2. You create world zones (space fnc?) with DO signals and use them to check where is robot tcp, then you create trajectories from each zone.
ex. IF DO5 THEN trajectory ENDIF
3. You can check actual robot position in world, and use relative movements / offsets to go to free space (like welding table), then drive home.
ex. PR[5,3]=-100, (in Z)
PR[10]=LPOS
L PR[10] ... TOOL_OFFSET PR[10]
Or in some cases, like palletization, you can just send robot in Z to specific height and then go directly to home.
ex. PR[10]=LPOS,
PR[10,3] = 2000, setting Z value
J PR[10] ....
You can also read JPOS values and create logic from there.
I think most common approach is in example 1. but all depends on what is most effective for your application.