|
|
New!PLCopen 15 years anniversary brochure! |
Efficient integration of a laser marker in a DVD production machine with an IEC 61131-3 ST programWilli Zeilinger, Dipl.-Phys., PLC Software Development, Matsushita Electric Works (Europe) AGIntroductionThe target was to replace a conventional ink jet printer for printing serial numbers on DVDs in a DVD production facility with a laser marker. Thereby, the company expected to reduce maintenance costs, increase reliability and preserve the clean room conditions. After an intensive evaluation, the company decided to use the new laser marker LP-310 from Matsushita/SUNX.The next step was to connect two different protocols running on different physical bus systems: the DVD production uses the PROFIBUS protocol on an RS485 bus system and the laser marker uses a special serial character-based protocol and the RS232 interface. To accomplish this task, a PROFIBUS converter based on available standard products with the following features needed to be developed:
Selecting the HardwareBased on the above requirements, it was obvious that a small PLC which
can be connected to PROFIBUS would make the best PROFIBUS converter
hardware. Hence it was decided to use the small, high-quality PLC
FP0 from Matsushita with 2.7k steps of program memory together with the PROFIBUS
FP0-DP Slave Unit. Choosing the programming EditorIn the programming software FPWIN Pro, all IEC 61131-3 editors (including the ST editor) have been fully implemented. Programmers can select the appropriate editor according to their personal preferences and task at hand. For this application it was decided to use the ST editor because:
The compiler generates PLC code for ST programs that is the same size as for
other IEC 61131-3 languages, as shown in the picture above. In most other software,
ST code is usually much longer due to overhead from compilation. The ApplicationThe extract from the program below shows how the STRING functions embedded in the ST editor facilitate the handling of the character-based protocol for the communication with the laser marker. Please note especially the simplicity and clarity of the code when it comes to analyzing the data string from the laser marker and extracting the desired information from it.
ST editor with string functions for easy, readily comprehensible programming Of course, it is possible to develop the program above with other editors ? but how much effort would it take? For non-trivial algorithms like the one above, the ST editor is the optimum choice. SummaryA small standard PLC with a PROFIBUS interface became a converter between the DVD machine and the Laser Marker LP310. Well tested, standard PLC hardware combines high quality and a reasonable price.With the IEC 61131-3 ST editor, it was possible to create an optimized, reliable, and flexible program, which can be easily improved, modified, or extended later. The sample program demonstrates how the ST editor with its powerful STRING functions in combination with selection control structures and iteration and loop statements makes it possible for the programmer to concentrate on the best algorithm for the application. |
|