Jump to content

Recommended Posts

Any chance of Network Time Protocol with selectable sync intervals? What about a simple setting for auto Daylight Savings Time correction? It's concievable that DST correction could be constructed with ladder logic. However a menu section would be easier.  thanks. 

Share this post


Link to post
Share on other sites

Hi hotwires,

There are 2 examples of time synchronization, for V570 and V700.

Both are located in Examples directory":

C:\Program Files (x86)\Unitronics\Unitronics VisiLogic_C\Examples\Version 900\Project examples\Communications\Ethernet

Daylight Savings Time cannot be automatic updated, as it changed from time to time.

You have to take care to decide, when to change DST. Rest is done by RFC-305  FB and some logic.

The same is for sync intervals. You have to select applicable for your project sync intervals.

If you have a specific requirements for your project, please send us project potential evaluation with detailed requirements description, and we will pass your requirements for evaluation.

 

B.R.

 

Share this post


Link to post
Share on other sites

The rules for Daylight Savings Time vary around the world, so there is no universal function that can be implemented in a standard PLC command set.

I had to write one for the US.  I've attached the Visilogic export of it, which you can re-create in UniLogic.

It's not perfect and the PLC must be powered on when DST occurs.  If someone wants to improve it and post what they've done it would be most welcome.

Joe T.

 

Daylight Savings Time.vlx

Edited by Joe Tauser
Updated Daylight Savings Time export
  • Upvote 1

Share this post


Link to post
Share on other sites

Joe, I can't import that vlx, it pops up an error.  What Visi version was it under?

In Aus there are different rules between our states, and my state changed things around a bit in past years, all or which creates constant headaches.

Daylight saving is one of those things that is simple for a human brain, but is actually fairly involved to explain to a dumbo plc!

cheers,

Aus

Share this post


Link to post
Share on other sites

 

2 hours ago, Joe Tauser said:

I've attached the Visilogic export of it, which you can re-create in UniLogic.

It's not perfect and the PLC must be powered on when DST occurs.  If someone wants to improve it and post what they've done it would be most welcome.

I get an error also. I'd love to play with it a bit if I could get it to load.

Share this post


Link to post
Share on other sites

It choked when I tried to import it, too.  Probably has something to do with the file date being 2009.  

I opened a program that had it in 9.8.31 and re-exported it.   I was successful in importing the new one into a blank project.

I have uploaded it again.  Give it a try.

Joe T.

Share this post


Link to post
Share on other sites

Works now.  I see that it only works if it is running on the day.  I'll dig up my methods as that is why mine was involved, as I don't do sets, it works on compares and works regardless of whether things are on or not.  But give it a few days...busy.

Also, in looking at this initially, I remembered I had seen someone's post with their example of how they had gone about it.  But searching doesn't bring anything up.  Might I have seen it on the old forum?  Ringing any bells with anyone else?  I think it was from one of our European colleagues.  Thought it had the ladder as images.

cheers, Aus

Share this post


Link to post
Share on other sites

It's not a big deal, i can TCP/IP connect and correct the MTU RTC offsite. More a matter of me remembering to do it.  Unistream generates and emails daily reports (7am to 7am next day). Report was an hour late the day after dst change. No one lost their head of over it. Now the RTU's at meter vaults.... serial modbus only (over RF), no IP,  correction would require a physical visit. i suppose i could construct a one time modbus write register that could change system clock. Thanks for all the feedback. 

Edited by hotwires

Share this post


Link to post
Share on other sites
3 hours ago, hotwires said:

i suppose i could construct a one time modbus write register that could change system clock. 

Yes, do it!  Anything that saves lots of driving around is worth it!  Isn't that what our great new world of technology is for?  Hmmmm?  Apart from sending us crazy now and then!

cheers,

Aus

  • Upvote 1

Share this post


Link to post
Share on other sites

Yes, it has that inherent tendency to send us all crazy once in a while!

And as always thank you all for sharing your knowledge! Be it expert or novice, it's all appreciated. 

Share this post


Link to post
Share on other sites

@Flex727-

My only excuse for an overloaded network is I wrote it in 2007.  A V120 was involved, and we all know how crazy those things are.

:lol:

Share this post


Link to post
Share on other sites

 

 


Hi again all,

Re me posting my solutions, it is getting into "my secrets" areas as the code is embedded into other things I prefer not to share with the world, and I can't be bothered separating it out.

However, I don't think that the ideas would be too hard to put into a function block for Visi etc.  It is all based around compares that look at dates, days of the week, and months and consequently works whenever the plc is running...it doesn't have to be on during the transition days.  Surely it wouldn't be too hard to develop a function block that has inherent calculations that do the same things and ends up with a MB on or off, based on answers to questions that ask when DST starts and ends for the desired location.  If a dumbo like me can do it, then the whizkids at head office who work with this stuff all the time should do a much neater version in a flash!

It would be a very useful addition.

cheers,

Aus

Share this post


Link to post
Share on other sites
On 3/17/2017 at 2:22 AM, Joe Tauser said:

@Flex727-

My only excuse for an overloaded network is I wrote it in 2007.  A V120 was involved, and we all know how crazy those things are.

:lol:

Joe, we've been at this for too long :P

Share this post


Link to post
Share on other sites

Ok, dudes - let me get all the ducks in a row over here, or herd all the cats into a single file:
 

You are asking for an FB for VISILOGIC?
We are in the UniLogic forum...

Help me out here.

Share this post


Link to post
Share on other sites
13 hours ago, Cara Bereck Levy said:

Help me out here.

Yes....sorry Cara, it sort of evolved into a discussion about the need for such a thing across all Unitronics types.  But in my case I am particularly talking about Visilogic.  Given that DST is a common thing worldwide, yet Unitronics has no innate means of implementing it without user coding, is a bit of an oversight in my opinion. I have worked with simple RTC timers that allow me to set it up with a few button pushes, so a far more complex PLC should also have the means to make it easy.

cheers,

Aus

Share this post


Link to post
Share on other sites

Cara,

Ultimately both. I'll take whatever I can get, whenever I can get it.  Most all the the Linux embedded security camera DVR's have auto DST offset, user specifies the day, week, month of beginning and end, the offset in hours, and time to execute (in 24 hour). One day of collected data will be an hour lean or an hour heavy, but at least it's just twice a year. I was two days late manually intervening this time around. If a person was managing 100 OPLC's without remote access it would take all day to do DST corrections. 

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

×