12-16-2008 02:27 PM
Hi everyone,
I have a question regarding saving timestamped data. I am using an instrument driver for a multimeter to collect voltage vs. time measurements from a thermopile.I've added the "Format Date/Time String" to obtain the time I want, and I've added it to the loop which interprets the data. When I ran the data collection via the "Highlight Execution" option on Labview, the measurements came out the way I wanted them to. However, when I run the data collection automatically, the recorded times were all identical, or nearly identical.
Upon further investigation, I found that all of the data collection of the instrument driver occurs at the "VISA Read" stage. The loop I was using was simply interpreting the string, not collecting the data, which is probably why I was recieving nearly identical recorded times for all of my measurements. Here is my question: is there a way for me to timestamp measurements of this VISA Read stage? I can't find a way to get inside the data collection of the VISA Read device, nor do I really understand how the VISA Read appears to be collecting an array of data, rather than just one data point a time. I'm probably interpreting the diagram incorrectly somehow (I notice something is going on with a shift register when I ran it step by step).
I've attached the files that will be helpful.ke2000ReadMultiple is the file with the VISA Read and the Loop. ke2000 Parse ASCII Data is the file in which the timing portion is held; it's just a simple Format Date/Time String device, but it might be helpful in case I'm doing something ridiculous.
Thanks a lot for your help!
Matt
12-16-2008 02:59 PM
Yes, I'm afraid that you are doing something ridiculous.
All that you are doing is timestamping the for loop. The for loop is not going to take very much time to parse out the string returned so the times are going to be very close together. The VISA Read does not collect an array of data. It just reads what the instrument returns. It is the for loop that creates an array from it.
The start time of the measurement is going to be when the measurement is initiated. This is probably with the MEAS command. The delta t is going to be the sample rate of the instrument. I don't see that function and I don't know if that is something that you can change or whether it is fixed. You would have to provide that at some place to create an accurate array of timestamps. Get the current time in parallel with the MEAS command. You can then create an array of timestamps from the dt, the number of readings, and the sample count.
You might also want to look if the instrument is capable of returning time data. I'm not familiar enough with the Keithley to know whether this is something that it supports. You would have to modify the parsing if it does.
12-18-2008 02:57 PM
Dennis,
Thanks for the help. I knew I was probably making a beginner's mistake. I was measuring inside the for loop because I thought that even if the actual measurement wasn't taken there, I could still get relative time measurements assuming the Instrument had to send a new string to parse every time it took data.
The schematics I showed you didn't cover the entire program. There is a function outside of what I showed you that allows the user to input a time delay between measurements. I originally followed your advice, using the dt and number of measurements method to get a time array. However, I wasn't sure how accurately the time delay actually reflected time between measurements. I want to take measurements every fraction of a second, and I wasn't sure if Labview's processing time was adding on to the delay that I input into the program. That's why I went about trying to get an actual time of measurement.
I've found the MEAS command that you told me about, and I can get the time that the first measurement occurs. If there a way that I can get a time for every measurement that takes place through this method? I see no loop that represents the data being taken, otherwise I'd place the timing device there. As for the Keithley having it's own timing data, I'll definitely look into that if I can't get it through labview.
Thanks again for your help,
Matt