analogData
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 |
Obtain the value of whether the data is correct. |
|
float |
Obtain the last recorded value of points. |
|
int |
Obtain the measurement time of points. |
|
float |
Obtain the maximum hourly value based on the acquisition time. |
|
float |
Obtain the minimum hourly value based on the acquisition time. |
|
float |
Obtain the average hourly value based on the acquisition time. |
|
float |
Obtain the hourly variation based on the acquisition time. |
|
datetime |
Obtain the time when the maximum hourly value based on the acquisition time. |
|
datetime |
Obtain the time when the minimum hourly value based on the acquisition time. |
|
float |
Obtain the maximum daily value based on the acquisition time. |
|
float |
Obtain the minimum daily value based on the acquisition time. |
|
float |
Obtain the average daily value based on the acquisition time. |
|
float |
Obtain the daily variation based on the acquisition time. |
|
datetime |
Obtain the time when the maximum daily value based on the acquisition time. |
|
datetime |
Obtain the time when the minimum daily value based on the acquisition time. |
|
float |
Obtain the maximum monthly value based on the acquisition time. |
|
float |
Obtain the minimum monthly value based on the acquisition time. |
|
float |
Obtain the average monthly value based on the acquisition time. |
|
float |
Obtain the monthly variation based on the acquisition time. |
|
datetime |
Obtain the time when the maximum monthly value based on the acquisition time. |
|
datetime |
Obtain the time when the minimum monthly value based on the acquisition time. |
|
float |
Obtain the maximum annual value based on the acquisition time. |
|
float |
Obtain the minimum annual value based on the acquisition time. |
|
float |
Obtain the average annual value based on the acquisition time. |
|
float |
Obtain the annual variation based on the acquisition time. |
|
datetime |
Obtain the time when the maximum annual value based on the acquisition time. |
|
datetime |
Obtain the time when the minimum annual value based on the acquisition time. |
|
float |
Obtain the maximum value of all time. |
|
float |
Obtain the minimum value of all time. |
|
float |
Obtain the average value of all time. |
|
float |
Obtain the variation of all time. |
|
datetime |
Obtain the time when the maximum value of all time. |
|
datetime |
Obtain the time when the minimum value of all time. |
|
int |
Obtain the prohibition setting information of points. |
|
int |
Obtain a value range of points. |
|
int |
Obtain the state information(quality) of points. |
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. |
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. |
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.
|
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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
|
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
|
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
|