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 nether the in which library
    nor which funtion use.

Many thanks for the help.

Riccardo

 

Related

Talk.ru: 1