Button Click Command - System

The Click Command property can be associated with the following System interactions:

Note:
Click Command Description Arguments (with Data Type) Return Type
System.DateTime.SetNtpEnabled

Enables or disables the usage of NTP servers to configure the system time of the vision system.

enabled: Boolean, can be true or false. True enables the usage of NTP servers. N/A
System.DateTime.SetNtpServers

Sets the list of NTP servers used by the system to configure date and time.

servers: Array of strings, specifying the IP address or URL of the configured NTP server(s).

N/A
System.DateTime.SetNtpUseDhcp

Sets whether DHCP is used to locate NTP servers that are used to set the system time.

enabled: Boolean, can be true or false. True enables the usage of DHCP.

N/A
System.DateTime.SetSystemClock

Sets the current date on the vision system.

date: The date, stored as milliseconds since 1970 in UTC.

Note: This is the same internal representation that is used by the javascript Date object.
N/A
System.DateTime.SetTimeZone

Sets the specified timezone to be used on the vision system.

zone: String, specifying the name of the configured timezone (as listed in the list of timezones).

Note: Use the System.DateTime.GetSupportedTimeZones function to fetch the list of supported timezones.
N/A
System.File.AppendText

Creates a file at the path specified with the filepath argument (relative to the public file system root), and writes the text specified with the text argument in that file. If a file with the specified filename already exists at the specified location, the specified text will be appended to the end of the existing file.

Note:
  • Only text output is supported.
  • The path separator in the filepath must be forward slash (/).
  • No extension is appended to the file automatically.
  • Using ".." in the filepath to navigate up in the directory hierarchy does not work.
  • The directory specified by filepath is relative to the public file system root, and must already exist when executing the function. If it does not exist when the function is executed, the function will fail.
  • New lines can be started in the specified text with the \n escape sequence.
  • filepath: String, specifying the path and filename of the text file to create.
  • text: String, specifying the text information to include/append in the specified text file.
N/A
System.File.Delete

Deletes the file specified with the filepath argument.

Note:
  • The path separator in the filepath must be forward slash (/).
  • The function succeeds even if the specified file does not exist.
  • Directories cannot be deleted.
  • Using ".." in the filepath to navigate up in the directory hierarchy does not work.
  • The directory specified by filepath is relative to the public file system root, and must already exist when executing the function. If it does not exist when the function is executed, the function will fail.
filepath: String, specifying the path and filename of the file to delete. N/A
System.File.WriteText

Creates a file at the path specified with the filepath argument (relative to the public file system root), and writes the text specified with the text argument in that file. If a file with the specified filename already exists at the specified location, the function overwrites it upon execution.

Note:
  • Only text output is supported.
  • The path separator in the filepath must be forward slash (/).
  • No extension is appended to the file automatically.
  • Using ".." in the filepath to navigate up in the directory hierarchy does not work.
  • The directory specified by filepath is relative to the public file system root, and must already exist when executing the function. If it does not exist when the function is executed, the function will fail.
  • New lines can be started in the specified text with the \n escape sequence.
  • filepath: String, specifying the path and the filename of the text file to create.
  • text: String, specifying the text information to include in the text file specified with filepath.
N/A
System.Log.Write

Records a log message on the vision system, which is read and displayed by the output window dialog of In-Sight ViDi. The recorded log - presuming that the IDE is running - will be recorded to the system log output file as well, available in the following location by default:

\Documents\In-Sight Vision Suite\Logs

  • message : String, specifying the log message to record.
  • logLevel : Integer, specifying the severity of the log message. Its value must be between 0-3, corresponding to the following severity levels:
    • 0: Verbose
    • 1: Info
    • 2: Warning
    • 3: Error
    Note: Log messages set to Verbose severity (that is, 0) will not be shown in the IDE system log.
N/A
System.Recipes.Products.Load

Loads the specified recipe configuration to the job.

configurationName: String, specifying the name of the recipe configuration to load.

N/A
System.Recipes.Products.Remove

Removes the specified recipe configuration from the job, and deletes its values.

configurationName: String, specifying the name of the recipe configuration to remove.

N/A
System.Recipes.Products.Save

Saves the specified recipe configuration from the job, along with a description.

Note: If a configuration with the same name already exists, execution of this function overwrites that existing configuration.
  • configurationName: String, specifying the name of the recipe configuration to save.
  • description: String, specifying the description of the configuration to save.
N/A