07-03-2020 05:35 AM
Dear Community,
I'm trying to write a huge waveform (tens of minutes to hours).
In practice, I creat a small waveform representing a minimal pattern that I repeat N times to correspond to the huge waveform.
Here are the different steps:
1- create the small waveform
2- write the waveform
3- within a for loop:
- Start task
- Wait unitl the task is finished
- Stop the task
- repeat n times
The problem is that the sequence Start/Wait/Stop seems within a loop seems to slow down the process and the timing is not as expected:
Could you help me please?
Best regards.
Sébastien
Solved! Go to Solution.
07-03-2020 06:19 AM
Here is a simple example of what I did:
07-03-2020 07:00 AM
You do not want to stop/start the task inside the loop. A DAQmx Write Task (if configured correctly) is designed to be "self-clocking". Here's the basic idea (a few details might be wrong in practice/implementation, but this is how it works in principle):
Give it a try.
Bob Schor
07-03-2020 07:37 AM
Dear Bob,
Thank you for your answer.
It seems that I have something to learn!
As all of my aliqua=ots of samples are identical, I just generate them once.
Then I write a first set of samples then start my task and then, in a loop, I write the N-1 aliquots of samples.
But, this is not the solution, so I missed Something in your exmplanation, sorry.
Sébastien
07-03-2020 08:22 AM
I cannot examine, test, modify, probe, etc. a picture. Attach your VI (or, if part of a LabVIEW Project, consider compressing the folder containing the Project and attaching the resulting .zip file). You'll help all of us to help you. Remember this for your next post.
Bob Schor
07-03-2020 10:18 AM
Sorry, I was too busy at work... Here is the testing code, for Labview 2016
07-06-2020 05:40 AM
Dear all,
any answer?
Séb
07-06-2020 06:07 AM
I tried with a while loop but once again, the time spent is not the expected time.
Thank you.
Séb
07-06-2020 08:37 AM
Hello, Séb.
I've not done much digital signal generation in LabVIEW with DAQmx, so don't have code of my own to share. Have you looked at the Examples that ship with LabVIEW? There's one called "Digital - Continuous Output" that has a lot of "bells and whistles" (meaning "other code that shows off all of the possible modes"), but which looks pretty simple to try out.
I don't know if you are familiar with the Examples. Here is what I suggest:
Sometimes NI doesn't provide as much explanation as we might want for all the little details for all of LabVIEW's functionality. However, having a series of Examples that we can study and incorporate into our code partly makes up for this!
Bob Schor
07-09-2020 07:04 AM - edited 07-09-2020 07:09 AM