WriteData
The WriteData function is used to write data to a file or append a data string to a file on a local device or an FTP server. This function is typically used to log data results that can be viewed in a file.
WriteData Inputs
| Parameter | Description | |||||||||||
| Data |
Specifies a text string or a reference to a cell containing a text string you want to write or append to a file. |
|||||||||||
| Event |
Specifies the event that forces an update. This parameter needs to be a reference to any event with a timestamp, for example
|
|||||||||||
| Storage |
Specifies whether you want to save the data file to a local device or an FTP server. Depending on the connected device and the function's Storage setting, the files are saved in different location.
|
|||||||||||
| Server |
Specifies the server name (or IP address) of the FTP server on the network where the data file will be written. An FTP server can be an In-Sight emulator or any other device recognized as an FTP server on the network. Note:
|
|||||||||||
| User Name |
Specifies the user name of the FTP server. When this field is left blank, "admin" is used. Note: This option is enabled only when the FTP Server is the selected Storage type.
|
|||||||||||
| Password |
Specifies the password of the FTP server. The password is case-sensitive. If the FTP server does not have a password, you can leave this field blank. Note:
|
|||||||||||
| File Path |
Specifies the location where you want to save the file.
When this field is left blank, the file is sent to the following default location:
|
|||||||||||
| File Name |
Specifies the name of the data file. Note: Follow the operating system's restrictions on the legal characters.
|
|||||||||||
| Data Format |
Specified the type of file. The extension will automatically be appended to the File Name.
|
|||||||||||
| Append |
Specifies how the data is written to the file.
|
WriteData Outputs
| Returns |
Note: Any invalid FTP server, path or file name will not return an #ERR.
|