Sign in to follow this  
Followers 0
soundwave

NS Screen - Updating Date & Time via PLC

22 posts in this topic

Just wondering if anyone has used a PLC to update the time and date on the NS display screens. I have checked the NS manuals but from what i have seen (so far) is methods for manual setting the clock. I want the PLC and NS times to be synchronised for accurate time stamping of alarms when compared to other equipment around the plant. cheers,

Share this post


Link to post
Share on other sites
I believe you can write to the NS date/time system memory data areas from the PLC, providing you have configured this in the NS setup. NS_DATE_TIME.pdf

Share this post


Link to post
Share on other sites
Sorry Members I may have found my answer in the endless resource of omron manuals A better look over the literature uncovered Section 2-4 of the NS Programming Manual (V073-E1-05.pdf) I will investigate and post the outcome

Share this post


Link to post
Share on other sites
Your version of the NS Programming Manual is out of date. Go to Omron documents and get V073-E1-06.

Share this post


Link to post
Share on other sites
Thanks Bits n Bytes that is definetly the docuemtn to reference. After an attempt I have had no luck. I believe the NS screen keeps it's clock as read only unless manually adjusted. The following will explain the procedure; The HMI requires a shared data area with the PLC. This is called SYSTEM MEMORY. The time and date information is located in the SYSTEM MEMORY. I needed to share this information between the PLC and the NS Display Note that the PLC and NS Display use the same data format for date and time. 1. First I allocated memory to share in the PLC (Using CX Programmer) The shared SYSTEM MEMORY will be the DM2000 area (suited for my purposes). (Refer Appendices 3 of NS Series -V1 Programming Manual V073-E1-06 for available data areas.) 2. Secondly set up System Memory Mapping on NS Display Although I wanted to share the word memory (not worried about the bit memory) I did have to allocate both word and bit memories to the DM memory of my PLC. If not an error would occur in CX Designer To set the memory area in the NS Display (Using CX Designer) I used the following tabs System Settings> Initial> System Memory $SB Allocation [PLC NAME]:DM02090 $SW Allocation [PLC_NAME]:DM02100 3. Thirdly select words to share between on NS Display (Using CX Designer) To set the data to be mapped to the memory area in the NS Display System Settings> Initial> System Memory List> Next Page> Next Page> Tick to Select Time&Date (I use BCD) 4. I then downloaded all the settings to the NS screen. (Using CX Designer) 5. With the PLC online I could see the time information via CX-Programmer watchwindow looking at DM 2113 and subsequent addresses 6. I placed a move statement in the PLC to write to the shared SYSTEM MEMORY. MOV A351 D2113 ( supposed to be move PLC clock to shared SYSTEM MEMORY) The same goes with the rest of the date and time 7. The PLC is currently moving the PLC clock to the shared SYSTEM MEMORY but the NS display then writes over the data. I believe the NS clock can only be read remotely and not written. Thanks again Bits n Bytes i changed my previous post to reflect the latest release I am downloading Version 6 now and with a slow connection on site the 19meg pdf may take a little time, cheers again

Share this post


Link to post
Share on other sites
The first word for the clock settings is in $SW14, therefore you should be writing to DM 2114. $SW13 is a control word something to do with passwords and is read only. The clock words $SW14 to $SW17 are not write prohibited according to the manual so the MOV instruction should work.

Share this post


Link to post
Share on other sites
Actually after looking at it closer the MOV instruction may not work. BUT, there is a macro called SETTIME that you can use... This should do the trick for you.

Share this post


Link to post
Share on other sites
Sounds like you have found the solution I am after ECSI I haven't used macros as yet so i will investigate and then apply and post the success.

Share this post


Link to post
Share on other sites
hi, this is a macro for that: '''Write calender information from PLC to PT 'Macro startup trigger OFF $B32000=0; 'Read calender information from PLC FINS(0,0,0,"0701",0,2,0,11,$W32000,0); $W32040=$W32004; $W32041=$W32003; $W32042=$W32002; 'Adjust PLC calender information '$W32001=H0702; 'FINS(0,0,0,$W32001,9,1,0,4,$W32020,0); 'Write calender information to PT SETTIME($W32040); red 2 is if you use serial B port of the screen, put 1 if is serial A hope this help by

Share this post


Link to post
Share on other sites
Hello Alberto, First of all thanks for replying to this post. You have commented well and I do understand the code but I have some trouble with the FINS(…) function. Could you direct me to a manual which shows the arguments for this function? ----------------------------------------- From your code; The macro is executed depending on the on/off condition of $B32000 If $B32000 is left on the macro will execute continuously. I therefore operate this bit $B32000 via the PLC, every morning for example '''Write calender information from PLC to PT 'Macro startup trigger OFF $B32000=0; You then read in the time from the PLC at $W32000 which is the PT internal memory. You then move this time to another memory location, I assume this is to give the NS screen independent memory area before the SETTIME function. Could you direct me to information on the FINS function listed below. At the moment I have an ethernet connection between PLC (network 1, node 9, unit 0) and the NS Screen (network 1, node 19, unit 0) 'Read calender information from PLC FINS(0,0,0,"0701",0,2,0,11,$W32000,0); $W32040=$W32004; $W32041=$W32003; $W32042=$W32002; This section would be used to write from the NS screen to the PLC? In my installation the time synch source will be sent to the PLC and then to the NS screen. So I can ignore this just as you have commented it out of the program 'Adjust PLC calender information '$W32001=H0702; 'FINS(0,0,0,$W32001,9,1,0,4,$W32020,0); This is the write function as you have stated 'Write calender information to PT SETTIME($W32040);

Share this post


Link to post
Share on other sites
... I used the 'Smart Active Parts' for clock setting on a project a while back - one for PLC to NS, and one for NS to PLC. (see picture) Nibroc Edited by Nibroc

Share this post


Link to post
Share on other sites
Thanks Nibroc you have had the solution for a number of my problems, I will use smart active parts to manually update the NS display. I initially was after an automated solution but as time has passed i have put it in the "additional time bin". All the best luck for you in your next struggle Nibroc after helping me again.

Share this post


Link to post
Share on other sites
I'll be using the solution for a project I'm doing right now, however. It's really irritating that when you disconnect the screens (to bring them to the computer for transmitting the program), the clock loses its setting. So I'll put this script on them, and run it at startup. :)

Share this post


Link to post
Share on other sites
Sorry soundwave but i have not manuals for this. The omron dealer in my country sent me this macro but he did not understand the code and was not able to help me. I asked he for an explanation of the function but...... i can give you more help in this

Share this post


Link to post
Share on other sites
what's with the settime macro command? it solves everything, i don't see why using anything else? you can execute macro with settime on any event, also you can put touch switch from smart active parts to read and to write time to plc. who need fins commands?

Share this post


Link to post
Share on other sites
you are right Tashniz, I was confused with Nibrocs Post I didn't realise that the smart active parts could be executed on an event i will have the PLC change a bit at midnight the smart active part will see this as an event and update clock sorry for the wasted time again i thought smart active parts were user inputs requiring manual activation, i didn't know you could trigger one on an event

Share this post


Link to post
Share on other sites
No, you can not use smart active parts from macro, you need to manualy press the button in case of this NS>>PLC. but you can use macro command settime to set date and time in NS from PLC. to write time from PLC to NS you need to set a DATE command in ladder, and from NS you trigger that instruction and prepare time data in format 00DoW YYMM DDHH mmss, that is four words. simple no? Edited by tashinz

Share this post


Link to post
Share on other sites
I never got the script mentioned here to work as it should so I wrote my own, simpler instead. I run it at startup and once every half our (triggered by the A352.00 bit). Should work well for any PLC that stores its clock at the same memory location as the CJ1M (I suppose that means all CJ/CS series PLCs, at least). Now all I have to figure out is how to change the clock in the PLC to get it adjustable if it drifts, or if the factory wants it to go correctly during daylight saving time... 'läser aktuell tid från PLC och sätter skärmens klocka därefter 'ch=102 <=> AR-area 'A351-A353 = styrsystemets klocka READHOSTW($W100,[HVHPLC],102,351,3); SETTIME($W100);

Share this post


Link to post
Share on other sites
if you have SCADA set time from it, if you have ethernet unit ETN21 use the service for set time in network, i've forgot the name of the service but ETN21 has it.

Share this post


Link to post
Share on other sites
Nope, neither, I'm using a simple serial connection (NT Link, which supposedly doesn't support FINS which would explain not getting the above example to work). I did find the DATE instruction in the CJ1 manual, which will be usable. I don't really know if I get time to implement this part of the system, but I know how to do it.

Share this post


Link to post
Share on other sites
Thanks Nibroc! the smart active parts solution was very easy to use, and did what I wanted as well! Thanks Mr PLC!

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