Thanks Scotty for your omnidirectional reply
But would it work if TP is on ie robot is in teach mode also ? Because actually this DI will only get when robot TP is ON
SORRY I didn't share this info coz I didn't think it would matter.
Thanks guys for taking your time out to help me