Hi,
i posted a question few days ago, but maybe it was to complicated or something. And i wanted to start to think in a new way.
So my simple question is:
Is it possible to recieve data only on Demand from an analogInputChannel without stopping the task itself?
If i set up a Channel with a finite AquisitionType and restart the task each time, it slows down. If i set up a continuous channel, the data is acquiried automatically and gets stored in the buffer. If i then use task.read() it works through the buffer "step by step", but i only want the latest value when calling task.read(). So i would have to call the task.read() exactly as often as the task writes to the buffer, which is impossible in my case.
I thought about using the stream_in method with a reader and always dumping the data in the buffer when reading it (read all samples that are available), but couldnt make it to work.
Calling this def throws this error:
Traceback (most recent call last):
File "C:\Users\Jetting\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\Jetting\anaconda3\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Jetting\Desktop\Robert\SCT_TryOut_DifferentAcqTypes\SCT_24.02.2021_v1.1_stream.py", line 102, in DAQ_Monitoring
task.start()
File "C:\Users\Jetting\anaconda3\lib\site-packages\nidaqmx\task.py", line 1026, in start
check_for_error(error_code)
File "C:\Users\Jetting\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: The specified mathematical operation results in an overflow.
Device: cDAQ9184-1B901BF
Task Name: _unnamedTask<0>
Status Code: -50175
Is there any advice or hint you have for me?