06-23-2015 01:13 PM
Hopefully a quick question....
In the attached picture of my vi, I'm attempting to obtain an analog voltage input from my ni 9221. If I place the DAQ assistant outside of the case structure AND the while loop, it works and I can see data, the only issue being that it reads the initial voltage and not the subsequent ones. If I place the DAQ assistant inside either the while loop OR case structure, I get "0" for the data. The idea of the vi is to have a case structure that programs my DC supply to different voltages and as i step through the cases, I measure the voltages. If there is any other pertinant information that would help diagnose this issue let me know and I will provide it. Thanks!
06-23-2015 01:53 PM
It is rather difficult to troubleshoot a picture.... Especially with so much hidden code And its likely that not everyone has the instrument driver you are using so, two things:
06-23-2015 02:29 PM
06-23-2015 02:34 PM
your case selector is wired to the counter for the while loop and your DAQ Assistant only fires when I+1 = 5.
06-23-2015 02:37 PM
What is the purpose of this?
06-23-2015 03:03 PM - edited 06-23-2015 03:09 PM
This is an un-fniished bit of code. I just have it there for a place holder at the moment. It will eventually be connected to the data output of the DAQ assistant to exit the program given a value is met.
"What is the purpose of this?"
06-23-2015 03:05 PM - edited 06-23-2015 03:09 PM
Even when executing case 5, I still get no data out of the DAQ assistant. I also tried putting a separate instance of the DAQ in every case and still had the same result of "0" for the dynamic data.
"your case selector is wired to the counter for the while loop and your DAQ Assistant only fires when I+1 = 5."
06-23-2015 03:08 PM - edited 06-23-2015 03:08 PM
I thought this too, so I tied the error output from the B&K instrument into the DAQ assistant. The output was still "0". Using the Highlight Executuion function, I was able to see that with the error lines connected, the DAQ was reading at the correct time.
"You are acquiring data at some random point in time and not at all in relationship with your B&K instruments. Your second B&K has no timing relationship to the first for that matter."
06-23-2015 03:12 PM
Here is the vi
06-23-2015 03:12 PM
Are you checking the voltage before the supply has enough time to respond to the command?