Understanding Scale Protocols

BarTender uses communication protocols to communicate with weighing scales. Protocol simply refers to the manner in which a scale communicates with BarTender using scale commands.

Scale commands enable BarTender to receive input (typically a weight) from a scale that is connected to a serial or network port on your computer. A number of common protocols along with their associated scale commands are installed with BarTender.

If you add a scale that is natively supported by BarTender, the scale automatically uses an existing protocol to communicate with the application. You don't have to configure the protocol yourself.

If you add a user-defined scale and the protocol that your scale uses is not supported by BarTender, you will need to define a new protocol to define the scale commands using the User-Defined Protocol Properties dialog. This usually occurs during scale setup, but you can edit existing protocols from the User-Defined Protocols tab of the Weighing Scale Setup dialog. Scale protocols are written using regular expressions.

When you create a new protocol that is not natively supported by BarTender, you need to specify a Command and Response Pattern for each of the scale commands you require. A command is the set of instructions sent by BarTender to the scale that tells the scale to do something. A response or response pattern is the scale's response to the specified command. For more information, refer to Weighing Scale Configuration.

If you have protocols that can work with more than one scale, you can change protocols from the Advanced tab of the Scale Properties dialog. Under Other Options, from the Protocol dropdown list, select the protocol you want.

Custom-defining a scale protocol requires advanced, detailed knowledge of the communication syntax for your scale.

Using Regular Expressions in Custom Protocols

A regular expression (also called RegEx or RegExp) is a sequence of characters that forms a search pattern. Regular expressions are used in the scale's response pattern. For more information, refer to Field Names Used in Regular Expressions and Regular Expression Examples.

Related Topics