09-11-2012 04:12 AM - edited 09-11-2012 04:16 AM
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.
regards,
yan.
09-11-2012 10:42 AM
need little edit,
as I say "using loop index (main program) as counter" it should be multiplied with length, not just index.
regards,
yan.
09-12-2012 03:03 AM
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
09-12-2012 04:00 AM - edited 09-12-2012 04:03 AM
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.
09-12-2012 11:30 AM
help anyone?
09-13-2012 03:26 AM
help anyone?
09-14-2012 09:10 AM
I would like to split like this:
regards,
Yan.
09-18-2012 07:23 AM
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
09-18-2012 08:04 AM
hi Stefan,
can you please convert the VI's in your zip into LV2010 version? I'll take a look.
thanks,
yan.
09-18-2012 08:20 AM
Hi Yan,
here it is! 🙂
Have a nice day,
Stefan