Technical White Paper - Neousys Technology

1 downloads 209 Views 615KB Size Report
Technical White Paper ... connected input channel of DIO card on the computer system. 3. ... The computer system obtains
Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Technical White Paper Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Summary For object inspection applications, it’s generally required to capture a clear picture of the object at an expected position with proper illumination. The position of an object is usually detected by a proximity sensor. The control system receives the sensor input as a trigger, and then accordingly generates strobe signals to actuate the illumination device and trigger the camera. The timing correlation between proximity sensor input, camera trigger output and illumination actuation control is crucial in such an application. Any unexpected latency in this trigger/strobe behavior can vary the position where image capture is taken place and therefore significantly affect the result of object inspection. To offer a deterministic timing correlation for trigger/strobe signals, Neousys Nuvis-3304af features a patented technology called “Deterministic Trigger I/O”. It’s a set of isolation digital I/O channels with dedicated control logic to allow a programmable and deterministic trigger/strobe behavior at a resolution of 25 microseconds. In this document, we’ll illustrate the current technology for object inspection applications and how Neousys’ Deterministic Trigger I/O can benefit these applications.

1 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Problem and Current Solution

Figure-1 Typical bottle inspection system

Figure-1 is a bottle inspection system, which is usually composed of 1. 2. 3. 4. 5.

Conveyor belt and motion control devices (ex. motors/PLC) One or several area-scan cameras Illumination device(s) Proximity sensor(s) A computer with camera interface (ex. GigE, USB) and digital I/O card

The computer system plays an important role here. It captures images of bottles from cameras and performs image-processing algorithms to determine if the product is Good or NG. Here is the summary of the bottle inspection process. 1. The bottle is carried by the fast-moving conveyor belt and is approaching the position of the proximity sensor. 2. When the bottle passed through, the proximity sensor outputs a pulse to a connected input channel of DIO card on the computer system. 3. When receiving a status change from the sensor, the DIO card generates an Change-of-State interrupt to notify the operating system on the computer. 4. Application software can response the interrupt and accordingly generate a strobe output for the illumination device via a digital output channel. 5. As the illumination is on, application software can trigger three cameras via digital output channels (simultaneously or in a pre-defined timing sequence according to camera’s position). 6. The computer system obtains the images of the bottle and starts to process the images. 2 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

From the aspect of application software, we can use the following timing diagram to represent the inspection process.

Figure-2 Timing diagram regarding sensor input and trigger/strobe output

You can notice that there is uncertainty between sensor input and digital output. It happens due to the fact that modern multi-tasking operating systems introduce latency when handling interrupts. For example, in Windows XP, the interrupt latency for a PCI device can be varied from tens of microseconds to tens of milliseconds depending on system status. For a bottle on a conveyor belt moving at 60 km/hr, the difference of 10us and 10ms in latency means a difference of 0.167mm and 166.67mm in displacement. This non-deterministic latency may cause misalignment between bottles and cameras when capturing images. There are some ways to deal with this problem. 

Lower the speed of conveyor belt As the bottles move slower, the displacement caused by interrupt latency becomes less significant. Obviously, performance degradation can be expected with this solution.



Connect the sensor and illumination device directly to the camera Some cameras offer the interfaces of trigger-in and strobe-out. You can use camera’s built-in logic to control the timing correlation between proximity sensor and illumination device. This is ideal for single camera configuration. But for multiple camera configuration, to synchronize them or to define a specific timing sequence between cameras remains a challenge.

3 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection



Implement the application software on a real-time OS Real-time OS can provide deterministic interrupt latency for mission-critical applications. Typically you can expect a steady 50 microseconds latency when handling the interrupt from a DIO card. Real-time OS offers a perfect platform for implementing a bottle inspection application. However, it needs extra software efforts (e.x. application software porting, drivers for RTOS and etc), and sets a high barrier for system implementation.

Neousys’ Deterministic Trigger I/O Technology To fulfill the requirements of object inspection applications, Neousys develops its patented technology called Deterministic Trigger I/O, or DTIO, to provide deterministic I/O control. Unlike current system implementation using a DIO card, DTIO introduces a standalone microprocessor to coordinate the behavior of digital input/output.

Figure-3 Current implementation for digital input/output

Figure-3 is the current implementation for digital input/output inside a computer system. The computer system accesses the DIO card, which contains a bus bridge and the digital isolation circuit, via system’s PCI/PCIe bus. In this case, the interrupt generated by the DIO card is processed by the computer/OS and non-deterministic interrupt latency is inevitable.

4 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Figure-4 Architecture of DTIO on Nuvis-3304af

Neousys’ patented DTIO technology, in contrast, uses a standalone MCU to collaborate with platform and digital isolation circuit. Figure-4 demonstrates the architecture of DTIO. The digital isolation circuit can be accessed directly by the CPU/chipset, or manipulated by the MCU. Inside the MCU is a highly-optimized algorithm to access DIO and communicate with platform. Through the communication interface, MCU can notify the platform for a status change, and the platform can configure MCU to response trigger signal(s) according to predefined parameters. Neousys’ current DTIO implementation can provide the following operating modes: 1. Polling Read/Write with Change-of-State Interrupt This is the typical way to access DIO function which is similar to a general DIO card. Users can either get input status and program output status using polling scheme, or specify a input status (combination of input channel(s) and rising/falling edge(s)) so that MCU will generate an interrupt accordingly. In this mode, it’s operating system’s liability to handle the interrupt and therefore the latency is not deterministic. 2. Deterministic Trigger I/O In DTIO mode, MCU takes the responsibility of controlling input/output channels. Users can program to generate pulse output on one or multiple DO channels with deterministic delay and duration when a predefined trigger condition occurred (i.e. rising/falling edge on a designated DI channel). The built-in algorithm in MCU guarantees a 25 microseconds resolution for specifying the pulse delay and duration. If we look at the timing diagram on figure-2 again, it shall be like this. 5 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Figure-5 Timing diagram regarding sensor input and trigger/strobe output with DTIO

With DTIO, you can always expect a deterministic delay of N x 25us and a duration of M x 25us for responding a trigger from the proximity sensor, no matter how busy your system is running. 3. Trigger Fan-out The trigger fan-out mode is a special scenario of DTIO. In some cases, users want to forward a trigger input to multiple output channels with minimal latency. In this mode, users can only specify the output duration. When a trigger condition occurred (i.e. rising/falling edge on a designated DI channel), pulses are generated immediately on designated channel(s).

Figure-6 Timing diagram of trigger fan-out mode 6 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

How does DTIO perform? DTIO provides the deterministic timing correlation between input and output signals. But in real hardware implementation, the transient time of photocoupler (a common component used for isolated digital input) is another factor should be taken into account. Transient time is the time needed for photocoupler to convert the voltage input to a logic high or low output. Fortunately, transient time is usually a constant which is only related to input voltage, and does not introduce non-deterministic latency. Take Nuvis-3304af as an example, trancient time measured is listed in the following table. Input Voltage

L to H

H to L

5V

13 us

142 us

24V

3 us

112 us

We can conclude a formula to describe the accuracy of pulse delay and duration when we program the DTIO function: Pulse Delay = Transient time of photocoupler + N x 25 us (+/- 25 us) Pulse Duration = N x 25 us

7 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Now we take real measurement for demonstrating the accuracy of DTIO. This is the screen shot of oscilloscope when we configure DTIO in microsecond scale with following conditions:   

Triggered on rising edge of DI CH0 Generate a pulse on DO CH0 with a delay of 50 us and a duration of 25 us Generate a pulse on DO CH5 with a delay of 100 us and a duration of 50 us

From the above expression, we can expect the pulse delay and pulse duration with 24V input/output signal as following: For DO CH0, Pulse Delay = 3 us + 2 x 25 us = 53 us (+/- 25 us) Pulse Duration = 1 x 25 us = 25 us For DO CH5, Pulse Delay = 3 us + 4 x 25 us = 103 us (+/- 25 us) Pulse Duration = 2 x 25 us = 50 us

8 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

This is another screen shot of oscilloscope when we configure DTIO in millisecond scale with following conditions:   

Triggered on rising edge of DI CH0 Generate a pulse on DO CH0 with a delay of 20 ms and a duration of 40 ms Generate a pulse on DO CH5 with a delay of 30 ms and a duration of 10 ms

From the above expression, we can expect the pulse delay and pulse duration with 24V input/output signal as following: For DO CH0, Pulse Delay = 3 us + 800 x 25 us = 20.003 ms (+/- 25 us) Pulse Duration = 1600 x 25 us = 40.000 ms For DO CH5, Pulse Delay = 2 us + 1200 x 25 us = 30.002 ms (+/- 25 us) Pulse Duration = 400 x 25 us = 10.000 ms

9 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

This is the screen shot of oscilloscope when we configure the trigger fan-out function with the following conditions:   

Triggered on rising edge of DI CH0 Generate a pulse on DO CH0 immediately with a duration of 75 us Generate a pulse on DO CH5 immediately with a duration of 125 us

You can notice that there is a latency of 8 microseconds. Considering the transient time of photocoupler is 3 microseconds with a 24V input, you can always expect a deterministic latency of 5 microseconds when using trigger fan-out function!

10 Copyright © 2017 Neousys Technology Inc. All Right Reserved.

Neousys White Paper - Using Deterministic Trigger I/O on Nuvis-3304af for Precise Object Inspection

Conclusion Accurate trigger/strobe control is the key to capture qualified image of an object at the right position. Comparing to traditional interrupt-based I/O scheme, Neousys’ DTIO technology on Nuvis-3304af significantly elevates the resolution of trigger/strobe control to a remarkable 25 microseconds. The most important is, DTIO is implemented with a standalone microprocessor, so you can have repetitive trigger/strobe behaviors regardless of CPU/system loading. Moreover, as an application-oriented platform for machine vision, Nuvis-3304af also features GigE PoE to power cameras and delivers sufficient bandwidth, and a patent Cassette to accommodate one additional PCIe/PCI card for function expansion. Neousys’ DTIO technology and Nuvis-3304af bring benefit for system integrators who want to implement machine vision solutions with extraordinary performance, compact size and great reliability.

11 Copyright © 2017 Neousys Technology Inc. All Right Reserved.