11/07/2011

PLC-Application Examples Part A

The following examples show some applications my colleagues and I developed over the past few years. They were papers we presented at various NI conferences (mostly NIWeek, but also VIP conferences in Europe); that is why you will find some redundancies, especially regarding FireWire. These papers are reproduced by permission of National Instruments.

You can find related software on the attached CD; when certain hardware is needed, parts of the application or demo samples of the software are available.

Moving Camera Supports EMC Test Automation

by Thomas KLINGER, Christian MADRITSCH, and Hermann STERNER (Paper presented at NIWeek 1999) [40]

Category

· Industrial Automation

Products Used

· LabVIEW Version 5.0

· IMAQ Vision for LabVIEW

The Challenge

EMC testing is usually a long and intensive procedure. The test object has to be visually checked and supervised by a test engineer, who has to record the time when the test object fails to operate.

The Solution

A Moving Camera, controlled by a LabVIEW application, using IEEE 1394 (FireWire) technology for video transmission and control signals, is able to detect test object failures by means of image processing.

Introduction

CTI (Carinthia Tech Institute, or Technikum Kaernten) is an educational institute with several research projects supported by the Austrian government. Two of the main topics of CTI are serial bus systems (with focus on the IEEE 1394 technology) and EMC. The Moving Camera project gave us the opportunity to combine these two topics.

Normally, a camera is installed inside an EMI anechoic chamber to monitor the test object during the test period. Current solutions use a video monitor in combination with a VCR, but by using a digital video camera with IEEE 1394 bus, the video can be displayed on a PC.

The Moving Camera system described in this paper allows not only setting the camera properties (e.g. brightness, focus, zoom), but also tilt and pan adjustment of the camera.

Figure 5.72. Block Diagram of the Moving Camera System

graphics/05fig72.gif

IEEE 1394 (FireWire)

IEEE 1394 is a serial bus system invented by Apple in 1985 (at this time known as ADB; Apple Desktop Bus) with the goal to have a standard for a high-speed serial bus that is able to replace all existing interfaces on PC or multimedia environments. In 1995 the bus was standardized under the name IEEE 1394-1995.

The primary features of FireWire are:

· Transfer rates of 100 Mb/s, 200 Mb/s, and 400 Mb/s (up to 3.2 Gb/s planned).

· Support for isochronous applications (guaranteed bandwidth) as well as asynchronous applications (guaranteed delivery).

· Hot plugging: Devices can be attached to or removed from the bus dynamically.

· Cable power: Power available from the bus can be either sourced or sinked by a given node.

· Daisy-chaining: The serial bus can be extended by connecting new serial devices to ports provided by serial bus nodes.

Currently, FireWire is becoming common for high-end multimedia applications, such as digital camcorders or VCRs. On the other hand, the features mentioned above enable FireWire to establish itself as a standard for industrial automation applications.

Figure 5.73. Prototype of the Moving Camera Unit

graphics/05fig73.jpg

The Moving Camera System

Figure 5.72 shows a block diagram of the whole system. The left hand part of the figure represents the Moving Camera unit, which is located inside the EMI chamber and connected via one single serial IEEE 1394 cable with a PC equipped with an IEEE 1394 PCI interface board. The IEEE 1394 cable provides the digital video signal as well as the motor control signals and the power supply for both the camera and the DC motors.

The hardware is controlled by two ActiveX controls; one for displaying the video data on the PC screen and the other for positioning the digital camera using the motor controller and the DC motors.

Moving Camera Hardware

The Moving Camera unit (inside the anechoic chamber) is shown in Figure 5.73 and consists of

· a digital IEEE 1394 video camera (Sony) with a resolution of 640 x 480 pixels;

· a PC104 microcontroller board (386SX microprocessor, 24 MHz clock, 1 MB DRAM);

· a PC104 IEEE 1394 node for asynchronous transfers (200 Mb/s, developed by CTI);

· a PC104 Motion Controller board (developed by CTI) driving two DC motors for horizontal and vertical movement;

· aluminum ground plate and DC motor support with gear units (prototype in Figure 5.73 shown without housing).

The PC104 bus allows for a modular design of the system. For further upgrading, it is possible to add other components, e.g., ADC-boards.

Figure 5.74. Screenshot of a Typical Image Processing Application

graphics/05fig74.jpg

Moving Camera Software

The Moving Camera software structure is shown on the right hand side of Figure 5.72. The software base is two ActiveX controls, which are layered above the driver for the IEEE 1394 PCI card.

The first ActiveX, called Camera Control, provides the functionality to control the camera properties and to display the video stream. The second is called Motion Control and provides the functionality to control the movement unit. Both controls are embedded within a LabVIEW application. For example, the Motion Control ActiveX exposes in its COM interface the methods MoveRight, MoveLeft, MoveUp, MoveDown. These methods can be invoked by pressing a control element of the LabVIEW GUI, using LabVIEW's ActiveX capabilities.

Figure 5.74 shows the screenshot of a typical LabVIEW user interface. The upper part of the screen displays the live video on the left and the IMAQ window used for further image processing on the right. The lower half consists of the control elements for the moving camera, position and zoom elements for the IMAQ window, and application specific controls (shown in Figure 5.75).

One of our sample applications detects the change of brightness in a previously specified region. For example, this feature allows for the detection of LED failure (Figure 5.74). In Figure 5.75 the value of a digital display is being read and certain values can be detected.

http://www.cadfamily.com/html/Article/PLC-Application%20Examples%20Part%20A_923_1.htm

http://www.cadfamily.com/html/Article/PLC-Application%20Examples%20Part%20A_923_2.htm

No comments: