# How to Configure the WriteData Function

The WriteData function allows you to write data to a file or append a data string to a file on a local device or an FTP/SFTP server. You can use this function to log data results and view them in a file.

Note: You can save the file to the selected Storage location while Online or Offline.

The following describes how to configure the WriteData function when connected to an In-Sight vision system:

1. Connect to the In-Sight vision system.

2. Insert the WriteData function into the spreadsheet, which opens the WriteData property sheet. Configure the following parameters, using the default settings for the rest of the parameters:

   - Data: Enter a text string or a reference to a cell containing a text string you want to write or append to a file. In this example, the Data parameter references cell C0, which is configured as: Stringf("Test string.\r\n")
   - File Name: Enter a File Name for your data file.

3. After configuring the parameters, click OK to close the property sheet. The WriteData data structure is inserted to the spreadsheet.

4. Trigger the vision system.

5. A data file (In-Sight.txt) is stored on the In-Sight device, and within the file, "Text string." is written.

6. If you trigger the vision system again, within the text file, another "Test string." is appended to the file.

7. Use FTP software to view the files. For more information, see How to View Files Stored on In-Sight Device.

Note:

- For more information on each parameter setting, see WriteData.
- If you want to send the files to an FTP/SFTP server, set Storage to FTP Server or SFTP Server, and enter the server address (Server), User Name and Password in the corresponding fields.

## Storage Locations

Storage Setting | Connected Device | Save Location
--- | --- | ---
Local Device | In-Sight Device | In-Sight device Note: You must use FTP software, such as FileZilla Client, to view files. For more information, see How to View Files Stored on In-Sight Device.
In-Sight Emulator | Host PC
PC | PC Note: Saving to a PC is only supported using an FTP/SFTP server.
FTP Server | Any device | Specified FTP server
SFTP Server | Any device | Specified SFTP server