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,479
I have two identical machines running similar HMI projects, the only difference is one is done in FactoryTalk View Version 10 and the other is...
Replies
0
Views
29
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
36
Hoping someone can give me some guidance or confirmation of what I need to do. We have a FactoryTalk SE program that I need to change the IP...
Replies
2
Views
85
We are a water/wastewater plant, collecting realtime and manually entered data. We have been using FactoryTalk Historian (OSI PI) for real time...
Replies
3
Views
132
Back
Top Bottom