Setting sequence from variable


TL;DR How do I tell the hamilton to use a sequence based on a variable which should be assigned that sequence name

Essentially, I’m trying to get it so that the user can input a config file with a sequence of pipetting steps. I then want the hamilton to translate this to an array, and then loop through the array, pulling each element one at a time, and then using that element as the sequence for an aspirate step. I’ve managed to get it up to the step where it has the variable from the array, but when I try tell the aspirate step to use that variable it just tells me that the name has already been assigned to a variable and can’t also be used as a sequence. Any help would be greatly appreciated.


sounds like you need to translate the array variable into a sequencing by using the SeqAdd in the sequence library

How do I use SeqAdd? Would it be the array variable as “sequenceObj”, the plate ID as “labware ID” and the existing position of that sequence for “position ID”?

Essentially, I have spots on a plate which already have sequences such as (Enzyme1, Enzyme2, Enzyme3); what I want to do is have an array which says (Enzyme2, Enzyme1, Enzyme3) and then it to pull each element of the array in order and pipette from the locations that have already been defined by each sequence

Hi Tarun,

The SeqAdd allows you to add positions to a sequence that already exists OR add positions to a new sequence assigned to a variable. The function consists of 3 parameters:

  • sequenceObj - this is the name of the sequence. You can select an existing sequence tied to the system deck editor or type in a value to give a name and it will create a variable of type sequence. Note if you want to use an existing sequence, but remove all its positions first before building it anew, then you’d have to use a SeqRemoveAll command prior.
  • labwareId - this is the labware id for a labware (a *.rck) on the system deck. This must be a variable of type string.
  • positionId - this is the position id associated with the labware rack file. Typically this is the well id or tube position. This must also be a variable of type string even if the indexing uses numeric value.

Typically, sequences are made by reading from an input file or config file and using the SeqAdd to positions to the sequence (labware id and position id). The SeqAdd can be used while reading through the file or from an array that contains these values. The SeqAdd only adds one position at a time, so you would have to loop over the file or array and have the SeqAdd in the loop to continue adding positions. Be sure to set the current position of the sequence to 1 after it has been made.

I hope that helps!


There is a command in the library “HSLDevLib” called “DevGetSequence”. This can be used to get an existing sequence from the deck based on a variable name and output a sequence variable. You can then reference that sequence variable in other method steps. This worked great for assigning variable sequences for CO-RE grip transport, hopefully it helps.


Thank you both for your help. I used a sort of modified version of your solution, using two sequences, one of which would call the correct value from the other, use that, and then clear itself. This seems to work fine.

Best wishes

1 Like