Universal Robots Forum

Convert input/output/register name into index

Is there a way of getting the index of an input, output or a register if I know its name (from Polyscope)?

I"m thinking of a reusable function for external device, where I would like to pass names of input/output/register as parameters.

For example I have a analog input with index 0 called PositionA and a digital output with index 10 called StartA. I want to use names StartA and PositonA as parameters of the function, but I don’t want to use their current values beacue the function will trigger the output and then will read the analog input.