Use DDE
Dynamic Data Exchange (DDE) is a standard inter-application communication protocol built into Microsoft Windows operating systems and supported by many applications that run under Windows. DDE takes data from one application and gives it to another application. It allows Windows programs that support DDE to exchange data between themselves. FactoryTalk Linx Gateway supports 20 DDE client connections.
FactoryTalk Linx Gateway only supports CF_TEXT and XLTABLE format. FastDDE and AdvanceDDE are not supported.
To use DDE in Excel
FactoryTalk Linx Gateway supports using DDE in both 32-bit and 64-bit editions of Excel.
- In Excel, enter the DDE format in the cell or use VBA to read the tag value.For DDE format samples, see DDE format sample. For VBA samples, see Visual Basic for Applications (VBA) code sample.IMPORTANT:DDE does not support wide characters, for example, 16-bit Unicode. Excel cannot show a tag value containing wide characters correctly.
Use L modifier in DDE
L modifier indicates the length (block size) or number of items to be read.
Use L modifier in a client application to read the data block (for example, array tag) in a single action.
The maximum numbers of this modifier for different data types are:
- BOOL: 3808
- INT/UINT: 238
- DINT/UDINT: 119
- SINT/USINT: 476
- REAL: 119
L modifier is only available when you select
Folders with scalar data
.Excel (Microsoft 365) supports using L modifier to read array values in the spreadsheet by adding the L modifier at the end of the formula.
For example:
=FTLinxGatewayDDE| New_Shortcut01! 'Program:MainProgram.Values00[1],L10'
You can use the L modifier by VBA. All versions of Excel support to use L modifier by VBA. For VBA samples, see Visual Basic for Applications (VBA) code sample.
For more information on the L modifier, see
FactoryTalk Linx Help
> Configure for local stand-alone applications
> Modifiers in FactoryTalk Linx
.Convert Excel to migrate the DDE interface from RSLinx Classic to FactoryTalk Linx Gateway
Take the
Folders with scalar data
option as an example.In Excel spreadsheet
- Replace the server nameRSLinxwithFTLinxGatewayDDEin the formula.
- Replace the RSLinx Classic topic name with the FactoryTalk Linx shortcut name.
In VBA
- Replace the server nameRSLinxwithFTLinxGatewayDDEand replace the RSLinx Classic topic name with the FactoryTalk Linx shortcut name in the code when initiating DDE.
- Delete,C1from the code.For example,RSLinx Classic:DDEServer = DDEInitiate("RSLinx", "TopicName")tagValue = DDERequest(DDEServer, "tagName,L1,C1")FactoryTalk Linx Gateway:DDEServer = DDEInitiate("FTLinxGatewayDDE", "ShortcutName")tagValue = DDERequest(DDEServer, "tagName,L1")TIP:To locate the FactoryTalk Linx DDE interface in WindowsTask Manager, perform one of these actions:
- InTask Manager, selectDetails>FTLinxGatewayDDE .exe.
- InTask Manager, selectProcesses>FactoryTalk Linx DDE Server (32 bit).
TIP:
If the DDE interface fails to get data, it will return the following errors to Excel:
- #REF: The tag does not exist.
- #NA: The DDE interface is unable to read the tag due to errors, such as the tag's data type mismatch between the custom namespace and the data source.
- #Value: There are communication errors.
To troubleshoot DDE, see The DDE Server Interface is not working.
Provide Feedback