Hello! I’m working on a project to communicate to the VWorks directly. I would like to write custom code to control the Bravo through VWorks. For example, I run a script to tell the Bravo through VWorks to move a plate to a location and then run an external script to scan (some check happens here) and then VWorks will wait for a response that will determine what VWorks does next (pop up an error message or proceed to the next viable item to scan). I want to be able to send commands back but no clue how to approach this.
I know Agilent has a VWorks API and some documentation for this. But I am quite new to using VWorks and APIs, and don’t understand how I can start communicating to VWorks. I feel like I’m missing a whole lot of information and have been trying to ask some of the support folks.
If there’s any support or guidance on this, I’ll gladly appreciate ! Thank you!
@Pete I have Microsoft Visual Studio 2022 installed. I also have 2008 because I tried using the samplevworksclient on 2022 and had issues with the one way upgrade. Is the samplevworksclient you’re referring to as the API? And 2008 still didn’t work for me.
In your solution explorer, make sure you you have Interop.VWorks4Lib added as a com Reference. Right click on Dependencies select add Com Reference. then you can browse and add VWorks.exe as a reference and you should be able to reference the API in your project
@Pete, I was able to add in the reference successfully and am using Visual Studios 2019. However, I’m running into an issue with the line “VWorks_= new VWorks4Lib.VWorks4APIClass();”
Hopefully this screenshot helps! I tried looking this up but am not understanding how to fix this. Thanks!
To give an update and for others if they run into issues like me… turns out, the issues I’ve been having were Windows 11 related! I replicated everything on Windows 10 and didn’t have any issues. Seems like the API may not be ready for Windows 11? Thanks for the help @Pete !
Hey Beverly, are you able to specify all parameters in a .pro from the API, or is more of just a start/stop command, that’s what it looks like from the documentation:
Ideally we would like to program .pro files outside of the Bravo Vworks IDE
Correct me if I’m misunderstanding you. You’re asking if I added parameters inside the .pro for the API? I didn’t modify anything in the .pro since all I needed to do was to start the protocol via the API. Is that what you mean?
Unfortunately, I haven’t been able to do that directly from the API. I wonder if it’s possible if you can run an aspirate.pro and send parameters to the aspirate.pro and write some JS in the aspirate command to pick up info from your code? Just some food for thought. I haven’t played with that specifically, but I was able to run my protocols that does plate scanning w/ variable positions read from a text file… hopefully that gives you some idea??
Hmmm maybe someone else can give us some insight if possible!
Omg! Thanks again Pete! @cwehrhan What Pete said would help you (and me )-- and I’ll probably modify my .pro directly rather than through the JS. Originally, I had JS read txt files after my code has written them for VWorks to pick up