Skip to main content
Version: 8.1

BarTender Drivers

Musson Industrial's BarTender Drivers Module offers a quick and easy way to integrate the printing power of BarTender with the flexibility of the Ignition Platform. Manage BarTender connections, print labels, and run advanced integrations all as if they were native to Ignition.

important

Connections to BarTender servers are handled on the gateway, making it easy to trigger prints from both Vision and Perspective.

Background

Integrations are a concept in BarTender that allows outside systems to trigger actions on the BarTender server. This module allows Ignition to trigger a BarTender integration through a simple scripting interface.

Simple Scripting Example
# Run a print on the server named "BarTender" with a barcode of "123456".
server = "BarTender"
result = system.bartender.runBlocking(server, {"barcode": "123456"})

Input Format

This module handles all data formatting that takes place between Ignition and the BarTender integration, greatly simplifying the time-to-market for developers. Simply select the data format required for the integration (XML Variables, JSON Variables, CVS, etc.) and the module handles the rest.

BTXML

This ease of use doesn't incur any drawbacks for power users. A fully featured BTXML generator allows power users to utilize the complete feature-set of BarTender to solve any unique printing challenge.

BTXML Example
# Run a BTXML print command on the server "BarTender"
printCommand = system.bartender.newPrintCommand(documentPath="C://label.btw", printer="Printer01", namedSubStrings={"barcode": "123456"})
script = system.bartender.newScript(name="PrintBarcode", commands=[printCommand])
result = system.bartender.runBlocking("BarTender", script)

Response

In addition to making it simple to trigger BarTender integrations, this module also makes it simple to utilize responses returned from the BarTender server. Return print results, server status information, or print preview images, all with minimal parsing required at the script level.

Response Example
# Run a BTXML print command on the server "BarTender"
result = system.bartender.runBlocking(...)

# Parse the response as BTXML
btxml = system.bartender.btxml.fromResponse(result.value)

# Get the server response from the first command.
response = btxml.responses[0].actions[0]
print response.jobStatus
print response.message
print response.printData
note

Certain BarTender integrations have limited response options. Web Service integrations allows for the most response data through the use of response headers.

Trial

The BarTender Drivers Modules utilizes Ignition's 2 hour trial mode, allowing you to Try Before You Buy and to aid in development/deployment. Download and start your trial today!