07-19-2009 01:31 PM
Hi,
I've application that need slower (100 Hz) datalogging initially and then increase the datalogging rate to high (10 KHz) after some time.
I have been trying incorporate variable DAQ rate but with not success. I also tried to maintain contant DAQ rate but write txt file at diffrent rate.
Now, without any success, I am now trying to write two txt file with low and high rate.
I would greatly apprecaite, if somebody can direct me to correct logic to accomplish the task.
Find bellow the sample test VI that I am trying to implement the requested feature. This VI Write data to a txt file with time stamp matching DAQ rate in first column.
Thanks in advance.
Solved! Go to Solution.
07-19-2009 02:29 PM
07-19-2009 05:10 PM
Thanks for the suggetion.
I tried to implement the parallel loop producer consumer architecture but am getting some error.
I cant connect the obtain queue VI.
07-19-2009 10:57 PM
07-20-2009 08:22 AM
07-20-2009 03:34 PM
Here is the code in which i am trying to implement the parallel loop producer-consumer architectuer to write txt file at set DAQ rate or something else.
Its not working and the obtain queue VI needs datatype input.
The file write is not working as well. Formatting is not correct.
Thanks
Ganesh
07-21-2009 03:37 AM - edited 07-21-2009 03:43 AM
Hi ganesh,
For obtain queue you need to give the queue name and data type.In the consumer loop you are not dequeueing the data,you are using the preview data(In source code). so your data was not getting dequeued and it appends with the previous data and the queue is bulilding.I attached the example hopes it help.
07-21-2009 03:49 AM
07-21-2009 09:26 AM
Thanks for the help.
Going foward, I am looking in to possibility of two consumer loops. One consumer loop should log data at high rate and the other at slow rate with user control to choose the data logging rate.
Presently I am trying to achieve obove task by using remainder of the time in a case structure. Its like selective writing.
As the data is logged into strings, its not working as required.
Take a look at the simple logic to achieve to datalogging rates.
Please recommend better ways to achieve this task. Thanks in advance.
07-21-2009 10:28 PM