LF: Load DTI from File

This Ladder function copies data from a *.udtf file located on an SD card into a DTI. You can load an entire Data Table, a single row, or multiple rows. Any data in the rows will be overwritten.

 

Parameter Name

Purpose

A

Data Table: Destination

Select the Data Table you want to load a file to.

B

Start Row Number: Destination

The data will be loaded beginning with this row.

Assign a Data Tag or enter a constant.

C

Source File Name

Assign a string to provide the name of the source file.

D

Start Row in Source File

Select the start row within the source file. The data will be loaded from this file.

E

Number of Rows to Load

This is the number of rows the function will load.

Assign a Data Tag to provide the number of rows, or enter a number.

F

Status

Assign a Data Tag to hold the function’s status messages.

 

Status Messages

When using Store DTI to File followed by Load from File:
- Allow approximately 15 seconds for the Store function to complete its procedure before activating the Load function.
- Check the status of the Load function.
- If status ≠ 0, wait 1 second and run Load again.

See LadderSee Ladder

 

 

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

 

Related Topics

Data Tables

Creating a Data Table

Data Table: Indexed (DTI)

LF: Write Row to DTI

LF: Read Row from DTI to Struct

LF: Insert Row to DTI

LF: Remove Row from DTI

LF: Clear DTI Row

LF: Find Value in DTI Column

LF: Copy DTI Column into Array

LF: Write value to DTI Column

LF: Store DTI to File (SD)

LF: Clear DTI

SD Management