Fieldpine Logo  

Retail Scales Roadmap

All Roadmaps Documentation

Scales reading erractically

Make sure the setting DevScale0FastReadTimer is not too small. There was a change in POS code at version P1875 correcting a timing issue and faulty scales causing Pos to hang. A side effect of this is that sites with this setting too low may have been using a longer value than expected. Try setting this value to 200 or 500.

Weight being reported is always higher/lower than actual

If the difference is always the same amount, such as always 70gm, check if the scale has been set to a TARE mode. With TARE mode of operation the scales themselves can change the weight or the protocol used to communicate to the POS

Small amounts being read wrongly/randomly

Scales can be sensitive to interference. If you are seeing small variations or random values being read, ensure that the scale top plate is not touching anything. If scale plates are recessed into counter tops, then the friction of touching the surround can throw off the values read. Contact your scale installer for more help.

Debug Tips

If you enable a trace file, the scale code writes strings in the trace file.

If you are sending a scale trace to support, please tell us know the exact weight(s) placed on the scale for the test

If the scale is occassionaly misreading, try changing the setting DevScale0Flags to either 2 or 1 and see if this helps

Advanced Tips

The following are very rare possibilities for problems

Are you using a serial interface that might be using 8250 or 16550 UARTs? (16550A is different/ok). These chips are very old and have some problems. Try disabling FIFO buffers on the serial port. (Device Manager, COMx, Properties, Advanced)

On installation, if you are using a USB to serial converter, it is been observed that the PC requires a reboot, even though the COM port is showing without issue in device manager. When the POS attempts to open the COM port it internally receives an error indicating the device does not exist. This was observed on Prolific cables.

How scales work internally

  1. If during selling an item the product is marked as weighed (specifically, field product.mmid=21) the system calls scale reading code.
  2. If the setting DevScaleEmulate is defined, a rudimentaty emulator is displayed to allow weight input. This is designed for development and testing where scales may not be present.
  3. The system tries to read the scale directly.
  4. If the scale did not return immediately, a high priority thread is created to read them
  5. The manual entry screen is displayed to both prompt the user to place the item on the scale or manually enter the value (NB Manual weight entry may not be legal in all environments)
  6. The system waits for either of the above two options to return a value. The first value returned is used.

The POS does not buffer data in addition to buffering from drivers. We match a read request to a read result

When reading a scale the system changes to support various types of scales and modes of operation they can be configured in.

SettingUsage
DevScale0PortThe Port that the scale is connected too. This value is used as an input to the CreateFile() windows API. The value will typically be "COM1" or "COM23" style strings. If the port cannot be opened, (P1875 and higher) flow error 1514170308 is logged; (versions older than P1875) runtime error 167 is logged.
DevScale0BaudBaud rate for serial devices. This setting is required
DevScale0BitsNumber of bits for serial devices. This setting is required
DevScale0ParityParity. This can be one of following values mark, space, odd, even. This setting is optional and if not provided the serial port will be set to no parity.
DevScale0StopNumber of stop bits. This can be "1" or "2" only. If not supplied the system will use 1 stop bit
DevScale0FastReadTimer Sets a faster read timer value, in milliseconds, when attempting to read scales. The default timers used are 500mS long, and this can be too long for some scales, as 1/2 second is a noticeable delay. Use this setting to enter a maximum delay in milliseconds when reading the scale. Setting this value too low will cause scales not to read correctly.
DevScale0TypeA string indicating the brand of scales being used or emulated. The single space between words is important.
  • "ishida vega"
  • "tec sl47"
  • "mettler toledo 8217"
  • "mettler viva 8217"
  • "ds866"
  • "towa oz series"
DevScale0EnqIf scale type is not understood, the system uses this setting and sends this value to the scale to trigger a read operation. The setting value is processed before sending and control characters can be sent by encoding them in percent signs. For example, if this setting has the value "%002%", the system sends ASCII 02(hex) (Control-B) to the scale.
DevScale0Flags(12 Apr 2016, P1919) Flags to affect precise scale operation. The default value is 0, but this may change in future versions. This is a bit field
  • Bit 0 (1): If set, close the handle to the port after use and release the port. The default is to keep handles open, mainly so that other applications do not open the scale and lock the POS out
  • Bit 1 (2): If set issue a read to clear all pending Rx data, if (and only if) data is pending before we try and read a scale. This setting should not be used on scales that send weight information without being polled as data might be lost.
  • Bit 2 (4): If set issue a 20mS timed read to clear all pending Rx data. This is similar to Bit-1, but implemented in an alternative way.