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

8217 Mettler Toledo

Host Communications 

The 8217 scale acts as a peripheral device when connected to a host computer. When the host requests weight data by sending an uppercase W, the scale will respond with the weight data or a status byte if the scale is in motion or an invalid state. The host can also request a scale zero operation, in which case the scale will respond with the scale status, so the host can determine if the scale is in zeroing range and/or if the scale is at zero. A scale confidence test can also be initiated by the host to cause the scale to perform RAM, ROM, and NOVRAM tests and put the results in a status byte for later interrogation by the host.

Data is transmitted and received by the scale using an RS232 voltage level interface in the following ASCII format: 7 bit even parity and one stop bit. Data transmission rates are 1200, 2400, 9600, or 19200 baud asynchronous.  The host computer must send requests to the scale as specified single uppercase ASCII characters to have it perform various functions. The scale will send a response back to the host computer as a string of ASCII numeric digits or as an ASCII ? followed by a status byte. There must be at least a 200-ms delay between commands to allow for processing data response time at the scale. The following table shows the standard commands and responses between the scale and host.  If a confidence test results in an error, the scale will not respond to the W or Z commands until the error condition is corrected. An error will also cause the scale to halt any weighing operation until cleared.

Command Descriptions

ASCII Commands

(* MUST BE UPPERCASE CHARACTERS ONLY)

*ASCII Command

From Host

Scale Response

 

Description

 

W

 

 

STX WW.WW CR

STX WW.WWW CR

STX WW.WWN CR

STX WW.WWWN CR

STX?status byte CR

Instructs scale to send weight data. (W=Weight Digit 0-9). The scale will respond as follows according to setup and status:

 

Gross Weight Pounds.

Gross Weight KG.

Net Weight Pounds. ASCII N added after weight.

Net Weight KG. ASCII N added after weight.

Status byte is sent if scale is in motion, or is net/gross weight is negative or over capacity. Table “Scale Status Byte Bit Definitions” to determine status byte results.

Z

STX?status byte CR

Zero scale command. On the next A/D reading, zero will be captured if the weight is stable, within capture range, and no tare is taken (gross weight mode.)

TCR

 

STX?status byte CR

 

Tare item on platter command. The scale must be at gross zero before placing the item on the platter. Tare will be taken if weight is stable and non-zero. After 150 millisecond delay, the scale will respond with a status byte. (NOTE: Tare must be enabled in calibration mode or scale will not respond.).

TWWWWW CR

 

STX?status byte CR

 

Digital Tare Command. Known tare value can be sent to scale and must be transmitted as five digits. The scale assumes a decimal point of WWW.WW LB, or WW.WWW KG.

(Note: Tare must be enabled in calibration mode or scale will not respond.)

C

 

STX?status byte CR

Clear Tare Command (ignored if weight is not stable.) Scale status byte is sent after 150 ms delay.

A

STX CR

Initiate Confidence Test Command. STXCR is sent indicating command was received.

B

 

STX?status byte CR

 

Send Confidence Test Results Command. A must be sent prior to the Send Result command B. Results of the test are contained in a status byte. Use Table 12-c to determine test results. If all tests passed, the ASCII @ character will be returned.

E

 

STXECR

Start Echo Mode Serial Port Test Command. Scale will respond with an E indicating command received. Characters except F will be echoed back to the host.

F

 

STXF

End Echo Mode Command. The scale will respond with an ASCII F indicating the command was received.

Status Byte Format

When the scale responds with STX?status byte CR , this indicates a status byte. The status byte contains scale status information, which can include net/gross mode, zero status, etc. The actual status byte sent will be an ASCII character which must be converted to binary to decode the bits. The scale status bit definitions are shown in the following table.

Scale Status Byte Bit Definitions

Bit Number

Bit Description

7

7 Parity Bit (even).

6

1 = Normal.

0 = Bad Command from host.

5

1 = Net Weight,

0 = Gross Weight

4

1 = Center of zero.

0 = Not at center of zero.

3

1 = Outside zero capture range.

0 = Within range.

2

1 = Under zero.

0 = Within weighing range.

1

1 = Over capacity.

0 = Within weighing range.

0

1 = Scale in motion.

0 = Stable weight data.

                             

Confidence Test Status Byte Format

When the scale responds with STX? status byte CR, after requesting a confidence test (B), a confidence test status byte will be sent. The status byte contains scale status information, which can include net/gross mode, zero status, etc. The actual status byte sent will be an ASCII character which must be converted to binary to decode the bits. The confidence test status bits are shown in the following table. Bit 6 is set to 1 after a confidence test is performed and reset to 0 after the host reads the confidence test status byte. The Confidence Test Byte bit definitions are shown below.

 

Note: The ASCII @ (decimal 64) indicates all tests were passed. Repeated reads of the confidence byte for all test passed without initiating a new confidence test will result in an ASCII NULL (hex 00).

Scale Confidence Test Byte Bit Definitions

Bit Number

Bit Description

7

Parity Bit (even).

6

1 = New status data available.

0 = Host has read data.

5

Bit is always a 0.

4

1 = ROM test failed.

0 = ROM test passed.

3

1 = Processor RAM test failed.

0 = Processor RAM test passed.

2

1 = Ram Test Passed.

0 = Ram Test Failed.

1

1 = NOVROM test failed.

0 = NOVROM test passed.

0

Always 0.

TARE

Tare can be taken on an item two ways: Automatic or digital.

REMOTE TARE

The unknown weight of an object can be tared-off automatically by placing the object on the scale platter, then with the display in a stable non-motion and positive weight condition, sending an uppercase ASCII T character followed by CR from the host will automatically subtract the weight. The tare function must be enabled. Chain tare is not permitted. A display triangle, located under the least significant weight digit on the scale display will illuminate to indicate net weight is displayed. Negative weight will cause dashes to be displayed and status byte will be sent to the host instead of weight data.

 

DIGITAL TARE

Keyboard tare is set in the scale when an uppercase ASCII T character, followed by five ASCII digits and a CR is sent by the host. The scale weight display must be positive and stable. The tare value input is limited to the scale capacity. In metric mode, the tare value must always end in 0 or 5.

CLEARING TARE

If auto tare clear is enabled, tare is automatically cleared whenever the scale returns to gross zero after having indicated a stable net weight at least one increment above net zero. If auto tare clear is disabled, tare can be cleared by sending an uppercase ASCII C from the host.