VLID
Function - Gets the identifier (ID) of an embedded list of variables.
-
-
- List files are read at compiling time and are embedded into the downloaded application code.
- This implies that a modification performed in the list file after downloading is not taken into account by the application.
- This function is used to create an Identifier (ID) or ListID for a list of application variables that are typically stored on the development PC.
- The list of application variables:
- Is a simple .TXT file.
- Can contain only one variable name per line.
- Can be only global variables (i.e., Internal variables known by all programs.)
- This function's ID output can be used as an input to LogFileCSV.
- It defines the application variables whose present value is recorded each time LogFileCSV is executed.
Inputs
|
Input |
Data Type See Data Types. |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
FILE |
STRING |
1 to 255 |
N/A |
No default |
|
Outputs
|
Output |
Data Type See Data Types. |
Range |
Unit |
Description |
|---|---|---|---|---|
|
ID |
DINT |
No range |
N/A |
|
File Setup
Before using VLID, create a file with a list of desired application variables.
The list of application variables:
- Is a simple .TXT file.
- Can contain only one variable name per line.
- Can be only global variables (i.e., Internal variables known by all programs.)
Procedure
- Create a text document file (.txt) on your file system.
- Edit the file to enter application global variables line by line.
- The compile step fails if there are any variables in the file are unrecognizable
(e.g., misspellings, unnecessary characters, invalid variables, etc.) - Example of file:
My_variables.txt
TravelSpeed
MasterAbsPos
MasterDeltaPos
Axis1Status
- The compile step fails if there are any variables in the file are unrecognizable
- Save the file.
- The full path to this file is used as the input for this function.
- Example: C:\Users\Public\Documents\My_variables.txt.
FBD Language Example
FFLD Language Example
The function is executed only if EN is TRUE.
IL Language Example
Not available.
ST Language Example
ID := VLID ('C:\Users\Public\Documents\MyFile.txt');





