Interface DCPower

    • Method Detail

      • getDescription

        static java.lang.String getDescription()
      • turnOn

        void turnOn()
             throws java.io.IOException,
                    DeviceException
        Enables the output of the power supply
        Specified by:
        turnOn in interface ISource
        Specified by:
        turnOn in interface Switch
        Specified by:
        turnOn in interface VSource
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • setOn

        default void setOn​(boolean on)
                    throws java.io.IOException,
                           DeviceException
        Enables or disables output of the power supply
        Specified by:
        setOn in interface Switch
        Parameters:
        on - Output enabled?
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • isOn

        boolean isOn()
              throws java.io.IOException,
                     DeviceException
        Returns whether the output of the supply is enabled or not
        Specified by:
        isOn in interface ISource
        Specified by:
        isOn in interface Switch
        Specified by:
        isOn in interface VSource
        Returns:
        Is it enabled?
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • setVoltage

        void setVoltage​(double voltage)
                 throws java.io.IOException,
                        DeviceException
        Sets the voltage output level of the supply
        Specified by:
        setVoltage in interface VSource
        Parameters:
        voltage - Voltage, in Volts
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • setCurrent

        void setCurrent​(double current)
                 throws java.io.IOException,
                        DeviceException
        Sets the current output level of the supply
        Specified by:
        setCurrent in interface ISource
        Parameters:
        current - Current, in Amps
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • getVoltage

        double getVoltage()
                   throws java.io.IOException,
                          DeviceException
        Returns the voltage output of the supply
        Specified by:
        getVoltage in interface VSource
        Returns:
        Output voltage, in Volts
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • getCurrent

        double getCurrent()
                   throws java.io.IOException,
                          DeviceException
        Returns the current output of the supply
        Specified by:
        getCurrent in interface ISource
        Returns:
        Output current, in Amps
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • setVoltageLimit

        void setVoltageLimit​(double limit)
                      throws java.io.IOException,
                             DeviceException
        Sets the voltage limit, also known as over-voltage protection. Setting a value of zero will disable this limit.
        Parameters:
        limit - Voltage limit, in Volts
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • getVoltageLimit

        double getVoltageLimit()
                        throws java.io.IOException,
                               DeviceException
        Returns the currently set voltage limit (OVP). Zero means no limit is set.
        Returns:
        Voltage limit, in Volts
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • setCurrentLimit

        void setCurrentLimit​(double current)
                      throws java.io.IOException,
                             DeviceException
        Sets the current protection limit
        Parameters:
        current - limit [A]
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
      • waitForStableVoltage

        default void waitForStableVoltage​(double pctError,
                                          long time)
                                   throws java.io.IOException,
                                          DeviceException,
                                          java.lang.InterruptedException
        Wait for the voltage output of the supply to be stable within the given percentage margin and time-frame
        Parameters:
        pctError - Margin of error, percentage
        time - Minimum time for voltage to be considered stable, milliseconds
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
        java.lang.InterruptedException
      • waitForStableCurrent

        default void waitForStableCurrent​(double pctError,
                                          long time)
                                   throws java.io.IOException,
                                          DeviceException,
                                          java.lang.InterruptedException
        Wait for the current output of the supply to be stable within the given percentage margin and time-frame
        Parameters:
        pctError - Margin of error, percentage
        time - Minimum time for voltage to be considered stable, milliseconds
        Throws:
        java.io.IOException - Upon communication error
        DeviceException - Upon device compatibility error
        java.lang.InterruptedException