LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sampling time in seconds?

Sure no problem.

First as for the meter, what is the model and make? Does the meter return any values? does it error? I just copied the commands in your original VI so I don't know what they are supposed to do. There may be a limitation on how fast the meter can aquire readings, this should be indicated in the manual (you may not be able to read as fast as 1 second).

Now for the VI: The 1000 constant wired to the dt terminal on the outside of the loop determines the timing of the loop. If you want to add a delay between the voltage and current reading you will need to put a wait in the For loop.

The reason I used a For loop was to take advantage of the auto indexing in labview. If you wire an array to a tunnel of a For loop the loop will run for each value in the array. In this case you are doing the exact same thing to read voltage and current just the commands and the string lookup change. This is a nice way to reuse code.

So in this VI the For loop will run twice, First for the voltage reading and second for the current reading, the output of the string to number conversion is wired to a tunnel on the for loop, again this is to utilize the auto indexing function of labview. This wil create a array of numbers for each iteration of the loop. In this case the first is Voltage the second is Current.

Next after the For loop has completed the two iterations I then display the values in the waveform charts, I now use the Index Array function to send the first value(Voltage) to the voltage chart and the second value(Current) to the current chart. You will notice I deleted the numerical indicators you had in the original VI beacuse if you right click on the waveform chart go to Visible items-> Digital display. This will give you the numerical display (You can move it around the front panel).

Beacuse file saving takes a lot of resources and time I have moved it to after all of the aquistion is complete, this means you will need to make changes if this vi is going to run for long periods of time. The arrays on the output of the timed loop will eventually get very large and proberbly crash your system. However to get started this is an easy way to see how the data is aquired. So for every iteration of the timed loop values will be placed into arrays indicated by the tunnels, The data is then converted to dynamic data to be used by the express vi.

Let me know if this helps.

 

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 11 of 35
(1,192 Views)
hi Andrew
 
i got version 8 now, regarding your vi, no readings or anything got sent. just clicking noises from the meter. the meter is a hameg.
i better explain what i wish to do again
 
1) measure voltage , just once ! (is will be constant 3.3v)
2) measure /sample current every second, until 10 mins elapses.
3) plot time vs current
3) plot time vs power
4) find the mean of 2) 7 3)
 
how do i get the vi to end after 10 minutes?
 
 
im sure there is a neater way to do my vi with labview 8
 
many thanks
 
eric
 
0 Kudos
Message 12 of 35
(1,185 Views)

If you are only going to take the voltage measurement once then place it before the timed loop and feed the result into a tunnel in the loop and use this value to calculate power.

To get the VI to end in 10 minuets use the Time Elapsed express VI and configure it for 600 sec.

You should find out if the meter has a wait until complete command that will allow it to finish an instruction before acepting another one. If you have to replace the 500ms waits between the VISA writes you will not be able to take the reading every second.

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 13 of 35
(1,176 Views)
hi Andrew,
 
could you alter your vi to include the timer to close the app after 10 mins and also the voltage outside the loop? i couldnt get it going......
 
regards
 
Eric
0 Kudos
Message 14 of 35
(1,160 Views)

Here ya go, you may have to add waits between the VISA Writes to allow the meter to aquire the data.

 

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 15 of 35
(1,154 Views)
thanks buddy
 
i think i may stick with my vi, even though its a bit crap. not much time to be going through another, i got labview 8 now thou. i will need to put in that time elapse on mine, as i am using cell batterys, dont want to waste power......!
 
 
0 Kudos
Message 16 of 35
(1,142 Views)
Andrew,
 
just ran your vi, nothing came out of it, zero volts or current going into the  multipler. but it does stop correctly.......!
 
 
the meter reads volts and then goes to current, and clicks ever second, as required, but maybe the delays need to be adjusted, i had alot of trouble, as you can see from my vi, to get it going.
 
eric
 
0 Kudos
Message 17 of 35
(1,141 Views)
Ok, you are going to have to place delays between the 2 write commands (see picture). In your original Vi the delays were 500ms. If you place a 500ms delay in the timed loop, change the loop time to 500ms to get your reading as close to 1 second as possible.

Message Edited by AndrewAlford on 02-16-2006 10:26 AM

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 18 of 35
(1,139 Views)

hi Andrew,

 

i tried putting in a sequence with a delay between the writes, but still no good. im getting 9 volts, and the current is wrong as well, like 8.94 or something.

on my vi, im getting 25mA, which sounds better.  im testing battery voltage vs time on a 25mm module, 2 x 3.3volt cells, how long do you think they should last?!

also , i need to keep the test running until the batterys run out, how can i use the time elapsed to just tell me how long the vi is running (without stopping)

 

do you think i have the mean part of my vi correct? im getting the same values for mean, max, etc .

 

many thanks

 

Eric

 

0 Kudos
Message 19 of 35
(1,125 Views)

Hey Andrew,

 

regarding the mean and max,min values.

 

im getting mean,max,min values per sample is seems.......

 

how can i get the mean , average etc value over the duration of the test, 10 min or 1 day or whatever.?

thats what i really need.

 

best

 

Eric

 

0 Kudos
Message 20 of 35
(1,121 Views)