03-31-2022 07:23 AM
Hi, I try to use internal counter output to control the generation of analog output (I set non-regeneration mode), because I need to read a data during each period of the conuter's output. So I use a loop to read data and write analog output. But the problem arised when I try to write a big array into it ("Range" increase to 50). When the loop executes to certain times, the loop iteration change to increase slowly. (More slow than the clock period, it works well before the problem arised). It's buffer size not big enough? Or is the write speed not fast enough? Or other problem? Looking forward to your reply. My Device: USB-6289
03-31-2022 09:46 AM
Please use File->Save for Previous Version and choose something like LV 2016. I can't open your 2021 file, and the front panel pic doesn't tell me anything useful either.
From your description, it sounds like you have a faulty understanding of how to work with buffered data acq tasks. No biggie, most people start there and it takes some time to get familiar and comfortable with it. Once you post code I can open, I can give you a few pointers.
-Kevin P
03-31-2022 09:22 PM
Thank you, Kevin. I have saved it for Previous Version LV2012. Expect to your reply sincerely.
04-01-2022 12:22 PM
I made some *partial* mods focused on task coordination, sync, and timing and added a few comments within the code. The way you generate your "triangle" waveform and choose durations, etc. appear to still need some work.
The easiest way to generate a repeating triangle is to write 1 cycle of it to the AO task buffer, allow regeneration, start the task, and never write to it again.
-Kevin P
04-01-2022 10:15 PM
Thank you, Kevin. I am appreciated for your patience. In my understanding, regeneration mode means recycling of written data, it’s suitable to generate periodic signal. But for non-periodic signals, if it is very large (a big array to write), will it happen again the problem I described before? If I misunderstand, hope you can point it out. Expect to your reply.
04-02-2022 04:54 PM
DAQmx can handle big arrays of data just fine. If your PC can allocate it in a contiguous chunk, DAQmx can use it. Most PC's these days should be fine if you're not in the 100 million sample realm, and many will *still* be fine even with that many.
The overall app will be much simpler if you can make use of what DAQmx offers and write your big buffer of data to the task all at once before starting the task.
-Kevin P
04-03-2022 11:24 AM
Okay. I will try to understand these. Thanks for your answer, dear Kevin.