Members Only | Ezine | Links | Legal Notice | Contact us |

NEWS

Official release
Creating PLCopen
Compliant Libraries
v1.0

 


booth #1-06
 


PLCopen OPC-UA
Client v 1.1
now released





PLCopen
Safe Motion v0.99
Release for Comments



PLCopen
presentations
available

 


 

 


 

 




 

 

 

Efficient integration of a laser marker in a DVD production machine with an IEC 61131-3 ST program

Willi Zeilinger, Dipl.-Phys., PLC Software Development, Matsushita Electric Works (Europe) AG

Introduction

The 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:

high reliability for industrial usage
minimized hardware costs
short development time for the converter software
an easy, flexible and user-friendly interface for integration into the DVD production system.

Selecting the Hardware

Based 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.


The Laser Marker LP-310 is writing a code on a DVD

The FP series PLCs from Matsushita are programmed with the IEC 61131-3 programming software FPWIN Pro, which has the PLCopen certificates Conformity Level ST and Reusability Level ST. All PLC types can use all data types, including the data type STRING. Especially for this PROFIBUS converter application, the functions based on the STRING data types are extremely useful.

The STRING functions make it simple to handle the demands of the character-based protocol required by the laser marker and therefore help reduce the costs and time needed for development considerably.

Choosing the programming Editor

In 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:

it is the most flexible editor
its economical use of space affords the best overview
it offers all the possibilities of a text editor
with its powerful selection control statements, all kinds of state machines can be programmed easily
effective iteration and loop statements allow all kinds of ARRAYs or STRINGs to be analyzed reliably while simultaneously saving program code.



The compiled ST code in the PLC is the same size as code from other languages

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 Application

The 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.

Summary

A 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.