Visualisation time and date Question

Discussion in 'C-Bus Automation Controllers' started by TheBigShac, Apr 10, 2019.

  1. TheBigShac

    TheBigShac

    Joined:
    Apr 10, 2019
    Messages:
    1
    Likes Received:
    0
    So probably a very basic question. i have done the 1 day basic nac and shac programming course so i have a basic understanding. One thing that i guess was not covered that i am struggling to find any information on was a time and date timestamp that i could have on a theme to display on the header of every page. I believe it must be coded as i have tried creating an object "user Parameter/TimeDate" but this is just static text. I have seen some images with time and date stamps on some Clipsal themes here.
    http://www.cleverhome.com.au/automa...0SHAC-C-Bus-Network-Automation-Controller.pdf

    thanks.
     
    TheBigShac, Apr 10, 2019
    #1
    1. Advertisements

  2. TheBigShac

    dic

    Joined:
    Sep 17, 2008
    Messages:
    7
    Likes Received:
    0
    To show the time and date, we have done this;

    1. Create three string User Parameters(i.e. named Viz_Time, Viz_Date, Viz_AMPM)
    upload_2019-4-18_10-51-51.png
    upload_2019-4-18_10-54-27.png

    2. Create Resident script with 60 second interval
    upload_2019-4-18_10-52-54.png

    3. With script contents of this;
    SetUserParam('Local', 'Viz_Time', os.date("%I:%M"))
    SetUserParam('Local', 'Viz_AMPM', os.date("%p"))
    SetUserParam('Local', 'Viz_Date', os.date("%A, %B %d, %Y"))

    4. We also put this line into the Startup script to make sure the date is updated on NAC power up;
    SetUserParam('Local', 'Viz_Date', os.date("%A, %B %d, %Y"))

    5. Then in the Visualisation add objects to show the values of the new User Parameters
     
    dic, Apr 18, 2019
    #2
    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.