05-07-2012 09:48 PM
I think that the direction of the feedback is different because of the location. But I'll check again.
Jose
05-08-2012 05:48 AM
Your code looks OK as long as the Timestamp array is increasing at each iteration of the loop, it’s not clear how this is happening from your image. Add an array size for the timestamps and one of the Y data arrays and check that they agree.
When trying to debug your code use the probe tool and possibly add a time delay inside the loop so that you can watch what’s happening to the data on each iteration.
05-08-2012 09:02 AM
Ok,
I think I know what's happening. My program usually updates every 15 seconds. It is possible to synchronize the Get Date/Time in Seconds function with the data acquisition? The data actually comes from different sources, but they all use the same Time Stamp Array. So I'm guessing that I should find a way to synch each, or is there a another way?
Thanks,
Jose
05-09-2012 04:02 PM
Hello,
I tried a different method to plot the graphs. I'm not getting the peak, but there is a discrepancy between the time axis of the time stamp array. Attached are the images of the subvi that creates the graphs and the main vi which creates the time stamp array. If anyone can help me I would greatly appreciate it.
Thanks all,
Jose
05-09-2012 05:21 PM - edited 05-09-2012 05:22 PM
You seem to be getting your time stamps from looking at the file modified time. Why not read the time when you collect your data, convert to a double and save it along with your measured data to the file. You can extract the time (seconds since 1st Jan 1904) like you do your measured data and use that for the X axis in your plots.
You can also simplify the way you get your file data into the 3 plots, take a look at the image.
Ian
05-10-2012 08:54 AM
Hello,
Thanks for the suggestion. I hope this doesn't make my VI too slow. I tried it with three graphs and it looks good so far. The attached image shows a good idea of how I did this. And looking at the results it's pretty promising. Although, I'm getting Error Code 4 on every execution. Do you why that might be?
Thanks for all the help.
Jose
05-10-2012 12:00 PM
You can get details of the error codes here: http://zone.ni.com/reference/en-XX/help/371361H-01/lverror/misc_lv_error_codes/
Error code 4 is 'End of file encountered.'
05-11-2012 01:48 PM
Could that error be the cause of this resulting graph. I also attached a graph done with excel using the captured values. In the labview it seems that the graph duplicated or went back in time. The graph is done with the logged data as see in the code I send earlier. Using the logged data in an spreadsheet It can be seen that the data does not go back in time or duplicates. What might be causing the data to do this? Thanks.
Jose
05-11-2012 02:24 PM
Looking at your Excel graph the data is taken over approximately 3 hours, whereas the LabVIEW chart shows time for 13 hours (taking you into the next day).
I notice that in your code you take two columns from your data array into a sub vi, this then outputs the timestamp array. I don’t know how your date and time are formatted, but I should check out the code in that vi. Is there a mismatch between 12 or 24 hr system?
Regards
Ian
05-17-2012 08:40 AM
IanW,
Thanks. I got it. It appears that my code for changing AM-PM to hours from 0-24 was not accurate. Now it is working very well.
Thanks for the help.
Jose