Data Logging Configuration

NI Vision Builder

Use Additional Tools

How to Log Inspection Results

Complete the following steps to configure the Data Logging step:

  1. In the Step Name control, enter a descriptive name for the step.

Measurements Logged Tab

  1. Select the measurement results or variables you want to log from the Measurements tree. If you select a measurement result that can produce multiple results, you must also specify the number of results to log.

    Click Select All to log all the measurements or variable values from the inspection. Click Deselect All to clear all the selected measurements.

    Tip Tip  You can expand or collapse all the items in the Measurements tree by right-clicking the tree and selecting the appropriate option.
  2. Select whether you want to Log All Measurements or Log Measurements Only When Inspection Fails. Logging measurements to a file is time intensive and reduces the maximum rate at which the inspection can be run. Consider only logging the results that correspond to failed inspections.
Note  You must have a Set Inspection Status step before this step in your inspection to correctly Log Measurements Only When Inspection Fails.

Destination Tab

  1. Vision Builder AI allows you to save inspection measurements to a local drive, an FTP server, or to send the measurements to a TCP device. Complete one of the following sets of steps to specify where you want to save the measurement results.

    Log Measurements to a Local Drive

    1. In the Log Location control, select Log to Local Drive.
    2. Click the Browse button and navigate to the folder where you want to save the log file.
    3. Enter a File Name to use for the log file, or select the result of a previous step from the drop-down list.
      Tip Tip  You can use the File Name control to specify subdirectories. When using the File Name control to specify subdirectories, you must use a \ to separate directories.
    4. Specify the File Type to use for the log file.
    5. In the Substitute on Fail control, enter the characters to enter when a measurement result is not available.
    6. Select whether to create a Single File or Multiple Files. If you choose to create multiple data log files, you must also specify how often a new data log file should be created using the Start a New Log File Every control.

      If you select Multiple Files, Vision Builder AI appends a timestamp to the specified File Name to distinguish each log file.

    7. To overwrite any log files created prior to the inspection being run, select the Overwrite any file(s) created prior to this inspection before logging data checkbox. Otherwise, the step appends the latest results to the existing log file.

    Log Measurements to an FTP Server

    1. In the Log Location control, select Log to FTP Server.
    2. Enter the IP Address of the FTP server where you want to save the log file.
    3. Enter the User Name and Password to use to log onto the FTP server.
    4. Click Test Login to verify that the login information you entered is correct.
    5. In the Folder Path control, enter the file path to the folder where you want to save the log file.
    6. Enter a File Name to use for the log file, or select the result of a previous step from the drop-down list.
      Tip Tip  You can use the File Name control to specify subdirectories. When using the File Name control to specify subdirectories, you must use a / to separate directories.
    7. Disable the Log as a Background Task checkbox if you do not what to perform data logging as a background task. For example, with very fast inspections, background data logging may not be able to keep up with the inspection, resulting in missing data. To ensure that all inspection data is logged, disable the Log as a Background Task checkbox.

      By default, Vision Builder AI performs data logging as a background task to allow the inspection to continue while data is being logged. However, when logging data to an FTP server, certain applications may require that data logging occur inline with the rest of the inspection.

    8. Specify the File Type to use for the log file.
    9. In the Substitute on Fail control, enter the characters to enter when a measurement result is not available.
    10. Select whether to create a Single File or Multiple Files. If you choose to create multiple data log files, you must also specify how often a new data log file should be created using the Start a New Log File Every control.

      If you select Multiple Files, Vision Builder AI appends a timestamp to the specified File Name to distinguish each log file.

    11. To overwrite any log files created prior to the inspection being run, select the Overwrite any file(s) created prior to this inspection before logging data checkbox. Otherwise, the step appends the latest results to the existing log file.

    Send Measurements to a TCP Device

    Note Note  Before you can log data to a TCP device, you must configure the TCP device using the Communication Device Manager.
    1. In the Log Location control, select Send to TCP Device.
    2. Select the TCP device where you want to send the measurement results from the Device Name control.
    3. If necessary, adjust the Timeout period for the TCP device.
    4. Use the Header and Footer controls to enter the strings to use to identify the beginning and end of the measurement data. You can use \ codes to format the string or enter non-printable characters.
    5. In the Substitute on Fail control, enter the characters to log when a measurement result is not available.
    6. In the Separator control, enter the character to use to separate measurement values.
  2. Click OK to add the step to the inspection.