logStatus



 logStatus object is used to read the history data of status points or history data groups. Available values are the hourly / daily / monthly / annual / cumulative On / Off count and On / Off duration.




Methods




Return Type

Method

Description

  list[historicalStatusData]

readData( model, name, start, end )

Read the history information list of status points between the start date and the end date in history data groups.

  historicalStatusData

readDataOnTime( model, name, date )

Read the history information of status points stored on the date entered in history data groups.

  list[historicalStatusData]

readStatusLog( name, start, end, type )

Read the history information list of status points stored between the start date and the end date.

  historicalStatusData

readStatusLogOnTime( name, date, type )

Read the history information of status points stored on the entered date.


  list[historicalStatusData] readData( setname:History data group name, name:Point name, start:Start date, end:End date )

 

  readData obtains the history information of search periods of status points among points


        ㆍ Enter the registered group name to setname as String.

        ㆍ Enter the name of status points to name as String.

        ㆍ Enter the start date to start using Python datetime.

        ㆍ Enter the end date to end using Python datetime.


        ※ Refer Python script datetime usage.


 The usage of history information is introduced on historicalStatusData.



  Example)

   


       import datetime

       start = datetime.datetime.now().replace(hour=0,minute=0,second=0,microsecond=0)

       end = start + datetime.timedelta(days=1)


       data_list = logStatus.readData('History data group1', 'Station1.Power', st, et )

       << data_list saves the history information of Station1.Power between 0:00:00 today to 0:00:00 a day after.


   



  historicalStatusData readDataOnTime( setname:History data group name, name:Point name, time:Search date )

 

  readDataOnTime obtains the information at a specified time of status points.


        ㆍ Enter the registered group name to setname as String.

        ㆍ Enter the name of status points to name as String.

        ㆍ Enter the search date to time using Python datetime.

        ㆍ Precautions when entering time to time

                - Set the search time according to the collection period in Data Explorer for which the history data group is registered.

                - For example, if the collection period is a 15 minutes interval, you should enter 0, 15, 30, 45 for the minute and 0 for the second.

                - If the collection period is a 10 seconds interval, you should enter 0, 10, 20, 30, 40, 50 for the second.

                - The usage of history information is introduced on 9.2.12.


        ※ Refer Python script datetime object usage.


  The usage of history information is introduced on historicalStatusData.



  Example)

   


       import datetime

       tm = datetime.datetime(2014, 1, 1, 1, 2, 1)  << 2014-1-1 1:02:01 of Python datetime format.

       # Suppose the collection period of history data group1 is a 1 second interval.


       data = logStatus.readDataOntime('History data group1', 'Station1.Power', time )

       # data saves the history information at 2014-1-1 1:02:01 of Station1.Power.


   



  list[historicalStatusData] readStatusLog( name:Point name, start:Start date, end:End date, type:Type )

 

  readStatusLog obtains the history information of status points based on the type as a list.


        ㆍ Enter the name of status points to name.

        ㆍ Enter the start date to start using Python datetime.

        ㆍ Enter the end date to end using Python datetime.

        ㆍ There are five types of type.

                - logAnalog.Time : Hour

                - logAnalog.Day : Day

                - logAnalog.Month : Month

                - logStatus.Year : Year

                - logAnalog.Total : Cumulative


        ※ Refer Python script datetime object usage.


  The usage of history information is introduced on historicalStatusData.



  Example)

   


       import datetime

       start = datetime.datetime.now().replace(hour=0,minute=0,second=0,microsecond=0)

       end = start + datetime.timedelta(days=1)


       data_list = logStatus.readStatusLog('Station1.Power', st, et, logStatus.Time)

       # data_list saves the hourly history information list of Station1.Power.


   



  historicalStatusData readStatusLogOnTime( name:Point name, time:Search date, type:Type )

 

  readStatusLogOnTime obtains the history information during the search date of status points.


        ㆍ Enter the registered group name to setname as String.

        ㆍ Enter the name of status points belonging to the group to name as String.

        ㆍ Enter the search date to time using Python datetime.

        ㆍ There are 5 types of type.

                - logAnalog.Time : Hour

                - logAnalog.Day : Day

                - logAnalog.Month : Month

                - logStatus.Year : Year

                - logAnalog.Total : Cumulative


        ※ Refer Python script datetime object usage.


  The usage of history information is introduced on historicalStatusData.



  Example)

   


       import datetime

       tm = datetime.datetime(2014, 1, 1, 1, 0, 0)  << 2014-1-1 1:00:00 of Python datetime format.

       data = logStatus.readStatusLogOnTime('Station1.Power', time, logStatus.Time )

       # data saves the time history information at 2014-1-1 1:00:00 of Station1.Power.