---
title: "Datamatrix and barcode detectors"
slug: "datamatrix-and-barcode-detectors"
updated: 2024-03-14T01:16:41Z
published: 2024-03-14T01:16:41Z
canonical: "support.tulip.co/datamatrix-and-barcode-detectors"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Datamatrix and barcode detectors

*Detect Data Matrix and other barcodes in a camera's view, Trigger app actions using barcode Detectors.*

## Overview

**In this article, you will learn...**

- How to set up a Datamatrix or Barcode Detector
- Using the detector event in-app triggers

Reading barcodes with a camera can help in visual verification of legibility and content of the code, as well as automating the overall process with the marked piece. We have two barcode detectors available:

- General purpose Barcode Detector, which can read a host of 1D and 2D [barcodes](https://en.wikipedia.org/wiki/Barcode##Types_of_barcodes), like: Code 128, Code 39, EAN-8, EAN-13, ITF, RSS-14, PDF 417 and QR code.
- [Data Matrix](https://en.wikipedia.org/wiki/Data_Matrix) Detector, which reads 2D DataMatrix barcodes widely used in production environments to mark products.

We offer a specialized Datamatrix Detector due to the speed and accuracy of the special purpose datamatrix detection algorithms.

          NOTE

          

Barcode detectors are only available from Tulip version r212+ and Player version 1.2.2+.

Using the barcode detectors in Vision, you can monitor pre-defined regions on your camera's stream to detect barcodes in real-time. You can then use the detection events to build logic within your app.

## Prerequisites

- Please review [Getting Started with Vision](https://support.tulip.co/docs/getting-started-with-vision) to get an understanding of Vision's functionalities and requirements, as well as for instructions on how to set up your camera.
- This feature works with both Color and Depth cameras.
- Consult the scanning setup guideline before starting to use the Vision barcode scanners: [Vision Barcode Scanning Guidelines and Limitations](/r230/docs/vision-barcode-scanning-guidelines-and-limitations)

## Setting up the Datamatrix or Barcode Detector

After completing your Camera Configuration setup, you can see the video stream. To set up the Datamatrix or Barcode detector, select the Region that you want to monitor for detecting barcodes. You may have to create a new region, by clicking and dragging on the picture to define your region:

Next, create a Datamatrix detector or Barcode detector by clicking **Create Detector**. Name the detector, give a description (optional), and choose the desired type of detector. Enable the detector for this region using the toggle.

![Datamatri.gif](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Datamatri%281%29.gif)

To create a Barcode detector, remember you must select "Barcode Detector" when creating the detector. The Barcode and Datamatrix detectors are separate.

The region boundary will turn green if a barcode is detected in the region, else it will stay as red. If a barcode is detected in the region, an event will be triggered in the app that is using this *Camera Configuration*.

## Using the Datamatrix or Barcode Detector in an App

Switch over to your app editor, and create a new **Device Output Trigger**.

All Camera Configurations will appear under the sub-list of **Specific device**. Select your Camera Configuration from the dropdown.

Note that the **Specific device** section allows you to use multiple cameras in the same app. Any station that runs this app must have the specific Camera Configuration that you selected for the camera. Otherwise, a warning shows when the app runs.

Now you will see a dropdown of various events to run the trigger off of:

For this example, select **Datamatrix Detected** or **Barcode Detected** from the list of events.

![Building a data matrix trigger](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Using%20the%20Datamatrix%20and%20Barcode%20Detectors_354358552.png)

If you have a video preview widget in your step, note the "Show Overlay" option allows you to disable showing the regions on top of the video. Enable the "DATAMATIRX DETECTOR" or "BARCODE DETECTOR" overlay to display the code detection information.

Run the app at the station to which you assigned your Camera Configuration.

When opening the step with the **Vision Camera Widget** in your Player, you will see the video stream of the camera. When you move an object inside the region which has a barcode the region boundary will turn green, and the Trigger Action will take place.

![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%28505%29.png)

You have now successfully completed setting up the Datamatrix and Barcode detectors in the camera configuration, and are ready to build this functionality into production apps.

## Further Reading

- [Using the Jig Detector](https://support.tulip.co/docs/using-the-jig-detector)
- [Using the Vision Camera Widget in Apps](https://support.tulip.co/docs/using-the-vision-camera-widget-in-apps)
- [Using the Snapshot feature in Apps](https://support.tulip.co/docs/using-visions-snapshot-feature)
- [Hardware Recommendations for Vision](https://support.tulip.co/docs/hardware-recommendations-for-vision)
- [Vision Barcode Scanning Guidelines and Limitations](/r230/docs/vision-barcode-scanning-guidelines-and-limitations)

---

Did you find what you were looking for?

Head to [community.tulip.co](https://community.tulip.co) to post your question or see if others have had a similar question!

**Trigger**

**Triggers** are groups of logic that are tied to an app event, such as step open, timer, widget interaction, etc. App builders can add triggers to **widgets**, **machines**, **devices**, **apps**, and **steps**.

**Triggers** can contain **actions**, **transitions**, and **conditions**.

**Tulip Vision**

**Vision**is a simple no-code tool to use cameras for visual inspection, process adherence, equipment, personnel, and material tracking on the shop floor.

**Camera Configuration**

**Camera****Configurations**are statically set detectors and their associated settings that can be applied to one or many cameras.

**Region**

**Regions**are user-established parts of a camera view within **Tulip Vision.****Detectors**can be added to individual regions, and when that detector is triggered, app logic can be executed. Multiple regions can be established in a single camera view.

**Widget**

**Widgets**are the elements that make up a specific **App Step.**Widgets can display information to users, collect user input, or trigger app logic.

*Common widgets include: Interactive Tables, Number inputs, Machine attribute widgets, and more.*

**Tulip Player**

**Tulip Player** is the Windows/Mac executable program where users can run Tulip apps. Tulip player allows you to create a more seamless user experience by removing the need for a web browser, and allows increased IT controls.

**Action**

**Actions**are different operations that can be executed in **Triggers. Actions**cannot move users to other apps, or other**steps.**

Many **Actions**can be added to a single **Trigger.**

*ex. Store the value of variable x to table field y, Print app step, Adjust Edge device GPIO pin.*
