Writing to HMI Tags in VBA (FactoryTalk View SE)

phuz

Member
Join Date
Jun 2008
Location
Mohnton, PA
Posts
1,043
Is this example really the easiest way to write to an HMI tag in VBA?
I've been playing with this for a couple hours and so far this is the only thing I can get to actually work.

Code:
Public WithEvents MyGroup As TagGroup
Public oTag As Tag

Private Sub Display_AnimationStart()
Set MyGroup = Application.CreateTagGroup(Me.AreaName)
MyGroup.Add ("MyHMITag")
Set oTag = MyGroup.Item("MyHMITag")
oTag.Value = 0
End Sub

Even in IFIX this can be accomplished with a single line of:
writevalue 1, "Node.tagname.F_CV"
 
That's actually about the best, neatest, most streamlined version of "how to write a tag in FTView SE with VBA" I've seen yet (y)
 
I was looking for a way to write to tags and also how to in a popup with parameters and found the ExecuteCommand function. It seems to work.

Code:
Private Sub Button_Released()
    Dim TagName As String
    Dim sCmd As String
  
    TagName = Me.TagParameters(1)
        
    sCmd = "Toggle {" & TagName & "}"
    Me.Application.ExecuteCommand sCmd
End Sub
 

Similar Topics

Anyone have any experience doing this? Is this too much of an undertaking to consider? What are the biggest hurdles? My guesses of the biggest...
Replies
69
Views
22,162
Why are there empty screens in between full screens are there supposed to be empty screens like 1, 2are full 3 is empty and 4 is empty and 5 is full
Replies
16
Views
5,279
hello all, I was wondering if there were anyway to write values to my plc micrologix 1000 from the HMI using the advancedhmi software nad not my...
Replies
9
Views
4,263
I'm gradually replacing a Windows 2000 PC running Wonderware with a 15" Red Lion HMI. The application is a large plastic extruder. Right now, the...
Replies
0
Views
3,135
Has anyone ever used an input device like this? I looking for an option for an operator to hand write info on a trend to be printed. any help...
Replies
0
Views
2,758
Back
Top Bottom