Winfield

_CurrentTime not incrementing/Controller clock stuck at 1-1-1970

4 posts in this topic

Hello,

I have a Sysmac project that contains two NJ controllers and an NA HMI. I am writing the current time to different variables upon completion of certain actions using the system variable _CurrentTime. 

I noticed that one controller was logging the date as 1-1-1970, and went to sync the clock with my computer's clock via the Controller-> Controller Clock... menu. 

Upon synchronizing and applying, the controller clock very briefly displays the correct time, and then reverts to 1-1-1970. I went to the second controller in the project, which simply had the wrong time zone setting, and attempted to change the time zone and apply. Whereas before it showed the correct time for the time zone setting, it now reverts constantly to 1-1-1970 as well. When I go online, I've also noticed the _CurrentTime variable is not incrementing; it is always 1970-01-01-00:00:00.00.

The HMI displays the correct time, and I am considering creating a mapped tag that shares this time with the controllers, but was curious as to what could be causing me this issue. I am also aware that 1-1-1970 is the unix epoch.

Any insight?

Edited by Winfield
spelling error

Share this post


Link to post
Share on other sites

I am sure you would of checked, but is there anything writing/resetting the system clock using the 'SetTime' instruction?

Share this post


Link to post
Share on other sites

Besides SetTime instruction, check in the Ethernet settings to see if it is logging into a network time server via NTP.  Maybe the time server is in error.

Share this post


Link to post
Share on other sites

I recommand to you using NTP settings for all your equipments.

If no NTP server is available you can setup a computer (Windows 10 for example) with NTP server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now