670 likes | 1.51k Views
HAMILTON Software VENUS two. VENUS two General Steps. HAMILTON Software VENUS two. What are the General Steps?. The General Step group contains steps for multiple basic programming purposes.
E N D
HAMILTON Software VENUS two VENUS twoGeneral Steps
HAMILTON Software VENUS two What are the General Steps? The General Step group contains steps for multiple basic programming purposes. Most of these steps are not instrument specific. This means you can execute these steps without an instrument. Example: Copying a file from text (*.txt) to Excel (*.xls) with the ‘File‘ steps needs no instrument.
HAMILTON Software VENUS two General Step ‘Comment‘ This step allows placing a comment into the method. It allows to get a quick overview, and it helps if more than one person works with this method. Check ‚Trace comment‘ to write the text into the LogFile.
HAMILTON Software VENUS two General Step ‘Comment‘ The comment step appears in light blue. Place it wherever it could be helpful for someone!
HAMILTON Software VENUS two General Step ‘Assignment‘ The Assignment step defines a variable in the method. Type in a name and a value for the variable. Use letters, digits or the ‚underscore‘ character. - First character must be a letter. - Variable names are case-sensitive: Volume ≠ volume - Variable names are restricted to the length of 255 characters. - Variable names must be unique. - HSL keywords cannot be used as variable names. (‚method‘)
Advantage: Having multiple steps using this variable, only one step (the Assignment) must be changed. HAMILTON Software VENUS two General Step ‘Assignment‘ This variable can then be used e.g. in pipette steps.
HAMILTON Software VENUS two General Step ‘Assignment‘ 3 different types of variables can be defined: - Integer (a whole number like 1, 7, 22, 250) - Float (a number with decimal point like 22.5) or - String (a text like “Resultfile.xls“) Make sure you are using the correct type. Otherwise, you will get a ‚type mismatch‘ error during the following use of the variable! SampleVol = “250“causes an error String instead of integer Variables can be defined in the View Variables menu as well
Available operations are: + - * / and modulo You can use both variables and numbers in the expression fields: HAMILTON Software VENUS two ‘Assignment with Calculation‘ This step allows you to calculate values for variables.
Also, have an eye on the integer / float types: Integer 1 Integer 2 Float 2.0 Integer 3 Float 1.5 HAMILTON Software VENUS two ‘Assignment with Calculation‘ Of course, you cannot mix numbers with text: Integer 3
‚Loop‘ and ‚EndLoop‘ are added, fill with the steps to be executed multiple times: HAMILTON Software VENUS two General Step ‘Loop‘ Use the ‚Loop‘ to execute a method part multiple times
HAMILTON Software VENUS two General Step ‘Loop‘ Other option to control a loop: By expression The ‚Loop‘ will be executed as long as the statement is true (NumberOfSamples less than or equal to 32). Make sure that the variable NumberOfSamples is incremented in the loop, otherwise the loop is executed endlessly!
HAMILTON Software VENUS two General Step ‘Loop‘ Other options to control a loop: By sequence The ‚Loop‘ is executed as long as the Currentposition of the sequence is not larger than the End position. Make sure that the current position of the controlling sequence is incremented in the loop. Otherwise, the loop is executed endlessly!
HAMILTON Software VENUS two General Step ‘Loop‘ Other options to control a loop: By file The ‚Loop‘ will be executed as long as the End of file (EOF) position is not reached. Make sure that you use a file read or file write step in the loop. Otherwise, the loop is executed endlessly!
General Step ‘Loop Break‘ The Loop Break step is used to exit the loop independent from the number of iterations, the expression, the sequence or the file. HAMILTON Software VENUS two General Step ‘Loop‘ The ‚LoopCounter‘ variable receives the number of the loop run how many times the loop has been entered
HAMILTON Software VENUS two General Step ‘If, Else‘ ‚If, Else‘ is used to make decisions depending on variable value. So if the variable ‚weather‘ receives the value “good“, the step(s) between ‚If, Else‘ and ‚EndIf‘ are executed If not, then not. The method continues after the ‚EndIf‘ step
If anything else, wear a raincoat HAMILTON Software VENUS two General Step ‘If, Else‘ Checking the ‚Include else block‘ box will add a second option that is executed if the condition is not true: If “good“, wear sunglasses
HAMILTON Software VENUS two Array Steps: Introduction An array is a list of values that has an index and a value column. The Value can be set by the user while the Index is fixed. An array can be used to store values within a method, so no external file (e. g. Excel) must be used. Please note that array values are only available during the method run: After that, values are lost.
Index Value Index Value 1 250 1 ML_Star.Medium 2 199.99 2 ML_Star.SampleTubes 3 “Hallo“ 3 ML_Star.Buffer HAMILTON Software VENUS two Array Steps: Introduction There are 2 types of arrays: Arrays of variables and Arrays of Sequences can contain integer, float and string values, also in mixed mode contain Sequences
Index Value 1 ML_Star.Medium 2 ML_Star.SampleTubes 3 ML_Star.Buffer Index Value 1 250 2 199.99 3 “Hallo“ HAMILTON Software VENUS two Array Steps: Introduction Values out of these arrays can then be used in other steps, e. g. Pipetting steps:
Select the starting size (# of lines) or ‚empty‘ array Give a name Select array type HAMILTON Software VENUS two ‚Array Declare / Set size‘ To define a new array, use this step.
Value to write into array The array to write to Append to end of array… …or write to a specific line. Make sure this line exists (size is large enough) ! HAMILTON Software VENUS two ‚Array Set At‘ The array has to be filled. Use the ‚ArraySetAt‘ step.
Variable to receive value The array to read from The position where to read in the array HAMILTON Software VENUS two ‚Array Get At‘ To read values from an array, use ‚ArrayGetAt‘.
Index Value 1 ML_Star.Medium 2 ML_Star.SampleTubes 3 ML_Star.Buffer After this step, NumberOfArrayValues = 3 HAMILTON Software VENUS two ‚Array Get Size‘ This step is used to find out how many values are stored in an array.
HAMILTON Software VENUS two ‚Array Copy‘ To copy an array, use this step. Type in a new name to get a copy of the existing array. If you enter the name of an existing array, all old values in the array are overwritten by the new ones and therefore lost.
‚Sequence Set Current Position‘ The Current position is shifted ‚Sequence Get End Position‘ Writes the actual End position to a variable ‚Sequence Set End Position‘ The End position is shifted HAMILTON Software VENUS two ‚Sequence Get Current Position‘ Writes the actual Current position to a variable
HAMILTON Software VENUS two ‚Adjust Sequences‘ This step is needed to ‚cut‘ different sequence to the length of the shortest one. This is used e.g. to pick up not more tips than needed.
Tips Sample Plate HAMILTON Software VENUS two ‚Adjust Sequences‘ Example: The method has to pipette 12 samples. To make sure that only 4 Tips are picked up in the second loop cycle, the ‚AdjustSequences‘ step is used.
HAMILTON Software VENUS two ‚Adjust Sequences‘ It is also possible to use the ‚AdjustSequences‘ function that is included in the ‚Loop‘. Select all sequences to adjust and specify the one that is controlling. This has the same effect as the previously shown ‚AdjustSequences‘ step.
HAMILTON Software VENUS two ‚Timer Start‘ You can use this command to start a timer.Three modes are available: - Relative time ( a certain amount of time) - Absolute date and time (run until a specific time) - Infinite time (used to measure times automatically) TimerStart always needs a second step: either ‚WaitForTimer‘ or ‚ReadElapsedTime‘ must be added for a reasonable use.
Name of timer Show total/elapsed time Allow user to stop timer Return value (to see if the user stopped the timer) HAMILTON Software VENUS two ‚Timer WaitFor‘ This command makes sure that the method does not continue before the specified time elapsed
Variable to receive elapsed time Name of timer HAMILTON Software VENUS two ‚Timer ReadElapsedTime‘ Can be used to read how much time has elapsed since the timers has been started. Useful in combination with If,Else or to trace out durations of method parts.
Dialog title Visible buttons Default button Get pressed button Sound to play Showing time Default, min/max Variable type Text to show Variable to receive value HAMILTON Software VENUS two ‚UserInput‘
Default, min/max Dialog title Text to show Visible buttons HAMILTON Software VENUS two ‚UserInput‘ Runtime view
Dialog title Visible buttons Default button Icon to show Get pressed button Sound to play Time to show Text to show HAMILTON Software VENUS two ‚UserOutput‘
Dialog title Text to show Icon to show Default button Visible buttons HAMILTON Software VENUS two ‚UserOutput‘ Runtime view Button-specific actions must be programmed by the user (e.g. Abort step if ‚No‘ was pressed)
for “Yes“ = 6 (See help of UserOutput) HAMILTON Software VENUS two ‚UserOutput‘
‚CommunicationPortOpen‘ Used to start a transmission on the interface ‚CommunicationPortRead‘ Reads the data on the ComPort ‚CommunicationPortWrite‘ Writes data to the ComPort ‚CommunicationPortClose‘ Used to end the transmission HAMILTON Software VENUS two These commands are used for drivers. To control third party components, use the appropriate libraries.
HAMILTON Software VENUS two ‚Shell‘ The Shell command is used to start up an external program (such as Microsoft Excel). This is a nice feature to e.g. open up a worklist during runtime and let the user select the samples to proceed.
Program to execute hide / normal / min / max Serial or Parallel mode EventID (use with ‚WaitForEvent‘) Return value HAMILTON Software VENUS two ‚Shell‘ You can choose between serial mode (open and wait until it is closed by the user) or parallel mode (open and continue in the method).
HAMILTON Software VENUS two ‚SetEvent‘ The ‚SetEvent‘ / ‚WaitForEvent‘ steps are used to e.g. ‚adjust‘ parallel processes. In the ‚SetEvent‘ step, you define an event name and place this step AFTER the step you want to execute before other steps are executed. The event handle can be just typed in.
HAMILTON Software VENUS two ‚WaitForEvent‘ The ‚WaitForEvent‘ step is ‚pausing‘ the method execution as long as the specified event is not set. Infinite mode will wait until the event ‚appears‘ Timeout will abort the method (or enter the cancel handler) if the event does not ‚appear‘ within the specified time)
SetEvent after HeatUp WaitForEvent HAMILTON Software VENUS two ‚SetEvent / WaitForEvent‘ To save your CPU, insert a Timer / Timer wait for inside the Loop! NO TRANSPORT before Inc. is hot
HAMILTON Software VENUS two ‚Return‘ In a sub-method definition, you can decide to pass back a ‚Return‘ value to the main method: So in the sub-method, a ‚Return‘ step must define which value to pass back:
It is often used in ‚If,Else‘ statements after ‚UserInputs‘: HAMILTON Software VENUS two ‚Abort‘ As the name says, this step terminates the method execution.
If an error occurs here.. ..the step(s) down here are executed HAMILTON Software VENUS two ‚ErrorHandlingByTheUser‘ This is a nice way to define the error actions manually.If the standard error handling is not sufficient, you can program whatever you want in case of an error. It works similar to an ‚If,Else‘ statements, but is triggered by an error.
1. Select error to handle 2. Uncheck Use default 4. Select Cancel 3. Uncheck Infinite HAMILTON Software VENUS two ‚ErrorHandlingByTheUser‘ Please keep in mind that the Error settings in your e.g. ‚Aspirate‘ step must be set to Cancel:
Main method Parallel process HAMILTON Software VENUS two ‚BeginParallel‘ ‚BeginParallel‘ allows to create a second branch in the main method. This is useful to execute steps at the same time.
HAMILTON Software VENUS two ‚EndParallel‘ Use the ‚EndParallel‘ step to close the parallel branch. Infinite mode waits until all steps in the parallel branch are executed. Timeout allows to set a maximum waiting time
The better way is to have only one parallel process and control it with the ‚SetEvent‘ / ‚WaitForEvent‘. Or, to use the Scheduler ! HAMILTON Software VENUS two ‚BeginParallel / EndParallel‘ You can not execute steps using the same ‚resource‘ at the same time (e.g. two pipetting steps in parallel). It is also not recommended to create multiple parallel processes.