S7 time synchronization with Master DCS

PLC_talk

Member
Join Date
Oct 2006
Location
p
Posts
50
Hello,
We have a S7-400 connected to DCS system through Modbus. Its required that the S7 clock be syncronized with DCS every 2 hours.
DO I need to get both the time & date data from DCS, or just a predefined On / OFF flag every 2 hours will suffice?
How do I modify S7 clock data?
Manual says that SFC 48 is used for time synchornization; Will it suit my case?

Please advice.

Thanks,
:)
 
The way we synchronise our PLC's is with a NTP server over ethernet, if you are communicsting over ethernet, in hardware profiles click on the ethernet card and select properties, there's a tag for Time-of-Day Synchronisation.

There you can insert the IP address of the NTP server and select whther or not to activate it.

Unsure if this is what you want, I've never looked at the other end of this so cannot really help on the PC settings for this.
 
Hello PLC_talk;

From the following image, you can see that SFC48 will not help you if the time master is the DCS; you will also see the SET_Clk SFC0 that you can use to set the clock.

SFC_48.jpg


You will have to build the Date_And_Time (DT) variable used for input in SFC0 yourself.
First you have to determine in what format the time is recieved by the S7 through the Modbus interface, and look at what conversions can be made to create a Date variable and a Time_of_Day variable that can be combined by FC3 D_TOD_DT into an acceptable input for SFC0.
All of the FCs and SFCs required are described in the manual System and Standard functions (in the Simatic/Documentation folder of the computer step 7 is installed on, or downloadable from Siemens' support website).
Hope this helps,
Daniel Chartier
 
Daniel & Peter Thanks for your help.
I will focus on SFC 0. BTW I was wondering if the logic could be simplified as follows -
Set the PLC clock manually once ( Both Time & Date).
Define a fixed time say , start at 0030 & every 2 hours after that to recieve the pulse. Build a counter to count 12 pulses per day.
At each pulse increment counter & set time based on 0030 + (Count* 2). That gives my exact time stamp synch. Use SFC 0 to set PLC clock. ( I assume thats the block to set the PLC clock)
This way I just look for one flag from the Master.

Please let me know your views.

Thanks,
;)
 
Hello PLC_talk;

Could work, but it could lead to starnge results, say if the Modbus link has a glitch exactly at the moment the synch pulse is sent from the DCS to the PLC.
I would use the Modbus interface to send one integer corresponding to the hour signal you need to synchronize to. For example, at exactly 12 midnight on the DCS, let the DCS write 1 in the time sync Modbus register. Read it in the S7; use an edge detection on a compare box in the S7 to start SFC0 with the calculated DT value for Midnight when the value changes to 1; it should execute only once. At 2:00, send integer value 2; at 4:00 send 3... and at 22:00 send the value 12.
That way operations between the DCS and the PLC would be validated and synchronized. If thee sync change is missed, the next one will execute SFC0 with the correct adjustment.
This is just one way of doing it; I'm sure others will join in with their own experiences.

Hope this helps,
Daniel Chartier
 

Similar Topics

I wish to get knowledge about master/slave synchronization for 2 analog servo motors with one motion controller. The master will start the...
Replies
7
Views
10,504
Hi All, I am trying to synch the primary with secondary, which apparently was disqualified due to Watchdog error. I am getting the following...
Replies
0
Views
921
I am running into an issue with time synchronization between a 1756-L81E and 1756-L83E. . L83E is the system time master. Enable Time...
Replies
2
Views
1,304
Dear All, I am new at this forum, seeking help from you guys and gals. Scenario: I have a Controllogix 1756-L71 5570 controller installed with...
Replies
12
Views
2,817
Dear all Iam working on a project for continuous vertical filling machine and this a video for my application https://youtu.be/coQyr06dDK8 My...
Replies
4
Views
2,151
Back
Top Bottom