Skip to content

pstim.py has hard dependency on NI-DAQmx hardware driver with no graceful fallback #291

@GaneshPatil7517

Description

@GaneshPatil7517

@pradeeban
nintan/pstim.py imports nidaqmx at module level and immediately creates a hardware task:

import nidaqmx
from nidaqmx.constants import AcquisitionType
from nidaqmx.stream_writers import DigitalSingleChannelWriter
...
task = nidaqmx.Task()
task.do_channels.add_do_chan("Dev1/port0/line0")

Issues:

  • The nidaqmx package is not in requirements.txt

  • It crashes on any machine without National Instruments hardware/drivers

  • The global uglobal variable is modified by the main thread and read by pwm() thread without any thread synchronization (race condition)

  • The pwm() thread runs an infinite while True loop with no way to stop it cleanly

  • Device name "Dev1/port0/line0" is hardcoded — should be configurable via concore.params

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions