LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramp generation with buffer by buffer ??

hi everyone,

I'm trying to generate ramp using a daqmx device. And I need to modify the code somehow, so that I can generate my ramp continuously with using buffer (not whole ramp generated at once). I think it should be not difficult, but it is somehow tricky for me.

 

So, this is what I'm doing until now:

I'm generating my ramp using required parameters: min/max/step numbers and ramp generation time. Besides those, I have another input parameter, which is ramp delay (to stay at min value until I start generating my ramp), then I have also total time (another input parameter), which means, the max value stays (after ramp generation done) until the total time elapsed.

 

So, if I make like this: 

delay= 1sec

ramp time= 2sec

total time= 10sec

means, I would get 1sec of my minimum value, then 2sec of ramp, then 7sec wait until 10sec elapsed, then done. I got my VI work for this, and split them in the end (this is problematic for long time generation).

 

But since I'm generating my ramp with using daqmx, which means, I should somehow limit my generation per buffer, otherwise I would have too much samples (not enough memory problem).

So I would like to have the same ramp generated with buffer, for example 100ms buffer, which means, I would split this generation into 100x buffer of generation. Any idea how to build them step by step (or buffer by buffer)?

Cause I tried to build them all then split them at the end would still give me the memory problem.

 

myramp.png

 

regards,

yan.

 

 

 

0 Kudos
Message 1 of 14
(4,164 Views)

need little edit,

as I say "using loop index (main program) as counter" it should be multiplied with length, not just index.

 

regards,

yan.

0 Kudos
Message 2 of 14
(4,146 Views)

Hi Mystogan,

 

have a look at this developer zone example. It shows how to update multiple analog outputs on the fly and might be what you are searching for.

Helpful to understand the concept is this link about Analog Output Regeneration in NI-DAQmx.

 

Have a nice day!

 

Stefan Egeler

0 Kudos
Message 3 of 14
(4,136 Views)

hi Stefan,

thanks for your tip. But I dont think I can use that method (updating output on the fly), because I cant have my DAQmx start task.vi inside while loop for one reason (put before while loop to start together with other task from other pxi device).

Thats why I need to split my whole ramp generation.

 

regards,

Yan.

0 Kudos
Message 4 of 14
(4,131 Views)

help anyone?

0 Kudos
Message 5 of 14
(4,121 Views)

help anyone?

0 Kudos
Message 6 of 14
(4,104 Views)

I would like to split like this:

 

split ramp.pngregards,

Yan.

0 Kudos
Message 7 of 14
(4,089 Views)

Hi Yan,

 

I think there is no problem triggering the example together with other devices if you do a slight change in architecture from the Community Example.

Please consider the following example. It is a slightly different variant of the

 

Cont Gen Wfm Non Regeneration Mult Channel.vi

 

and should show where to insert the triggering into the code.

 

Have a nice day

 

Stefan

0 Kudos
Message 8 of 14
(4,058 Views)

hi Stefan,

 

can you please convert the VI's in your zip into LV2010 version? I'll take a look.

 

thanks,

yan.

0 Kudos
Message 9 of 14
(4,051 Views)

Hi Yan,

 

here it is! 🙂

 

Have a nice day,

 

Stefan

0 Kudos
Message 10 of 14
(4,046 Views)