VWorks JavaScripting Help!

I’m building a protocol where I would like to sort plates to 1 of 2 incubators. Each incubator has different temps, so some plates will need a cold temp, and others a warm temp.

I have both my incubators configured as storage devices. I’m wondering if there are any specific “task.x” methods for selecting a specific storage incubate device when 2 or more devices are available at the storage incubate task.

Basically, is there a way, that if I have both my incubators available at the storage incubate task, can I slot in some js to call out which incubator I’d like the plate to go to?

I see there is a “task.incubateAtLocation”, but I’m unsure exactly the syntax to call or utilize this functionality, or if this even allows me to do what I want. Any help or tips would be nice! @dcmay @luisvillaautomata @Pete I tagged you guys because it seems like you guys know Vworks pretty well. Thanks in advance!

Side note, VWorks documentation leaves far too much to the imagination.

Hi there, I agree, VWorks documentation is most useful when you already know how to do things. It should be improved, but we try to help anyway.

Please could you tell me more? Still Bionex version, I guess. Which incubator? And do you access this incubator via the “load”/“unload” task?

So I’m using the “Incubate Storage Location” task. It’s not the “Unload” or “Load” tasks, but it’s similar.

In all fairness it isn’t actually an incubator, it’s 2 separate plate hotels. However, one is a basic plate hotel (cold inc), and one is a custom built heated plate pad hotel (warm inc).

I’ve got a workflow where a decision will be made to go to cold or warm incubator, and I’d like to figure out a way to do this in a run.

I currently have to run my cold and warm plates separately in 2 different protocols. “WarmIncubate.pro” and “ColdIncubate.pro”. Ran separate, I obviously don’t need fancy scripting to sort plates accordingly, plates will just mundanely only go to the assigned storage device.

I have tried to use the “Unload/Load”, but I’m already unloading from another storage location at the beginning of the swimlane, and vworks tells me I can’t do mulitple unloads/loads in a swimlane. Now I know I could play with the processes and lanes and sort this out, but I would still need to know the syntax to properly sort the plates to the right storage device via the unload/load tasks as well. Hope this helps.

I’m pretty knowledgable with VWorks in general and decent JavaScripter. I just don’t know every single eclectic JS syntax to call every built in function/method in the VWorks js library. Do you happen to have any additional VWorks documentation at all? I do have the manuals, and they are helpful up to a point.

I don’t know if this may help but for a similar problem I have used a structure like the following (this is a snippet of a more complex process):

Here I wanted to down-stack 4 plates from a BenchCel and incubate them at 4 different locations on the Bravo. The “workflow” process would host 4 instances at the same time and the process control would run inc5, inc6 inc8 and inc9 as subroutines, depending on the current “workflow” instance. The incubation time for all subroutines was the same here, but it does not need to.

In your case you could run 2 instances of your main process and direct the incubation to different “incubators” with the same technique.

I hope this helps!

I seem to recall that it’s just a string of the location: ie
task.incubateAtLocation = “Agilent Plate Hub Carousel - 1, cassette 1, slot 1”

not 100% sure, I’ll try to check.

The other option is use 2 “incubate” steps one after another, then use task.skip().

Thanks for all the help @mauro Mauro, but I have a total of 48 individual plate positions, which is why I chose to make them incubate storage devices and not individual incubate positions. Though you have given me some ideas on how to do a different part of the process better. So definitely thank you for that!

@RKeyser so that is pretty much exactly what I’m looking for. I have definitely tried ‘task.incubateAtLocation = “Agilent Plate Hub Carousel -1”;’ before. However, I was hoping to not have to be granular down to the cassete and slot level. I was hoping to just dynamically fill each storage location like the protocol would do if there was only 1 device involved. But alas.

I am going to test this and some variations tonight. Do you think task.incubateAtLocation = “device x, x, x” will work? Or does it have to be “device x, cassette x, slot x”?

I don’t have the inventory database configured on my PC instance, so I can’t check at the moment.

I think it’s just passing in the location as a string, so it will have to match exactly with device x, cassette x, slot x. However, you might be able to create an inventory location and refer to that by name. And - looking at the step through the breakpoint debugger view - looks like it’ll take an array for the locations. I don’t know the exact syntax for JS arrays, maybe
locations[48] = [“device, cassette, slot 1”, “device, cassette, slot 2”, etc…]

That’s a lot of guessing on my part, but hopefully easy to try out.

Ok, I have never seen the task you want to use, Maybe I could try with the Agilent vworks 12.x. Could you show me how you would normally use the task?

I have used a 10-position plate hotel in the past and I remember that all I had to do was to set a task property to the relevant shelf number I needed to use. Programmatically, I treated the plate hotel as an array and stored each incoming plate in the position corresponding to the next element that contained a zero.

So it was (single process with 10 instances possible at the same time):

  1. Create an array with 10 zero elements
  2. Get the next plate
  3. Check for first zero element in array
  4. If available, store the plate and make the element non zero, otherwise wait
  5. Start incubation
  6. Remove plate when incubation done and set the corresponding element back to zero

Do you know if yours is a specific task only present in the Bionex version of VWorks?

Thanks

Is it this one?

image

In that case you could create some location groups with the inventory tool and use the same technique I outlined in this post.