Reading Data Matrix Codes With S7-1200 and Archiving Them in an MS Access Database (Set 27)
With an unambiguous coding, all the production steps for every part produced can be planned and carried out. The purpose of this application is to identify products reliably with a coding and to trace them after they have been delivered. A reader should read various codes on the surface of the products, and transmit them with RS232 to a SIMATIC S7 station and then to a database.
The application example shows the concrete connection of the MV340 reader via the RS232 communication module CM1241 to an S7-1200 PLC. With the reader the matrix codes are transmitted into the S7-1200. The SIMATIC NET OPC server forwards these codes to the OPC Client (MS Access database). The corresponding scancode is searched for in a product table in the data base and its product name is transmitted back to the PLC via the SIMATIC NET OPC Server.
Functions of the application
The following functions have been realized in this application:
- Configuration of the point-to-point connection of the communication module CM1241 RS232.
- Receiving of the code from MV340 from the CM1241 and storing it in a data block on the S7-1200.
- Using an MS Access database, in which an OPC client has been realized in VBA for the communication with the PLC.
- Monitoring the communication between the PC and the PLC.
Advantages and benefits
This application provides several universal S7 and PC program parts you can easily adapt for your projects. In particular, the communication between SIMATIC S7 and OPC Client is structured on the PC side and also in the SIMATIC S7 program so generally that it can be used for many variants of communication between the SIMATIC S7 and the PC.
|Content of Downloads||
Reading Data Matrix Codes With S7 and Archiving Them in an MS Access Database
STEP 7 V12 project for the application example
Figures, Flyer, Security Note
- 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