LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not Receiving Data from DAQ Assistant In Case Structure

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!

0 Kudos
Message 1 of 20
(3,309 Views)

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:

  1. Attach The VI  OR, Press Ctrl+A and select Edit>>Create Snipette from selection and insert the resulting *.png inline in a post
  2. AND Right click the DAQ Assistant Select "Generate Code...">>Configuration and add a snipette of the resulting block Diagram so we can inspect the Task Settings

"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 20
(3,282 Views)
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.
0 Kudos
Message 3 of 20
(3,265 Views)

your case selector is wired to the counter for the while loop and your DAQ Assistant only fires when I+1 = 5. 

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 20
(3,256 Views)

What is the purpose of this?

Capture2.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 20
(3,253 Views)

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?"

0 Kudos
Message 6 of 20
(3,240 Views)

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."

0 Kudos
Message 7 of 20
(3,235 Views)

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."

0 Kudos
Message 8 of 20
(3,232 Views)

Here is the vi

0 Kudos
Message 9 of 20
(3,221 Views)

Are you checking the voltage before the supply has enough time to respond to the command?

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 10 of 20
(3,219 Views)