Table Of Contents

Read Barcode (G Dataflow)

Last Modified: June 25, 2019

Reads common 1D barcode types, including Codabar, Code 39, Code 93, Code 128, EAN 8, EAN 13, Interleaved 2 of 5, MSI, UPCA, Pharmacode, and RSS Limited (GS1 DataBar Limited).

NI recommends that you disable the Pharmacode barcodes unless you are specifically decoding barcodes of this type. Pharmacodes are simple, and many barcodes can be mistaken for this type. When using multiple barcodes that include Code 39, Code 93, or Interleaved 2 of 5, NI recommends that you set validate to FALSE.

connector_pane_image
datatype_icon

ROI descriptor

Descriptor that defines the region of interest within which the code is located.

The ROI must be a rectangle or rotated rectangle with a rotation of 0 degrees. If the ROI descriptor is empty or not connected, the entire image is considered to be the region.

datatype_icon

Global Rectangle

Coordinates of the bounding rectangle.

datatype_icon

Contours

Individual shapes that define an ROI.

datatype_icon

ID

Object specifying if contour is the external or internal edge of an ROI.

datatype_icon

Type

Shape type of the contour.

datatype_icon

Coordinates

Relative position of the contour.

datatype_icon

image in

Reference to the source image.

datatype_icon

search options

Cluster that contains the barcode search options to use when searching for barcodes in the image.

datatype_icon

min bar width

Minimum bar width of the barcode in the image, in pixels.

The node relies on this parameter to determine barcode characteristics to locate the barcode in the image.

datatype_icon

min edge strength

Minimum difference in intensity values to allow between the edge of a barcode and its surroundings.

A lower value helps locate low-contrast barcodes. A higher value helps remove noise.

datatype_icon

min bars

Minimum number of bars required in the barcode to be qualified for reading.

datatype_icon

skip location search?

Boolean that specifies if the node assumes that the barcode occupies most of the image or the search region.

TRUE Barcode occupies most of the image or search region.
FALSE No assumptions made about the image or search region.

If TRUE, the node skips the location phase and moves immediately to extraction and decoding.

Default: FALSE

datatype_icon

barcode types

Array of barcode types to search in the image.

Name Value Description
Reserved Reserved
Codabar 1

Reads a Codabar barcode.

Code 39 2

Reads a Code 39 barcode.

Code 93 3

Reads a Code 93 barcode.

Code 128 4

Reads a Code 128 barcode.

EAN 8 5

Reads an EAN 8 barcode.

EAN 13 6

Reads an EAN 13 barcode.

Interleaved 2 of 5 7

Reads an Interleaved 2 or 5 barcode

MSI 8

Reads an MSI barcode.

UPCA 9

Reads a UPCA barcode.

Pharmacode 10

Reads a Pharmacode barcode.

RSS Limited 11

Reads an RSS Limited (GS1 DataBar Limited) barcode.

datatype_icon

max number of barcodes

Number of barcodes to be read from the image.

Default: 1

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

validate

Boolean that specifies whether or not to validate the barcode's data.

If the barcode type is Codabar, Code 39, or Interleaved 2 of 5, the error correction information is used to validate the results. For all other barcode types, either no validation is performed or the validation is performed automatically because the type requires it.

datatype_icon

grading options

Options for barcode grading.

datatype_icon

calculate grading report

Boolean that specifies if grading report should be generated.

Default: FALSE

datatype_icon

scan width

Aperture or width of the problem to use while scanning the barcode to calculate the grading report.

Default: 1

datatype_icon

image out

Reference to the image that contains the Data Matrix code.

datatype_icon

barcode reports

Information about the barcode read.

datatype_icon

data

Decoded barcode data.

datatype_icon

special char 1

Information about the barcode, depending on the type of barcode read.

  • Codabar—If the node reads a Codabar barcode, this parameter returns the start character.
  • Code 128—If the node reads a Code 128 barcode, this parameter returns the FNC character.
  • EAN 8 and EAN 13—If the node reads an EAN 8 or EAN 13 barcode, this parameter returns the first country code.

For all other barcodes types, the value of this parameter is set to 0.

datatype_icon

special char 2

Information about the barcode, depending on the type of barcode read.

  • Codabar—If the node reads a Codabar barcode, this parameter returns the stop character.
  • EAN 8 and EAN 13—If the node reads an EAN 8 or EAN 13 barcode, this parameter returns the second country code.
  • UPCA—If the node reads a UPCA barcode, this parameter returns the system number.

For all other barcodes types, the value of this parameter is set to 0.

datatype_icon

checksum

Error correction information added to the encoded data to validate the decoded data.

Because checksum is not part of the input data, it is not returned in the output string. Not all barcode types have checksum error correction capabilities. In many cases, the text printed below the barcode contains the encoded data, including the checksum. For example, an EAN-13 barcode can display text containing 13 numeric digits. The first 12 digits represent the actual input data and the thirteenth is the checksum.

datatype_icon

barcode type

Type of barcode read.

datatype_icon

confidence level

Quality measure of the decoded barcode ranging from 0 to 1000, with 1000 being the best.

This value weights the error in the widths of the bars and spaces with the size of the character in the barcode. In general, a confidence level of less than 800 means the decoded string is suspect. confidence level is useful in decoding EAN 13 barcodes because 11 of the 12 values are encoded as characters in the barcode, and the twelfth value is encoded by the parity of the first 11 encoded characters

datatype_icon

bounding box

Array of points that define the boundary of the code in the image.

datatype_icon

x

x is the x-coordinate of the point.

datatype_icon

y

y is the y-coordinate of the point.

datatype_icon

number of barcodes

Number of barcodes read.

datatype_icon

barcode ANSI/CEN/ISO grading reports

Cluster detailing the grading information of the barcode.

All the grades displayed are the average of the grades over ten scan lines across the barcode, as recommended by the ANSI/CEN/ISO Bar Code Print Quality standard.

datatype_icon

overall grade

Grade of the barcode (A, B, C, D or F) .

For each scan line, an overall scan grade is calculated as the lowest of all the other eight grades (not including the quiet zone). The overall grade displayed is the average of these ten scan grades.

datatype_icon

edge determination grade

Grade that specifies if there are enough elements, or bars and spaces, present in the barcode for it to be decoded.

A result is either A (pass) or F (fail). Excessive bar growth, ink spread, or weak printing of narrow bars can result in an F grade.

datatype_icon

minimum reflectance grade

Letter grade assigned to a barcode based on the minimum reflectance score, or the ratio of the intensity of the darkest bar to the lightest space.

The darkest bar must have intensity less than or equal to half of the space. For example, if the highest intensity value of the spaces is 80%, the intensity value of at least one bar must be 40% or less. The grade is either A (pass) or F (fail).

datatype_icon

minimum edge contrast grade

Letter grade assigned to a barcode based on the minimum edge contrast score, or the lowest contrast in any edge or transition from bar to space and vice versa.

The grade is either A (pass) or F (fail). Incorrect bar color or background color and unfocused print will yield a low grade.

datatype_icon

symbol contrast grade

Letter grade assigned to a barcode based on the symbol contrast score, or the difference between the intensity of the darkest bar and lightest space of the barcode.

The grade varies from A to F. Low contrast means either the bars are too light or the background is too dark or both.

datatype_icon

modulation grade

Letter grade assigned to a barcode based on the modulation score, or the ratio of min edge contrast score and the symbol contrast score.

This output measures the uniformity of the intensity of the bars and spaces in the barcode. The grade varies from A to F. Press gain or undesirable bar widening causes a low modulation grade.

datatype_icon

defects grade

Letter grade assigned to a barcode based on the amount of noise present in the barcode.

The noise can exist as white gaps on the bars, or less ink, and dark gaps on spaces, or dirt. The grade varies from A to F.

datatype_icon

decode grade

Letter grade assigned to a barcode based on the success of the node in decoding or reading the barcode.

The grade is A if the barcode is decoded, otherwise it is F.

datatype_icon

decodability grade

Letter grade assigned to a barcode based on its decodability score, or the measure of the accuracy of the printed bar code against the appropriate reference decode algorithm.

The theoretical bar widths are compared with the actual bar widths obtained from the barcode to calculate the deviation and higher this deviation, the lower the grade. The grade varies from A to F. Uneven scanning, press gain or bar widening and bars with blurred and uneven edges lead to low decodability grades.

datatype_icon

quiet zone

Letter grade that specifies if the quiet zone is present (A) or absent (F).

Scanners require a quiet zone to the left and right of the barcode symbol to be able to successfully decode the barcode. This area must be clear of all text or graphics. The quiet zone dimension requirements vary according to the type of the barcode.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics