How to set and synchronize the ACE PLC clock with the HMI using a macro
In this post, we will show you how to synchronize the HMI clock with the ACE PLC clock.
As the HMI has a saved clock, we use it to update the ACE PLC clock.
With vBuilderFirst of all, it is necessary to define in the Modbus register these UI8 tags that will be written by the HMI. Address 4×900 to 4×905. Don’t forget to set them to «Writable» : «Y» You will get the clock of the HMI in your ACE PC. |
![]() |
With HMI-ToolIn the Macro Editor, add a new macro and copy it. You don’t have to use all the tags, if you need, for example, only the hours and minutes.
And create the list of these tags. BDCSec, BCDMin,.. come from the HMI clock. Sec, Min,.. are for the ACE PLC. |
![]()
|
Compile the program
The program must move to the «Success» branch |
![]() |
Add the macro in «global Macro» list
And set its frequency of execution to 1000 ms for update the clock every seconds.
You can download here the HMI-Tool project if you wish to test it.
|
![]() |