Hi,
Your definition is on global scope so it runs only once upon saving/compiling (thus, nothing happens when you click it). Now, when you start clicking on the actual signal itself you have to “catch” the signal via an event. This event is called OnSignal that gives you a type of VcSignal as its argument.
Now you can filter out the signal types and give whatever logic you wish via if statements. You can also check this thread on emergency stops with robots:
br,
Lefa