# Use same test step for different instruments

**URL:** <https://forum.opentap.io/t/use-same-test-step-for-different-instruments/1283>\
**Category:** Technical\
**Tags:** python\
**Created:** [October 24, 2023, 11:21am UTC](https://forum.opentap.io/t/use-same-test-step-for-different-instruments/1283 "2023-10-24T11:21:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schoepfel](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@schoepfel](https://forum.opentap.io/u/schoepfel)\
**Post date:** [October 24, 2023, 11:21am UTC](https://forum.opentap.io/t/use-same-test-step-for-different-instruments/1283/1 "2023-10-24T11:21:47Z")

</div>

Hello,

I am working with different SCPI devices and have created a class for each SCPI device. Some methods are the same for each device., e.g. getting the ID of the insturment with "\*IDN? ". I want to create a test step that requests the ID of the instrument and I want to be able to select the instrument that I want the ID from in the Editor X. I thought this should be easy but I do not understand how this is done because test steps are directly connected to an instrument , e.g. in the BasicFunctionality Python example the test step BasicFunctionality works only with instrument BasicInstrument

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/1X/44247d318e1d91d0a374c3361e40b2e52149f984.png)

How can I make _Instrument_ to be for example one of three possible Instrument classes?

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [October 24, 2023, 12:35pm UTC](https://forum.opentap.io/t/use-same-test-step-for-different-instruments/1283/2 "2023-10-24T12:35:14Z")

</div>

Hi @schoepfel and welcome to the forum!

The instrument settings is being created at

```python
    Instrument = property(BasicInstrument, None)\#...

```

The first argument to property is the instrument type. This can be the type or a base class of the type you want to be able to select. So if you have

- ScpiInstrument → DMM
- ScpiInstrument → PSU

Then if you do `property(ScpiInstrument #,...` then you can select either DMM or PSU.  
If you do `property(DMM #,...` Then only DMM instances can be used.
