Hi All
We have developed a python plugin for handling our power supply. The plugin shall be able to handle multiple plugins.
For know it can adjust the voltage and power on/off. Its using the comports.
The way we have implemented is:
The instrument itself we have a property input for the comport. We use the property in open() to open connection and Close() for closing the connection. Then we have a few methods to handle the functions like power on/off etc.
Then the plugin part simply use these functions.
In terms of use, we have in the Bench setup 4 power supplies. As we need different voltages to simulate a test.
When we use just one of the power supplies it work fine. no matter what power supply we chose in the test.
When we need to use multiple power supplies something is going wrong:
in the testplan/teststep we assign the input parameter to the instrument(Power supply).
When running the testplan with multiple power supplies it simply not using the right power supply. and that’s a bummer as then we sent wrong voltage to the DUT. The pattern I see is that opentap not making a new object for each power supply so it will just send commands to the last initialized comport.
To prove my findings and quick fix our issue, I have moved the open/close comport to each method. As then I am sure we link it to the right comport. This actually work but it really slow down the tests.
Anyone that have seen the same problem and having an idea to solve this?
Its not easy to explain but I have tried… I can of course share an example if my explanation doesn’t make sense:)
br
Martin