You can use Tulip's "Scan Optical Barcode" Trigger action to allow an operator to scan a barcode with their device's webcam.

This Trigger action imitates a real barcode scanner, so you will really need to write two triggers:

  1. Open the optical barcode scanner and allow operator to scan
  2. Store the barcode number in a variable.

Here's how to accomplish this in Tulip. Please ensure that the Tulip Player can access the camera on your computer before proceeding.

Scan Optical Barcode

Create a trigger that fires upon the opening of a step, then choose the appropriate trigger action.

  • "When" "Step is opened"
  • "Scan Optical Barcode"

When an operator runs the app, they will see a screen like this:

The operator must present the barcode in the highlighted clear box, and wait a few seconds for it to be scanned. Please note: due to limitations of the technology, only certain barcode formats can be successfully scanned.

Storing the Barcode Number

In order to store the barcode number in a variable, you must create a second trigger based around the barcode scan event. Here's how to store this value in a variable called barcode:

  • "When" "Barcode Scanner" outputs at this station
  • "Data Manipulation" "Store" data: "Device Output" "data" location: "barcode"
Did this answer your question?