A factory has a MES (manufacturing execution system), and I have a machine. The factory wants to use their MES to control my machine (start/stop producing, etc.) and monitor real-time manufacturing data (such as how many products produced).
To be short, the goal is:
MES ---controls--> machine
MES <--reports data--- machine
Be noted that My machine already has a .NET WinForm application (deploying the MVP pattern), which contains all the business logic, and could be easily used by workers offline. To meet the factory's need, I have to do some upgrade/transform to my .NET code.
After some investigation, I found 2 possible ways to achieve the goal:
- let my machine acts as an OPC UA server, let MES to adapt to my machine
- use socket programming to communicate between MES and the machine
I don't have any experience in either of the 2 methods above, so could you please tell the pros and cons of each? Or is there a third better way?