devctrl.devices.led_controller.impl.thorlabs_dc2200.DC2200#
- class DC2200(instr: Resource)[source]#
Bases:
LedControllerControl Thorlabs DC2200 LED controller
This controller works only when the LED is connected to Terminal 2.
- Parameters:
instr – pyvisa Resource object for the LED controller
Methods
Manually add a specific device.
allow_only_dummy_devicesConnect to a DC2200 LED controller
Connect an instance of the device's dummy implementation
Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}
Get the current brightness percentage
Get controller capabilities
Get the current LED current in amperes
Get the LED head name and model information
Get the current operating mode
Query the status of the device and return a string describing errors.
Check if the device is connected and responding
Get a list of all devices for this type.
Set the LED brightness to 0%
Set the LED brightness to 100%
Send a query to the device and return the response
Set the LED brightness percentage
Set the LED current in amperes
Set the LED controller operating mode
Attributes
BRIGHTNESS_ON_OFFBRIGHTNESS_PERCENTVALID_BRIGHTNESS_PERCENTVALID_MODE- classmethod add_device(connect_info)#
Manually add a specific device. The device will show up when list_devices() is called for the device type. Call this from the device class implementation, e.g. use ModelXYZ9000.add_device(‘GPIB:1234:5678’) to add a specific device with a fixed GPIB address. This is useful when automatic discovery is undesired/impossible, either because it is not implemented or it disturbs other devices which can’t handle a identification request. :param cls: The device implementation class :param connect_info: A string argument that is passed to the connect() method of the device implementation, when the device is being connected.
- classmethod connect(device_type_name: str, device_name: str | None, **kwargs) Device#
- Parameters:
device_type_name – The name of the device class
device_name – The name of the device class
- classmethod connect_device(name)[source]#
Connect to a DC2200 LED controller
Opens a VISA connection to the specified device and returns a configured instance.
- Parameters:
name – VISA resource name of the device
- Returns:
Configured DC2200 instance
- classmethod connect_dummy(**kwargs) Device#
Connect an instance of the device’s dummy implementation
- classmethod get_base_classes(recurse=True) dict[str, type[Device]]#
Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}
- get_brightness_percent()[source]#
Get the current brightness percentage
- Returns:
Current brightness level (0-100)
- get_capabilities() int[source]#
Get controller capabilities
Returns a bitmask indicating supported features.
- Returns:
Capabilities bitmask (BRIGHTNESS_PERCENT)
- get_current_A()[source]#
Get the current LED current in amperes
Current can only be read when the device is in CC (constant current) or TTL mode.
- Returns:
Current in amperes
- Raises:
RuntimeError – If device is not in CC or TTL mode
- classmethod get_device_name() str#
- Returns:
The specific type name of the device, e.g., SR830 or Keithly2600
- classmethod get_device_type_name() str#
- Returns:
The general type name of the device, e.g., Lock-In Amplifier or Voltmeter
- get_led_name() None | str[source]#
Get the LED head name and model information
- Returns:
LED name string or None if not available
- get_status() str#
Query the status of the device and return a string describing errors. If everything is ok, empty string must be returned :return: String of device status
- is_connected() bool[source]#
Check if the device is connected and responding
Queries the device identification string to verify connection.
- Returns:
True if device responds to *IDN? query, False otherwise
- classmethod list_devices() list[tuple[str, str]]#
Get a list of all devices for this type. The list made up of: - Manually added devices - Available devices (those returned by _enumerate_devices) - A dummy device (if a dummy implementation exists) - List of all devices of child classes
- Returns:
list of available devices
- query(query: str) str[source]#
Send a query to the device and return the response
- Parameters:
query – SCPI query string to send
- Returns:
Response string with newline stripped
- set_brightness_percent(level: int)[source]#
Set the LED brightness percentage
- Parameters:
level – Brightness level (0-100)