Hi all,
I've just come across a weird situation. One of my colleagues has just had his PC updated to Excel 2010 and with it, upgraded to Datalink 4.2.1. He has an excel sheet which has worked perfectly well up to now, but for some reason, after his PC was upgrade he can no longer get data after a certain timestamp. The sheet has the timestamps for the month starting at the 1st of the month at 03:00 (3am to you and me), with all subsequent data at 4 hourly intervals. Simple so far.
The timestamps are configured as "$a57 + 4/24" ;the last cells timestamp + 4 hours. However, after the 12th day of the month the sheet no longer gets data. The sheet uses the PIarcval command with the retrieval mode set as "exact time". I've traced it to a rounding error in Excel where the actual timestamp is out based on the millisecond value. For example a time stamp of 1-aug-2013 03:00:00 will return no data, but a timestamp of 1-aug-2013 03:00:00:00 will return a value. It seems that PI or excel is converting the 4/24 down to the millisecond, and the rounding error compounds itself through the cells until it reaches a point where the millisecond value skews the timestamp enough so that I can't get data as "exact time".
FYI - he uses the piarcval and exact time function as the data he is looking at is Lab data and he wants to know when we have missed samples in a an easy to see layout - he checks to see if the PI function returns "no valid data" (or whatever the error is for no value at the specified time) and uses that to blank the cell. That way he can see at what time samples have been missed.
Is there anyway to stop this rounding error?? Is it just an Excel issue (32 'vs' 64 bit)??? Can you force PI just to look at the seconds not the milliseconds of a timestamp??? My own suggestion is that he edits the sheet and creates the timestamps using a concatenation of the date and the timestamp, which should remove the rounding error.