Displaying Counter/Variable

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by CJ Polo, Dec 17, 2009.

  1. CJ Polo

    CJ Polo

    Joined:
    Nov 2, 2004
    Messages:
    18
    Likes Received:
    0
    Location:
    Sydney Australia
    Hey,
    Just wondering if there has been an easier way devloped to display counter/variables.
    As for the past few jobs we have just been using the following code and it is getting very annoying as more and more people are wanting counters used. Is it possible to create a text box on the screen for CTouch and dump some code in the text box instead of trying to line up page co-ordinates.

    Code:
    if ShowingPage ("Counter") then
    begin
    ClearScreen;
    TextPos (230,200);
    DrawText ('Counter = ', CounterDwayne : 3) ;
    end;
    Thanks
     
    CJ Polo, Dec 17, 2009
    #1
    1. Advertisements

  2. CJ Polo

    Mark

    Joined:
    Oct 28, 2004
    Messages:
    196
    Likes Received:
    0
    Location:
    Grenoble, France
    System IO Variables

    Yep - store the timer in a System IO Variable, then display the System IO Variable using a level component in your project.

    Cheers,
    Mark.
     
    Mark, Dec 17, 2009
    #2
    1. Advertisements

  3. CJ Polo

    CJ Polo

    Joined:
    Nov 2, 2004
    Messages:
    18
    Likes Received:
    0
    Location:
    Sydney Australia
    Thanks Mark For your help works great.
    Just to help out any one else chasing same issue sample code below.

    Code:
    once (GetCBusState("Local Network", "Inputs", "Trigger1") = ON) then
    begin
    //(Increasing the Counter by Ten everytime "Trigger1" becomes on)
      CounterMain := CounterMain + 10;
    //(Display as System I/O)
      SetIntSystemIO("Display Coutner", CounterMain );
    end;
     
    CJ Polo, Dec 17, 2009
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.