Dear Experts,
I want to pop up a window automatically when a tag value becomes high.
I am using FT View SE v8 & RSLOGIX5000 v16
Please tell me how can i do it???
Eagerly waiting.
Popup windows on the FT View 8
-
- Posts: 17
- Joined: Sun Jun 14, 2015 4:41 pm
Re: Popup windows on the FT View 8
Dear Experts!!!
I found this everywhere, but i did not get any solution.
I am really tired of being fool all the time.
I have tried everything but not able to show a pop on high tag.
Please please please please help me!!!!
What i want to do is : wheneva a tag named "heater_off_alarm" gets high, a display named "Heater off" should pop up on the the current working screen
I found this everywhere, but i did not get any solution.
I am really tired of being fool all the time.
I have tried everything but not able to show a pop on high tag.
Please please please please help me!!!!
What i want to do is : wheneva a tag named "heater_off_alarm" gets high, a display named "Heater off" should pop up on the the current working screen
-
- Posts: 17
- Joined: Sun Jun 14, 2015 4:41 pm
-
- Posts: 80
- Joined: Wed Apr 30, 2014 6:16 pm
Re: Popup windows on the FT View 8
Congratulations. Why don't you share your solution?sachincool786 wrote:Done
-
- Posts: 17
- Joined: Sun Jun 14, 2015 4:41 pm
Re: Popup windows on the FT View 8
Public WithEvents oGroup As TagGroup
Public Sub Display_AnimationStart()
Dim TagsInError As StringList
On Error Resume Next
Err.Clear
If oGroup Is Nothing Then
Set oGroup = Application.CreateTagGroup(Me.AreaName, 500)
If Err.Number Then
LogDiagnosticsMessage "Error creating TagGroup. Error: " _
& Err.Description, ftDiagSeverityError
Exit Sub
End If
oGroup.Add "Heating_Auto_OFF_SCADA"
oGroup.Add "stack_Glass_R2_Alarm_SCADA"
oGroup.Active = True
oGroup.RefreshFromSource TagsInError
End If
End Sub
Private Sub oGroup_Change(ByVal TagNames As IGOMStringList)
On Error Resume Next
Dim oTag1 As Tag
Dim oTag2 As Tag
If Not oGroup Is Nothing Then
Set oTag1 = oGroup.Item("Heating_Auto_OFF_SCADA")
Set oTag2 = oGroup.Item("stack_Glass_R2_Alarm_SCADA")
Err.Clear
End If
If oTag1.Value = 1 Then
ShowDisplay ("Heating_Off")
End If
If oTag2.Value = 1 Then
ShowDisplay ("R2_Alarm")
End If
End Sub
Public Sub Display_AnimationStart()
Dim TagsInError As StringList
On Error Resume Next
Err.Clear
If oGroup Is Nothing Then
Set oGroup = Application.CreateTagGroup(Me.AreaName, 500)
If Err.Number Then
LogDiagnosticsMessage "Error creating TagGroup. Error: " _
& Err.Description, ftDiagSeverityError
Exit Sub
End If
oGroup.Add "Heating_Auto_OFF_SCADA"
oGroup.Add "stack_Glass_R2_Alarm_SCADA"
oGroup.Active = True
oGroup.RefreshFromSource TagsInError
End If
End Sub
Private Sub oGroup_Change(ByVal TagNames As IGOMStringList)
On Error Resume Next
Dim oTag1 As Tag
Dim oTag2 As Tag
If Not oGroup Is Nothing Then
Set oTag1 = oGroup.Item("Heating_Auto_OFF_SCADA")
Set oTag2 = oGroup.Item("stack_Glass_R2_Alarm_SCADA")
Err.Clear
End If
If oTag1.Value = 1 Then
ShowDisplay ("Heating_Off")
End If
If oTag2.Value = 1 Then
ShowDisplay ("R2_Alarm")
End If
End Sub
-
- Posts: 80
- Joined: Wed Apr 30, 2014 6:16 pm
Re: Popup windows on the FT View 8
I think your code is similar to opc group. I will test it later.
There is another way to show a popup when a tag changes its value.
a) First you need to put an invisible numeric display in all the displays. In my projects, I always use a global object as a header with common information for all displays (title, company's logo, time&date, reset button) and I add the numeric display there. Let's say the numeric display is NumericDisplay1.
b) Open NumericDisplay1's properties and write your tag (heater_off_alarm) in the expression field. Close properties.
c) Open Property Panel for NumericDisplay1 and select VBA Control in ExposeToVBA field.
d) Open VBA Code for the global object and add this code:
Popup_Message is the name of the display you are using as a banner. Remember: you need to select On Top in the display settings.
That's all.
There is another way to show a popup when a tag changes its value.
a) First you need to put an invisible numeric display in all the displays. In my projects, I always use a global object as a header with common information for all displays (title, company's logo, time&date, reset button) and I add the numeric display there. Let's say the numeric display is NumericDisplay1.
b) Open NumericDisplay1's properties and write your tag (heater_off_alarm) in the expression field. Close properties.
c) Open Property Panel for NumericDisplay1 and select VBA Control in ExposeToVBA field.
d) Open VBA Code for the global object and add this code:
Code: Select all
Private Sub NumericDisplay1_Change()
If Me.NumericDisplay1.Value = "1" Then
Me.Application.ExecuteCommand ("Display Popup_Message /CC")
End If
End Sub
Popup_Message is the name of the display you are using as a banner. Remember: you need to select On Top in the display settings.
That's all.
-
- Posts: 17
- Joined: Sun Jun 14, 2015 4:41 pm
Re: Popup windows on the FT View 8
In your case, it will work only once when that screen is open; on which you have put your Numerical Display.
That screen should be updating all the time no???
so that is can detect all the times.
That screen should be updating all the time no???
so that is can detect all the times.
-
- Posts: 80
- Joined: Wed Apr 30, 2014 6:16 pm
Re: Popup windows on the FT View 8
This method works all the time and not only when the screen is open. It's because the Numeric Display is updated every time the screen is updated (by default, 1 second). The event NumericDisplay1_Change is working all the time the screen is open.sachincool786 wrote:In your case, it will work only once when that screen is open; on which you have put your Numerical Display.
That screen should be updating all the time no???
so that is can detect all the times.
You can set update rate in Properties > Maximum Tag Update Rate (screen properties).