Skip to content

Automatic Module‐Channel Configuration

ryanhardig edited this page Sep 25, 2025 · 2 revisions

Automatic Module-Channel Configuration for Coldbox

This page documents the new feature added to the Coldbox system that allows automatic module-channel configuration.


Overview

The Coldbox can test up to 8 modules simultaneously. Previously, channels were configured manually through JSON files. With the new feature, the GUI can now automatically assign channels in a coldbox setup.

Automatic assignment starts from the lowest available channel and respects the list of working channels defined in the configuration file.


Working Channels

siteConfig.py now includes a list called WorkingChannels, which defines the TEC channels available for use. By default, all 8 channels are active:

WorkingChannels = [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8
]

If you remove a channel number from this list, the system will skip that channel during module assignment. This is useful if a channel is broken or needs to be disabled.


Automatic vs. Manual Configuration

Automatic Configuration

  • Enabled when using a JSON file that contains the word auto in its filename.
  • Example: jsonFiles/instruments_osu_auto.json
  • ** NOTE ** It is important that the auto json file contains all channels. This is to ensure all devices turn off when pressing the 'Connect Devices' button.
{
    "instrument_dict": {
        "lv_1": {
            "class": "HMP4040",
            "resource": "ASRL/dev/ttyACM3::INSTR",
            "sim": false,
            "default_voltage": 1.8,
            "default_current": 3
        },
        "lv_2": {
            "class": "HMP4040",
            "resource": "ASRL/dev/ttyACM0::INSTR",
            "sim": false,
            "default_voltage": 1.8,
            "default_current": 3
        },
        "cb": {
            "class": "PSIColdbox",
            "resource": "TCPIP::coldbox::1883::SOCKET",
            "default_temperature": 5,
            "temperature_tolerance": 0.5,
            "validation_time": 20,
            "validation_timeout": 600
        },
        "hb": {
            "class": "PSIHVBox",
            "resource": "ASRL/dev/ttyACM2::INSTR",
            "channel_compliance": 5e-6
        },
        "hv": {
            "class": "Keithley2410",
            "resource": "ASRL/dev/ttyUSB0::INSTR",
            "sim": false,
            "default_voltage": -80,
            "default_current": 5e-6
        }
    },
    "channels_dict":{
        "0":{
            "lv": {"instrument":"lv_1", "channel":1},
            "cb": {"instrument":"cb", "channel":1},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "1":{
            "lv": {"instrument":"lv_1", "channel":2},
            "cb": {"instrument":"cb", "channel":2},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "2":{
            "lv": {"instrument":"lv_1", "channel":3},
            "cb": {"instrument":"cb", "channel":3},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "3":{
            "lv": {"instrument":"lv_1", "channel":4},
            "cb": {"instrument":"cb", "channel":4},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "4":{
            "lv": {"instrument":"lv_2", "channel":1},
            "cb": {"instrument":"cb", "channel":5},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "5":{
            "lv": {"instrument":"lv_2", "channel":2},
            "cb": {"instrument":"cb", "channel":6},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "6":{
            "lv": {"instrument":"lv_2", "channel":3},
            "cb": {"instrument":"cb", "channel":7},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "7":{
            "lv": {"instrument":"lv_2", "channel":4},
            "cb": {"instrument":"cb", "channel":8},          
            "hv": {"instrument":"hv", "channel":1}
        }
    }
}
  • The system automatically counts the number of modules input into the GUI and turns on the corresponding number of channels.
  • Channels are assigned sequentially from the lowest working channel available.
Screenshot 2025-09-25 112449

Manual Configuration

  • If you prefer to manually configure channel assignments, use a JSON file without the word auto in the filename.
  • This method follows the old system, where TEC channels are explicitly set within the JSON.
Screenshot 2025-09-25 114543

Usage Notes

  1. Inputting module count
  • Modules are entered into the GUI.
  • The system then turns on the correct number of channels based on the WorkingChannels list.

👉 [Insert screenshot of GUI where module count is entered]

  1. Broken channels
  • Remove broken channel numbers from the WorkingChannels list in the config file.
  • The system will automatically skip these when assigning channels.
  1. Switching between automatic and manual configuration
  • Use a JSON file with auto → automatic configuration.
  • Use a JSON file without auto → manual configuration.

Example Workflow

Suppose we are trying to test 4 modules SH0012, SH0013, SH0014, and SH0015, but let's say TECs 2 and 4 are not working at the moment. Let's run through what setting up the automatic configuration would look like.

  1. Update WorkingChannels in the config file to reflect working channels.
WorkingChannels = [
    1,
    3,
    5,
    6,
    7,
    8
]
  1. Select the appropriate JSON file:
  • *_auto.json → automatic setup.
  • Any other JSON → manual setup.
  1. Input the number of modules into the GUI.
Screenshot 2025-09-25 114451
  1. By the time the run window pops up, the device configuration has already changed. Without going through the tedious process of revising the json file, checking the channel numbers, checking the LV, the TECs, and so on... we have essentially changed our json file to look something like this:
    "channels_dict":{
        "0":{
            "lv": {"instrument":"lv_1", "channel":1},
            "cb": {"instrument":"cb", "channel":1},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "2":{
            "lv": {"instrument":"lv_1", "channel":3},
            "cb": {"instrument":"cb", "channel":3},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "4":{
            "lv": {"instrument":"lv_2", "channel":1},
            "cb": {"instrument":"cb", "channel":5},          
            "hv": {"instrument":"hv", "channel":1}
        },
        "5":{
            "lv": {"instrument":"lv_2", "channel":2},
            "cb": {"instrument":"cb", "channel":6},          
            "hv": {"instrument":"hv", "channel":1}
        }
    }