You should configure DataSetManager to what you need in your project:
local DAT files, accessable with DataSetAccess service or
data from MES via OpconXml
data from MES via Public Interface (OPC UA)
RottG's answer is a bit outdated 😃 Since NxDataSetManager V1.2 (2022) it supports OpconXml and includes already a dataDownloadRequired instance. No additional code and no additional DDL event are necessary. Like for all other OpconXml DDL Events you just need a DDL connection (usually one connection for the whole machine):
The example code in the documentation is the same for every target service. That means DataSetManager.ParCmd.DataLoad.DataSetName is used for the dataset name in the dataAccessHead structure. Your additional question:
One addon instance can use only one target service (OpconXml or DataSetAccess). If you want to use both OpconXml and DataSetAccess service at the same time, use two instances (that means both instances must be controlled in the application). The target service can be changed via ParCfg (not ParImm like the documentation of V2.0 describes), but I am not sure if this is completely tested. What is your use case to use both OpconXml and DataSetAccess? Switch MES off/on? Independent of that (two addons or changing service) it remains the application's task to synchronize the DAT file with the MES data.
... View more