Configuration of Alarm in Zenon Editor

Configuration of Alarm in Zenon Editor

Hi,
I have a small problem with the configuration of one of the alarms coming from one of the machines linked to our data collection system.
The alarm is called "Machine in Standby" (internal variable: S0.M85.4), because we have 5programs that we run on the machine so we want to track downtime information with different program numbers.
I have written a program using Case statements that IF program number 2 is running send the value of S0.M85.4 to "varOut1" ELSE when program 4 is running send the value of S0.M85.4 to "varOut2".
For example currently we are running program 2. When we change the program to go from one product to another product, the machine is in standby mode, which means their is a recieved time for varOut1 in the alarm list. And as soon as we change the other program the machine shows recieved time for "varOut2".
The problem here is because the varOut1 is left without any cleared time information so it shows me NEGATIVE duration of time in IPA.
This can be resolved by adding few command lines in the VBA code saying , SET "Cleared_time" = "System time" for "varOut1" when program is changed from 2 to 4.
Could any one please help me in writing this statement which assigns the "Time_Cleared" field as "System_time" when a program is changed on the machine.
I Have also attached the VBA code that I wrote for this program, if you could please check and tell me what statement would I have to write to set the clear time as system time whenever the program number is changed on the machine.
Thanks.

This is a migrated post! Originally posted on 03.08.2009 by user bmcbrita. 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