Method error with file?

Hi there,

I am a lab technologist with zero coding background, but i am wanting to create a couple of easy methods on our STAR (Venus 4 software), and am teaching myself to try to do it (with only mild success at the moment).

I am trying to have a reagent volume transfer to 3 vials, at different volumes, at the same time.
I have input the volumes etc into an excel file. The idea would be to then build on this to create some calibration standards.

However i am getting this error The error description is: C:\Program Files (x86)\HAMILTON\Library\HSLPTLLibImpl.hs_(13840) : left hand side of expression is not a number (0x23 - 0x2 - 0x4)

image

Hopefully these images load when i submit this! - Note i just had to take out my other images due to being new- so i will try to post them as replies.

It seems like it is having issues with a Library perhaps? but i dont understand what the error is telling me.
Any ideas as to what i am missing, would be so greatly appreciated!
This forum is awesome and has helped me figure out some of my other issues- so thank you all for the resource :slight_smile:

this is my method…

And this is the excel, for the volumes i am trying to transfer into a 52 vial rack

Hey Kris,
i suggest you should check the type which you read from excel, you can do this via the string library and get the type of your variable in return (int, float, strg).
I think the problem is that your excel read is a string and you need int or flt type to work with these values - but you can convert thet with the same library.
Good luck !

1 Like

You need to handle when there are no values in the dispintvol column, maybe?

3 Likes

To expand on this a bit, your error is saying that it expected a number and didn’t get one.

This is because when you’re looping over the file it takes a row and tries to put that row into the variables you defined. In the first row (skipping header) if you take it and assign the cells to values you’d get:
xls_MethodID = “TestPlate”
xls_PosID = “1”
xls_DispIntVol = “”

All of these are strings* and DispIntVol is expected to be an integer. You can put in your loop a check for what the value type is (string, integer, etc.) and essentially skip the fileRead step for that row with an if/else command.

*I assume the number is being cast to a string for the posID but tbh I don’t remember how venus handles this

You can also just delete the rows with empty values from the file completely.

With all of that out of the way, you’ll also probably want to build a sequence for the dispenses. Sequences tell the robot where to go (labware and position within that labware). What people will typically do is read through the file, generating the sequences and the volume array, close the file, then run the liquid handling. There’s a library HSLSeqLib that has lots of great helper functions for generating sequences.

For a quick example:
image

In this case I’m adding positions to two sequences (seqSource, seqDestination) with labware Ids (strPlateInput, strPlateOutput) and the positions (strInputPosition, strOutputPosition). The labware IDs and positions were read from the file directly. Then the value in the volume (fltVolume) read from the file as well is being added to an array.

When I go to do my dispense, I set up a loop like this making sure that the sequence is incremented correctly (in this case automatically counting it down within the aspirate/dispense steps themselves) and then the volume array is incremented correctly (by adding 8 to the arrayIndex value after the transfer):
image

Hope this helps!

Hi Matt,

Thank you! this makes a lot more sense and perfect with the examples.
I will try some things later today and see how it goes!

Thank you all for your responses.