Навигация по разделу "Инструкции, софт и прошивки": Zipstore.ru > Инструкции, софт и прошивки > Меттлер Толедо > Протоколы для простых весов

 NCI – ECR

OVERVIEW

The serial communications protocol is used to interface Weigh-Tronix/NCI POS (Point-of-Sale) scales to ECR (Electronic Cash Registers), or other computing equipment (eg. personal computers).

Responses to serial commands will be immediate, or within one weight meter cycle of the scale. One second should be more than adequate for use as a time-out value by the remote (controlling) device.

There are two types of serial commands: mandatory and optional. Mandatory commands must be supported by all products.

If weight is negative, in motion, over capacity or under capacity, or if a zero error exists, only the scale's status is returned in response to a weight ('W') command.

Status bytes are prefaced by the letter 'S'

Units of measure abbreviations are always upper case.

The weight is always positive, therefore there is no polarity byte.

Key to symbols used:

End of TeXt character (03 hexadecimal).

Line Feed character (0A hex).

Carriage Return character (0D hex).

Space (20 hex).

x Weight characters from display including minus sign and out-of range characters.

hh Two status bytes.

UU Units of measure (LB, KG, OZ, G, etc., all upper case).

 

Mandatory Commands

Name:                                           Request weight

Command:                                   W

Response:                                    Returns decimal weight, units and status. (see note 1 and 2)

                                                         xx.xxxUUShhhh

 

                                                          Returns lb-oz weight with units plus scale status.

                                                          xLBxx.xOZShhhh

 

                                                           Scale status only if wt < 0, initial zero error, in motion or out of capacity.

                                                           Shhhh

 

Name:                                               Request status

Command:                                       S

Response:                                        Returns scale status.

Shhhh

 

Name:                                                Zero the scale

Command:                                        Z

Response:                                        Scale is zeroed, returns scale status. (see note 4)

Shhhh

 

 

Optional Commands

Name:                                                Request high-resolution weight

Command:                                        H

Response:                                         Returns decimal wt in 10x with units plus scale status. (see notes 2 and 3)

  xxx.xxxUUShhhh

 

  Returns lb-oz wt in10x with units plus scale status.

  xLBxx.xxOZShhhh

 

  Scale status only if wt < 0, initial zero error, in motion or out of capacity.

  Shhhh

 

Name:                                                 Change units of measure

Command:                                         U

Response:                                         Changes units of measure, returns new units and scale status.

  uuShhhh

 

Name:                                                 Request metrology raw counts

Command:                                         M

Response:                                         Returns normalized raw counts and scale status.

  xxxxxxMMShhhh

 

Name:                                                 unrecognized command

Command:                                        all others

Response:                                        Unrecognized command

                                             ?

NOTES:

1)    Weight field is always six characters (5 for weight, 1 for decimal point), regardless of display size.

2)    Leading zeroes are not suppressed.

3)    High resolution weight field is seven characters (6 for weight, 1 for decimal point), regardless of display size.

4)    If scale is outside zero range or in motion the ‘Z’ command is ignored and scale status is returned without zero status flag set, i.e., scale not at zero.

 


 

Weight Command: W

This command causes the scale to return the displayed weight string in ECR format. The scale will usually return the displayed weight with leading zeroes (ie no leading zero suppression). However, if weight is negative, in motion, over capacity or under capacity, or if a zero error exists, the ECR protocol causes only the scale's status to be returned in response to a weight ('W') command.

The returned weight string will include decimal point plus units of measure. The length of the weight field will be equal to the length of the scale's display plus three (one for the decimal point, and two for the units, e.g., "LB"). For pounds-ounce weight, the length of the weight field will be equal to the length of the scale's display plus five (one for the decimal point, two for the "LB" and two for the "OZ"). Units of measure will appear in their ANSI standard abbreviated form ("LB" for pounds, "KG" for kilograms, etc.) in uppercase characters.

 

Zero Command: Z

If zeroing criteria are met, the scale is zeroed. In any case, scale status is returned.

 

High-Resolution Command: H

This is the same as the W command except that when weight is returned, it is returned with ten times the scale's displayed resolution.

 

Change Units Command: U

The effect of this command will be the same as if the UNITS key on the scale were pressed, causing the scale to change its units of measure. In response, the scale will return the new units of measure and scale status.

 

Metro Command: M

This command is optional. It will cause the scale to return normalized raw counts used for metrology verification. The count value is the same number displayed in the scale's division test in its diagnostics mode. For example, this number ranges up to 120,000 for the 67xx, 100,000 for the 78xx and 1,000,000 for QDT scales.


Scale Status Command: S

There will be at least two status bytes. If bit 6 of the second status byte is set then there will be a third byte. Bit 6 of each successive byte will indicate whether or not another status byte follows. The bit will be clear (0) in the last status byte. At this time only the first three bytes are defined. Others may be added in the future. Bit 0 is the least significant bit in the byte while bit 7 is the most significant bit.

The status bits are defined as follows:

 

Bit

Status Byte 1

Status Byte 2

Status Byte 3

Status Byte 4

0

1 = Scale in motion

0 = Stable

1 = Under capacity

0 = Not under capacity

00 = Low range

01 = (undefined)

10 = (undefined)

11 = High range

1 = Weight Change

0 = No Change