ApplyRecipeColumn
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
FILE |
STRING |
|
|
|
Path Set of continuous positions and orientation information in multi-dimensional space. Geometrical description of a space curve that the TCP of an axesgroup moves along. name of the recipe file (.CSV Comma-separated values - The CSV file format is a file type that stores tabular data. or .RCP). Must be a constant value. |
COL |
DINT |
|
|
|
Index Zero pulse (zero signal) of a hardware pin such as digital input or feedback pin. of the column in the recipe (0 (zero) based). |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
OK |
BOOL |
|
|
|
Remarks
- The FILE input is a constant string expression specifying the path name of a valid .CSV or .RCP file.
- If no path is specified, the file is assumed to be located in the project folder.
- CSV files are created using Excel or Notepad.
- RCP files are created using an external recipe editor.
- In CSV files, the first line must contain column headers, and is ignored
during compiling.
- There is one variable per line.
- The first column contains the symbol of the variable.
- Other columns are values.
- If a cell is empty, it is assumed to be the same value as the previous (left
side) cell.
- If it is the first cell of a row, it is assumed to be null (0 or FALSE or empty string).
Example of CSV file with five variables and five set of values
comment lines here
TravelSpeed;100;200;300;400;500
MasterAbsPos;0;45;90;135;180
MasterDeltaPos;0;90;180;270;360
MachineSpeed;50;100;150;200;250
MachineState;0;0;1;1;2
-
-
For the CSV file to be valid, ensure the data are separated with semicolons (NOT commas).
Usage in an FFLD program The act of performing a sequence of instructions or commands. where column 3 is selected.
Column 3 corresponds to column E in the Excel sheet because this parameter is 0 based.
Result displayed in the Dictionary when the application is running.
@COLNAME=Col3 Col4
@SIZECOL1=100
@SIZECOL2=100
@SIZECOL3=100
@SIZECOL4=100
bCommand
tPerio
bFast
Blink1
test_var
bOut
@EXPANDED=Blink1
-
-
Recipe files are read at compiling time and are embedded into the downloaded application code.
This implies that a modification performed in the recipe file after downloading is not taken into account by the application.
FBD Language Example
FFLD Language Example
- In the FFLD Language, the operation is executed only if the input rung (EN) is TRUE.
- The output rung is the result of the function.
- The function is executed only if ApplyRecipe is TRUE.
IL Language Example
Op1: LD Ladder diagram - This is a method of drawing electrical logic schematics. It is a very popular graphical language for programming Programmable Logic Controllers (PLCs). It was originally invented to describe logic made from relays. The name is based on the observation that programs in this language resemble ladders, with two vertical rails and a series of horizontal rungs between them. 'MyFile.rcp'
ApplyRecipeColumn COL
ST Structured text - A high-level language that is block structured and syntactically resembles Pascal. OK
ST Language Example
OK := ApplyRecipeColumn ('MyFile.rcp', COL);