Ahsoka / beskar

🧪 Redesigning the SEAL kit software for compatibility with modern operating systems.
MIT License
0 stars 0 forks source link

Apply Voltage page cannot apply certain voltages #1

Closed Ahsoka closed 3 years ago

Ahsoka commented 3 years ago

When apply voltage above or below a certain threshold the program errors out with the following error:

Traceback (most recent call last):
  File "C:\Users\AA12 Louqe\Google Drive\Coding\Github Repositories\Beskar (Solar Army)\beskar\gui.py", line 106, in on_apply_button_clicked
    apply_voltage(self.parent.device_name, self.parent.voltage_offset + offset - self.voltage_to_be_applied)
  File "C:\Users\AA12 Louqe\Google Drive\Coding\Github Repositories\Beskar (Solar Army)\beskar\utils.py", line 13, in apply_voltage
    task.write(voltage)
  File "C:\ProgramData\Anaconda3\lib\site-packages\nidaqmx\task.py", line 1233, in write
    return _write_analog_f_64(
  File "C:\ProgramData\Anaconda3\lib\site-packages\nidaqmx\_task_modules\write_functions.py", line 32, in _write_analog_f_64
    check_for_error(error_code)
  File "C:\ProgramData\Anaconda3\lib\site-packages\nidaqmx\errors.py", line 127, in check_for_error
    raise DaqError(error_buffer.value.decode("utf-8"), error_code)
nidaqmx.errors.DaqError: Attempted writing analog data that is too large or too small. Change Minimum Value and Maximum Value to reflect the range of the channel.
Data:  5.671000
Specified Range Minimum:  0.0
Specified Range Maximum:  5.0

Task Name: _unnamedTask<14F>

Status Code: -200561

Even when expanding the minimum and maximum values this error still persisted.

Will update this issue with more information after a more thorough analysis of this issue.