Power Supply Instrument Control

I am wondering if I can use the power supply channel as a instrument class but not a whole instrument.

There are some power supplies in my system, which are Rigol 1116A (two channels) for high current, N6700C with 4 modules for normal use. Depends on my DUT, some is OK with N6700, some need to use N6700 and Rigol 1116A. My current idea is in the test step code, I set the power channel as an instrument. When setting up the instrument in editor, I need to assign the address and channel number. For example, I have 4 power supply instrument instance, all of them use the same visa address (N6700’s address) but assign different channel number and 2 Rigol 1116A instrument instance. So that I don’t need to write different test code, just only to assign the proper power supply instance. I know as the test plan start, the instrument will be opened at first, would this 4 instance with same address fail when the first visa address have been opened?

Is it possible? I don’t have the N6700 on hand now. Looking forward to your feedback, if you have other idea, we can discuss.

1 Like

I think it sounds like a good design. Maybe you should make a kind of N6700 ‘base’/‘chassis’ instrument and have each N6700 ‘channel’ instrument reference that. This way you can use the N6700 ‘base’ as a SCPI instrument.

This way, the channel instrument is kind of a slice of the N7600 instrument.

OpenTap understands dependencies between instruments and makes sure they are opened in the right order.

public class N6700Chassis: ScpiInstrument{

public class N6700Channel : Instrument, IPowerSupply{
      // N6700Channel 'depends' on N6700 Chassis.
      // it is guaranteed that Chassis will be opened before Channel, 
      // and closed after channel
      public N6700Chassis Chassis{get;set;}
      public int ChannelNumber{get;set;}
1 Like

Hi Rolf,

Do you have the N6700 on hand?
I am wondering if I have two N6700Channel instance (share a same N6700Chassis), the OpenTAP would report error. Since the N6700Chassis is already opened.