我們的品牌

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

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
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.

施耐德電機Taiwan

探索更多
產品:
探索更多
產品:

需要協助?

  • 產品選型工具

    快速輕鬆地為您的應用找到合適的產品和附件。

  • 取得報價

    立即線上提交您的銷售需求,專業團隊將主動聯繫您。

  • 購買地點

    輕鬆在您所在地區找到最近的施耐德電機經銷商。

  • 支援中心

    在同一位置找到滿足您所有需求的支援資源。

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings