Oldskuler Posted November 9, 2020 Report Share Posted November 9, 2020 Hi, I'm using V130 to control school shedules and some building automations. They recently added "Master clock", device that sync it own internal time via GPS. It has several communication protocols, but the only one that is maybe usable for me is SNMP. I must admit, this is the first time I met with this kind of protocol, so I need some tips from you guys. Namely, idea was that V130 internal clock is syncronized with the Master clock, so I thought that I can use SNMP. My question is, does that can be done? I mean, it looks theoreticaly possible to me - to store MI that I receive from Master clock, and store it to SI (35,36,37)? If someone is willing to take a look, model of Master clock is attached in PDF. It is Rack version. Thank you in advance for any help. 643331_Modular_master_clock_Sigma_Mod.pdf Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted November 9, 2020 MVP 2023 Report Share Posted November 9, 2020 Looking quickly at the specs, the simple way that you may have overlooked is to use one of the clock's relay outputs to activate at a given time second or minute, and this relay close is run to an input on the 130. The 130 then registers the rising input as "I need to set the time to 05:00:00", say. This method does not need any networking protocols etc at all. The downside is that there is no real "truth" in the setting, it relies on the plc's RTC being reasonably close to the time. But given that this could essentially involve 24 hours, the likelihood of error is minimal. I often incorporate time adjustment into programs I do that need to be fairly accurate. I carefully monitor the plc over months and see what drift the RTC is doing. At a suitable time period I add or subtract "x" seconds to bring it back close to real time. The same sort of thing would be done here. I'd suggest you do it at the latest hour turnover before anything needs to happen at school, and then it will be close all day. The most drift I've seen in a 130 was about 4 minutes a year, so an update every day would easily cover your situation. The logic here is 4 x 60 essentially = 240/365, which is a negligible error in a single day. Especially given your system is probably only working in 12 hours of that day which means even with rounding your 130 clock will be perfectly in sync on seconds with the master. cheers, Aus 1 Link to comment Share on other sites More sharing options...
Isakovic Posted November 10, 2020 Report Share Posted November 10, 2020 If I understand manual correctly this Master Clock can work as an NTP server. There is a function in VisiLogic called RFC-1305 for time synchronization with NTP server, there is also an example. It works fine, but if something goes wrong and server returns 0 it will reset PLC clock to midnight 1.1.2001. Just make sure to have some logic preventing this. Or if wiring allows it use digital input as Ausman says, that will take less programming time and be pretty accurate for this case. 1 Link to comment Share on other sites More sharing options...
Oldskuler Posted November 10, 2020 Author Report Share Posted November 10, 2020 Hi Aus! Thank you for your reply. Actually that is a great idea. Really great. I always said that simplicity is beautiful. As I don't have a clock device near me, I will check if I can configure it to activate relay output at a few different times during the day, so in that way, I'm sure that will ensure perfect sync. Once again, thank you, big thank you for the idea! Cheers, Petar Link to comment Share on other sites More sharing options...
Oldskuler Posted November 10, 2020 Author Report Share Posted November 10, 2020 Thank you Isakovic, for your help too. Yes, it can work as NTP server. Can I test this function with my PC? Because I have configured my Win10 to work as NTP server. So, theoretically speaking, if I enter my PC IP adress in RFC block, after I upload software to PLC, will it sync time from my PC? Please, see picture attached. EDIT: Sorry, on CMD screen, I have marked wrong line, but below can be seen that server is enabled (set to 1). Cheers, Petar Link to comment Share on other sites More sharing options...
Isakovic Posted November 10, 2020 Report Share Posted November 10, 2020 I guess it should work, I never tested it with my own PC. In the ladder before MB2 you can place condition DW0>3000000 so it won't update unrealistic time. I think you also need to account daylight savings time and your time zone (this comes down to adding Nx3600 to DW0). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now