02-22-2006 02:55 PM
02-23-2006 03:50 PM
Hi BJ,
I noticed that you are using Traditional NI-DAQ (Legacy) for your application. I stronly recommend that you upgrade to DAQmx. It is a free download from the National Instruments website from the following link: NI-DAQmx 8.0. Also, programming and troubleshooting are much simpler with DAQmx and I am posting some links with more information about this driver.
In the meantime, are you able to successfully run analog input examples? I recommend using an example and then modifying it to fit your specific needs. At this point, it's difficult to say what could be causing the problem with the subVI and the control variable. Are you receiving any errors when you run the code? Also, it sounds like you may be changing settings in your analog input while the task is running: is this correct? Please keep me posted with your progress on this issue.
Transition from Traditional NI-DAQ to NI-DAQmx
Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
Regads,
Hal L.
02-24-2006 03:02 PM
Hal:
Thanks for you help. I solved the problem. I made a basic mistake when calling subvi to scan the control variable. I was supposed to put AI scan in the loop so that I can have updated data when my control variable changes. But I somehow put it outside the loop. That's why my AI scan number never changed. haha
bj