04-27-2011 02:13 AM
I am writing a queued timed event based data acquision application that collects analog samples from 4 channels.
The program is set up so during runtime, when the user changes the value of the DAQmx Physical Channels control, the old DAQmx task is stopped and cleared with "stop task.vi" and "clear task.vi"; once this is completed, a new task is configured using the new values from the DAQmx Physical Channels control. The task is stored through shift register.
The structure in question is pictured in the attachment.
When the program is ran, after the user changes the channels value, the loop iterates, but the appropriate samples are not collected when the DAQmx read is called. When the program exits and the loop exits, I get error code 200099 saying specified physical channel does not exist from DAQmx Create Channel.vi.
I don't see what I am doing wrong here, if anyone can help me figure this out I would greatly appreciate it.
Thank you.
04-27-2011 02:17 AM
Please attach the vi and not just a screenshot. It's hard to figure it out what happens there.
Paul
04-27-2011 02:32 AM - edited 04-27-2011 02:38 AM
Thanks for the reply, I am attaching the VI as requested.
LabView version is 2009 SP1
04-27-2011 04:44 AM - edited 04-27-2011 04:49 AM
I've done some more digging, and made a simple test VI to check if DAQmx Tasks can be cleared and created during runtime.
This VI uses a basic event driven state machine structure to clear and create DAQmx Task when the DAQmx Physical Channel box is changed by the user.
This test works as intended, but a similar structure in the vi posted above does not. Is there an explanation for this?