ni / nimi-python

Python bindings for NI Modular Instrument drivers.
Other
112 stars 84 forks source link

Bypass NI cooling requirements #2062

Closed PeterKnauss closed 3 months ago

PeterKnauss commented 3 months ago

Description of issue

Currently, when trying to run an NI instrument in a chassis that is not rated for the cooling requirements of the instrument, a Session can not be opened to the instrument. I was hoping there could be a way to bypass this at the users own expense. Maybe a warning instead of an error?

System report

python -c "import nidcpower; nidcpower.print_diagnostic_information()" output

```
OS:
    Name:      Windows
    Version:   10.0.19045
    Bits:      64
Driver:
    Name:      NI-DCPower
    Version:   Unknown
Module:
    Name:      nidcpower
    Version:   1.4.6
Python:
    Version:   3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:40:50) [MSC v.1937 64 bit (AMD64)]
    Bits:      64
    Is_Venv:   False
    Installed Packages:
        brotli==1.1.0
        jinja2==3.1.3
        markupsafe==2.1.5
        pyqt5==5.15.9
        pyqt5-sip==12.12.2
        pysocks==1.7.1
        pyyaml==6.0.1
        archspec==0.2.3
        asttokens==2.4.1
        attrs==23.2.0
        authorizer==0.5.1
        beautifulsoup4==4.12.3
        boltons==23.1.1
        certifi==2024.2.2
        cffi==1.16.0
        chardet==5.2.0
        charset-normalizer==3.3.2
        click==8.1.7
        colorama==0.4.6
        conda==24.1.2
        conda-build==24.1.2
        conda-index==0.4.0
        conda-libmamba-solver==24.1.0
        conda-package-handling==2.2.0
        conda-package-streaming==0.9.0
        contourpy==1.2.1
        cycler==0.12.1
        decorator==5.1.1
        distro==1.9.0
        executing==2.0.1
        filelock==3.13.1
        fonttools==4.51.0
        hightime==0.2.1
        idna==3.6
        importlib-resources==6.1.2
        ipython==8.23.0
        jedi==0.19.1
        jsonpatch==1.33
        jsonpointer==2.4
        jsonschema==4.21.1
        jsonschema-specifications==2023.12.1
        kiwisolver==1.4.5
        libarchive-c==5.1
        libmambapy==1.5.7
        mamba==1.5.7
        markdown-it-py==3.0.0
        matplotlib==3.8.4
        matplotlib-inline==0.1.7
        mdurl==0.1.2
        menuinst==2.0.2
        more-itertools==10.2.0
        munkres==1.1.4
        nidcpower==1.4.6
        numpy==1.26.4
        packaging==23.2
        parso==0.8.4
        pillow==10.3.0
        pip==23.0.1
        pkginfo==1.10.0
        pkgutil-resolve-name==1.3.10
        platformdirs==4.2.0
        pluggy==1.4.0
        ply==3.11
        prompt-toolkit==3.0.43
        psutil==5.9.8
        pure-eval==0.2.2
        pycosat==0.6.6
        pycparser==2.21
        pygments==2.17.2
        pyparsing==3.1.2
        python-dateutil==2.9.0
        pytz==2024.1
        referencing==0.33.0
        requests==2.31.0
        rich==13.7.1
        rpds-py==0.18.0
        ruamel.yaml==0.18.6
        ruamel.yaml.clib==0.2.8
        setuptools==69.1.1
        shellingham==1.5.4
        sip==6.7.12
        six==1.16.0
        soupsieve==2.5
        stack-data==0.6.3
        toml==0.10.2
        tomli==2.0.1
        tornado==6.4
        tqdm==4.66.2
        traitlets==5.14.3
        truststore==0.8.0
        typer==0.9.0
        typing-extensions==4.10.0
        urllib3==2.2.1
        wcwidth==0.2.13
        wheel==0.42.0
        win-inet-pton==1.1.0
        zipp==3.17.0
        zstandard==0.22.0
```

Steps to reproduce issue

1. Have a system with mismatched cooling requirements (ex: chassis that can cool 38W, instrument that requires 58W cooling)
2. Open a session using `with nidcpower.Session(resource_name=resource)`
3. Receive error saying that the session cannot be opened because the chassis does not have enough cooling for the instrument. 
marcoskirsch commented 3 months ago

Hello @PeterKnauss,

There is no way to bypass this check. It is in place in order to prevent hardware damage. I am closing this as it is not an issue with the Python nidcpower module. Please use the hardware in a safe and valid configuration.