11-14-2008 04:36 AM
Hi,
I have been developing some kind of access library (with unified interface for all type of tasks) for 6259 device and I don't know how to generate analog voltage (other signals probably too) the way I want. I can generate finite or continous signals but only with specified samples buffer (the signal is then very periodical). My intention is to use everyNSamplesEvent to change the buffer content so I can generate easily user defined signals. I noticed that the buffer changing is well performed when the task is stopped. But I don't want to stop the task to exchange the buffer content. How can I do this?
Solved! Go to Solution.
11-17-2008 02:43 AM
Hello again,
I know that this issue may not be the easiest thing to do, but this forum exists for NI experts to share the knowledge and experience with others users of NI products. That's why leaving the thread without any answer is bad idea, cause it shows that even NI experts don't know the solution. The better way is to reply that the problem is impossible to solve in case of any hardware limitation than no response at all.
I still don't know the solution for my problem so I am waiting for someone to guide me within this area.
11-20-2008 10:02 AM - edited 11-20-2008 10:04 AM
11-24-2008 02:59 AM
Sebastian, sebastianbratescu
Thanks for your reply.
I am developing without any development environment for NI device - just Visual Studio and use only native C API. I have got NI-DAQmx 8.7.1 driver installed.
My intention is to achieve dynamicaly changing analog generation without stopping a task. The most convienient way would be to get a callback after generating N (buffer size) samples and to exchange buffer data within this callback to allow generation newly defined signal.
Best regards,
Dariusz Boczkowski
11-28-2008 06:54 PM
Hello Dariusz,
A function that you might find useful is the DAQmxRegisterEveryNSamplesEvent. Information about this function can be found in the NI-DAQmx C Reference Help under NI-DAQmx C Functions»Task Configuration/Control»Events»DAQmxRegisterEveryNSamplesEvent.
The purpose from the help file:
"Registers a callback function to receive an event when the specified number of samples is written from the device to the buffer or from the buffer to the device. This function only works with devices that support buffered tasks."
Regards,
Dan King
12-02-2008 02:22 AM
Hello,
Thank you for an answer. I have been using this method since some time and it works very weel to my purpose. The point of was to generate dynamically changing signal with using everyNSamplesEvent callback. The solution is of course non regenerated output.