SetSystemConfig: OPC UA Time Sync

Configures the time synchronization for OPC UA tag timestamps.

Note: This Extended Native Mode command is supported for the In-Sight 2000 vision sensor.

Inputs

Syntax: EV SetSystemConfig("OPCUA.TimeSync",[TimeSyncFrequency],[InitialTimeoutSec],[TimeSyncFrequencySec],[WriteProcSet])

Parameter

Description

"OPCUA.TimeSync"

References the OPC UA time sync settings.

TimeSyncFrequency
  • 0 = The date/time is synchronized once, during system startup only. (default)
  • 1 = The date/time is continuously synchronized, based on the TimeSyncFrequencySec parameter value. This setting is recommended for high accuracy time synchronization.
InitialTimeoutSec

Specifies the amount of time the OPC UA server will wait (in seconds) for the date/time change to take effect. (default = 15 seconds)

Note:
  • The OPC UA Server will not start until the specified InitialTimeoutSec time has elapsed.
  • If the vision system/sensor's Date/Time settings have been manually configured and an SNTP server or external device configured for Precision Time Protocol (PTP) is not located when the vision system/sensor's power is cycled, the initial date/time are reset to Thursday, January 01, 1970 and 12:00:00 AM. In this case, increase the InitialTimeoutSec, and after the vision system/sensor powers up, manually configure the Date/Time settings.
TimeSyncFrequencySec

Specifies the time synchronization frequency when the TimeSyncFrequency parameter value is set to 1. (default = 1 second)

WriteProcSet

  • 0 = Settings are not saved in the proc.set file. The settings do not persist if the In-Sight vision system/sensor is power cycled. (default)
  • 1 = Settings are saved in the proc.set file. The settings persist after the In-Sight vision system/sensor is power cycled.

Outputs

Returns a status code, followed by the number of characters (in bytes) for the results, then the results in XML format. The status codes are:

Status Codes Description
1 The command was executed successfully.
0 Unrecognized command.
-2 The command could not be executed.
-6 User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example

To specify the OPC UA time synchronization settings and save the settings to the proc.set file, issue the following command: EV SetSystemConfig("OPCUA.TimeSync",1,15,1,1)

The In-Sight vision system responds with a status code (1), followed by the number of characters, in bytes (20). Finally, the results are returned in XML format.