Create cumulative time for output on

Discussion about Code Builder Builder and Winlog language support.
Post Reply
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: Create cumulative time for output on

Post by admin »

Dear Sir,
The only way is to create a code function.
For example:

Code: Select all

Function void counter()
#startup

    int counter;

    While(WindowIsOpen())

        if (GetDigGateValue("Output", 0) == 1) then
            counter = GetNumGateValue("SecondsCounter", 0);
            counter = counter + 1;
            SetNumGateValue("SecondsCounter", 0, counter);
        end

        Sleep(1000);
    end
end
Best regards
Post Reply