12-16-2021 04:56 AM
Hi guys,
I'm quite new in this whole DAQ game so I'm sorry if this question is something one should basically know. Is there a possibility to write a text-file full of voltage samples (ECG track over 1 Minute, I link it below) to an analog output of the DAQ? My idea is to run it continuously to kind of simulate a real meassurement to test my algorithm. For that I connect the output with an analog input where I read the samples and go on with calculations like peak detection etc. I'm using the USB-6361 BNC, the sample frequency of the signal is 1000Hz and as I wrote it is an ECG.
In the end I want to connect a real ECG device to my daq analog input but until then I need to feed my DAQ with some data to simulate the meassurement because I can't sit with electrodes attached to my body at my working place the whole time.
The last weeks I worked with Python and the DAQ and there I already managed to write data to the ao continuously and to read it parallel with the ai. But Python is to slow for my ideas so I have to implement it in LabView.
It would be a great help if somebody has an idea how to realise that.
Thanks 😄
Solved! Go to Solution.
12-16-2021 08:59 PM
Of course, you can generate the signal using DAQ AO, do the following,
Note - USB 6361 has only one AO timing engine, this means, if you're generating the ECG waveform on AO, you cannot create or use another AO DAQmx Task in parallel. But you can use all other features in parallel such as AI, DI, DO, Counters.
12-17-2021 02:47 AM
Hi Santhosh,
thank you for your help. But actually my problem is not how to write something to the analog output continuously but how to write a text-file that is full of samples to an analog output. So which components I have to use to do that. I found some examples for plotting data from a text-file but all those solutions don't work.
12-17-2021 10:12 AM
Again, as I mentioned you don't need to continuously write to DAQmx write, you once write a chunk of samples to DAQ and it will loop on it forever using the regenerate mode.
All you have to do is, use the File IO functions to read the text file, convert it into an array of numeric data, write it to DAQmx AO.
12-20-2021 02:21 AM
Alright thanks. It is working now.
12-23-2021 08:24 PM
Please mark appropriate post as answer to close this thread