FTView SE - VBA to get quantity of alarms at banner

Revnus

Member
Join Date
Aug 2019
Location
Brazil
Posts
73
Hi.

I'm trying to get the number of alarms from an alarm and event banner located on a display called "alarmepag1" and write to a HMI tag "AlmInAlm".
No success yet. How can I do it?

Here is the last code that I tried:

Dim ChangeAlarmVBA_int As Tag
Dim MyGroup As TagGroup
Dim bannerVBA As AlarmSummary
Option Explicit

Private Sub Display_AnimationStart()
On Error GoTo ErrHandler

Set MyGroup = Application.CreateTagGroup(Me.AreaName)
MyGroup.Add ("AlmInAlm")
Set ChangeAlarmVBA_int = MyGroup.Item("AlmInAlm")

Set bannerVBA = Me.Application.LoadedDisplays("alarmepag1").Elements("FactoryTalkAlarmandEventBanner1")
ChangeAlarmVBA_int.Value = bannerVBA.AlarmFaultCount

Exit Sub

ErrHandler:
Application.LogDiagnosticsMessage "Error occurred in " & ThisDisplay.FullName & _
" Display_AnimationStart(). Error # " & Err.Number & ": " & Err.Description, ftDiagSeverityError
End Sub
 

Similar Topics

Hi all. Currently I'm working on a VBa script for FTView. I would like to understand a bit better about some commands. 1) What are the...
Replies
3
Views
599
Hi all. I'm running a VBA code on my FTView which is actually working, but everytime I open the display that calls the VBA code, it throws the...
Replies
28
Views
1,814
Greetings, I have this question: How can I add a tag, in my case LS:0 {#5} (literal string of tag #5), to a variable using VBA? I couldn't find...
Replies
4
Views
897
Hello Every one, I need a help on vba code for getting data from MSSQL server 2014 to display in FTview SE client version 12 . Thanks. Please...
Replies
4
Views
1,816
I've been messing around with trying to find a way to clear all PlantPAx AOI latched alarms via the Alarm Banner or Summary objects. So far, I can...
Replies
2
Views
1,740
Back
Top Bottom