02-14-2006 05:57 PM
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.
02-15-2006 06:39 AM
02-15-2006 09:24 AM
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.
02-16-2006 06:58 AM
02-16-2006 09:18 AM
Here ya go, you may have to add waits between the VISA Writes to allow the meter to aquire the data.
02-16-2006 10:54 AM
02-16-2006 11:03 AM
02-16-2006 11:26 AM - edited 02-16-2006 11:26 AM
Message Edited by AndrewAlford on 02-16-2006 10:26 AM
02-16-2006 01:02 PM
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
02-16-2006 01:23 PM
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