Configuring the Scale

Configuration files

Windows driver

  • defaultVars.cmd

Linux driver

  • defaultVars.sh

Configuration for JavaPOS

  • ..\parameter\client\hal.properties
  • ..\parameter\client\scale.properties
  • ..\parameter\client\jpos.xml

Configuration via Named Pipes

  • CS300SD.ini

Configuring scale protocol 8217

  • ..\parameter\client\hal.properties
  • ..\parameter\client\scale.properties
  • ..\parameter\client\ flow\customerFlowConfigs.properties
  • ..\parameter\client\ ui-translation_en_US.properties
  • ..\parameter\client\inputDomains.properties

The following describes the configuration of a scale (e.g. CS300 with software display).

Preparatory Actions

Generally, the scale is connected to the POS Client via a serial interface (e.g. COM3).

The case is different if a software display is used. The software display is responsible for the communication with the scale via the serial interface and the POS Client communicates with the software display via Named Pipe or JavaPOS. JavaPOS is used in the example. Differences for the Named Pipes are explained below.

Windows driver

Windows systems require a one-time installation where the corresponding installation command file installcs300sd.cmd resulting from the Bizerba installation package CS300_SDK_61107200130.zip is executed with administrator rights.

Adjustments are made in the configuration file C:\Program Files\bizerba\cs300sd\cs300sd.ini after the installation. Check the COM port to which the scale is physically connected.

After starting Windows, the software display must be started once via CS300SD.exe. KillSD.bat can be used to stop the software display.

The drivers installed by means of the Bizerba installation process are located in subdirectories under :\Program Files\bizerba. Java routines are stored there as well. For this reason, two environment variables must be extended using the file defaultVars.cmd:

Before starting the POS Client, perform these settings by calling defaultVars.cmd.
REM *** Bizerba Scale ***
SET BIZJPOS_HOME=%ProgramFiles%/bizerba/posscale
SET classpath=%classpath%;%BIZJPOS_HOME%/com_bizerba_jpos_scalecsoem.jar
REM *** Bizerba Scale ***
SET librarypath=%librarypath%;%BIZJPOS_HOME%/winnt_x86

In order to uninstall the software display, call uninstallcs300sd.bat.

Linux driver

Linux systems require an X server. If the software display is intended to run both on the operator display and on the customer display, you have to install the package Xinerama. All installation activities must be executed with root rights.

The Bizerba installation process is started after unpacking with tar -xzf cs300sd…tar.gz. Then, call install.sh. As an alternative, use the RPM package manager by calling rpm -i cs300sd…rpm.

Upon installation, root rights are no longer required if the user has read and write permissions to the serial interface.

The display can be started via /opt/Bizerba/cs300sd-gtk/bin/runcs300sd and stopped via stopcs300sd in the same path.

Similar to Windows, paths must be extended. The command file being edited is defaultVars.sh. defaultVars.cmd:.

Uninstall.sh or rpm -e cs300sd… are used for uninstallation. rpm -e cs300sd… >

Tip:
For more information on the Bizerba installation process, refer to the driver package documentation.

Setting up the POS configuration for JavaPOS

Switch from the virtual scale to the physical scale in the file hal.properties.

Note:
Required lines should already exist and need to be uncommented now. Set the applicable options, if desired.
  1. Disable the virtual scale:
    DeviceEntryTypes.VirtualScale.enabled=false
  2. Enable the desired device:
    DeviceEntryTypes.BizerbaScaleCS300SD1.enabled=true
  3. Set DeviceMapping to default scale:
    DeviceMappingEntryTypes.DefaultScale.id=DefaultScale
    DeviceMappingEntryTypes.DefaultScale.deviceCategory=SCALE
     DeviceMappingEntryTypes.DefaultScale.mappedTo=BizerbaScaleCS300SD1
    Note:
    The ID “BizerbaScaleCS300SD” applies to the scale Bizerba CS300 with its first software display. This scale is also set as the default scale.

For further setting options, refer to the file hal.properties.

The ID “BizerbaScaleCS300SD” is included in the scale configuration file as well. The software display is directly addressed via JavaPOS. As an alternative, Named Pipes can be used (see below.) The POS Client directly communicates with the scale via dialog 06 only if no software display is used.

Further parameters may be required and set for the communication.

scale.properties
#Bizerba CS scale is a CS300SD scale system
#protocol type - dialog06 (default), JavaPOS
scale.BizerbaScaleCS300SD1.protocol=JavaPOS
#javapos device name (name of entry in jpos.xml)
 scale.BizerbaScaleCS300SD1.jposDeviceName=BizerbaScaleCS300SD1
scale.BizerbaScaleCS300SD1.noload.timeout=10000
scale.BizerbaScaleCS300SD1.motion.timeout=3000

The JavaPOS device name is also set to “BizerbaScaleCS300SD1”. This name is called again in the file jpos.xml. In the case of direct communication between the POS Client and the scale, the COM port would be set in the file scale-properties.

jpos.xml
<JposEntry> <JposEntry logicalName="BizerbaScaleCS300SD1"> <creation factoryClass="com.bizerba.jpos.scalecsoem.ScaleInstanceFactory" serviceClass="com.bizerba.jpos.scalecsoem.BizerbaCSScaleService19" /> <vendor name="Bizerba" url="http://www.bizerba.com" /> <jpos category="Scale" version="1.14" /> <product description="Bizerba Scale Service, version 1.14, (c) 2014" /> <!-- Other non JavaPOS required property (mostly vendor properties and bus specific properties i.e. RS232) --> <prop name="physicalDeviceName" value="BizerbaScaleCS300SD1" /> <prop name="physicalDeviceDescripton" value="BizerbaScaleCS300SD1" /> <prop name="config_file_with_rw_access_without_extension" type="String" value="" /> <prop name="loggingPropertiesFile" value="" />
</JposEntry>

Differences in configuration when using Named Pipes

The communication between POS Client and CS300SD can also take place via Named Pipes. If using Windows, the pipe is bidirectional. The pipe name is set in CS300SD.ini and the default setting is \\\\.\\pipe\\CS300SD.

If using Linux, more pipes must be configured because these pipes are unidirectional. All names and directories can be set in the file CS300SD.ini. ([comsetting] key namedpipe=xxxx). The default is /tmp/CS300SD , where the FIFOs are located.

A FIFO with the name xxxxfromclient and one with the name xxxxfromserver are used for Dialog06. The FIFOs xxxxstatusfromclientand xxxxstatusfromserver are used for the display status. The FIFOs enable write permissions for users without root rights. The Client can use the pipes only if the Pipe Server was started before. The Pipe Server reads the pipe. xxxxfromclient the Client reads xxxxfromserver>

Further configuration options

Further configuration options for the software display may be set in the file CS300SD.ini (communication and Look&Feel) and in the file sdmetric.ini (display settings). See Bizerba driver documentation.

Configuring Scale Protocol 8217 (Mettler)

With optional live display of the weight on the POS

Price computing scales are currently used in Europe only, and they are connected via checkout dialog 06. By contrast, price computing scales are currently not used for checkout purposes in the USA.

For this reason, scale protocol 8217 was implemented in the POS Client. This includes the option of showing a live display of the scale's weight panel on the POS Client if the checkout scale does not have its own display.

To do this, the 8217 protocol cyclically requests the weight from the scale, whereupon the weight is more or less displayed live, both on the operator display and on the customer display.

The frequency and speed of display refreshing is affected by limitations of the scale hardware and serial interface data transfer.

Configuring Scale Protocol 8217

The scale is connected to the serial interface of the POS, as usual. In general, the interface parameters for protocol 8217 are set to 9600 bit/s, 7 data bits, 1 stop bit and uneven (ODD) parity. These parameters are configurable both for the scale and for the POS, and the configured values must be identical for both systems.

Similar to any other peripheral device, the scale is enabled by using the corresponding setting in the configuration file hal.properties:
DeviceEntryTypes.MettlerCOM1Scale.id=METTLER_COM1
 DeviceEntryTypes.MettlerCOM1Scale.descriptionKey=device.entry.METTLER_COM1.scale
DeviceEntryTypes.MettlerCOM1Scale.description=Scale
DeviceEntryTypes.MettlerCOM1Scale.deviceCategory=SCALE
DeviceEntryTypes.MettlerCOM1Scale.enabled=true
DeviceEntryTypes.MettlerCOM1Scale.active=true
 DeviceEntryTypes.MettlerCOM1Scale.className=com.gk_software.pos.hal.device.scale.JPosScale
#DeviceEntryTypes.MettlerCOM1Scale.xXCustom01=
#DeviceEntryTypes.MettlerCOM1Scale.xXCustom02=
#DeviceEntryTypes.MettlerCOM1Scale.xXCustom03=
#DeviceEntryTypes.MettlerCOM1Scale.xXCustom04=
#DeviceEntryTypes.MettlerCOM1Scale.xXCustom05=
....
DeviceMappingEntryTypes.DefaultScale.id=DefaultScale
DeviceMappingEntryTypes.DefaultScale.deviceCategory=SCALE
DeviceMappingEntryTypes.DefaultScale.mappedTo=METTLER_COM1
....
 HalConfig.devices.deviceEntries.39=reference\:DeviceEntryTypes.MettlerCOM1Scale
The parameters for the data transfer from/to the scale are set in scale.properties:
# interface type - serial (default), named-pipes
#scale.METTLER_COM1.interface=serial
# COM port name where the scale device is connected
scale.METTLER_COM1.port=COM1
# parameters for setting the COM port, default for Protocol6 is 9600/7/1/ODD
# SHOULD NOT BE CHANGED unless you have very good reason for it !!!
# allowed values:
# - baudrate ... 9600, 19200, 38400 etc. (valid COM port baudrate values)
# - databits ... 5, 6, 7, 8
# - stopbits ... 1, 1.5, 2
# - parity ... even, none, odd (case insensitive)
#
#scale.METTLER_COM1.baudrate=9600
#scale.METTLER_COM1.databits=7
#scale.METTLER_COM1.parity=odd
#scale.METTLER_COM1.stopbits=1
# settings for MT protocol 8217
#scale.METTLER_COM1.port=COM1
scale.METTLER_COM1.protocol=8217
scale.METTLER_COM1.conversion.factor=1
# time to wait between each send command (in ms - minimum is 200, otherwise the scale may crash)
scale.METTLER_COM1.blockTime=200
# default 3 for kg, 2 for lb
scale.METTLER_COM1.tare.precision=2
# default true for price rounding is up, false for rounding down
scale.METTLER_COM1.priceUpRoundingFlag=true
# timeout in ms for waiting before showing the error
# that the scale is empty (has no load)
# minumum is 1000, maximum is 60000
scale.METTLER_COM1.noload.timeout=10000
# timeout in ms for waiting before showing the error
# that the scale is not able to get stable weight value
# minumum is 1000, maximum is 10000
scale.METTLER_COM1.motion.timeout=3000
# timeout in ms for waiting for the reply packet from device
# default value is 2000, must be > 0
scale.METTLER_COM1.receivePacketTimeout=5000

Enabling Live Display of the Weight

To enable live display of the scale weight on the POS, set the following entry in the file customerFlowConfigs.properties:
CustomerFlowConfigs.Default.scaleInfosEnabled=true

Switching weight units from US pound (lb) to kilogram (kg) with a connected scale

In the USA, both the weight unit lb and the weight unit kg are legal and certified for our POS system.

The US pound "lb" is more commonly used in general. Though, "kg" is more frequent in areas near the Canadian border. The POS system is certified in the USA for connection of scales that weigh either in "lb" or in "kg".

However, the system is allowed to work with one of both weight units only at runtime.

To switch between the weight units, the corresponding setting must be made both on the scale and on the POS. In this case, you have to make the following adjustments:

  1. In the database artsdb , enter the desired weight unit in the table PA_STR_RTL_OPR_GK, field NM_UOM_WT_MN of the US-Store (data record to be recognized by the corresponding Store ID): lb or kg.
  2. In the configuration file scale.properties, go to the section that corresponds to the scale you are using and set the property "...tare.precision" to the correct value:
    # default 3 for kg, 2 for lb
    scale.METTLER_COM1.tare.precision=3
  3. In the configuration file ui-translation_en_US.properties, store the scale properties at both sections defining the "...ScaleInfo..." configuration. The values must be identical with those of the scale that is actually connected. Example:
    customerFlow.scaleInfo.additionalInfos.title=Nmax: 3000 | Scale: 30x0.01lb | Class: III
    ....
    registration.scaleInfo.additionalInfos.nmax.title=Nmax: 3000
    registration.scaleInfo.additionalInfos.scale.title=Scale: 30x0.01lb
    registration.scaleInfo.additionalInfos.class.title=Class: III
  4. In the configuration file inputDomains.properties, set the decimal places "minimumFractionDigits" and "maximumFractionDigits" for the IDs WEIGHT and SCALE_INFO: Correct values are 2 in case of "lb", and 3 in case of "kg".
InputDomainsConfig.inputDomains.28.id=WEIGHT
InputDomainsConfig.inputDomains.28.name=Quantity input - weight
InputDomainsConfig.inputDomains.28.dataType=DECIMAL_NUMBER
....
# Sets the minimum number of digits allowed in the fraction portion of a number. minimumFractionDigits must be <= maximumFractionDigits. If the new value for minimumFractionDigits exceeds the current value of maximumFractionDigits, then maximumIntegerDigits will also be set to the new value.
 # Default value is 0.
 InputDomainsConfig.inputDomains.28.validation.numberValidation.minimumFractionDigits=2
# Sets the maximum number of digits allowed in the fraction portion of a number. maximumFractionDigits must be >= minimumFractionDigits. If the new value for maximumFractionDigits is less than the current value of minimumFractionDigits, then minimumFractionDigits will also be set to the new value.
 # Default value is 0.
 InputDomainsConfig.inputDomains.28.validation.numberValidation.maximumFractionDigits=2
....
InputDomainsConfig.inputDomains.53.id=SCALE_INFO_WEIGHT
InputDomainsConfig.inputDomains.53.name=Scale info weight domain
InputDomainsConfig.inputDomains.53.dataType=DECIMAL_NUMBER
....
# Sets the minimum number of digits allowed in the fraction portion of a number. minimumFractionDigits must be <= maximumFractionDigits. If the new value for minimumFractionDigits exceeds the current value of maximumFractionDigits, then maximumIntegerDigits will also be set to the new value.
 # Default value is 0.
 InputDomainsConfig.inputDomains.53.validation.numberValidation.minimumFractionDigits=2
# Sets the maximum number of digits allowed in the fraction portion of a number. maximumFractionDigits must be >= minimumFractionDigits. If the new value for maximumFractionDigits is less than the current value of minimumFractionDigits, then minimumFractionDigits will also be set to the new value.
 # Default value is 0.
 InputDomainsConfig.inputDomains.53.validation.numberValidation.maximumFractionDigits=2

The receipt layout should comply with the input domain settings. The masks for weight display are generated based on the corresponding input domain. The layout files are named transaction.xml and are saved to subfolders of the directory report .

Receipt Reprinting on Bizerba Printers

Note:
The Bizerba reprinting feature is only available in the Take Away mode. For more information on the configuration of Take Away POS, see chapter Configure Take Away Mode in this document.
To enable receipt reprinting on a Bizerba printer after an "out of paper" error, change the following parameters in file ui.properties:
 UiConfig.errorOverlayScreenConfig.manualConfirmationAllowedForErrorCodeList.2=GKR-20002
 UiConfig.errorOverlayScreenConfig.skipDeregisterFromMessageBusErrorCodeList.0=GKR-20002

If the Bizerba printer runs out of paper, proceed as follows:

  1. Insert new paper into the printer.
  2. Confirm the "out of paper" error dialog with OK.

The reprint is started.