Presentation is loading. Please wait.

Presentation is loading. Please wait.

HAMILTON Software VENUS two VENUS two General Steps.

Similar presentations


Presentation on theme: "HAMILTON Software VENUS two VENUS two General Steps."— Presentation transcript:

1 HAMILTON Software VENUS two VENUS two General Steps

2 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. HAMILTON Software VENUS two What are the General Steps? Example: Copying a file from text (*.txt) to Excel (*.xls) with the ‘File‘ steps needs no instrument.

3 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. HAMILTON Software VENUS two General Step ‘Comment‘ Check ‚Trace comment‘ to write the text into the LogFile.

4 The comment step appears in light blue. Place it wherever it could be helpful for someone! HAMILTON Software VENUS two General Step ‘Comment‘

5 The Assignment step defines a variable in the method. Type in a name and a value for the variable. HAMILTON Software VENUS two General Step ‘Assignment‘ Use letters, digits or the ‚underscore‘ character. - HSL keywords cannot be used as variable names. (‚method‘) - 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.

6 HAMILTON Software VENUS two General Step ‘Assignment‘ This variable can then be used e.g. in pipette steps. Advantage: Having multiple steps using this variable, only one step (the Assignment) must be changed.

7 3 different types of variables can be defined: HAMILTON Software VENUS two General Step ‘Assignment‘ Make sure you are using the correct type. Otherwise, you will get a ‚type mismatch‘ error during the following use of the variable! - 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“) Variables can be defined in the View  Variables menu as well SampleVol = “250“ causes an error  String instead of integer

8 This step allows you to calculate values for variables. HAMILTON Software VENUS two ‘Assignment with Calculation‘ Available operations are: + - * / and modulo You can use both variables and numbers in the expression fields:

9 Of course, you cannot mix numbers with text: HAMILTON Software VENUS two ‘Assignment with Calculation‘ Also, have an eye on the integer / float types: Integer 3 Integer 1 Integer 2 Float 2.0 Float 1.5 Integer 3

10 Use the ‚Loop‘ to execute a method part multiple times HAMILTON Software VENUS two General Step ‘Loop‘ ‚Loop‘ and ‚EndLoop‘ are added, fill with the steps to be executed multiple times:

11 Other option to control a loop: By expression HAMILTON Software VENUS two General Step ‘Loop‘ 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!

12 Other options to control a loop: By sequence HAMILTON Software VENUS two General Step ‘Loop‘ The ‚Loop‘ is executed as long as the Current position 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!

13 Other options to control a loop: By file HAMILTON Software VENUS two General Step ‘Loop‘ 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!

14 The ‚LoopCounter‘ variable receives the number of the loop run  how many times the loop has been entered HAMILTON Software VENUS two General Step ‘Loop‘ 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.

15 ‚If, Else‘ is used to make decisions depending on variable value. HAMILTON Software VENUS two General Step ‘If, Else‘ 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

16 Checking the ‚Include else block‘ box will add a second option that is executed if the condition is not true: HAMILTON Software VENUS two General Step ‘If, Else‘ If “good“, wear sunglasses If anything else, wear a raincoat

17 An array is a list of values that has an index and a value column. HAMILTON Software VENUS two Array Steps: Introduction IndexValue 1250 2199.99 381 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.

18 contain Sequences can contain integer, float and string values, also in mixed mode HAMILTON Software VENUS two There are 2 types of arrays: Arrays of variables and Arrays of Sequences Array Steps: Introduction “Hallo“3 199.992 2501 ValueIndex ML_Star.Buffer 3 ML_Star.SampleTubes 2 ML_Star.Medium 1 ValueIndex

19 HAMILTON Software VENUS two Values out of these arrays can then be used in other steps, e. g. Pipetting steps: Array Steps: Introduction ML_Star.Buffer3 ML_Star.SampleTubes2 ML_Star.Medium1 ValueIndex “Hallo“3 199.992 2501 ValueIndex

20 HAMILTON Software VENUS two To define a new array, use this step. ‚Array Declare / Set size‘ Select array type Give a name Select the starting size (# of lines) or ‚empty‘ array

21 HAMILTON Software VENUS two The array has to be filled. Use the ‚ArraySetAt‘ step. ‚Array Set At‘ 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) !

22 HAMILTON Software VENUS two To read values from an array, use ‚ArrayGetAt‘. ‚Array Get At‘ Variable to receive value The array to read from The position where to read in the array

23 HAMILTON Software VENUS two This step is used to find out how many values are stored in an array. ML_Star.Buffer3 ML_Star.SampleTubes2 ML_Star.Medium1 ValueIndex ‚Array Get Size‘ After this step, NumberOfArrayValues = 3

24 HAMILTON Software VENUS two To copy an array, use this step. ‚Array Copy‘ 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.

25 HAMILTON Software VENUS two  Writes the actual Current position to a variable ‚Sequence Get Current Position‘  The Current position is shifted ‚Sequence Set Current Position‘  Writes the actual End position to a variable ‚Sequence Get End Position‘  The End position is shifted ‚Sequence Set End Position‘

26 HAMILTON Software VENUS two This step is needed to ‚cut‘ different sequence to the length of the shortest one. ‚Adjust Sequences‘ This is used e.g. to pick up not more tips than needed.

27 HAMILTON Software VENUS two 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. ‚Adjust Sequences‘ TipsSamplePlate

28 HAMILTON Software VENUS two It is also possible to use the ‚AdjustSequences‘ function that is included in the ‚Loop‘. ‚Adjust Sequences‘ Select all sequences to adjust and specify the one that is controlling. This has the same effect as the previously shown ‚AdjustSequences‘ step.

29 HAMILTON Software VENUS two You can use this command to start a timer. Three modes are available: ‚Timer Start‘ - 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.

30 HAMILTON Software VENUS two This command makes sure that the method does not continue before the specified time elapsed ‚Timer WaitFor‘ Name of timer Show total/elapsed time Return value (to see if the user stopped the timer) Allow user to stop timer

31 HAMILTON Software VENUS two 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. ‚Timer ReadElapsedTime‘ Variable to receive elapsed time Name of timer

32 HAMILTON Software VENUS two ‚UserInput‘ Dialog title Visible buttons Default button Showing time Get pressed button Sound to play Variable to receive value Variable type Default, min/max Text to show

33 HAMILTON Software VENUS two ‚UserInput‘ Visible buttons Dialog title Text to show Default, min/max Runtime view

34 HAMILTON Software VENUS two ‚UserOutput‘ Dialog title Visible buttons Default button Sound to play Icon to show Get pressed button Time to show Text to show

35 HAMILTON Software VENUS two ‚UserOutput‘ Default button Icon to show Text to show Visible buttons Dialog title Runtime view Button-specific actions must be programmed by the user (e.g. Abort step if ‚No‘ was pressed)

36 HAMILTON Software VENUS two ‚UserOutput‘ for “Yes“ = 6 (See help of UserOutput)

37 HAMILTON Software VENUS two ‚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 These commands are used for drivers. To control third party components, use the appropriate libraries.

38 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.

39 HAMILTON Software VENUS two ‚Shell‘ hide / normal / min / max Program to execute 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). Serial or Parallel mode EventID (use with ‚WaitForEvent‘) Return value

40 HAMILTON Software VENUS two ‚SetEvent‘ 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. The ‚SetEvent‘ / ‚WaitForEvent‘ steps are used to e.g. ‚adjust‘ parallel processes.

41 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)

42 HAMILTON Software VENUS two ‚SetEvent / WaitForEvent‘ NO TRANSPORT before Inc. is hot SetEvent after HeatUp WaitForEvent To save your CPU, insert a Timer / Timer wait for inside the Loop!

43 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:

44 HAMILTON Software VENUS two ‚Abort‘ As the name says, this step terminates the method execution. It is often used in ‚If,Else‘ statements after ‚UserInputs‘:

45 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. If an error occurs here....the step(s) down here are executed

46 HAMILTON Software VENUS two ‚ErrorHandlingByTheUser‘ Please keep in mind that the Error settings in your e.g. ‚Aspirate‘ step must be set to Cancel: 1. Select error to handle 2. Uncheck Use default 4. Select Cancel 3. Uncheck Infinite

47 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. Main method Parallel process

48 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

49 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. The better way is to have only one parallel process and control it with the ‚SetEvent‘ / ‚WaitForEvent‘. Or, to use the Scheduler !


Download ppt "HAMILTON Software VENUS two VENUS two General Steps."

Similar presentations


Ads by Google