TIME() function not available?

More
1 year 1 month ago #294 by Sergey Romanov
PT: ULINT; - does that means I should set time in TICKS? How to convert TICK to miliseconds?

Please Log in or Create an account to join the conversation.

  • Walter Zögernitz
  • Visitor
  • Visitor
1 year 3 weeks ago #305 by Walter Zögernitz
Replied by Walter Zögernitz on topic TIME() function not available?
Hello Sergey,

The time from one tick to an other is different from system to system and is also depending on some values of settings. That means that the ratio milliseconds to timer ticks needs to be determined once. It can be used instead of the regular time based time base for "timer" POUs.

Please Log in or Create an account to join the conversation.

More
1 year 3 weeks ago #308 by Sergey Romanov
What I mean by my question what kind of data GET_EP_TICKS sets to GET_EP_TICKS? Is it time in milliseconds from start or is it unix timestamp? Because name of the function GET_EP_TICKS suggests that it returns TICKS not TIME.

Please Log in or Create an account to join the conversation.

  • Walter Zögernitz
  • Visitor
  • Visitor
1 year 3 weeks ago #310 by Walter Zögernitz
Replied by Walter Zögernitz on topic TIME() function not available?
The ticks are system specific. Windows systems have per default 10kHz sampling rate for ticks, linux systems 1MHz.
You can determine the elapsed time by substracting of the two tick values and dividing it by the frequency.
Please note, that timer ticks are relative "time values". logi.RTS will get these values out of the operating system.

Please Log in or Create an account to join the conversation.

LOGI.CALS AUSTRIA

Address

Europaplatz 7/1,
3100 St. Pölten

LOGI.CALS GERMANY

Address

Postfach 1306,
40738 Langenfeld
© 1987 - 2019 logi.cals GmbH