LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

non-regeneration analog ouput within a loop

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

Download All
0 Kudos
Message 1 of 7
(867 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 7
(845 Views)

 Thank you, Kevin. I have saved it for Previous Version LV2012. Expect to your reply sincerely.

0 Kudos
Message 3 of 7
(824 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 7
(805 Views)

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.

0 Kudos
Message 5 of 7
(791 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 7
(779 Views)

Okay. I will try to understand these. Thanks for your answer, dear Kevin.

0 Kudos
Message 7 of 7
(758 Views)