| #GOOGLELINKS# |
LabVIEW utilities - sequences or recipes
[LabVIEW vi collection]
[LabVIEW links]
[LabVIEW store]
[programming topics] [drivers] [utilities] [projects] [events] [related topics]
Using Recipes on New or Existing LabVIEW ProgramsMANUALversion 20070716 GENERALrecipe.vi is a top-level vi in recipe.llb. recipe.vi is a separate utility, which, through recipes, can automatically perform actions on an existing vi. Working with recipes has several advantages over working manually:
A recipe is a list of commands. Small recipes can be made or changed with the built-in editor. However, it is recommended to use Notepad or an equivalent editor. The recipes are simply stored as ASCII files, ending with '.rcp', and can be read by this utility. Recipes will be executed line by line. One line may contain several, ';' separated commands. The following sections describe all existing commands. Anything else will be regarded as comment. Recipes may contain empty lines. Two consecutive empty lines will be regarded as the end of the recipe. COMMANDSIn order to present all commands, they have been grouped as follows:
All commands start with a unique keyword. adjust controls A recipe can adjust the controls of a vi. These are both input fields and knobs, but also indicator fields. The following keywords can be used to change, differently typed, controls:
The abovementioned keywords are being used as follows: Spaces separate the parts of a complete command. The variable name may also contain spaces. The value that comes with the 'text' command may also contain spaces in which case it must be placed within quotation marks. Examples: index 6 way valve 3; sets 6 way valve '6 way valve' to 3 valve V102 off; turns valve 'V102' off text status "regeneration phase"; sets status text 'status' to "regeneration phase" Besides adjusting simple controls it is possible to adjust controls in clusters or in arrays too. Use the following notation to point to a cluster element: Change an element of an array by adding the index of the element, preceded by a '/', to the name of the array. For example: delay The command for a delay is: delay 10 m; delay 2 h; If a line contains more than one delay, only the last will be executed. And a delay will only be executed after all other commands of the same line have been executed. By default the unit is in seconds. An alternative delay command waits until a specific condition is met: Without a timeout the recipe will be paused until the condition is met. With a timeout the recipe will continue even if the condition is not met, yet after the given delay in seconds. If no 'on_timeout_label' was given, the recipe will continue at the next line. Or else the recipe will continue at the labelled line1). The variable can be a boolean type control. The condition can only be either 'true' or 'false': The variable can also be a numeric control. The value of that control can be compared with a constant or another control2) 3): 1) A label is unique word without spaces, preceded by a ':'. 2) Currently the name of the other control may not contain spaces and the variable must have been used elsewhere in the recipe as a first variable e.g. in a 'foreach' loop. 3) There should be no space between the operator and constant or named control. repeat The commands for a program loop are: next variablename == part to be repeated next I If instead of 'I' an existing variable name (of a numeric input) like 'real_value' is being used, then the loop may also contain the following command: The 'andeach' command complements the 'foreach' command: andeach value_2 2 56,34,21 == common part to be repeated set value_1 set value_2 next value_1 jump The command to jump to a specific line in a recipe is: The normal program flow is that the lines of the recipe will be executed one after the other. This command forces the recipe to continue at the line containing the label. For example: == part to be skipped :proceed Jumping to a specific recipe line may depend on a specific condition. If a numeric control must be compared to a constant or another control1), then this is the command to use: If the condition is met, then the recipe will be executed at the line marked with the 'goto' label. If not, then the next line in the recipe will be executed. Valid operators are '=' ( 'equals'), '!=' ('doesnt_equal'), '>' ('greater_than') and '<' ('less_than'). For example: The 'if' command is suitable for boolean type controls as well. The condition is either 'true' or 'false'. For example: 1) The name of the other control may not contain spaces. USERINTERFACEThe user interface contains 3 tabbed pages, 'recipe', 'options' and 'about', and a common taskbar. The 'recipe' page shows the recipe and buttons to load a recipe (LOAD) or to save the recipe (SAVE). Also a loaded recipe can be erased (NEW). The remaining buttons have the same functionality as the similar buttons on the taskbar. On the 'recipe' page, 'vi path' should indicate for which program (vi) the recipe is intended. The 'recipe state control' can be used to force the recipe into a different state. The 'options' page states which aliases can be used for changing controls. If desired, aliases can be added, making recipes even more readable, or deleted, making recipe execution slightly faster. On the 'options' page 'inverted boolean controls' lists the boolean controls that work in an irregular way. When using valves, 'true' stands for 'open' and 'false' stands for 'close' by default. Controls set down in this list act the other way round. In this way a 'normally closed' and 'normally open' valve can take the same command, whereas, from a logic point of view, the opposite will happen. The 'about' page contains a brief explanation on how to create a recipe. The 'all control specs' table on this page shows which variable names were found in the selected program. Likewise the 'selected control specs' table shows which variable names were used in the recipe thusfar. The common taskbar contains buttons to start (START), to either pause (HOLD) or resume (CONTINUE) and to stop (STOP) the recipe. Also the common taskbar contains the button to stop the program (QUIT). While the recipe is executing the active line will be highlighted. Should the active line end up outside the visible area of the recipe, then the program will automatically shift the list of commands in such a way that it will make the active line reappear. If a recipe has been paused with the HOLD button, it can be stored to file. The recipe will then resume just like would happen with the CONTINUE button. REMARKSCommands to adjust the value of a numeric control can be mixed. A command to adapt an integer value could be replaced by the command to adapt a real value. This should be used as an exception and should be checked for each individual case. Commands to adjust integer values can also be used to adjust enumerated values. A later version of this utility might enable the use of selection names instead of selection numbers. Recipes may contain commas. Commas can be used as decimal symbol or for digit grouping depending on regional options. Think of modifying these options at erratic behaviour. This utility only uses rudimentary error handling. Therefor test any recipe without running the vi that should be automated. AUTHOURBart Boshuizen / SSC-ICT 3xO Bld : DelftChemTech Julianalaan 136 Room : 0.044 Phone : +31 15 2785073 Web : www.morechemistry.com COMMAND SHORTLIST
* or one of its aliases. Other informationFor downloads and additional information please visit the Bart Boshuizen, 2007/07/10 |
#GOOGLEADDS#
|