analogData



 analogData is the value through the function getAnalogData in scada

 The data includes various information such as the state of analog points, the last data, the maximum/minimum/average values, the maximum/minimum time, tag, limit, and quality. It has built-in functions that allow you to recall various values.


 Use examples)

        anaData = scada.getAnalogData('Point name')

        val = anaData.isGood()


 analogData consists of similar functions to logAnalog, but unlike the searchable by specifying data in logAnalog, the data is acquired based on the acquisition time.




Methods




Return Type

Method

Description

int

isGood()

Obtain the value of whether the data is correct.

float

lastValue()

Obtain the last recorded value of points.

int

scanTime()

Obtain the measurement time of points.

  float

hourMaxValue()

Obtain the maximum hourly value based on the acquisition time.

  float

hourMinValue()

Obtain the minimum hourly value based on the acquisition time.

  float

hourAvgValue()

Obtain the average hourly value based on the acquisition time.

  float

hourDeltaValue()

Obtain the hourly variation based on the acquisition time.

  datetime

hourMaxTime()

Obtain the time when the maximum hourly value based on the acquisition time.

  datetime

hourMinTime()

Obtain the time when the minimum hourly value based on the acquisition time.

  float

dayMaxValue()

Obtain the maximum daily value based on the acquisition time.

  float

dayMinValue()

Obtain the minimum daily value based on the acquisition time.

  float

dayAvgValue()

Obtain the average daily value based on the acquisition time.

  float

dayDeltaValue()

Obtain the daily variation based on the acquisition time.

  datetime

dayMaxTime()

Obtain the time when the maximum daily value based on the acquisition time.

  datetime

dayMinTime()

Obtain the time when the minimum daily value based on the acquisition time.

  float

monthMaxValue()

Obtain the maximum monthly value based on the acquisition time.

  float

monthMinValue()

Obtain the minimum monthly value based on the acquisition time.

  float

monthAvgValue()

Obtain the average monthly value based on the acquisition time.

  float

monthDeltaValue()

Obtain the monthly variation based on the acquisition time.

  datetime

monthMaxTime()

Obtain the time when the maximum monthly value based on the acquisition time.

  datetime

monthMinTime()

Obtain the time when the minimum monthly value based on the acquisition time.

float

yearMaxValue()

Obtain the maximum annual value based on the acquisition time.

float

yearMinValue()

Obtain the minimum annual value based on the acquisition time.

float

yearAvgValue()

Obtain the average annual value based on the acquisition time.

float

yearDeltaValue()

Obtain the annual variation based on the acquisition time.

datetime

yearMaxTime()

Obtain the time when the maximum annual value based on the acquisition time.

datetime

yearMinTime()

Obtain the time when the minimum annual value based on the acquisition time.

  float

totalMaxValue()

Obtain the maximum value of all time.

  float

totalMinValue()

Obtain the minimum value of all time.

  float

totalAvgValue()

Obtain the average value of all time.

  float

totalDeltaValue()

Obtain the variation of all time.

  datetime

totalMaxTime()

Obtain the time when the maximum value of all time.

  datetime

totalMinTime()

Obtain the time when the minimum value of all time.

  int

tag()

Obtain the prohibition setting information of points.

  int

limit()

Obtain a value range of points.

  int

quality()

Obtain the state information(quality) of points.


  int isGood()

 

  isGood returns the state of data.


        ㆍ If the return value is 1, it is correct data.

         If it is 0, it means the server stopped due to abnormal data, the unusual state of drivers, the error of data. quality() method stores error information.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of the analog point matched with the entered point name.

       val = ana_Data.isGood();  << If the val is 1, it is correct data and if the val is 0, it is abnormal data.





  float lastValue()

 

  lastValue returns the last recorded value(the recent value) on analog points.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.lastValue();  << Enter the last recorded value to val.





  int scanTime()

 

  scanTime returns the measurement time of points.


        ㆍ The return value is the number calculated in seconds.

        ㆍ The return value can convert into time value through the function datetime.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       scanTimedata = ana_Data.scanTime();  << The measurement time of analog data is entered on scanTimedata.


       tm = datetime.datetime.fromtimestamp(scanTimedata);  << Convert the number in seconds into the Python data format.

                   




  float hourMaxValue()

 

  hourMaxValue returns the maximum hourly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.hourMaxValue();  << Enter the maximum hourly value to val.






  float hourMinValue()

 

  hourMinValue returns the minimum hourly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.hourMinValue();  << Enter the minimum hourly value to val.





  float hourAvgValue()

 

  hourAvgValue returns the average hourly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.hourAvgValue();  << Enter the average hourly value to val.





  float hourDeltaValue()

 

  hourDeltaValue returns the hourly variation based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.hourDeltaValue();  << Enter the hourly variation to val.





  datetime hourMaxTime()

 

  hourMaxTime returns the time when the maximum hourly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.hourMaxTime();  << Enter the time when maximum hourly value to date.





  datetime hourMinTime()

 

  hourMinTime returns the time when the minimum hourly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.hourMinTime();  << Enter the time when the minimum hourly value to date.





  float dayMaxValue()

 

  dayMaxValue returns the maximum daily value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.dayMaxalue();  << Enter the maximum daily value to val.





  float dayMinValue()

 

  dayMinValue returns the minimum daily value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.dayMinValue();  << Enter the minimum daily value toval.





  float dayAvgValue()

 

  dayAvgValue returns the average daily value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.dayAvgValue();  << Enter the average daily value to val.





  float dayDeltaValue()

 

  dayDeltaValue returns the daily variation based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.dayDeltaValue();  << Enter the daily variation to val.





  datetime dayMaxTime()

 

  dayMaxTime returns the time when the maximum daily value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.dayMaxTime();  << Enter the time when the maximum daily value to date.





  datetime dayMinTime()

 

  dayMinTime returns the time when the minimum daily value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.dayMinTime();  << Enter the time when the minimum daily value to date.





  float monthMaxValue()

 

  monthMaxValue returns the maximum monthly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.monthMaxValue();  << Enter the maximum monthly value to val.





  float monthMinValue()

 

  monthMinValue returns the minimum monthly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.monthMinValue();  << Enter the minimum monthly value to val.





  float monthAvgValue()

 

  monthAvgValue returns the average monthly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.monthAvgValue();  << Enter the average monthly value to val.





  float monthDeltaValue()

 

  monthDeltaValue returns the monthly variation based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.monthDeltaValue();  << Enter the monthly variation to val.





  datetime monthMaxTime()

 

  monthMaxTime returns the time when the maximum monthly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.monthMaxTime();  << Enter the time when the maximum monthly value to date.





  datetime monthMinTime()

 

  monthMinTime returns the time when the minimum monthly value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.monthMinTime();  << Enter the time when the minimum monthly value to date.





  float yearMaxValue()

 

  yearMaxValue returns the maximum annual value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.yearMaxValue();  << Enter the maximum annual value to val.





  float yearMinValue()

 

  yearMinValue returns the minimum annual value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.yearMinValue();  << Enter the minimum annual value to val.





  float yearAvgValue()

 

  yearAvgValue returns the average annual value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.yearAvgValue();  << Enter the average annual value to val.





  float yearDeltaValue()

 

  yearDeltaValue returns the annual variation based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.yearDeltaValue();  << Enter the annual variation to val.





  datetime yearMaxTime()

 

  yearMaxTime returns the time when the maximum annual time based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.yearMaxTime();  << Enter the time when the maximum annual time to date.





  datetime yearMinTime()

 

  yearMinTime returns the time when the minimum annual value based on the acquisition time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.yearMinTime();  << Enter the time when the minimum annual value to date.





  float totalMaxValue()

 

  totalMaxValue returns the maximum value of all time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.totalMaxValue();  << Enter the maximum value of all time to val.





  float totalMinValue()

 

  totalMinValue returns the minimum value of all time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of the analog point matched with the entered point.

       val = ana_Data. totalMinValue();  << Enter the minimum value of all time to val.





  float totalAvgValue()

 

  totalAvgValue returns the average value of all time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data. totalAvgValue();  << Enter the average value of all time to val.





  float totalDeltaValue()

 

  totalDeltaValue returns the variation of all time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       val = ana_Data.totalDeltaValue();  << Enter the variation of all time to val.





  datetime totalMaxTime()

 

  totalMaxTime returns the time when the maximum value of all time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.totalMaxTime();  << Enter the time when the maximum value of all time to date.





  datetime totalMinTime()

 

  totalMinTime returns the time when the minimum value of all time.



  Example)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       date = ana_Data.totalMinTime();  << Enter the time when the minimum value of all time to date.





  int tag()

 

  tag returns the prohibition state value of points.


         If the return value is 0, no settings set.

         Users can check the return value by comparison.

         tag return value

                - scada.ControlInhabit (0x01) : Control prohibition

                - scada.AlarmInhibit (0x02) : Alarm prohibition

                - scada.ScanInhabit (0x04) : Scan prohibition

                - scada.UpdateInhabit (0x08) : Update prohibition



  Examples)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       tagdata = ana_Data.tag();  << Enter the tag information of analog data to tagdata If tagdata information is 0, no settings set.

       

       if (tagdata & scada.ControlInhabit):

       << TRUE: Control prohibition, FALSE: No control prohibition

       if (tagdata & scada.AlarmInhibit):

       << TRUE: Alarm prohibition, FALSE: No alarm prohibition

       if (tagdata & scada.ScanInhabit):

       << TRUE: Scan prohibition, FALSE: No scan prohibition

       if (tagdata & scada.UpdateInhabit):

       << TRUE: Update prohibition, FALSE: No update prohibition

       




  int limit()

 

  limit returns to the value range of analog points.


         If the return value is 0, no range set, and it is correct data.

         Users can check the return value by comparison.

         limit return value

                - scada.LowHi (0x01) : Hi Low exceeded

                - scada.LowLowHiHi (0x02) : HiHi LowLow exceeded

                - scada. UnReasonable (0x04) : Out of range data

                - scada.Roc (0x08) : Out of change rate data

                - scada.Abnormal (0x10) : Abnormal data



  Example)

   


       ana_Data = scada.getAnalogData(‘Point name’);  << Read the data of analog points matched with the entered point.

       limitdata = ana_Data.limit();  << Enter the limit information of analog data to limitdata. If the limitdata information is 0, there is no information about the range and it is correct data

       

       if (limitdata & scada.LowHi):

       << TRUE: Out of LowHi range data, FALSE: Inside the range data

       if (limitdata & scada.LowLowHiHi):

       << TRUE: Out of LowLowHiHi range data, FALSE: Inside the range data

       if (limitdata & scada.UnReasonable):

       << TRUE: Out of range data, FALSE: Inside the range data

       if (limitdata & scada.Roc):

       << TRUE: Out of change rate data, FALSE: Inside the change rate data

       if (limitdata & scada.Abnormal):

       << TRUE: Abnormal data, FALSE: Normal data

             




  int quality()

 

  quality returns the reason when the data of analog points is abnormal.


         If the return value is 0, it is correct data.

         Users can check the return value by comparison.

         quality return value

                - scada.NonTelemeted (0x01) : Fep scan failed

                - scada.ManuallyReplaced (0x04) : Manual entry state

                - scada.Failed (0x08) : Fep response failed

                - scada.OldData (0x20) : The data state persists for more than a certain amount of time

                - scada.BadData (0x40) : Abnormal data



  Examples)

   


       ana_Data = scada.getAnalogData('Point name');  << Read the data of analog points matched with the entered point.

       qualitydata = ana_Data.quality();  << Enter the quality information of the analog data to qualitydata. If the qualitydata information is 0, there is no quality information and it is correct data.

       

       if (qualitydata& scada.NonTelemeted):

       << TRUE: Fep scan failed data, FALSE: Normal data

       if (qualitydata& scada.ManuallyReplaced):

       << TRUE: Manual entry state data, FALSE: Normal data

       if (qualitydata& scada.Failed):

       << TRUE: Fep response failed data, FALSE: Normal data

       if (qualitydata& scada.OldData):

       << TRUE: The data state persists for more than a certain amount of time, FALSE: Normal data

       if (qualitydata& scada.BadData):

       << TRUE: Abnormal data, FALSE: Normal data