LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not Receiving Data from DAQ Assistant In Case Structure

The order with execution highlighting on is not at all the same when you turn it off. Since you have not posted an updated VI with correct dataflow, no one can tell if it's correct. Since you have not posted an actual VI or the DAQ Assistant setup, no one can tell if that's correct either.
0 Kudos
Message 11 of 20
(1,017 Views)

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

 

I thought that might be the case so I did 2 things.  First, I added a delay function to the DAQ assistant and went as high as 4 seconds, and second, I temporarily connected the DAQ to a separate dc supply on my bench that was constantly on and not controlled by the LabVIEW.  In both cases, the result was the same.  Only when I take the DAQ assistant out of the loop, do I get a reading from it.

0 Kudos
Message 12 of 20
(1,010 Views)

I added the vi on one of my posts on the 1st page, towards the bottom.

0 Kudos
Message 13 of 20
(1,007 Views)

Well,

Lets look at Case "0, Default"

!0.png

Unless I'm really off here..........0 is not Greater than 0 and the while loop exits as soon as i=5Smiley Sad


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 20
(985 Views)

Case 0 should never execute if the selector is wired to I + 1.

 

I don't have 2014 so I may be off as well.

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 15 of 20
(977 Views)

Again, I can't see the DAQ assistant configuration (I have a simulated Strain Guage a cDAQ1Mod1


"Should be" isn't "Is" -Jay
0 Kudos
Message 16 of 20
(968 Views)

So, I have found something interesting.  In short, I'm now getting readings from my DAQ inside of my case structure.  What I'm unsure of is why I can only get reading when I also add a DAQ assistant outside of the while loop.  In the attached picture, you can see the DAQ Assistant 7 outside the while loop and the other DAQ assistant inside the case.  In this configuration, everything works great but as soon as I take that DAQ Assitant 7 out, I get nothing for data.  Thoughts?  

 

For the DAQ configuration, I have it sampling on channel 0, N samples, 5k samples, 10k rate.

 

0 Kudos
Message 17 of 20
(963 Views)

Couple of questions (again i can't open the VI so I am just throwing suggestions out there):

 

1.  Are there two supplies that you are programming in this VI?  I see two separate lines of configuration VIs.  If these are for the same supply, maybe they are conflicting with one another, causing the supply to go into error mode.  

2.  Why are you reading 5000 samples in the DAQ assistant but outputting a single value?  Which value does the DDT output when you only output a scalar?  The last one?  I'm not sure.

3.  What is this VI do?  It looks like a Configure Current Limit, maybe.  If so, you are setting the current limit to 0.1 which, depending on the device hooked up to the supply, may result in a near-zero voltage.  

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 18 of 20
(946 Views)

@aputman wrote:

Couple of questions (again i can't open the VI so I am just throwing suggestions out there):

 

1.  Are there two supplies that you are programming in this VI?  I see two separate lines of configuration VIs.  If these are for the same supply, maybe they are conflicting with one another, causing the supply to go into error mode.  

2.  Why are you reading 5000 samples in the DAQ assistant but outputting a single value?  Which value does the DDT output when you only output a scalar?  The last one?  I'm not sure.

3.  What is this VI do?  It looks like a Configure Current Limit, maybe.  If so, you are setting the current limit to 0.1 which, depending on the device hooked up to the supply, may result in a near-zero voltage.  

 


1.  There are 2 supplies...well, 1 supply and one DC load.  Would it make sense to put them all in series in terms of initializing?  I just figured it would be fine to do so in parallel.

 

2.  My understanding of the DAQ Assistant express VI was that it averages the readings you take and outputs the average reading, not the first or last value read.  I could be wrong on that though.

 

3.  Correct, that is the current limit for the BK 9201 supply.  I did take your advice and increase it to 1A.  I orginally had it set lower while I was making the test setup as to not inadvertently fry something.

0 Kudos
Message 19 of 20
(935 Views)

1.  There are 2 supplies...well, 1 supply and one DC load.  Would it make sense to put them all in series in terms of initializing?  I just figured it would be fine to do so in parallel.

 

2.  My understanding of the DAQ Assistant express VI was that it averages the readings you take and outputs the average reading, not the first or last value read.  I could be wrong on that though.

 

3.  Correct, that is the current limit for the BK 9201 supply.  I did take your advice and increase it to 1A.  I orginally had it set lower while I was making the test setup as to not inadvertently fry something.


1.  If they are separate supplies, leave them separate.  I just wanted to be sure that all of those init VIs weren't for the same supply.

2.  I believe you are wrong.  If you want an average, use the Statistics Express VI to average the samples.  Actually you should learn how to use DAQmx properly and get away from the DAQ Assistant.  You can use it as a stepping stone to what you really want by configuring it as required and then right clicking and converting it to DAQmx code.  Using this code is much more powerful and uses less resources because you are not creating and destroying the same task over and over.  

3.  I didn't say increase the current limit.  I said that depending on the device hooked up to the supply, a low current limit may result in a near-zero voltage.  

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 20 of 20
(926 Views)