FTView SE VBA TagGroup

adh2004plc

Member
Join Date
Dec 2011
Location
duluth,mn
Posts
2
I am using ftview se 8.0. I am currently working to monitor tags and send their values along with some other information over to sql server on change. Before anyone asks I am using the data log model on a number of other tags but these particular tags and the information I am trying to get to sql dont fit with using a datalog model. I am running into an error that says Invalid procedure call or argument. I am guessing it has to do with what I am trying to pass as far as the TagNames.Item(i) is concerned.

My ultimate goal here is to track which tag has changed and what its value is so that I can pass that information to the SQLInsert subroutine to have it logged to sql. Any help would be greatly appreciated. Here is a copy of the subroutine that is causing my error.


Private Sub mtgDevice_Change(ByVal TagNames As IGOMStringList)

Dim i As Long
Dim UserID As String
Dim Message As String
Dim Device As String


For i = 0 To TagNames.Count - 1

lTime = formatLogTime(LogTime.Value)
Message = "N/A"
UserID = SysUser.Value
Call SQLInsert(lTime, Devices(i), CStr(TagNames.Item(i)), Message, UserID)

Next


End Sub
 
Code:
Private Sub mtgDevice_Change(ByVal TagNames As IGOMStringList)
  Dim i As Long
  Dim UserID As String
  Dim Message As String
  Dim [COLOR=Red][B]Device[/B][/COLOR] As String
  For i = 0 To TagNames.Count - 1
    lTime = formatLogTime(LogTime.Value)
    Message = "N/A"
    UserID = SysUser.Value
    Call SQLInsert(lTime, [COLOR=Red][B]Devices[/B][/COLOR](i), CStr(TagNames.Item(i)), Message, UserID)
  Next
End Sub
Devices or Device?
 

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
594
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,793
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
894
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,808
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,733
Back
Top Bottom