FILE : STRING Path name of the recipe file (.RCP or .CSV) - must
be a constant value!
COL : DINT Index of the column in the recipe (0 based)
@COLNAME=Col3 Col4
@SIZECOL1=100
@SIZECOL2=100
@SIZECOL3=100
@SIZECOL4=100
bCommand
tPerio
bFast
Blink1
test_var
bOut
@EXPANDED=Blink1
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 your CSV file to be valid, ensure the data are separated with semicolons (and not commas).
Usage in a FFLD program 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
OK : BOOL TRUE if OK - FALSE if parameters are invalid
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.
OK := ApplyRecipeColumn ('MyFile.rcp', COL);
(* The function is executed only if ApplyRecipe is TRUE *)
Op1: LD"Ladder diagram" Ladder logic is a method of drawing electrical logic schematics. It is now 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
|
Copyright © 2015 Kollmorgen™ |
|