06-06-2017 09:03 AM
Hi,
I am trying to create a very basic analog to digital converter. I have a 1D waveform (500 elements) which I compare to a constant (true or false), and then I send the 1D boolean into a for-loop to output a high or low value depending on if the comparison was true or false.
I can input a 1D array into the "select" function, but I don't know how to output a 1D array from the "select" function. How can I output a 1D array from the "select" function? Did I do it right in the attached VI?
The attached VI doesn't work because it says my "application is not able to keep up with the hardware acquisition".
Thanks,
W
06-06-2017 09:55 AM
For starters, track the 'number of samples written per channel' output of the 'DAQmx write' and wire that to an indexing item on the loop. Then add an indicator to follow the events.
06-06-2017 10:12 AM
Hi WCSRI,
The error you posted is actually unrelated to your use of the select function. Your posted code is using auto-indexing to feed the values in your double array into the for loop one at a time and then sends them to an output array. This is fine.
With regards to the error code, this error is being thrown because you are creating a DAQmx task without specifying a clock and trying to use it. Then, the DAQ Assistant task is overrunning the buffer that stores input because your writes are unable to keep up with the 75 kHz read rate. You should match the rates of both the producer (read) and consumer (write) to prevent errors like the one you are getting.
Before continuing to program, I would recommend checking out a few learning resources:
Using Producer/Consumer Architecture in LabVIEW
The NI Example Finder can also be VERY helpful for learning how to build standard LabVIEW architectures. You can find it under the help tab in LabVIEW.
And finally,
Consider Taking/Retaking LabVIEW Core 1 and 2 - this will help resolve confusion about what is causing your errors and help you ask the right questions so that we can help you find a solution as quickly as possible!
If you check out these resources and still cannot find the answer to your questions, feel free to follow-up here. But be sure you understand how to use each of these tools at a basic level first. I would also recommend moving away from DAQ Assistant since it seems you understand how to use DAQmx for data acquisition, but that is up to you.
Best,
Duncan W.