FactoryTalk SE - Execute VBA code when interval elapsed

rasen

Member
Join Date
Oct 2013
Location
Qwe
Posts
3
Hi,
I've got a project where I have to execute a VBA code cyclically - let's say every 1 minute.

I've created a 'hidden' display which is opened all the time, and I attached my code to a button. Then I setup an event which triggers every 1 minute and calls: Invoke HiddenDisp.Button.Realeased()(). Unfortunately 'invoke' action doesn't work from HMI server (which is understandable).

What's the best way to solve this? I'm thinking about adding a numeric display connected with a 'trigger tag' and call my code on Change(). Is there a more fancy solution?



PS.
The VBA code gathers values from specified tags and insert them into SQL table. I know that FTV has data log models which support ODBC but they save values in a weird form using three tables (FloatTable, TagTable, StringTable). Is it possible to change that? Eg. I have table 'Temperatures' with columns:
Date | Temp1 | Temp2 | Temp3 | ... Is it possible somehow to configure form of those data logs?
 
I just use a numeric on the hidden display, which is controlled from the PLC. Then fire your logging code in the OnChange event for that numeric.

If you have multiple clients, make sure that you only allow one computer to handle your datalogging.

The FTV Datalog is what it is.
 
Hi,
I've got a project where I have to execute a VBA code cyclically - let's say every 1 minute.

I've created a 'hidden' display which is opened all the time, and I attached my code to a button. Then I setup an event which triggers every 1 minute and calls: Invoke HiddenDisp.Button.Realeased()(). Unfortunately 'invoke' action doesn't work from HMI server (which is understandable).

What's the best way to solve this? I'm thinking about adding a numeric display connected with a 'trigger tag' and call my code on Change(). Is there a more fancy solution?



PS.
The VBA code gathers values from specified tags and insert them into SQL table. I know that FTV has data log models which support ODBC but they save values in a weird form using three tables (FloatTable, TagTable, StringTable). Is it possible to change that? Eg. I have table 'Temperatures' with columns:
Date | Temp1 | Temp2 | Temp3 | ... Is it possible somehow to configure form of those data logs?


Bom dia, sera que alguem pode me ajudar?

Alguem sabe me dizer como faco para deixar rodando um script por tras da tela toda hora para atualizacao de valores? O script ja tenho, ele busca valores da planilha em excel quando digitado e mostra na tela do supervisorio. Este eu tava executando via botao, mas nao quero desta maneira, quero quando eu colocar o valor no excel meu supervisorio ja se atualize sozinho.

Sera que alguem pode me ajudar como fazer isto?
 

Similar Topics

Is there a way to create a Macro that is executed when a display is opened. I know how to create a Display_AnimationStart() routine to execute...
Replies
6
Views
6,531
Hello, I have a panelview plus that reads from 4 different PLC's. 2 of these used to be Micrologix PLC's and someone else went and updated them to...
Replies
3
Views
101
Hi. I need to create several alarm servers in an application, but first I need to know if there is any impact on communication, or if more...
Replies
0
Views
71
Hello all, I'm having trouble opening an application. After clicking open I'm prompted to login and after putting in username & password it...
Replies
0
Views
87
Has anyone found information on using the variable message file? I keep looking for documentation on how to implement the message file name as a...
Replies
0
Views
76
Back
Top Bottom