06-23-2015 03:12 PM
06-23-2015 03:15 PM
"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.
06-23-2015 03:17 PM
I added the vi on one of my posts on the 1st page, towards the bottom.
06-23-2015 03:42 PM - edited 06-23-2015 03:44 PM
Well,
Lets look at Case "0, Default"
Unless I'm really off here..........0 is not Greater than 0 and the while loop exits as soon as i=5
06-23-2015 03:45 PM - edited 06-23-2015 03:46 PM
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.
06-23-2015 03:47 PM
Again, I can't see the DAQ assistant configuration (I have a simulated Strain Guage a cDAQ1Mod1
06-23-2015 04:08 PM
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.
06-23-2015 04:27 PM
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.
06-23-2015 04:49 PM
@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.
06-23-2015 05:09 PM
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.