RobotStudio event

How to trigger signal when mechanism pose is reached in smart component

Hi,

I want to trigger signals when poses of a mechanism are reached through a smart component by code behind.

For example, I would like an at close position signal triggered if a clamp reaches its close position.

How to achieve this?