For generic software, you would have a library of functions and configuration pertaining to the model selected, mapping to the functions in the UI. If the hardware doesn't support a specific function, you would hide it in the UI.
For example, if you have a power supply, it might be 1,2, or 3 channels. In the config for the model you have, it would define the number of channels, and the UI would be generated appropriately to match that configuration. If the voltage range is -/+ 10V, then the UI wouldn't let you set anything beyond that, etc.
I'm going to talk myself into writing something, aren't I?