Advertisement

Communicating the Agilent ChemStation through VB6.0

Discussions about chromatography data systems, LIMS, controllers, computer issues and related topics.

3 posts Page 1 of 1
Hi,everyone here.Recently,i'm using Visual Basic program to communicate with Agilent ChemStation by Dynamic Data Exchange(DDE) method.Here is my code.

With text1
.linktopic="hp3118|CPNOWAIT"
.linkmode=2
.linkitem="REGSIZE(CHROMREG)"
.linkRequest
End Eith

With these code,text1 can not request the result of "REGSIZE(CHROMREG)" command.When linkItem was set to standard variable like "_DATAPATH$", results was showed in text1 successfully.How to fix my code, please help me out.Thanks.
It is some time since I used DDE with VB6 and ChemStation, but I seem to remember that DDE is handling strings. You may need to convert the number to text. The fact that it works with the datapath, which will be text, may explain it.

Gasman
It is some time since I used DDE with VB6 and ChemStation, but I seem to remember that DDE is handling strings. You may need to convert the number to text. The fact that it works with the datapath, which will be text, may explain it.

Gasman
Thank you for your response.
But unfortunately it does't work. I've set linkitem to another variable like "_ERROR",that is a numerical variable. And this code returns the correct numerical result. I've also tried 'val$' command to convert the number to text.It also does't work.
For simplicity, my objective is making some VB code to obtain the remote command results, like 'regsize(myreg)' , 'objhdrname$(myreg,1)', and more.
From Agilent's user guide ebook, i found something about 'Items with the CPWAIT and CPNOWAIT Topics'.They says 'You can specify any ChemStation command processor variable, command, or macro as an item'.But i don't know how to use it.
3 posts Page 1 of 1

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 4374 on Fri Oct 03, 2025 12:41 am

Users browsing this forum: Bing [Bot] and 1 guest

Latest Blog Posts from Separation Science

Separation Science offers free learning from the experts covering methods, applications, webinars, eSeminars, videos, tutorials for users of liquid chromatography, gas chromatography, mass spectrometry, sample preparation and related analytical techniques.

Subscribe to our eNewsletter with daily, weekly or monthly updates: Food & Beverage, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry