Using HSLTipCountingLib with labware added during run time (added via HSLDevLib)

I have a unique problem when integrating HSLDevLib with HSLTipCountinglib.

The underlying issue seems to be that Sequences added via the HSLDevLib at run time are not tied to the deckLayout object. The tip counting library can only display the name of a sequence when it is defined in the deckLayout object.

Ideally I want to display the name of the sequence as shown in figure1.

After using HSLDevLib to add my labware I get “seq_target” when trying to edit my tip sequence, figure2. This is confusing to the user since I have both 50ul and 300ul tips on the deck.

I was able to get 1 tip rack at a time into the deckLayoutObject via the HSLDeckVisualize library since it uses: decklayout.UpdateUsedLabware(description,0,pars);, see figure3. But once I try to do multiple labware in the same sequence it fails to update I think (silent error).

I have tried using the deckLayout::SaveSequence([In] string Name, [In] object pSequence); but getting a “name unknown error”… My understanding of this class is limited as decompiling the .dll does not explain the order of operations for the class’s methods, or if the sequence name needs to exist pre-compile.

My questions:

  1. I am wonder if it is impossible to save sequences to the deckLayout object at run time? OR if there is a way to display the sequence name in the tip counter?

  2. Along with this what are the uses of IDeckLayout 4 through 7? They seem to share a lot of the same functions, which leads me to believe there is a order of operations when accessing these objects as well?

Ok, so I think I was going about this the wrong way but still unsuccessful on further attempts.

I think the object I actually need to interact with is the ElementCounter object, this saves the tipCounter name to C:\Program Files (x86)\HAMILTON\System\HxElementCounter.mdb.

Looking at HSLTipCountingLib.hsl it seems if it is not a deck provided sequence it just replaces this with a blank sequence to operate on, instead of resetting the deck sequence. So maybe figuring out how to add a system managed deck sequence will help me.

@cwehrhan - This is a limitation with the HSLTipCounting library. The CopyResetSequence() function that the library uses to restore a full copy of the consumed or partially consumed sequence only works with deck sequences (defined in the deck layout). Use of the default tip counting library with temp sequences (created at runtime) requires workarounds, as I am unaware of a way to write temp sequence data to the deck layout for the instance of a single run.

When you dynamically instantiate your temp sequence, you will want to immediately make a copy of it, where the copy will act as a template sequence of full positions. This template copy will remain idle/unused until your active temp sequence has been consumed to the point that a reload is required. As the sequence is consumed, do not use the write function of the tip counting library.

When it is time for a reload and another edit function to be called, prior to calling the edit function on your consumed sequence, overwrite the consumed sequence to full by copying its state from the full template sequence (or reset the state of the consumed sequence to full).

When the edit function is called, because the consumed tip sequence (using the tip counter) has not been written to the database, the reloaded sequence generated by the edit function (internal to the HSL) will yield a full sequence, which will be editable.

Before employing this workaround, you will want to change the value of the tip counter variable to something not previously used, as the current database reference will yield an empty sequence.


1 Like

Hey Nick,

That’s for the reply! Was never able to write tips sequences to the deck.

I did however figure out where the Seq_target was coming from, I was using the HSLExtentsion::Concat(); which was locally creating then returning out a new sequence called seq_target! Not truly concat’ing the sequences together, but creating a new one with the two passed in sequences added together! My C# is a bit rusty but why would seq_target remain the name if it is returned in main? I am guessing that a sequence is a “reference” type similar to this answer on stack overflow.

I now wonder what were to happen if you were to use this concat function multiple times, would you loose your original concat sequence if it was called a second time! I have spent far too much time on this haha

After making my own concat function the sequence names appear in the sequence edit dialogue


@cwehrhan - You can use the Concat function as many times as you wish to continually add contributor sequences to a larger recipient sequence that continually inherits positions as needed. Oftentimes I will collect all the sequences I would like to merge in an array of sequences, and merge them using a separate function which utilizes the Concat function of the HSLExtenstions Sequence library. See the example below:

The purpose of returning a merged sequence as a separate sequence object from the other sequence parameters used by the function is so that the two contributor sequences that get merged are un-altered for downstream use, if those sequences need to be reused for other purposes.

Regarding your other question about the name of the sequence, the HSL instantiation of the sequence within the function is where the sequence name assignment occurs. Any sequence returned by this function will have the name ‘seqTarget’ as that is how the sequence is assigned when it gets instantiated.



Sequences that are not deck sequences are not required to have a unique name.