Developer Portal Community

    Showing results for 
    Search instead for 
    Did you mean: 

    DataSetManager with OpconXml and public interface

    DataSetManager with OpconXml and public interface



    I would like to ask some implementation questions about PLC side, when use setup control of MES.

    1.Should I configure the OpconXml in the DataSetManager ?

    2.If select OpconXml, the DDL events will be sent by DataSetManagerAddon automatically  during executing load data command  or I need to create DDL events based on the xml file exported by Cpstudio?

    3.if it is sent automatically, where can I find the structure 'DataAccessHead' and assign specific value, for example: type number


    another question about public interface:

    is it possible to use the xml and OPC UA at the same time? I mean telegram use xml, DatsSetManger use public interface

    thank you~

    4 REPLIES 4



    You need to create seperate DDL events (dataDownloadRequired, etc.) for the XML communication.

    DataSetManager is only for accessing and handling the datafiles (TypeData, StationData, etc.) on the PLC, and also for OPC-UA communication. With XML, you need to manually assign the variables to the telegram items and then call the execution of the event.

    For the 2nd question, I think you can only use one adapter per station (either XML or OPC-UA).

    thank you for the response^^

    Community Moderator
    Community Moderator
    1. 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)

    2. 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):
    3. 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:
    4. 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.

    Thank you so much~ ^^

    Acutually my request is that the DataSetManager can be switched quickly with minimal project changes, when the MES is online/offline.

    1.About additional question, I mean that like partProcessed telegram use the OpconXml, but DataSetManager use public interface OPC UA/local service, I see comment if I set the target service to OpconDataSetTargetService.PAR_IMM, it can be switched between local and OPC UA, but I am not sure if the two communication methods can be worked at the same time between MES and PLC. and if can, I do not know how is it working, after setting, for example: if executing the command Data_load, MES will transfer data of the type data shadow structure to PLC directly during the Data_load process? you mentioned, if I use the OpconXml for DataSetManager, after Data_load command, PLC will get data via dataDownload telegram from MES, then check the plausibility of shadow data, next if the apply set to true, the shadow data will be transfer to the active stucture? if the local .dat file will be also created during this procedure? , is there any creating new local file command?