Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Time and Date

Anonymous
2018-01-06
2018-01-13
  • Anonymous - 2018-01-06

    Originally created by: Primitive Source

    Hi,

    What is the most simple way to get Time and Date from my pi and read it in to my project? I have seen ways by getting the time past since 1970 but this all seems a little too complicated.

    There is a get time and date function block in one the COdesys libraries, however, when I add this library to my project and call the function block, an error is thrown up saying that the GetDateTime function block cannot be found?

    Any help on this is appreciated.

     
  • eschwellinger

    eschwellinger - 2018-01-07

    Hi,
    I would check the following example:
    l viewtopic.php?f=23&t=6247&p=12387#p12396 l
    This is using oscat calender to switch the daylight saving time.

    or maybe the 'date and time' store example.

    BR
    Edwin

     
  • Anonymous - 2018-01-08

    Originally created by: Primitive Source

    I am getting a lot of error messages when I open up that example project. I think one of the main things is that I dont have the OSCAT Building library. I have been on the OSCAT website and tried to download the Building library, however it downloads a .lib file, and when I try to load this in to my Library repository I am getting an error, the message says the library cannot be added to the repository because it is not a .zip file?

    Do I simply need to zip this file for it to work?

     
  • Anonymous - 2018-01-08

    Originally created by: Primitive Source

    Just for some further information, the variable that are underlined in red in the variables section, are the SYSTEMIMMEDIATE variables, which library do these exist in?

     
  • eschwellinger

    eschwellinger - 2018-01-09

    Hi,
    please uninstall the libs from OSCAT and use them from CODESYS Store.

    .> the variables are in SysTimeRtc.library
    BR
    Edwin

    IMG: installOscat.jpg

     
  • Anonymous - 2018-01-13

    Originally created by: Primitive Source

    I am still struggling to get this working, even after resinstalling the OSCAT Library and adding the SysTimeRtc.library to my project, when I try and declare SYSTEMIMMEDIATE in my variables I am still getting an error stating that SYSTEMIMMEDIATE unknown?

    I can see SYSTEMIMMEDIATE within the library that has loaded so I am unsure why the POU is saying it is unknown?

     

Log in to post a comment.