LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DMATRIX Barcode String Truncation Issue in LabVIEW TSPL Printer Application

 

Description of the Problem:

I am working on a LabVIEW 2022 Q3-based barcode label printing application that generates commands and sends them to a barcode printer TSC TTP 244 PRO. The application collects several input parameters such as Customer Part Name, Project Name, Serial Number, Vendor Code, DBA Level, Speed, and Date, and concatenates them into a DMATRIX barcode string in the following format:

DMATRIX 10,30,100,140,"A1B1@ABC00124@02@29EA@A@032767@111251@71@16@1141"
Issue observed:-

When the combined length of all input fields is short (for example, Serial Number = 12345, DBA = 114), the DMATRIX command is generated correctly with the closing double-quote intact (as attached image1 of prn file) and the barcode prints successfully.

However, when the input values are longer (for example, Serial Number = 327677, DBA = 1141), the concatenated DMATRIX string gets truncated. As a result, the closing double-quote character is lost, the TSPL command becomes syntactically invalid, and the barcode either does not print due to missing full length string.

 

Root Cause Suspected:

The string buffer or field width allocated during string concatenation in the LabVIEW block diagram appears to have a fixed maximum length. When the total character count of all combined input fields exceeds this limit, the string is cut off before the closing quote can be appended, resulting in a malformed printer command.

What I Need Help With:

  1. How to identify and increase the string buffer size in the LabVIEW concatenation or Format Into String node responsible for building the DMATRIX command line
  2. How to ensure the closing double-quote is always appended safely, regardless of input length
  3. Best practices for validating string length before sending commands to the printer to prevent silent failures

Environment:

  • Software: LabVIEW
  • Printer Command Language: TSPL
  • Printer: Barcode Label Printer
  • OS: Windows

I have attached code as well as screenshots of the showing both the case.

Any guidance would be greatly appreciated. Thank you.

 


 

0 Kudos
Message 1 of 2
(70 Views)

This is complete code of  project 

0 Kudos
Message 2 of 2
(41 Views)