Sign in to follow this  
Followers 0
BobB

Automatic update NS screen time/date from PLC

15 posts in this topic

Have spoken to our local Guru and I understand I can hook in to a SCADA network where there is either and SNTP or NTB time clock server. The PLCs can be setup to automatically update time from the server. The problem is I then have to update the time clock in NS screens automatically from the PLCs. The SAP for this is operated by a button press but I have to do it automatically. Currently there are 13 PLCs on my network and this will eventually increase to 19 PLCs. Each PLC has an NS screen attached serially. Have a heap of info floating around peer to peer set up with the excellent network configurator software. Has anyone figured out how to automatically update the time, and possibly date, in an NS screen from a PLC? The PLCs are mostly CJ2M-CPU33 but one PLC is a CS1D duplex jobby. That one is the interface to the other network.

Share this post


Link to post
Share on other sites
Could you call the macro on entry to one of the defined screens, then the time would sync with the plc transparently?

Share this post


Link to post
Share on other sites

Bob, I haven't used it in a long time, but here is a start. FINS macro Set Time.txt

Share this post


Link to post
Share on other sites
Thanks Jay - I will look into it a bit further - I thought someone would have done it somewhere along the way.

Share this post


Link to post
Share on other sites
I also placed a question at My Omron and they came back with a very simple, and effective, solution. There is a READCMEM function in the NS screens. Place a bit lamp on all screens and insert the following macro (for serial communications through serial port A) 'PLC (CS-, CJ- or CP-series) clock data : Read AR351 through AR353. +0; READCMEM($W1000,[sERIALA:AR351],3); SETTIME($W1000); Then enable 'Execute When Trigger On' and hide the bit lamp. It can be proved in the simulator by changing time and date for your computer - instantaneous response. Hope this helps someone else. Thanks Jay but this is really simple and works.

Share this post


Link to post
Share on other sites
That is very similar to what I have done Bob, except have done it in a project scoped macro. I have the NS writing it's data to the PLC as part of the notify area, then compare the NS seconds with the PLC seconds, if the drift is greater than 30sec, then set a flag that calls a macro that does executes te same code as above. No need to do it on all screens as is project scoped. Will post an example if anyone wants it?

Share this post


Link to post
Share on other sites
Yes please for the example - sound a bit less processor intensive than the other way.

Share this post


Link to post
Share on other sites

Hi Bob, Sorry for late reply, but attached is a basic example of the NS & PLC config. You will need to change symbols etc to suit address's that will not conflict with what you may already have in use. The macro for syncing the clock is under the project settings, when the bit is set in the PLC, the macro executes. Somewhere, I have some methods for syncing in either direction manually, but have not been able to find them just yet.. This is easy & is done at a global level, so only needs to be done once. It takes advantage of the functions that are available.. I sometimes find that a lot of the 'in-built' features aren't exactly what I require, there is often too much in them which just makes it not as easy...PLC-NS ClockSync.zip

Share this post


Link to post
Share on other sites
Thank you - I will have a go.

Share this post


Link to post
Share on other sites
The global clock sync worked like a charm thanks. I only took out the screen <> as I do not need it. I also set the +-/- to 2 seconds as this mob are feral about synchronisation of time through the premises - I am sure they will have someone checking 2 points with 2 ways. Bloody data centres!

Share this post


Link to post
Share on other sites
Glad to hear it worked Bob, there are plenty of nifty things you can do with Macros to make some things easier..

Share this post


Link to post
Share on other sites

Hi,

Can I request the admin/s, to kindly fix the link of this page. 

The file is not available and was grayed out. 

Thank you.

Share this post


Link to post
Share on other sites

Hi Admin,

Could you kindly fix this page, the file could not be accessed anymore.

Thank you for the help.

 

 

Share this post


Link to post
Share on other sites

@LD_M:  I think that I got all the links repaired.  Let me know if I missed something.

Share this post


Link to post
Share on other sites

Dear Michael,

I was able to access and download the links.

Thank you very much.

 

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
Sign in to follow this  
Followers 0