TIA V12 Prof. Runtime script problem

genesisfm

Member
Join Date
Apr 2008
Location
Europe
Posts
23
Hi,

I want to make every day a report with all the alarms on a hitlist.
But my problem is, how can i detect the maximum number of data records for those alarms (because its variable).

I made the following script but i can;t detect the EOF (/ of end of the alarms).

Sub Set_limits()
Dim objAlarmControl
'create reference to AlarmControl
Set objAlarmControl = HMIRuntime.Screens("Alarmen").ScreenItems("Alarm view_1")

'Set the hitlistmaxsourceitems = 1
objAlarmControl.HitListMaxSourceItems = 1

'Select the range
If (objAlarmControl.MsgFilterSQL = "") Then
objAlarmControl.MsgFilterSQL = "DATETIME >= '2013-07-24 00:00:00.000'"

Else
objAlarmControl.MsgFilterSQL = ""
End If

'Loop for finding the end of the hitlist
Do
objAlarmControl.HitListMaxSourceItemsWarn = True
objAlarmControl.HitListMaxSourceItems = objAlarmControl.HitListMaxSourceItems + 1
SetTag "test", objAlarmControl.HitListMaxSourceItems

If objAlarmControl.HitListMaxSourceItemsWarn = True Then
SetBit "test_1"
Else
ResetBit "test_1"
End If
'Detected the last histlist item? Then end the loop
Loop Until objAlarmControl.HitListMaxSourceItemsWarn = False

End Sub

I hope someone can help me.

Thx
 

Similar Topics

hello all, I have a project in Wincc V15 and I need to copy some screens from V15 to V12 TIA. How do I it. I cant copy paste as there are...
Replies
2
Views
1,927
Hi guys. Sorry. I can help me please, i no dont the program of a furnace, i do download en simatic manager, but so export a tia portal 13 i have...
Replies
3
Views
1,826
Hello, I have a 1214 DC/DC/DC PLC with SW created by TIA V12 SP1. Project in laptop and SW in PLC are different - it means that some functions are...
Replies
5
Views
2,173
Dear sirs I have plc S7 1200 from Siemens loaded with file used tia v12 and i have tia v13 on my pc when I have tried to upload I can not upload...
Replies
0
Views
4,014
Hi All, I am just learning to use Siemens TIA portal V12 (and PLCs) and having difficulty with the IP addresses when connecting from HMI and PLC...
Replies
3
Views
5,089
Back
Top Bottom