02-26-2008 12:05 PM - edited 02-26-2008 12:06 PM
02-26-2008 01:25 PM
02-26-2008 01:34 PM
02-26-2008 02:00 PM - edited 02-26-2008 02:02 PM
You can use the event structure and shift registers as shown below. The DAQ code is only partial code. You would have to stop the DAQ before you changed its rate, then restart again. Use shift registers to pass the task ID and put the stop and restart code in the refresh event case. I'll leave the coding up to you. Good exercise.
OOOOPS. Mistake. You need to put a local variable of the rate control inside the refresh case and wire it to the right tunnel. Don't 'put the straight wire like is shown above. I didn't want to recreate the picture, I'm lazy today.
02-26-2008 02:04 PM - edited 02-26-2008 02:06 PM
Off my lazy butt. Like this:

And don't put the DAQ timer vi inside the timeout event or it will execute every 100 mS. I just don't have it together today. Maybe I'll try again if you don't get the picture. Just let me know.
02-26-2008 02:22 PM - edited 02-26-2008 02:23 PM
02-26-2008 02:58 PM - edited 02-26-2008 02:59 PM
Why do you stop the DAQ inside your loop? When the loop iterates a 2nd time, the DAQ is stopped and you will get an error or a timeout, then the loop will exit.
You could move the contents of your loop into the timeout case of an event structure (without the DAQ stop). In the refresh event case, put the DAQ stop, followed by the DAQ Timer with input from a front panel variable (or local variable, no shift register needed actually), then restart the DAQ. Event is fired and the loop iteration finishes. Next loop, the timeout event will fire and the DAQ will gather data at a new rate. The refresh case would look like this:
