I used DDE to message down data to a bunch of PLCs, most of the time it is all numeric and this works fine.
However with this latest PLC I have a 20 character String tag on the ControlLogix which contains the ID of an device.
I'd like to update this string trough DDE but my DDEPoke command does not seem to work.
My code looks similar to this:
Channel = DDEInitiate("RSLINX", Topic)
''Reads and write work great until the following
''CM_pH[1].Cfg_ID is the tag (DDE Item) I am trying to write
DDEPoke Channel, "CM_pH[1].Cfg_ID", Range("B2").Value
DDETerminate
I noticed that the String tag on the CLX has the String Data and Length tags in the structure. Do I need to write to there instead or is there a way to write directly to the string value? If not, that would be a pain...
Thanks.
However with this latest PLC I have a 20 character String tag on the ControlLogix which contains the ID of an device.
I'd like to update this string trough DDE but my DDEPoke command does not seem to work.
My code looks similar to this:
Channel = DDEInitiate("RSLINX", Topic)
''Reads and write work great until the following
''CM_pH[1].Cfg_ID is the tag (DDE Item) I am trying to write
DDEPoke Channel, "CM_pH[1].Cfg_ID", Range("B2").Value
DDETerminate
I noticed that the String tag on the CLX has the String Data and Length tags in the structure. Do I need to write to there instead or is there a way to write directly to the string value? If not, that would be a pain...
Thanks.