How does one set a "parameter" via a global variable

That is exactly why I asked you to give some more information about what en why you to achieve something. It can give people more insight to have a alternative solution. For me the id was the best solution because the device in was always the same, only the port changed sometimes.