DeviceData는 [통신 채널 그룹 - 통신 채널 - 디바이스]로 구성되는 파워씬 통신 모델 구조에서 디바이스에 대한 정보를 보유하는 데이터 객체 입니다.
DeviceData는 통신 상태나 통신 성공율과 같은 디바이 통신과 관련된 정보를 가지고 있습니다. 사용자는 DeviceData를 이용하여 다음과 같은 작업을 수행할 수 있습니다.
• 디바이스에 속한 포인트 이름 및 포인트 값을 읽을 수 있습니다.
• 아래 그림과 같이 '스카다 통신 채널 요약' 화면에 표시되는 정보중 디바이스와 관련된 정보들을 읽어올 수 있습니다.
.
DeviceData를 얻기 위해서는, scada.getDevice( ) 함수를 호출합니다. 이때 인자로 조회할 디바이스 이름을 지정할 수 있습니다.
또한 scada.getDeviceList( ) 함수를 사용하면 전체 디바이스 목록을 불러올 수 있습니다.
그리고 CommChannelData 개체를 이용해서 해당 통신 채널에 속한 디바이스 정보를 읽어올 수 있습니다.
Methods
analogData getAnalogData
( pointName )
|
디바이스에 속한 지정된 아날로그 포인트의 현재 값을 포함한 데이터를 읽어 옵니다
예)
# 디바이스를 읽습니다.
device = scada.getDevice('PCS1')
# 디바이스속한 아날로그 포인트 목록을 읽습니다.
analogNames = device.getAnalogPointNameList()
for name in analogNames:
#아날로그 포인트 데이터를 얻어 옵니다.
analogData = device.getAnalogData(name)
print name ,':' , analogData.lastValue()
|
결과)
Source Type : 0.0
Grid Type : 0.0
Software Version : 0.0
Date - Year : 0.0
Date - Month : 0.0
|
|
list<string> getAnalogPointNameList
( )
|
디바이스에 속한 모든 아날로그 포인트 이름 목록을 불러 옵니다.
예)
# 디바이스를 읽습니다.
device = scada.getDevice('PCS1')
# 디바이스속한 아날로그 포인트 목록을 읽습니다.
analogNames = device.getAnalogPointNameList()
for name in analogNames:
#아날로그 포인트 데이터를 얻어 옵니다.
analogData = device.getAnalogData(name)
print name ,':' , analogData.lastValue()
|
결과)
Source Type : 0.0
Grid Type : 0.0
Software Version : 0.0
Date - Year : 0.0
Date - Month : 0.0
|
|
string getName
( )
|
디바이스 이름을 조회합니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
#디바이스를 이름을 얻어 옵니다.
print device.getName()()
|
결과)
PCS1
BMS1
PCS2
BMS2
PV
ACB1
|
|
string getDescription
( )
|
디바이스 설명을 조회합니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
#디바이스를 설명을 얻어 옵니다.
print device.getDescription()
|
|
list<string> getPointNameList
( )
|
디바이스에 속한 모든 전체 포인트 이름 목록을 불러 옵니다.
예)
# 디바이스를 읽습니다.
device = scada.getDevice('PCS1')
# 디바이스에 속한 전체 포인트 목록을 읽습니다.
points = device.getPointNameList()
for point in points :
#포인트 값을 읽습니다.
print point ,':' , device.getValue(point)
|
결과)
Schedule Mode : 1
Comm Status : 1
Topology : 0
Switch Material : 0
Filter Type : 0
Cooling Type : 0
Tranformer Type : 0
|
|
datetime getScanTime
( )
|
최근 계측 시간을 조회 합니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
#디바이스를 설명을 얻어 옵니다.
print device.getName() , ':' , device.getScanTime()
|
결과)
PCS1 : 2025-11-10 16:45:32
BMS1 : 2025-11-10 16:45:32
PCS2 : 1970-01-01 09:00:00
BMS2 : 1970-01-01 09:00:00
PV : 2025-11-10 16:45:32
ACB1 : 1970-01-01 09:00:00
|
|
int getStatus
( )
|
디바이스의 통신 상태를 읽습니다.
• 반환값 : 1 : 정상 , 0: 연결 해제
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
#디바이스의 통신 상태를 얻어 옵니다.
print device.getName() , ':' , device.getStatus()
|
결과)
PCS1 : 1
BMS1 : 1
PCS2 : 0
BMS2 : 0
PV : 1
ACB1 : 0
|
|
statusData getStatusData
( pointName )
|
디바이스에 속한 지정된 상태 포인트의 현재 값을 포함한 데이터를 읽어 옵니다
예)
# 디바이스를 읽습니다.
device = scada.getDevice('PCS1')
# 디바이스속한 상태 포인트 목록을 읽습니다.
statusNames = device.getStatusPointNameList()
for name in statusNames:
#상태 포인트 데이터를 얻어 옵니다.
statusData = device.getStatusData(name)
print name ,':' , statusData.lastValue()
|
결과)
Schedule Mode : 1
Comm Status : 1
Topology : 0
Switch Material : 0
Filter Type : 0
Cooling Type : 0
|
|
list<string> getStatusPointNameList
( )
|
디바이스에 속한 모든 상태 포인트 이름 목록을 불러 옵니다.
예)
# 디바이스를 읽습니다.
device = scada.getDevice('PCS1')
# 디바이스속한 상태 포인트 목록을 읽습니다.
statusNames = device.getStatusPointNameList()
for name in statusNames:
#상태 포인트 데이터를 얻어 옵니다.
statusData = device.getStatusData(name)
print name ,':' , statusData.lastValue()
|
결과)
Schedule Mode : 1
Comm Status : 1
Topology : 0
Switch Material : 0
Filter Type : 0
Cooling Type : 0
|
|
float getTodayCommSuccessRatio
( )
|
금일 통신 성공율을 읽습니다
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTodayCommSuccessRatio()
|
결과)
PCS1 : 100.0
BMS1 : 100.0
PCS2 : 0.0
BMS2 : 0.0
PV : 100.0
ACB1 : 0.0
|
|
int getTodayFailDuration
( )
|
금일 통신 실패 기간(초)을 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTodayFailDuration()
|
결과)
PCS1 : 0
BMS1 : 0
PCS2 : 0
BMS2 : 0
PV : 0
ACB1 : 0
|
|
int getTodayFailCount ( )
|
금일 통신 실패 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTodayFailCount()
|
결과)
PCS1 : 0
BMS1 : 0
PCS2 : 0
BMS2 : 0
PV : 0
ACB1 : 0
|
|
int getTodayNoResponseCount
( )
|
금일 통신 무응답 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTodayNoResponseCount()
|
결과)
PCS1 : 0
BMS1 : 0
PCS2 : 0
BMS2 : 0
PV : 0
ACB1 : 0
|
|
int getTodayPollingCount
( )
|
금일 통신 시도 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTodayNoResponseCount()
|
결과)
PCS1 : 190071
BMS1 : 123022
PCS2 : 0
BMS2 : 0
PV : 123031
ACB1 : 0
|
|
int getTodaySuccessPollingCount
( )
|
금일 통신 성공 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTodayNoResponseCount()
|
결과)
PCS1 : 190071
BMS1 : 123022
PCS2 : 0
BMS2 : 0
PV : 123031
ACB1 : 0
|
|
float getTotalCommSuccessRatio
( )
|
누적 통신 성공율을 읽습니다
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTotalCommSuccessRatio()
|
결과)
PCS1 : 100.0
BMS1 : 100.0
PCS2 : 0.0
BMS2 : 0.0
PV : 100.0
ACB1 : 0.0
|
|
int getTotalFailDuration
( )
|
누적 통신 실패 기간(초)을 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTotalFailDuration()
|
결과)
PCS1 : 0
BMS1 : 0
PCS2 : 0
BMS2 : 0
PV : 0
ACB1 : 0
|
|
int getTotalFailCount
( )
|
누적 통신 실패 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTotalFailCount()
|
결과)
PCS1 : 0
BMS1 : 0
PCS2 : 0
BMS2 : 0
PV : 0
ACB1 : 0
|
|
int getTotalNoResponseCount
( )
|
누적 통신 무응답 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTotalNoResponseCount()
|
결과)
PCS1 : 0
BMS1 : 0
PCS2 : 0
BMS2 : 0
PV : 0
ACB1 : 0
|
|
int getTotalPollingCount
( )
|
누적 통신 시도 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTotalPollingCount()
|
결과)
PCS1 : 190071
BMS1 : 123022
PCS2 : 0
BMS2 : 0
PV : 123031
ACB1 : 0
|
|
int getTotalSuccessPollingCount
( )
|
누적 통신 성공 횟수를 읽습니다.
예)
# 디바이스 목록을 읽습니다.
devices = scada.getDeviceList()
for device in devices:
print device.getName() , ':' , device.getTotalSuccessPollingCount()
|
결과)
PCS1 : 190071
BMS1 : 123022
PCS2 : 0
BMS2 : 0
PV : 123031
ACB1 : 0
|
|
variant getValue
( pointName )
|
디바이스에 속한 지정한 포인트의 현재 값을 읽어 옵니다.
예)
# 디바이스를 읽습니다.
device = scada.getDevice('PCS1')
# 디바이스에 속한 전체 포인트 목록을 읽습니다.
points = device.getPointNameList()
for point in points :
#포인트 값을 읽습니다.
print point ,':' , device.getValue(point)
|
결과)
Schedule Mode : 1
Comm Status : 1
Topology : 0
Switch Material : 0
Filter Type : 0
Cooling Type : 0
Tranformer Type : 0
|
|