RichardChambers / anduino_uno

a repository for lesson projects with Anduino Uno
MIT License
0 stars 0 forks source link

arduino scale simulator not compatible with NCR 67xx scale #1

Open RichardChambers opened 3 years ago

RichardChambers commented 3 years ago

Testing with GenPOS point of sale provisioned for the NCR 67xx scale is giving a scale error.

Debugging shows that the amount field of 0000.26LB is too long by one character. Also the status field expects the letter S.

It appears the NCR 67xx scale is using the Weigh-Tronix SCP-02 specification and not the SCP-01 specification.

See http://www.mwjesus.com/gospel/utility/AveryBerkel%206720/SCP-02.pdf

The SCP-01 specification for Request weight says:

Name: Request weight Command: W Response: Returns decimal weight (x1), units and status.

xxxx.xxuuhh... Returns lb-oz weight, units plus scale status. xxlbxx.xozhh... Returns contents of display (other than wt) with units and scale status. cccccccuuhh... The SCP-02 specification for Request weight says: Name: Request weight Used: ECR:Mandatory, OPOS:Mandatory OPOS Ref: ReadWeight (Method) Command: W Response: Returns decimal weight, units and status. (see note 1 and 2) xx.xxxUUShh -orReturns lb-oz weight with units plus scale status. xLBxx.xOZShh -orScale status only if wt < 0, initial zero error, in motion or out of capacity. Shh Looking at the GenPOS source code for handling an NCR 67xx scale, it appears to be expecting the SCP-02 Request weight response. As a side note there are other Scale Serial Communication Protocols Scale Manufacturers Association Standard Scale Serial Communication Protocol SMA SCP-0499 https://www.scalemanufacturers.org/PDF/ScaleCommProtocol5199M1.pdf Toledo protocol host commands https://scalenet.com/pdf/PS60_RS232_MANUAL.pdf see page 49 in Appendix 3
RichardChambers commented 3 years ago

Starting work on implementing SCP-02 alongside of SCP-01.

This requires a user interface change with the membrane keypad as well to allow selection of one of several protocols.

Using the letter C on the keypad to indicate a spec change followed by a single digit indicating the new spec.

The first selection list will be:

Changes to both the Arduino sketch and to the test program required.

RichardChambers commented 3 years ago

changes made and uploaded to both Arduino scale simulator and test application.

Changed folder name containing Arduino simulator to be in line with Arduino IDE requirements. Name of folder must be the same as the file name, without the .ino extension, of the Arduino sketch.

added SCP-02 protocol spec to the allowed output messages. modified the membrane keypad UI for the letter C to indicate change spec with a digit indicating new spec: 0 for SCP-01 and 1 for SCP-02.

Test application now examines the scale message and determines whether to use SCP-01 or SCP-02 parsing.

One possible issue outstanding is if weight amount is not changed after selecting spec and the weight measurement sent is not as expected due to the number of digits in the Most Significant and Least Significant parts of the scale weight.

SCP-01 uses dddd.dd while SCP-02 uses dd.ddd and the UI does data entry, press the star or asterisk key, into two different variables depending on the number of digits for each part.

Not yet tested with GenPOS point of sale.