10-22-2008 05:45 AM
Thanks again.
But still I have got some questions to make clear:
1. I understand that running two different type tasks is impossible but I can combine two channels (e.g. analog inputs) into one task. In this way gathered data is sent back in common array. Am I right?
2. Cause each channel may receive/send data at different time, how is it possible to recognize which channel data have been processed?
3. Combining two channels in one task: continueous analog input and finite digital output may be a little bit tricky to manage. How to do it? Where from will I know that one channel has ended its work?
I imagine that in my access library the user will be able to create any task (with various channels), provide some buffer with data to send/for data to receive and the function that will be invoked when data is processed. I want my system to be as flexible as possible. Do you think it is quite easy to do?
Some source code will be very helpfull (in native C).
10-22-2008 06:05 AM
Hi,
1. I understand that running two different type tasks is impossible but I can combine two channels (e.g. analog inputs) into one task. In this way gathered data is sent back in common array. Am I right?
You can run two or more tasks of different type on one device. You can't run two task of some type on one device. I told it to you last time. If you look at the example I post you last time
http://zone.ni.com/devzone/cda/epd/p/id/2333
You will find, that you will generate data and you acquire data in parallel.
2. Cause each channel may receive/send data at different time, how is it possible to recognize which channel data have been processed?
It will be recognized so, that the driver will sent you the data in array from all channels. The sampling frequency is the same for all channels.
3. Combining two channels in one task: continueous analog input and finite digital output may be a little bit tricky to manage. How to do it? Where from will I know that one channel has ended its work?
You are not able to combine that. Run it with two tasks. See 1. The document called M series manual will be very useful to you. http://digital.ni.com/manuals.nsf/websearch/2025C99AB0614F9E8625748000577B9A
I imagine that in my access library the user will be able to create any task (with various channels), provide some buffer with data to send/for data to receive and the function that will be invoked when data is processed. I want my system to be as flexible as possible. Do you think it is quite easy to do?
I think, that it is not easy to do. And I can't imagine the real application that you will want to do.
Some source code will be very helpfull (in native C).
I can't help you, because I code only in LabVIEW. I sent you some exmaples in C last time. You can try to find more examples on our websites.
Regards,
Jiri
CLA, CTA