readDataOnTime obtains the data of the trend group at a specified time by setting the time of data.
ㆍ Enter the name of trend groups to name as String.
ㆍ Enter the search date to date using Python datetime.
ㆍ Precautions when entering the desired time.
- Set the time according to the storage time of trend groups.
- If the trend group is saved in 1 second interval, the user must set datetime up to the second. If the trend group is saved in 60 seconds interval, the user must set datetime up to the minute.
- The trend group saved in an hour interval and the user must set the time by computing the saving time.
- The collection period of trend groups can be checked in Data Explorer.
※ Refer Python script datetime object usage.
The usage of history information is introduced on trandData.
Example)
import datetime # This is the statement for using Python datetime.
tm = datetime.datetime(2014, 1, 1, 1, 0, 1) << Set the search time as 2014-1-1 1:00:01.
dataset = logTrand.readDataOnTime('Trand data set 1', tm )
# If the storage period of trand data set 1 is a second, obtains the history data at 2014-1-1 1:00:01.
tm = datetime.datetime(2014, 1, 1, 2, 30, 0) << Set the search time as 2014-1-1 2:30:00.
dataset = logTrand.readDataOnTime('Trand data set 2', tm )
# If the storage period of trand data set 2 is 30 minutes, obtains the history data at 2014-1-1 2:30:00.
|