# Danfysik 8500 Power Supply

class `pymeasure.instruments.danfysik.``Danfysik8500`(port)

  Bases: `pymeasure.instruments.instrument.Instrument`

  Represents the Danfysik 8500 Electromanget Current Supply and provides a high-level interface for interacting with the instrument

  To allow user access to the Prolific Technology PL2303 Serial port adapter in Linux, create the file: `/etc/udev/rules.d/50-danfysik.rules`, with contents:

      SUBSYSTEMS=="usb",ATTRS{idVendor}=="067b",ATTRS{idProduct}=="2303",MODE="0666",SYMLINK+="danfysik"

  Then reload the udev rules with:

      sudo udevadm control --reload-rules
      sudo udevadm trigger

  The device will be accessible through the port `/dev/danfysik`.

  `add_ramp_step`(current)

    Adds a current step to the ramp set.

    Parameters: | current – A current in Amps

  `clear_ramp_set`()

    Clears the ramp set.

  `clear_sequence`(stack)

    Clears the sequence by the stack number.

    Parameters: | stack – A stack number between 0-15

  `current`

    The actual current in Amps. This property can be set through `current_ppm`.

  `current_ppm`

    The current in parts per million. This property can be set.

  `current_setpoint`

    The setpoint for the current, which can deviate from the actual current (`current`) while the supply is in the process of setting the value.

  `disable`()

    Disables the flow of current.

  `enable`()

    Enables the flow of current.

  `id`

    Reads the idenfitication information.

  `is_current_stable`()

    Returns True if the current is within 0.02 A of the setpoint value.

  `is_enabled`()

    Returns True if the current supply is enabled.

  `is_ready`()

    Returns True if the instrument is in the ready state.

  `is_sequence_running`(stack)

    Returns True if a sequence is running with a given stack number

    Parameters: | stack – A stack number between 0-15

  `local`()

    Sets the instrument in local mode, where the front panel can be used.

  `polarity`

    The polarity of the current supply, being either -1 or 1. This property can be set by suppling one of these values.

  `ramp_to_current`(current, points, delay_time=1)

    Executes `set_ramp_to_current()` and starts the ramp.

  `remote`()

    Sets the instrument in remote mode, where the the front panel is disabled.

  `reset_interlocks`()

    Resets the instrument interlocks.

  `set_ramp_delay`(time)

    Sets the ramp delay time in seconds.

    Parameters: | time – The time delay time in seconds

  `set_ramp_to_current`(current, points, delay_time=1)

    Sets up a linear ramp from the initial current to a different current, with a number of points, and delay time.

    Parameters:

    - current – The final current in Amps
    - points – The number of linear points to traverse
    - delay_time – A delay time in seconds

  `set_sequence`(stack, currents, times, multiplier=999999)

    Sets up an arbitrary ramp profile with a list of currents (Amps) and a list of interval times (seconds) on the specified stack number (0-15)

  `slew_rate`

    The slew rate of the current sweep.

  `start_ramp`()

    Starts the current ramp.

  `start_sequence`(stack)

    Starts a sequence by the stack number.

    Parameters: | stack – A stack number between 0-15

  `status`

    A list of human-readable strings that contain the instrument status information, based on `status_hex`.

  `status_hex`

    The status in hexadecimal. This value is parsed in `status` into a human-readable list.

  `stop_ramp`()

    Stops the current ramp.

  `stop_sequence`()

    Stops the currently running sequence.

  `sync_sequence`(stack, delay=0)

    Arms the ramp sequence to be triggered by a hardware input to pin P33 1&2 (10 to 24 V) or a TS command. If a delay is provided, the sequence will start after the delay.

    Parameters:

    - stack – A stack number between 0-15
    - delay – A delay time in seconds

  `wait_for_current`(has_aborted=<function Danfysik8500.<lambda>>, delay=0.01)

    Blocks the process until the current has stabilized. A provided function `has_aborted` can be supplied, which is checked after each delay time (in seconds) in addition to the stability check. This allows an abort feature to be integrated.

    Parameters:

    - has_aborted – A function that returns True if the process should stop waiting
    - delay – The delay time in seconds between each check for stability

  `wait_for_ready`(has_aborted=<function Danfysik8500.<lambda>>, delay=0.01)

    Blocks the process until the instrument is ready. A provided function `has_aborted` can be supplied, which is checked after each delay time (in seconds) in addition to the readiness check. This allows an abort feature to be integrated.

    Parameters:

    - has_aborted – A function that returns True if the process should stop waiting
    - delay – The delay time in seconds between each check for readiness