Machine Automation Forum
A forum addressing machine automation solutions for the complete machine lifecycle. Including offers like Machine Advisor, Modicon PLC/PacDrive, Lexium or Preventa. Discuss and share knowledge on offers relating to cloud-based service platforms, machine localization and monitoring, industrial operations control, motion products as well as safety function!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-04 10:57 PM
Hello everybody,
Little question to follow up about a request to have SNTP Time :
(https://community.se.com/t5/Machine-Automation-Forum/SNTP-with-M172/m-p/428939#M886)
Is there a functional block to get the day of week with full date ?
Is there a functional block that determines the time zone ?
My Code :
FC_TON_Time(IN:= NOT FC_TON_Time.Q, PT:= 60000);
IF FC_TON_Time.Q THEN
sysSNTP_Reset();
END_IF;
usiSNTP_Status := sysSNTP_GetTime(FALSE, 123, 192, 168, 253, 2, ADR(usiSeconds), ADR(usiMinutes), ADR(usiHours), ADR(usiDay), ADR(usiMonth), ADR(usiYear));
R_TRIG_Update(clk := usiSNTP_Status = 3);
IF R_TRIG_Update.Q THEN
sysClockWrite(usiSeconds, usiMinutes, usiHours, 0, usiDay, usiMonth, usiYear);
END_IF;
Thank's you very much.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-04 11:07 PM
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-04 11:40 PM
Work's very good for day.
Any solution for GMT ?
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.