background image

Communications Manual Rev 3.21 

Software Versions 3.xx 

Page 32 

003R-618-321

 

9.3. Example 

Figure 8 below, demonstrates the use of the streaming registers.  In this example, 
REG_STREAM_REG1 contains the value 0003

 H

.  Looking up this index into the list 

of registers yields REG_SYSTEM_ERROR.  So the 1

st

 position in 

REG_STREAM_DATA is filled in with the contents of REG_SYSTEM_ERROR.  
Similarly, REG_STREAM_REG2 contains 0004

 H

, which refers to 

REG_ABSOLUTE_MVV.  So the 2

nd

 position in REG_STREAM_DATA is filled in 

with the contents of REG_ABSOLUTE_MVV.  The 3

rd

 position in 

REG_STREAM_DATA is filled in with the contents of 
REG_ADC_SAMPLE_NUMBER. 

 

Figure 8: Streaming Registers Example 

 

Read Stream Register 
Final  

20110040:

 

 

Response 

81110040:000000000000123400000001

 

 

 

 

 

Read Stream Register 
Literal  

20050040:

 

 

Response 

81050040:E0000,0.4660,1

 

 

 

Summary of Contents for X320

Page 1: ...IP69K Washdown Indicator Communications Manual 800 223 4227 www cas usa com U51024290 ...

Page 2: ...le 12 4 PROTOCOL OVERVIEW 13 4 1 COMM Message Structure 13 4 1 1 Address Field 14 4 1 2 Command Field 14 4 1 3 Register Id Field 14 4 1 4 Optional Parameters 15 4 1 5 Return Value 15 4 1 6 RS 232 Ring Network Enhancement 15 4 2 Error Handling 16 4 3 Register Types 17 4 4 Permissions 18 4 4 1 Register Access 18 4 4 2 Calibration and Configuration Counters 19 5 REGISTER OPERATIONS AND PROPERTIES 20 ...

Page 3: ...m 31 9 3 Example 32 10 PRINTING 33 10 1 Basic Operation 33 10 2 Tokens Available for Printing 33 10 3 Examples of Operation 34 11 ADVANCED TYPE HANDLING TYPE_MENU 35 12 APPENDIX PROGRAM CONSTANTS 36 12 1 Register Types 36 12 2 Commands 36 12 3 Error Codes 37 12 4 Register Identifiers 37 12 5 Key Codes 40 12 6 Decimal Binary and Hexadecimal Conversion 41 12 7 Setup and Calibration Errors 42 12 8 Gl...

Page 4: ...shed with a PC permitting the instrument software to be upgraded It also allows the use of computerised setup and calibration via the Viewer software The instrument also has an RS 232 port which may be used for printing connection to a remote display or control using COMM The instrument can utilise the protocol to fully control the indicator Figure 1 Weight Indicator 1 1 Intended Audience This man...

Page 5: ...anual Bold Text Bold text denotes words and phrases to note This symbol denotes one space used in Commands Ellipses indicate an incomplete listing For space considerations in this Manual complete listings of returned Command responses may not be shown 1234 H The subscript H indicates numerical values expressed in hexadecimal radix 16 1010 b The subscript b indicates a numerical value expressed in ...

Page 6: ...trumentation Note The serial connection for the opto LINK is standard to this instrument 2 1 1 opto LINK Activation This feature is used to temporarily connect a PC to the instrument for calibration and setup purposes A long press of the GROSS NET key will toggle the opto LINK infrared communications On Off When the opto LINK has been enabled the following will occur The instrument briefly display...

Page 7: ...32 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 One Instrument to PC using COM Port DB9 Figure 3 RS 232 One Instrument to PC using COM Port DB25 ...

Page 8: ...9600 baud in a clean EMC environment If there are communications errors or for longer cable runs lower the baud rate to 4800 or 2400 and or use the Long Ring Network in Figure 5 below which uses a separate return path from the Last Instrument to the PC For DB25 connections at the PC connector refer to Figure 3 above When operating in a Ring Network the Instruments must have same serial port option...

Page 9: ...le 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 Figure 5 RS 232 Long Cable Runs Ring Network using COM Port DB9 ...

Page 10: ...rmanent connection No Yes Communications settings 9600 N 8 1 Configurable via SERIAL BAUD SERIAL BITS Timeout with no use 5 minutes None Software upgrade using FLASH Yes Yes Remote display Master No Yes Printing Print No Yes Auto outputs Auto 1 Auto 2 No Yes NET mode Network When activated as described in Opto Link Activation page 5 SERIAL TYPE Auto switch to NET when command received Supports Rin...

Page 11: ...ton or press the ENTER key to send a command to the indicator The command that is sent is shown on the terminal screen after the symbols Note The symbol below indicates CR LF Using ViewR300 this is generated by pressing Send 3 2 COMM Protocol Summary NOTE The values used with the Read Final and Write Final commands are hexadecimal Refer to Table 7 Decimal Binary and Hexadecimal Conversion page 41 ...

Page 12: ...ary and Hexadecimal Conversion page 41 3 5 Setting Values For example change Set Point Target 1 overweight to 500 kg in final form for an indicator with units of kg Type the following and then press Send 20120171 1F4 1F4 in hexadecimal 500 decimal The indicator will respond with a message like 81120171 0000 Where the 0000 value after the indicates no errors 3 6 Remote Key Press For example remotel...

Page 13: ...e with Two Instruments A typical command from a PC shown as 1 in the example Ring Network in Figure 7 above might be Message 1 DC2 20110150 CR LF DC4 The first instrument address 31 in our example would send the echoed command and add its own following response on to the second instrument 2 Message 2 DC2 20110150 CR LF 9F110150 07 01 2030 17 29 CR LF DC4 The second instrument address 30 in our exa...

Page 14: ...nds from a Master typically a PC to a Slave typically an Indicator are of the form Address Field Command Field Register Id Optional Parameter xx mm rrrr ppppp Table 2 COMM Command Format Responses from Slave to Master are of the form Address Field Command Field Register Id Return value yy mm rrrr vvvvv Table 3 COMM Response Format Where xx is the Address Field sent to the indicator Response bit 0 ...

Page 15: ...he id of command to be performed The following commands are defined to read register values or properties Command Description CMD_READ_TYPE Read Type of register CMD_READ_RANGE_MIN Read Minimum valid register value CMD_READ_RANGE_MAX Read Maximum valid register value CMD_READ_LITERAL Read Literal value of register Note Value will be converted to final value as required eg 2 000 kg G for gross weig...

Page 16: ...o Off DC2 Command Address Field Command Field Register Id Optional Parameter xx mm rrrr ppppp DC4 Table 4 COMM Command Format with Ring Network Enhancement Where DC2 and DC4 are the characters ASCII 12 H and ASCII 14 H respectively here called Echo On and Echo Off Each instrument echoes the command which is passed on to the next instrument If the command s Address Field is addressed to one of the ...

Page 17: ...m rrrr wwwww An error code will consist of a hexadecimal value representing the specific error code Note When an error occurs the most significant bit is 1 and other bits indicate the specific problem More than one error bit may set if more than one error is present Refer to Error Codes page 37 For example attempting to read the type of the register with Id 0000 H not implemented will return C1010...

Page 18: ...TION 1 0 28 1 Lists of strings TYPE_USHORT 2 0 216 1 Unsigned numeric values TYPE_SHORT 2 215 215 1 Signed numeric values TYPE_LONG 4 231 231 1 Large numeric values TYPE_ULONG 4 0 232 1 Large unsigned numeric values TYPE_STRING NUL terminated string TYPE_BITFIELD 1 2 or 4 0 28 1 216 1 or 232 1 Composite setting TYPE_MENU 1 0 28 1 Menu structure TYPE_BLOB Binary Large OBject A block of data interpr...

Page 19: ...as the correct passcode the indicator uses the highest level most powerful The instrument has the following permission levels Permission Level Description Passcode Register None Lowest level permission Operation is always available eg reading the gross weight NONE Safe Operation is available if the safe passcode has been given Used for indicator settings that do not affect trade certification of i...

Page 20: ...r increments when trade critical settings in the Calibration CAL menu marked with are changed An example of the counter is C 00010 The Configuration Counter increments when other trade critical settings ie not in the CAL menu marked with are changed An example of the counter is F 00009 Internally the instrument operates with two counters the Calibration Counter REG_CAL_COUNT_NTEP and the Configura...

Page 21: ...permission refer to Register Access page 18 the indicator will return REG_ERR_ACCESS_DENIED 5 2 Common Properties Each register stores information about itself This information is referred to as properties The register properties differ depending on the type of the register Registers implement the following common properties regardless of the register s type 5 2 1 Type Each indicator supports a fi...

Page 22: ... of REG_DECIMAL_PLACES returns F F which means Read with any permission always available Write with Full permission Does not affect Calibration Counter Affects Configuration Counter 5 3 Type Specific Properties The behaviour of the following properties depends on the type of register 5 3 1 RangeMin RangeMax All Registers have a concept of RangeMin and RangeMax The register must contain a value tha...

Page 23: ...R_RANGE if new value RangeMax REG_ERR_ACCESS_DENIED if permission not valid REG_ERR_MENU_IN_USE if menu in use and attempting to write eg An indicator displaying 2 345 kg Gross would return 929 when reading REG_WEIGHT_GROSS Converting 929 H to decimal gives 2345 5 3 3 Literal Value This is a formatted version of the Final value in a human readable form It may be the same as the Final Value Command...

Page 24: ...o the command Each value is returned as a string Command CMD_READ_ITEM Valid Types TYPE_OPTION TYPE_MENU TYPE_BITFIELD Parameter RangeMin parameter RangeMax Return String value Error Code If no parameter is present the indicator returns ERR_BAD_PARAMETER eg Read items 0 and 1 from REG_DECIMAL_PLACES Read item 0 200D0128 0 Response 810D0128 000000 Read item 1 200D0128 1 Response 810D0128 00000 0 ...

Page 25: ... 3 0 InternalErrorCode Used for Calibration Errors etc Table 6 Register REG_SYSTEM_STATUS Interpretation The following table lists the values that the InternaErrorCode field may take It lists the error message that would be displayed on the indicator s display if the operation was being performed using the setup menus Display Message Code Value Description no error 00 Last operation was successful...

Page 26: ... is too high Check scale cables E0010 The temperature is outside of allowable limits Check location E0020 Scale build is incorrect The number of graduations has been set too low or too high Fix up scale build E0100 The digital setup information has been lost Re enter setup E0200 The calibration information has been lost Re calibrate E0300 All setup information has been lost Enter setup and calibra...

Page 27: ...sical codes represent the physical keys on an indicator Logical codes represent an indicator function ASCII codes are used to enter data using device independent codes eg a numeric keypad could generate ASCII codes Logical characters can be considered to include the ASCII characters as a subset Refer to Key Codes page 40 for the list of codes 7 2 1 Physical Codes Physical keys are numbered from 1 ...

Page 28: ...r by remotely sending the TARE key Command Field 12 H CMD_WRITE_FINAL Parameter Field 8003 H KEY_PHYSICAL_3 Register Field 0008 H 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 KEY_SETUP_FULL ...

Page 29: ...st calibration Non zero values indicate various errors such as span high or low etc Zero calibration is performed using REG_CALIBRATE_ZERO as shown in the table below Type of Calibration Parameter Other Registers Zero Calibration using Test Weights none none Direct mV V Zero Calibration mV V 10 000 as hexadecimal value none eg Execute a Zero calibration using test weights Command 10 H CMD_EXECUTE ...

Page 30: ...eights Execute 20100103 REG_CALIBRATE_SPAN Sample Response 81100103 0000 Indicator shows S in P Check Status by reading 20040021 Sample Response while calibrating 81040021 00002000 Indicator is Calibrating Sample Response when complete 81040021 00000000 Calibration finished no errors InternalErrorCode field 0 showing that the calibration was successful eg Execute a Direct Span calibration at 3 0 m...

Page 31: ...risation L1 20040021 REG_CALIBRATION_LIN1 81100104 0000 Unit shows L in P Check status 20040021 81040021 00002000 Busy Calibrating 20040021 81040021 00000000 Completed successfully eg Deleting Linearisation point L1 Write calibration weight 20120100 0 REG_WEIGHT_CALIBRATION 81060100 0000 Execute linearisation L1 20040021 REG_CALIBRATION_LIN1 81100104 0000 Check status 20040021 81040021 00000000 Co...

Page 32: ...ay be streamed REG_STREAM_REG1 REG_STREAM_REG2 and REG_STREAM_REG3 are used to select three registers from this list The raw value of each REG_STREAM_REG1 to 3 is an index into this list 9 2 Registers Available to Stream The following table lists the registers able to be streamed Index into list Reg Id 0000 H REG_NONE 0001 H REG_ADC_SAMPLE_NUMBER 0002 H REG_SYSTEM_STATUS 0003 H REG_SYSTEM_ERROR 00...

Page 33: ...G_STREAM_DATA is filled in with the contents of REG_SYSTEM_ERROR Similarly REG_STREAM_REG2 contains 0004 H which refers to REG_ABSOLUTE_MVV So the 2nd position in REG_STREAM_DATA is filled in with the contents of REG_ABSOLUTE_MVV The 3rd position in REG_STREAM_DATA is filled in with the contents of REG_ADC_SAMPLE_NUMBER Figure 8 Streaming Registers Example Read Stream Register Final 20110040 Respo...

Page 34: ... press of the print key FACTRY DEFLT resets REG_PROG_PRINT to the standard short print press printing while REG_PROG_PRINT_SUMMARY is reset to the standard long print press printing Alternatively the standard formats can be set by writing the default print tokens indicated below to the registers REG_PROG_PRINT and REG_PROG_PRINT_SUMMARY respectively 10 2 Tokens Available for Printing The following...

Page 35: ...G_ABSOLUTE_MVV and REG_ADC_SAMPLE_NUMBER registers Write Stream Register 1 20120042 03 Write Stream Register 2 20120043 04 Write Stream Register 3 20120044 01 The Streaming Register Raw print token when loaded 20120146 E9 Would produce the printout below on a short press of the print button auto single print or auto print options 000000000000138700024AED CR LF The Streaming Register Literal print ...

Page 36: ...nual Rev 3 21 Software Versions 3 xx 003R 618 321 Page 35 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 37: ...LD 0C H Options combined into a compressed field 12 2 Commands Command Code Description CMD_NONE 00 H CMD_READ_TYPE 01 H Read the type of a register CMD_READ_RANGE_MIN 02 H Read the minimum value allowed for this register CMD_READ_RANGE_MAX 03 H Read the maximum value allowed for this register CMD_READ_RAW 04 H Read internal raw value typically for factory use only CMD_READ_LITERAL 05 H Read liter...

Page 38: ...G_ERR_RESERVED_4 0010 H REG_ERR_RESERVED_3 0008 H REG_ERR_RESERVED_2 0004 H REG_ERR_RESERVED_1 0002 H REG_ERR_DATA_ERROR 0001 H Internal data error 12 4 Register Identifiers Register Code Type Example Description REG_REGISTER_VERSION 0001 H STRING V1 0 Version of the protocol REG_COPYRIGHT 0002 H STRING C Rinstrum 2003 Copyright message REG_UNIT_MODEL 0003 H STRING R320 Model of the instrument REG...

Page 39: ...FULLSCALE 002F H LONG 00000BB8 Fullscale setting REG_WEIGHT_NET_TOTAL 0030 H LONG 00000208 Total Net Weight Reading K303 K307 only REG_WEIGHT_GROSS_TOTAL 0031 H LONG 0000020C Total Gross Weight Reading K303 K307 only REG_STREAM_DATA 0040 H BLOB 0017ABC0000A Block of data selected by STREAM_REGs REG_STREAM_MODE 0041 H OPTION REG_STREAM_REG1 0042 H MENU 00000001 Index for first register data REG_STR...

Page 40: ...N 0132 H OPTION 00000000 Motion setting REG_ZERO_RANGE 0133 H OPTION 00000000 Zero range setting REG_ZERO_TRACKING 0134 H OPTION 00000000 Zero tracking setting REG_ZERO_INIT 0135 H OPTION 00000000 Initial zero operation REG_ZERO_BAND 0136 H LONG 00000000 Zero band setting REG_AUTO_TARE_THRESH 0138 H LONG 00000000 Automatic tare threshold REG_SERIAL_TYPE 0140 H OPTION 00000000 Type of serial output...

Page 41: ...TYPE_2 0173 H OPTION 00000000 Setpoint 2 Type REG_SETPT_SRC_2 0174 H OPTION 00000000 Data Source Setpoint 2 REG_SETPT_TARGET_2 0175 H LONG 000003E8 Setpoint 2 Target REG_COUNT_QTY 0180 H ULONG 0000000A Counting sample quantity REG_OVERLOAD_COUNT 0181 H ULONG 0000000D Input Overload Count REG_CLEAR_OVERLOAD 0182 H EXECUTE Reset Input Overload Count 12 5 Key Codes Key Code Code Description KEY_NONE ...

Page 42: ...00 0010 b 02 H 3 0000 0011 b 03 H 4 0000 0100 b 04 H 5 0000 0101 b 05 H 6 0000 0110 b 06 H 7 0000 0111 b 07 H 8 0000 1000 b 08 H 9 0000 1001 b 09 H 10 0000 1010 b 0A H 11 0000 1011 b 0B H 12 0000 1100 b 0C H 13 0000 1101 b 0D H 14 0000 1110 b 0E H 15 0000 1111 b 0F H 16 0001 0000 b 10 H 17 0001 0001 b 11 H 18 0001 0010 b 12 H 254 1111 1110 b FE H 255 1111 1111 b FF H Table 7 Decimal Binary and Hex...

Page 43: ...an existing calibration point Re enter the calibration point Points must be spaced by at least 2 of full scale from each other RES LO The scale build is configured for less than 100 graduations Check the resolution count by and capacity settings RES HIGH The scale build is configured for more than 30 000 graduations Check the resolution count by and capacity settings SPAN LO The load cell signal r...

Page 44: ...ross load It is equal to the full scale divided by the resolution LED Light Emitting Diode NTEP National Type Evaluation Program OIML International Organization of Legal Metrolology opto LINK Cable opto isolated infrared communications link cable PLC Programmable Logic Controller Range Total change in weight between zero gross load and full capacity gross load ie the nominated total capacity of th...

Page 45: ...INK 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 46: ...27 Message Structure 13 Operator Manual 4 opto LINK 5 opto LINK Activation 5 opto LINK Communications Settings 6 Physical Codes 26 Printing Counting Sample 34 Program Constants Commands 36 Decimal Binary Hexidecimal Conversion 41 Error Codes 37 Key Codes 40 Register Identifiers 37 Register Types 36 Setup and Calibration Errors 42 Protocol Structure 13 Protocol Summary 10 Quick Start Manual 4 Readi...

Page 47: ...Communications Manual Rev 3 21 Software Versions 3 xx Page 46 003R 618 321 Notes ...

Page 48: ...Communications Manual Rev 3 21 Software Versions 3 xx 003R 618 321 Page 47 Notes ...

Page 49: ...Communications Manual Rev 3 21 Software Versions 3 xx Page 48 003R 618 321 Notes ...

Page 50: ...Notes ...

Reviews: