Runtime Port Configuration

Hi,
I was wondering if there was a way in C++ to configure at runtime if a port was in use anymore.
If we had two outputs to the same input, was there a way to make switch between the two at runtime rather than having two outputs and two inputs and logic to handle which input was to be used.

Thanks

Hello CDrive,
the way is simple and very efficient, you only need a Flag_Variable. You can set the FlagVar in eHMI or connect it with a DI-Input-Signal:

if (FlagVar==true)
{
OutputVar = InputVar_A;
}
else
{
OutputVar = InputVar_B;
}

I hope it helps.

BR Eduard