Simple Plant visualization with OCX Data Control in VBA for Excel
Process data exchange between SIMATIC S7 stations is a core element in the field of automation technology. OPC provides standardized interfaces for this which enable connecting Windows applications to programmable logic controllers (PLCs). The main requirement in this application is visualizing the process variables delivered via OPC, using a simple and cost-effective user interface in Microsoft Excel.
The application on hand shows a very simple process for generating individual visualization user interfaces with Microsoft Excel and VBA. In this application, a simple production plant is simulated with a SIMATIC S7 controller. The required process information is exchanged between the Excel application, via the OCX Data Control, and the SIMATIC NET OPC server and the S7-CPU via the MPI interface.
Various tables of an Excel application illustrate how
- a simple operator user interface for controlling the plant,
- a minimal recipe management,
- the display of temporal processes
are realized. In VBA Code you learn how
- S7 process data with SIMATIC NET ActiveX Controls (without programming skills) and Excel Standard Controls (with individual programming) are linked and displayed
- larger data volumes are written to the S7-CPU or read from it
- the most important S7 variable types are converted and displayed in VBA
- You have a technical question / problem: Ask the Technical Support
- You want to discuss in our forum and exchange experiences with other users
- You want to create CAx data for one or more products
- You would like to send us feedback on this Entry