From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-16-2008 08:54 AM
In our application it is important that a LabView VI is synchronised with
Agilent Chemstation (Rev B.03.01), i.e. that LabView always starts at a
certain point of each method.
Unfortunately we cant use a hardware solution because all pins are already occupied with other (non-LabView) applications.
My idea was to built a DDE server in LabView (found a similiar example in the tutorial on DDE) and use Chemstation as a
client with a prerun macro command. (see below) I registered the server, register the item, check the item inside a while loop (only returns value when poked from client), display this returned value to test my VI, afther the loop I unregister first the item then the server.
Unfortunately it is not possible to send data to the LabView DDEServer,
although the connection is established without problems. So the problem seems to be about registering the item. I get the
message: External Item (data) not set. (Channel ...)
The example macros of the chemstation (e.g. sending data to excel via
dde) work without problems. My LabView DDEServer also works when I use
another LabView VI as a client. Do you have any ideas what the problem
could be?
Chemstation Macro:
name DDELabView
local MyValue, MyString$
!Initiation block
Chan = DDEInitiate ("LabView","LabData") ! Open channel
!Conversation block
MyValue = 5000
MyString$ = val$(MyValue)
DDEPoke Chan,"data",MyString$ ! Send
Print "Startsignal ",MyString$ ! Print
!Termination block
DDETerminate Chan
Return
End Macro
10-17-2008 04:12 AM
Hi lm83,
If I understand correctly, the LabVIEW DDE server works with another LabVIEW VI as client, and the Chemstation client works with another DDE server than LabVIEW, but they do not work together.
I would suggest first of all that you go over the following document from our DevZone:
http://zone.ni.com/devzone/cda/tut/p/id/4531#1
Regards,
10-20-2008 05:36 AM - edited 10-20-2008 05:37 AM
Hi,
actually I read the document before and built my dde server according to it.
I now found that the problem also occurs with other dde servers, eg. the flow dde from Bronkhorst.
With a LabView VI as client I can send Data (Poke), but with the Chemstation it is only possible to establish a connection, but not to send data.
So the problem does not seem to be about my LabView DDE server VI but rather about the Chemstation which only seems to work properly with Excel.
Im in contact with Agilent for that question.
Anyway I would be grateful about having a glance on the LabView DDE server VI (see last message). Maybe there is still something in it I could change or add to make it work with the Chemstation as a client.
Thanks a lot, Luisa
06-16-2009 07:49 PM
I had the same problm with chemstation. my DDE macro was practicaly identical to yours. What allowed me to resolve this issue was to add in the "DDEpoke" comand the option of DDEFormat and I set it to CF_Text
so the command in the end looked like:
DDEPoke Chan,"stat",MyString, CF_Text
I hope this helps