Jump to content

Recommended Posts

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

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

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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

NTP.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...