Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted

11-20-2020 07:17 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello all,

I'm using NI 9472 to generate a Digital Pulse.

The expected pulse involves sequence of High and Low level which is to be repeated number of times(**cycle**). The number of Repetition or number of cycles of the sequence is fixed.

I can generate the expected Digital Pulse by configuring **DAQmx Timing.vi** in either Continuos or Finite Sample Mode.

__ Continous Sampling Mode__ - In this mode i can pass the data of one cycle to

__ Finite Sampling Mode__- In this mode i can the pass the whole data(required number of cycle of sequence) at once to the

Please suggest what should be the best timing mode in this case. I have tried my best to explain my question, if you are unable to understand any part of it please reply to this post.

Thanks

Highlighted
Options

11-21-2020 03:21 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

What's the total # pulses? I'm pretty sure that you can set up Finite Sampling to keep regenerating from a small-ish buffer until it reaches a much larger total # samples. You might have to explicitly set a DAQmx Write property for "regeneration mode" to allow regeneration. (This is the default behavior for Continuous Sampling tasks, I'm not sure if it's also default for Finite).

-Kevin P

Highlighted
Options

11-22-2020 04:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I have to generate multiple repetition(cycles) of the same pulse. The number of repetitions is pre-defined and i have to stop the task when these repetitions are generated.

Number of Samples in 1 Cycle of Pulse is 23,350.

Total Number of Repetitions(Cycles) is around 20,000 so Total Number of Samples is going to be around **457,200,000**.

I understand the use of Setting Regeneration Mode Property but i'm not sure about how i can Stop the task at the exact instant when 457,200,000 samples are generated. Can you please share an example code for it.

Thanks

Highlighted
Options

11-23-2020 05:18 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Start with one of the shipping examples (menu Help->Find Examples...) for Finite digital output. Default values in that example write only 8 samples to the buffer while configuring the task to to generate 1000 samples.

That indicates that the # samples can be both exact and much greater than the # of values in the buffer. I don't have real hw to verify, but the example did run without error for a simulated device. I would have expected an error if it would have been necessary to explicitly set the property to allow regeneration (which the example doesn't do).

So you should be able to configure DAQmx Timing for Finite Sampling with ~457 200 000 samples, write your 23350 samples to the task buffer one time, start the task and let it do its thing. The choice of Finite Sampling means the task will stop generating all by itself when it reaches your designated total # samples.

-Kevin P