How can we help you today?

Can I set the Magelis clock using scripting in Vijeo Designer?

Yes, you can set the Magelis clock using scripting in Vijeo Designer. By using the Sys.setTime command.

Function

Changes the time on the target machine.

You can also change the time from the Configuration menu, but using scripts makes it possible to change the time while still running Vijeo-Designer Runtime.

Format

    • public static boolean Sys.setTime(int hours, int minutes, int seconds);
Parameters
        • Parameter
        • Description
        • int hours
        • First parameter defines the hours using a 24 hour clock. Parameter may contain up to two digits, and acceptable values are 0 to 23. 0 is equivalent to 12am midnight. If you define a value of 24, it changes to 0.
        • int minutes
        • Second parameter defines the minutes (0-59). Parameter may contain up to two digits.
        • int seconds
        • Third parameter defines the seconds (0-59). Parameter may contain up to two characters.

Use 1 as any of the parameters to ignore that parameter.

Example:

    • Sys.setTime(12, 0, -1);

      // set the hours to 12, minutes to 0, and do not change the seconds

Return Value
        • Value
        • Description
        • false
        • Failed to set the time on the target machine. Usually indicates invalid parameters, but may also indicate a communication error.
        • true
        • Successfully set the time on the target machine.

Legacy KB System (APS) Data: RESL201396 V1.0, Originally authored by GeMc on 02/19/2010, Last Edited by GeMc on 02/19/2010
Related ranges: Magelis XBT GC, Magelis Modular iPC, Magelis Compact iPC, Magelis Smart BOX, Compact PC Box & Flex PC BOX, Magelis Smart, Magelis XBT GTW, Magelis XBT G, Magelis XBT GT, Magelis XBT GK, Vijeo Designer

Schneider Electric Philippines

Discuss this topic with experts

Visit our community and get advice from experts and peers on this topic and more

Need help?

Product Selector

Quickly and easily find the right products and accessories for your applications.

Get a Quote

Start your sales inquiry online and an expert will connect with you.

Where to buy?

Easily find the nearest Schneider Electric distributor in your location.

Help Center

Find support resources for all your needs, in one place.