Use this function to select data in a DTI and store it in a file on an SD card.
You can select the file type by storing values into parameter F, File Type to Create:
0 = Only .udtf file
1 = .csv .udtf, and csv.zip files
2 = Only csv
3 = Only csv.zip
4 = Formatted files: .csv .udtf, and csv.zip files
5 = Formatted .csv
6 = Formatted .zip file(csv)
|
Appending Rows
|
|
Path |
|
Parameter Name |
Purpose |
A |
Data Table: Source |
Select the Data Table to store. |
B |
Start Row Number (offset): Source |
Assign a Data Tag or enter a constant. The function stores the values in the source Data Table beginning from this row. |
C |
Destination File Name |
Assign a string to provide the name of the file on the SD card. The data will be stored into this file. Note that: |
D |
Number of Rows to Store |
Assign a Data Tag to provide the number of rows, or enter a number. This is the number of rows function will store. |
E |
Append |
Assign a Data Tag bit to control this feature: 0 = Data will overwrite the destination file 1 = Data will be appended to the file |
F |
File Type to Create |
Assign a Data Tag bit to control this feature. Use the values below to create the desired file type: 0 = Only .udtf file 1 = .csv .udtf, and csv.zip files 2 = Only csv 3 = Only csv.zip 4 = Formatted files: .csv .udtf, and csv.zip files 5 = Formatted .csv 6 = Formatted .zip files |
G |
.csv Delimiter |
Assign a Data Tag to provide the character, or enter it as a constant. For example, to enter a comma, place the comma between quotation marks: |
H |
Digitally Sign file |
Assign a Data Tag to decide whether or not to digitally sign the file: 0 = Don't sign 1 = Sign |
I |
Status |
Assign a Data Tag to hold the function’s status messages. |
|
When using Store DTI to File followed by Load from File: |
Code |
Message |
1 |
Function in progress |
0 |
No errors |
-1 |
Function failed |
-2 |
Internal error. Contact Support. |
-3 |
General Error. |
-4 |
Internal error. Contact Support. |
-5 |
Read file error |
-6 |
Write file error |
-7 |
CRC error. The structure of the Data Table and the external file do not match |
-8 |
Signature file error |
-9 |
PLC Data Table cannot be stored to external file |
-10 |
External File cannot be loaded to PLC Data Table |
-12 |
Internal error. Contact Support. |
-13 |
Function Failed |
-14 |
Append file error, no file created; see Help topic LF: Store DTI to File for more information |
-31 |
Number of lines in file is 0 |
-32 |
File Name missing: the file name parameter is empty within the function |
-33 |
The number of lines specified in the function exceeds the number of lines that are in the Data Table |
-34 |
The file name exceeds 63 characters |
-35 |
Too many requests |
-36 |
Internal error. Contact Support. |
-37 |
Download in Progress |
-38 |
Array locked by other utility |