Change date hours from opcua

I would like to be able to change the system time of the plc from opcua… where can I find a pre-made example or show me a block that does the job?? Thank you for support

note : no use NTP but I like trasfert through opcUA

Hi,

You can use the AsTime library FB “DTSetTime()” to set the time of the PLC. If you want to do it using OPC UA you can just publish a BOOL on your OPC UA server and execute the function block on a rising edge. In that way whatever OPC UA client can set this bool to true.

You could also use OPC UA methods if you want to be more fancy :slight_smile:

Kind regards,
Mads Cornelius Andersen

2 Likes

thank you for support