{}

Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.

Search FAQs

How to sync the HMISTU655/855 to a PLC TOD (Time of Day) clock?

Goals and Symptoms
This resolution is to sync the Magelis time of day clock to a PLC clock. You will need to read the clock and put each value into a separate address/tag. How this will work is that on startup, the Magelis will try to communicate to the PLC to set the HMI clock using two scripts (sys.setTime and sys.setDate).
Causes and Fixes
HMISTU655/855 sync to a PLC TOD
This resolution is to sync the Magelis time of day clock to a PLC clock. You will need to read the clock and put each value into a separate address/tag.
How this will work is that on startup, the Magelis will try to communicate to the PLC to set the HMI clock using two scripts (sys.setTime and sys.setDate).

Enable Time Management for Manual configuration and also enable Auto start. The time to auto start is up to you. You want to optimize the time so that
your PLC is up before Magelis starts communicating. 20 seconds is just a starting reference and it could be more or less depending on the PLC boot time.

image1

Create 5 external variables for the hours, minutes, month, day, and year to read the data from the PLC.

image2

Create an external communications statistics variable to monitor the communication for that scangroup.

image3

Last but not least, create an internal boolean variable with a initial value of 1.  The initial value is under the Data Details Tab.

image4

Under Actions, create an action with a trigger type of Conditional.  Trigger Variable is the Communications statistics variable, Good_Comms, and Trigger Condition as On Data Change.
Also check the box for Enable Interlock with the following syntax: "Set_clock == 1 && Good_Comms == 5", then click Next.

image5

Select Script as an operation and click New Script.
image6

Type the following script into the field. Your variables that are reading the TOD maybe different then the ones in this resolution. Keep in mind that the PLC_year variable needs to be a 4 digit value.

image7

Click Add and then add another operation called Bit with the Reset operation on the Set_clock boolean tag.  Click Add and Finish.

image8

This Action will run on the HMI when the Good_Comms counter has reached a value of 5 and the Set_clock is TRUE to set the TOD clock.  Once the clock is set, Set_clock is set to FALSE
and the script will no longer execute until a power cycle of the HMI.

Schneider Electric South Africa

Explore more
Product:
HMISTU855HMISTU655
Explore more
Product:
HMISTU855HMISTU655
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.