Time clock functioning

Riccardo
2021-12-17
2021-12-20
  • Riccardo - 2021-12-17

    Hallo everyone,

    It is days I am fighting with TIME and DATE systems.
    I'm not understanding how the system works, there are a lot of libraries and functions but no basic documents.

    Can some one explane me how the system works?

    I need to make 2 kind of work, one is a online Industrial network and in that system I need to syncrhonize the time and date with the web clock (How to perform it?) and the second one is a stand alone automation.

    1. For the first one to perform what I need, in the visualization I used:

    %t[hh:mm - dd/MM/yyyy]

    and this works.
    Successively I need create a datalog system that saves: date, time, name of the logged operator and a string that describe the event/manoeuvre/action.

    At this point I must capture the time and date but I don't know to which variable this code %t[hh:mm - dd/MM/yyyy] refers.

    Exemple:
    IF (VisuElems.CurrentUserGroupId <> 0 AND a = 0)
    THEN
    LogArr[1].LoggedOperator := VisuElems.CurrentFullUserName;
    LogArr[1].AccessTime := %t[hh:mm - dd/MM/yyyy]
    a := 1;
    ELSIF (a = 1 AND VisuElems.CurrentUserGroupId = 0)
    THEN
    a := 0;
    END_IF

    1. For the second one, the stand alone automation, I should use the same logger system but I don't have a WEB clock to use, It means I need to build a system to put in the right time and date and to build a fuction that count the passed time.
      I am sure that something like this already exists but I don't find neither in which library nor which funtion use.

    Many thanks for the help.

    Riccardo

     

    Last edit: Riccardo 2021-12-17
  • dFx

    dFx - 2021-12-17

    Please, have a search in Online Help before posting.
    The store also contains free code exemples and libs like oscat that suits your needs Codesys store

     
  • Riccardo - 2021-12-20

    I bought e!cockpit software, not codesys.
    I am already become mad to find this forum, I am consulting:
    Codesys help;
    the software online help and
    This forum.

    I saw oscat but it is a german forum and I don't know german language.
    Furthermore the help documentation is static and doesn't reaply to any question.
    I asked to the help documentation to which variable %t refer but it didn't reaply.

    I don't need burocracy that make me jump from e forum to another forum I need solutions.

    I'll go to see oscat but this product seems very weak.
    I am payed to produce not to study.

     

    Last edit: Riccardo 2021-12-20
    • aliazzz

      aliazzz - 2021-12-20

      Some unsollicitated advice: most of us here are customers, just like you. We are not obligated to help you, so please accept our help, hints and tips with care ;-)

      My advice would be to read the offline manuals and online resources for e-Cockpit. I am sure you will find the anwser you seek in there.

      PS Since you bought e-Cockpit, you can always contact Schneider since they sold you their product, they should provide support for it.

       
      • dFx

        dFx - 2021-12-20

        I would add that oscat is not known for its forum but for its very complete and nicely written library. They provide some function description and exemples in english and german.

        Actually, what you are asking is totally provided in the software help. You might not find it for some reasons, but it is. Being mad won't help you at all. Take a cold beer and chill :)

         
        πŸ‘
        2
        • Riccardo - 2021-12-20

          thanks dFx.

          Forgive me for the bad reaction

           
          πŸ‘
          1
  • Riccardo - 2021-12-20

    Hi aliazzz,

    I know we are almost all customer and I apologize if I result a bit sour.
    I am an electronic, my studies tought me to care the code to prevent a too heavy software, today the informatic industry forgot this concept and makes complex systems.
    The documentation is very weak for every software and each informatic company wants you to pay to learn using their products.
    To do this they leave the customer without a proper istruction manual. It is not only with codesys.
    I bought it from Wago, I contacted them but sometimes it seems I know more than them.

    Anyway, I apologize for my outburst

     

    Last edit: Riccardo 2021-12-20

Log in to post a comment.