I am acquiring data from a load cell at a certain rate and this rate needs to be modified after a certain condition has been reached. I really cannot seem to find a way to do this. I tried the property nodes, but the task has to be stopped and then restarted. Is there a way to do what I would like to do with out stopping the data acquisition? Attached is a simple version of my VI (simpler than the real one where I save the data, use queues and modify the X-axis).
There is a way to change the sampling rate. You must fristly stop the task, then using the property node to set the new rate and finally, start the task again. It is the only way a know.
If you do not want to interrupt the acquisition to re-configure the card, acquire at the maximum rate all the time and discard the data you do not need.
If the system cannot keep up at the maximum rate, this method will not work.
I can think of two ways to set the rate of data acquisition before a task starts. To allow the user to change the rate of acquisition you can use a control connected to a DAQmx Timing VI or to a DAQmx Timing Property Node. However, I may not understand your question. Are you trying to allow the user to update the sample rate after the VI has started running but before the DAQmx Task starts? If this is the case you will need to prevent the Acquisition from starting until the user has been able to enter the required information. You could possibly employ an event based architecture. However if the control is set befor the VI runs than this added complexity will not be needed. Let me know if you have additional questions.
Regards,
Neil S. Applications Engineer National Instruments