Vba macro should run every 1sec without any external trigger from runtime

Vba macro should run every 1sec without any external trigger from runtime

Hi, I am using ZENON 8.20 Version, I need to take The Total no. of alarm values into historian, but it is an Screen specific type function, I am not able to take the value so i am using the VBA macro to take the value into variable, But everytime i need to trigger the function *Execute vba macro* in my case the macro should fetch data every 1 sec, i am attaching my source code, please anyone can help me

Public Sub GetAlarmItems()
Dim zAML As Alarm
Dim zAML_Items As AlarmItems
Dim zAML_Item As AlarmItem

set zAML = thisproject.Alarm

thisproject.Variable.Item("TEST_E").value = zAML.Items.Count

End Sub



How can I modify this program to get data every 1 sec, Here my variable is TEST_E

This is a migrated post! Originally posted on 27.05.2021 by user MOHANLAL. Please be aware that information can be outdated.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com