head = scada.getAnalogData('건물부하.분기#1.total 유효전력 - 공통')
conference = scada.getAnalogData('건물부하.분기#2.total 유효전력 - 공통')
test = scada.getAnalogData('건물부하.분기#3.total 유효전력 - 공통')
lounge = scada.getAnalogData('건물부하.분기#4.total 유효전력 - 공통')
lab_south = scada.getAnalogData('건물부하.분기#5.total 유효전력 - 공통')
lab_center = scada.getAnalogData('건물부하.분기#6.total 유효전력 - 공통')
lab_north = scada.getAnalogData('건물부하.분기#7.total 유효전력 - 공통')
total = 0
if(head.isGood()):
total += head.lastValue()
if(conference.isGood()):
total += conference.lastValue()
if(test.isGood()):
total += test.lastValue()
if(lounge.isGood()):
total += lounge.lastValue()
if(lab_south.isGood()):
total += lab_south.lastValue()
if(lab_center.isGood()):
total += lab_center.lastValue()
if(lab_north.isGood()):
total += lab_north.lastValue()
scada.setValue('건물부하.total 유효전력', total)
|