03-17-2009 07:01 AM
Hai,
1. In the digital task you have added incude the sync clock that is found with other two tasks.
2. As a guideline to data logging use a seperate loop that logs the data. Use queus to pass the data between the acquisition loop and logging loop.
3.You can use spread sheet or TDMS for logging. If the samples you are going to log is too high TDMS is preferrable. Look into TDMS read/write examples in Example finder.
4.Spreadsheet file write is common and you can get that in examples or just run simple search in forums you will get it.
5. The pci boards like 6221 has PFI lines that will act as a source of trigger which is not available in the setup you have. But cDAQ chasis has some trigger lines with it but am not sure how to use them coz need hardware to carry out the testing. Just play with the lines provided by cDAQ and see if you are able toreplace the loop. [if you succeed jus post everyone will come to know how to do that]
Hope this helps.
03-17-2009 07:08 AM
Hi,
cn you just help me in establishing this guidline?
"As a guideline to data logging use a seperate loop that logs the data. Use queus to pass the data between the acquisition loop and logging loop."
I would be greatfull.
Thanks
03-17-2009 09:13 AM
Hi Thunder,
You could look at the following example that shows how to pass data between parallel loops using queues. The example is for a DAQmx Analog Input, but can be expanded to other types of tasks as well:
Using Producer/Consumer Architecture for DAQmx Read and Write to File
This should help you get started, but please let us know if you have any further questions about it. More information about the producer/consumer design pattern can be found here:
Application Design Patterns: Producer/Consumer
Thanks for posting and have a great day!
-John
03-18-2009 05:39 AM
Hai,
Just take a look into the thread: http://forums.ni.com/ni/board/message?board.id=170&thread.id=393756
There is a discussion on the file logging approaches.