Communications Manual Rev 3.21 Software Versions 3.xx 1. Introduction This manual details the communications protocol (COMM) of the indicator. This protocol is used by the Viewer program to calibrate and configure the instrument. The Viewer TEST tab can be used as a convenient terminal to test the instrument communications.
Communications Manual Rev 3.21 Software Versions 3.xx 1.3. The Manuals Set This manual is part of a set of manuals covering the setup and operation of the instrument. The set includes the following: • Reference Manual - Contains detailed information on calibration and setup. This manual is intended for use by Scale Technicians who are installing the instrument.
Communications Manual Rev 3.21 Software Versions 3.xx 2. Connecting to the Instrument 2.1. opto-LINK A temporary infrared com- munications link established between instrument and a PC using an optional opto-LINK cable. The opto-LINK cable can be used transfer setup information from a PC and download software upgrades to the instrument.
Communications Manual Rev 3.21 Software Versions 3.xx 2.2. RS-232 Connection 2.2.1. RS-232 Communications Settings The communications settings for RS-232 are configured using the SERIAL:BAUD and SERIAL:BITS items in the instrument setup menus. Network: One Instrument to PC (RXD, TXD, GND) Figure 2: RS-232 -–...
Page 8
Communications Manual Rev 3.21 Software Versions 3.xx Ring Networks: Multiple Instruments to PC (RXD, TXD, GND) Instruments with K302 software revision V3.82+ can be configured in a Ring Network. This also requires an enhancement in the PC’s software. The Short Ring Network layout can be used in situations up to a total cable run length of about 150 m (500 ft) at 9600 baud in a clean EMC environment.
Page 9
Communications Manual Rev 3.21 Software Versions 3.xx Long Ring Network: Multiple Instruments to PC (RXD, TXD, GND) The Long Ring Network layout can be used in situations where each leg of the cable run can be up to about 150 m (500 ft) at 9600 baud. If there are communications errors, lower the baud rate to 4800 or 2400.
Communications Manual Rev 3.21 Software Versions 3.xx 2.3. opto-LINK vs RS-232 Table 1 provides a summary of the differences between the two communications links: opto-LINK RS-232 Supports COMM protocol Supported indicators All R300 Series R320, R323 Only Permanent connection Communications settings 9600, N, 8, 1 Configurable via SERIAL:BAUD,...
Communications Manual Rev 3.21 Software Versions 3.xx 3. Getting Started This section gives a brief introduction to using the COMM protocol on the instrument. The examples below use the broadcast address and assume that a PC is connected to the RS- 232 port as described in RS-232 Connection page 6.
Communications Manual Rev 3.21 Software Versions 3.xx 3.3. Reading Gross Weight as Literal Value Type the following (without the “” quotes) and then press Send (which appends <CR><LF>): “20050026:” The indicator will response with a message like: “81050026:^^10.00^kg^G” (along with a trailing <CR><LF>) 3.4.
Communications Manual Rev 3.21 Software Versions 3.xx The responses from the instruments echo the command (which is why <DC2> has been called ‘Echo-On’), which is passed by one instrument on to the next. Each instrument’s response is then added to the end of the incoming message ahead of the ‘Echo-Off’...
Communications Manual Rev 3.21 Software Versions 3.xx 4. Protocol Overview The instrument contains a number of registers. The indicator is configured by reading and writing the information stored in these registers. Information such as gross weight is obtained by reading these registers. The instrument has registers of different types to hold weights, menu options, etc.
Communications Manual Rev 3.21 Software Versions 3.xx 4.1.1. Address Field The address field is a two character hexadecimal field where: Field Name Description Response Set by the slave to indicate that this message is a response to a previous command. Error Set to indicate that the data in this message is an error code and not a normal response.
Communications Manual Rev 3.21 Software Versions 3.xx 4.1.4. Optional Parameters The value here is dependent on the command and register being accessed. Not all commands require a parameter (eg. CMD_READ_FINAL). Commands that write to a register have the new value as the parameter. 4.1.5.
Communications Manual Rev 3.21 Software Versions 3.xx 4.2. Error Handling If a command cannot be processed, the indicator returns an error code. Typical errors include: • Register not implemented on indicator • Register value out of range • Command not implemented for register An error response is indicated by setting the Error bit in the Address Field of the reply.
Communications Manual Rev 3.21 Software Versions 3.xx 4.3. Register Types The following types are defined: Type Data Size Minimum Maximum Description (bytes) Value Value TYPE_BYTE Small numeric values. TYPE_OPTION Lists of strings. TYPE_USHORT Unsigned numeric values. TYPE_SHORT Signed numeric values. TYPE_LONG Large numeric values.
Communications Manual Rev 3.21 Software Versions 3.xx 4.4. Permissions 4.4.1. Register Access Each register has permission levels required for reading, writing and executing. These permission levels can be read using the CMD_READ_PERMISSION command. The communications link has a permission level. Changing the current permission level is achieved by writing a passcode to a permission register.
Communications Manual Rev 3.21 Software Versions 3.xx 4.4.2. Calibration and Configuration Counters Within the instrument there are a number of trade critical registers that can affect the calibration and/or legal for trade performance of the instrument. If any of these registers are altered, the trade certification of the scale will be voided.
Communications Manual Rev 3.21 Software Versions 3.xx 5. Register Operations and Properties 5.1. Register Operations The basic operations that can be performed on values in registers are: • Read the current value of the register as Final or Literal. • Write a new value to the register as Final. •...
Communications Manual Rev 3.21 Software Versions 3.xx 5.2.3. Permission Command: CMD_READ_PERMISSION Return: This property returns a string of characters, indicating the permission bits for the register. The characters are (in order): • Read Permission • Write Permission • Calibration Counter •...
Communications Manual Rev 3.21 Software Versions 3.xx 5.3.2. Final Value The final value is the numeric value converted to user units (eg. weight in kg), but without unit or decimal places. Note: These values are generally the same as the displayed value with the decimal point and units removed.
Communications Manual Rev 3.21 Software Versions 3.xx 5.3.6. Read Items This command reads one item from the list for the register. The item to be read is given as a parameter to the command. Each value is returned as a string. Command: CMD_READ_ITEM Valid Types:...
Communications Manual Rev 3.21 Software Versions 3.xx 6. Reading Status and Error Codes 6.1. REG_SYSTEM_STATUS This register contains status information about the indicator. Bit(s) Field Description 31 to 18, 8, 5, 4 RESERVED Reserved for future use. OverLoad The weight is above the maximum allowable weight reading.
Communications Manual Rev 3.21 Software Versions 3.xx Display Code Description Message Value (RES) (HIGH) The scale build is configured for more than 30,000 graduations. (ZERO) (LO) An attempt has been made to calibrate zero below - 2mV/V. (ZERO) (HI) An attempt has been made to calibrate zero above +2mV/V.
Communications Manual Rev 3.21 Software Versions 3.xx 7. Remote Key Interface 7.1. Operation The indicator polls the REG_KEYBOARD register looking for new key presses to act upon. No new key press is indicated by a value of KEY_NONE in this register. After reading the value, the unit sets REG_KEYBOARD to its default value (KEY_NONE).
Communications Manual Rev 3.21 Software Versions 3.xx 7.2.2. Example Tare an indicator by remotely sending the TARE key Command Field CMD_WRITE_FINAL Parameter Field 8003 KEY_PHYSICAL_3 Register Field 0008 REG_KEYBOARD Complete Message 20120008:8003 Sample Response 81120008:0000 7.2.3. Logical Keys Logical codes maintain their meaning across a range of indicators. eg.
Communications Manual Rev 3.21 Software Versions 3.xx 8. Execute Functions Registers that respond to CMD_EXECUTE may use the optional parameter field depending on the function involved. Execute functions are used to perform actions (eg. calibration) within the indicator, as opposed to register values that can simply be read or written (eg.
Communications Manual Rev 3.21 Software Versions 3.xx 8.1.1. Span Span calibration is performed using REG_CALIBRATE_SPAN as shown in the table below. Type of Calibration Parameter Other Registers Span Calibration using none REG_WEIGHT_CALIBRATI test weights Direct mV/V Span (mV/V * 10,000) as REG_FULLSCALE Calibration hexadecimal value...
Communications Manual Rev 3.21 Software Versions 3.xx 8.1.2. Linearisation (K302 and K305 only) Adding linearisation points is similar to span calibration using test weights. The desired weight value is written to REG_WEIGHT_CALIBRATION. To delete a point, set this value to zero. Place the test weight on the scale.
Communications Manual Rev 3.21 Software Versions 3.xx 9. Streaming 9.1. Basic Operation The streaming facility in the instrument allows a master (PC) to quickly read a number of registers (up to three) from a slave (indicator) with one command. REG_STREAM_DATA contains the final value for the three registers. When new weight data is available, REG_STREAM_DATA is updated with the latest final values pointed to by REG_STREAM_REG1 to 3.
Communications Manual Rev 3.21 Software Versions 3.xx 9.3. Example Figure 8 below, demonstrates the use of the streaming registers. In this example, REG_STREAM_REG1 contains the value 0003 . Looking up this index into the list registers yields REG_SYSTEM_ERROR. position REG_STREAM_DATA is filled in with the contents of REG_SYSTEM_ERROR. Similarly, REG_STREAM_REG2 contains...
Communications Manual Rev 3.21 Software Versions 3.xx 10. Printing 10.1. Basic Operation There are two non-volatile registers available for user programmable print strings. REG_PROG_PRINT with a capacity 80 ascii(160 hex) characters including tokens. REG_PROG_PRINT_SUMMARY with a capacity of 20 ascii(40 hex) characters including tokens.
Communications Manual Rev 3.21 Software Versions 3.xx 10.3. Examples of Operation The following data loaded : 20120146:D020617420C0206F6E20BF0D0A Would produce the printout below: 525 kg N at 11:04 on 03.02.2005<CR><LF> To use the streaming tokens, the streaming register is first set up as described above.
Communications Manual Rev 3.21 Software Versions 3.xx 11. Advanced Type Handling (TYPE_MENU) The menu items can be accessed from the COMM port. Figure 9 illustrates examples of the menu levels. Figure 9: TYPE_MENU Example Page 35 003R-618-321...
Communications Manual Rev 3.21 Software Versions 3.xx 12. Appendix – Program Constants 12.1. Register Types Type Code Description TYPE_CHAR 8-bit signed value (typically used for ASCII characters) TYPE_UCHAR 8-bit unsigned value TYPE_SHORT Signed 16-bit value TYPE_USHORT Unsigned 16-bit value TYPE_LONG Signed 32-bit value TYPE_ULONG Unsigned 32-bit value...
Communications Manual Rev 3.21 Software Versions 3.xx 12.3. Error Codes The error code returned when a command is not processed correctly is a hexadecimal value that is a combination of the following constants. Error Code Description REG_ERR_NONE 0000 REG_ERR_ERROR 8000 Always set to show an error REG_ERR_UNKNOWN 4000...
Page 39
Communications Manual Rev 3.21 Software Versions 3.xx Register Code Type Example Description REG_ADC_SAMPLE_NUMBER 0020 ULONG 00169196 Counts each new reading REG_SYSTEM_STATUS 0021 ULONG 00000200 Instrument Status REG_SYSTEM_ERROR 0022 ULONG 00000000 Instrument Error Status REG_ABSOLUTE_MVV 0023 WEIGHT 00006187 Absolute signal in mV/V REG_WEIGHT_DISPLAY 0024...
Communications Manual Rev 3.21 Software Versions 3.xx 12.7. Setup and Calibration Errors These messages show status messages or errors that may occur during the instrument setup and calibration. Error Description Resolution (ENTRY) The instrument may be in Safe Access Full Setup to edit the (DENIED) Setup and an item that needs item.
Communications Manual Rev 3.21 Software Versions 3.xx 12.8. Glossary Terms Term Definition Calibration An adjustable parameter that can affect measurement or performance Parameter accuracy and, due to its nature, needs to be updated on an ongoing basis to maintain device accuracy, eg., span adjustments, linearisation factors, and coarse zero adjustments The communications protocol used to communicate with the R300 Series COMM...
Communications Manual Rev 3.21 Software Versions 3.xx 12.10. List of Tables Table 1: opto-LINK vs RS-232 port....................9 Table 2 COMM Command Format....................13 Table 3 COMM Response Format ....................13 Table 4 COMM Command Format with Ring Network Enhancement..........15 Table 5 COMM Response Format with Ring Network Enhancement ..........15 Table 6: Register REG_SYSTEM_STATUS Interpretation..............24 Table 7: Decimal, Binary and Hexadecimal Conversion ..............41 Page 44...