A solution for your case would be save the result into “.dat” files then transmitting them to MES.
I’ve never tried by myself but it surely works an it is widely used at Bosch Business Unit PS.
On Control Plus Studio, you can set up a DataSetAccess for writing the desired data (in your case the result data) into “.dat” files.
After all basic configuration is done, in TwinCat basically you write your result data to the "shadow data" (eg. ResultDataNew), then with the command "DATA_SAVE" the data will be applied to the active data set (eg.ResultData).
The DataSetManager documentation has some reference code for that, please have a look.
Once the results are saved into “.dat” files, there is a service that can be installed and configured on PLC that transfers “.dat” files to MES (As I don’t remember service name, I will not write here to avoid confusion. Please check with your MES colleague).
... View more