COMMUNICATION PROTOCOLS - User Manual - Microlectra BV
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
Microlectra bv. www.microlectra.nl info@microlectra.nl User Manual version 1.06 COMMUNICATION PROTOCOLS for weight indicators SERIES W (programs: BASE – LOAD – UNLOAD – 3/6/14 PROD.) Protocols for instruments CE- APPROVED EN45501-2009/23/EC-OIML R76:2006
KEY TO SYMBOLS Below are the symbols used in the manual to draw the reader's attention: Caution! High Voltage. Caution! This operation must be performed by skilled workers. Read the following indications carefully. Further information. Microlectra bv. Augustapolder 12. 2992 SR Barendrecht. The Netherlands. www.microlectra.nl info@microlectra.nl
TABLE OF CONTENTS CONTINUOUS FAST WEIGHT TRANSMISSION PROTOCOL – Only for “BASE” program........... 1 CONTINUOUS WEIGHT TRANSMISSION TO REMOTE DISPLAYS PROTOCOL............................ 2 ASCII BIDIRECTIONAL PROTOCOL – Only for “BASE” program................................................... 3 1. SETPOINT PROGRAMMING ..........................................................................................................................3 1.1. SELECTING THE CLASS OF SETPOINT (OPTION E/EC*) TO BE PROGRAMMED..........................3 1.2. READING THE SELECTED CLASS OF SETPOINT (OPTION E/EC*) TO BE PROGRAMMED ..........4 1.3. SETTING SETPOINT VALUES CURRENTLY IN USE .........................................................................4 1.4. SETPOINT STORAGE IN EEPROM MEMORY ....................................................................................4 1.5. READING THE CLASS OF SETPOINT (OPTION E/EC*) CURRENTLY IN USE .................................5 2. READING WEIGHT, SETPOINT AND PEAK (IF PRESENT) FROM PC........................................................5 3. SEMI-AUTOMATIC ZERO (WEIGHT ZERO-SETTING FOR SMALL VARIATIONS).....................................6 4. COMMUTATION OF GROSS WEIGHT TO NET WEIGHT .............................................................................6 5. COMMUTATION OF NET WEIGHT TO GROSS WEIGHT .............................................................................6 6. READING OF DECIMALS AND DIVISION NUMBER.....................................................................................6 7. KEYPAD LOCK (BLOCK THE ACCESS TO THE INSTRUMENT) ................................................................7 8. KEYPAD UNLOCK..........................................................................................................................................7 9. DISPLAY AND KEYPAD LOCK......................................................................................................................7 10. CHECK-SUM CALCULATION ........................................................................................................................7 MODBUS-RTU PROTOCOL ................................................................................................................. 8 FUNCTIONS SUPPORTED IN MODBUS..................................................................................................................9 COMMUNICATION ERROR MANAGEMENT ...........................................................................................................10 LIST OF AVAILABLE REGISTERS ..........................................................................................................................10 ACCESS TO LEGALLY RELEVANT PARAMETERS COMMANDS ........................................................................13 REAL CALIBRATION (WITH SAMPLE WEIGHTS)..................................................................................................14 ANALOG OUTPUT SETTING ...................................................................................................................................14 READING AND WRITING IN ALIBI MEMORY .........................................................................................................14 SPECIAL REGISTERS..............................................................................................................................................15 INPUTS AND OUTPUTS REGISTERS......................................................................................................................17 DIVISION AND UNITS OF MEASURE REGISTER (40014)......................................................................................17 COMMAND REGISTER (40006) ...............................................................................................................................18 Only for “BASE” program .......................................................................................................................................19 SETPOINT PROGRAMMING ...............................................................................................................................19 SETPOINT READING...........................................................................................................................................20 Only for “BATCHING” programs (LOAD – UNLOAD – 3/6/14 PRODUCTS) .........................................................20 CONSTANTS AND FORMULAS READING AND WRITING ...............................................................................20 FORMULAS WRITING .........................................................................................................................................22 FORMULAS READING ........................................................................................................................................22
BATCHING START AND STOP...........................................................................................................................23 BATCHING DATA READING...............................................................................................................................23 BATCHING DATA ALARMS (40055; 40056).......................................................................................................24 COMMUNICATION EXAMPLES ...............................................................................................................................26
CONTINUOUS FAST WEIGHT TRANSMISSION PROTOCOL – Only for “BASE” program This protocol allows the continuous transmission of the weight at high update frequencies. Up to 300 strings per second are transmitted with a minimum transmission rate of 38400 baud. Following communication modes availables (see SERIAL COMMUNICATION SETTINGS section in instrument manual): : communication compatible with TX RS485 instruments; : communication compatible with TD RS485 instruments. -If is set, the following string is transmitted to PC/PLC: xxxxxxCRLF where : xxxxxx = 6 characters of gross weight (48 57 ASCII). CR = 1 character return to the start (13 ASCII). LF = 1 character on new line (10 ASCII). The first character from the left takes on the value « - » (minus sign - ASCII 45) in case of negative weight. In case of error or alarm, the 6 characters of the weight are substituted by the messages found in the table of the ALARMS section (see the instrument manual). -If is set, the following string is transmitted to PC/PLC: &TzzzzzzPzzzzzz\ckckCR where: & = 1 initial string character (38 ASCII). T = 1 character of gross weight identification. P = 1 character of gross weight identification zzzzzz = 6 characters of gross weight (48 57 ASCII). \ = 1 c. of separation (92 ASCII). ckck = 2 ASCII control characters or calculated considering the characters included between & and \ excluded. The control value is obtained executing the XOR operation (or exclusive) for the 8 bit ASCII codes of the characters considered. Therefore, a character expressed in hexadecimal is obtained with 2 numbers that may assume values from “0” to “9” and from “A” to “F”. “ckck” is the ASCII code of the two hexadecimal digits. CR = 1 c. of end string (13 ASCII). The first character from the left of the weight characters takes on the value « -» (minus sign -ASCII 45) in case of negative weight. In case of error or alarm, the 6 characters of the gross weight are substituted by the messages found in the table of the ALARMS section (see the instrument manual). FAST TRANSMISSION VIA EXTERNAL CONTACT: it’s possible to transmit the weight, just once, even closing an input for no more than a second (see OUTPUTS AND INPUTS CONFIGURATION and SERIAL COMMUNICATION SETTINGS section in instrument manual). -1-
CONTINUOUS WEIGHT TRANSMISSION TO REMOTE DISPLAYS PROTOCOL This protocol allows the continuous weight transmission to remote displays. The communication string is transmitted 10 times per second. Following communication modes availables (see SERIAL COMMUNICATION SETTINGS section in instrument manual): - : communication with RIP5/20/60, RIP50SHA, RIPLED series remote displays; the remote display shows the net weight or gross weight according to its settings. - : communication with RIP675, RIP6125C series remote displays; the remote display shows the net weight or gross weight according to its settings. - : communication with RIP675, RIP6125C series remote displays. The instrument sends the following string to the remote display: &NxxxxxxLyyyyyy\ckckCR where: & = 1 initial string character (38 ASCII). N = 1 character of net weight identification (78 ASCII). xxxxxx = 6 characters of net weight or PEAK if present (48 57 ASCII). L = 1 character of gross weight identification (76 ASCII). yyyyyy = 6 characters of gross weight (48 57 ASCII). \ = 1 c. of separation (92 ASCII). ckck = 2 ASCII checksum characters calculated considering the characters between & and \ excluded. The checksum value is obtained from the calculation of XOR (or exclusive) of the 8-bit ASCII codes of the characters considered. This obtains a character expressed in hexadecimals with two digits that can have the values from “0” to “9” and from ”A” to “F”. “ckck” is the ASCII code of the two hexadecimal digits. CR = 1 c. of end string (13 ASCII). In case of negative weight, the first character on the left acquires the value « -» (minus sign -ASCII 45). If has been set, the decimal point at the position shown on the instrument's display can also be transmitted. In this case, if the value exceeds 5 digits, only the 5 most significant digits are transmitted, while if the value is negative, no more than the 4 most significant digits are transmitted. In both cases, however, the decimal point shifts consistently with the value to display. If has been set, in addition to what stated in protocol, the instrument transmits the prompt every 4 seconds in the gross weight field, if on the instrument, it has been carried out a net operation (see SEMI-AUTOMATIC TARE (NET/GROSS) section in instrument manual). In case of weight value is under -99999, the minus sign (‘-‘) is sent alternated with the most significant figure. In case of error or alarm, the 6 characters of the gross weight are substituted by the messages found in the table of the ALARMS section (see the instrument manual). -2-
ASCII BIDIRECTIONAL PROTOCOL – Only for “BASE” program The instrument replies to the requests sent from a PC/PLC. It is possible to set a waiting time for the instrument before it transmits a response (see parameter in the SERIAL COMMUNICATION SETTINGS section in the instrument manual). Following communication modes availables (see SERIAL COMMUNICATION SETTINGS section in instrument manual): : communication compatible with instruments series W60000, WL60 Base, WT60 Base, TLA60 Base; : communication compatible with TD RS485 instruments. Captions: $: Beginning of a request string (36 ASCII); & or &&: Beginning of a response string (38 ASCII); aa: 2 characters of instrument address (48 57 ASCII); !: 1 character to indicate the correct reception (33 ASCII); ?: 1 character to indicate a reception error (63 ASCII); #: 1 character to indicate an error in the command execution (23 ASCII); ckck: 2 ASCII characters of Check-Sum (for furthers information, see section CHECK-SUM CALCULATION); CR: 1 character for string end (13 ASCII); \: 1 character of separation (92 ASCII). 1. SETPOINT PROGRAMMING The programming of setpoint depends on the presence of E/EC option on the instrument: without E/EC option with E/EC option -------------------------------------------- Selecting the class of setpoint to be programmed Setting setpoint values Setting setpoint values Storage of the setpoint in the EEPROM Storage of the setpoint in the EEPROM memory memory 1.1. SELECTING THE CLASS OF SETPOINT (OPTION E/EC*) TO BE PROGRAMMED *) Only for instruments provided with E/EC option. The PC transmits the following ASCII string: $aaFffckckCR where: F = Command of selection of the class to be programmed; ff = Number of the setpoint class (from 01 to 12); Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR - “ff” exceeds the maximum allowable: &aa#\ckckCR -3-
Example: To select the class no. 11 to program for the instrument no. 01, the PC must transmit the following command: $01F1147(Cr). 1.2. READING THE SELECTED CLASS OF SETPOINT (OPTION E/EC*) TO BE PROGRAMMED *) Only for instruments provided with E/EC option. The PC transmits the following ASCII string: $aafckckCR where: f = Command of reading of the selected class to be programmed; Possible instrument responses: - correct reception: &aaff\ckckCR - incorrect reception: &&aa?\ckckCR where: ff= setpoint class (from 01 to 12). 1.3. SETTING SETPOINT VALUES CURRENTLY IN USE Warning: If the option E/EC is not present on the instrument, the new values of setpoint are active immediately, but if the option E/EC is present, the new values are active only if the class to be programmed coincides with the class currently in use. The PC transmits the following ASCII string: $aaxxxxxxyckckCR where: xxxxxx = 6 characters to indicate the setpoint value (48 57 ASCII); y = A (set the value in the setpoint 1). y = B (set the value in the setpoint 2). y = C (set the value in the setpoint 3). y = D (set the value in the setpoint 4). y = E (set the value in the setpoint 5). Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR - ff exceeds the maximum allowable: &aa#\ckckCR Example: To set 500 in the setpoint no. 4, the PC must transmit the following command: $01000500D70(Cr). 1.4. SETPOINT STORAGE IN EEPROM MEMORY The setpoint are stored in the RAM volatile memory and lost upon instrument power off. It is necessary to send a special command to save them permanently in the EEPROM memory. Please note that the writing number allowed in the EEPROM memory is limited (about 100000). The PC transmits: $aaMEMckckCR -4-
Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR 1.5. READING THE CLASS OF SETPOINT (OPTION E/EC*) CURRENTLY IN USE *) Only for instruments provided with E/EC option. The PC transmits the following ASCII string: $aagckckCR where: g = Command of reading of the class currently in use Possible instrument responses: - correct reception: &aaff\ckckCR - incorrect reception: &&aa?\ckckCR where: ff= setpoint class (from 01 to 12). 2. READING WEIGHT, SETPOINT AND PEAK (IF PRESENT) FROM PC The PC transmits the following ASCII string: $aajckckCR where: j = a to read setpoint 1 j=b to read setpoint 2 j=c to read setpoint 3 j=d to read setpoint 4 j=e to read setpoint 5 j=t to read gross weight j=n to read net weight j=p to read the gross weight peak if the parameter is set as ; if, instead, the parameter is set on the gross weight will be read. To read the points, set the equal to 50000. Possible instrument responses: - correct reception: &aaxxxxxxj\ckckCR - incorrect reception: &&aa?\ckckCR - In case of Peak not configured: &aa#CR where: xxxxxx = 6 characters of the required weight value; Notes: In case of negative weight, the first character on the left acquires the value « -» (minus sign -ASCII 45). In case of weight value is under -99999, the minus sign (‘-‘) is sent alternated with the most significant figure. Error messages: In case of an instrument alarm for exceeding 110% of the full scale or 9 divisions above the value of the parameter , the instrument sends the string: &aassO-Lst\ckck -5-
In case of faulty connection of the load cells or of another alarm, the instrument sends: &aassO-Fst\ckck where: s = 1 separator character (32 ASCII – space-). Generally refer to ALARMS section (see the instrument manual). 3. SEMI-AUTOMATIC ZERO (WEIGHT ZERO-SETTING FOR SMALL VARIATIONS) WARNING: The zero setting will be lost after power-off. The PC transmits the following ASCII string: $aaZEROckckCR Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR - the current weight is over the maximum value resettable: &aa#CR 4. COMMUTATION OF GROSS WEIGHT TO NET WEIGHT The PC transmits the following ASCII string: $aaNETckckCR Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR 5. COMMUTATION OF NET WEIGHT TO GROSS WEIGHT The PC transmits the following ASCII string: $aaGROSSckckCR Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR 6. READING OF DECIMALS AND DIVISION NUMBER The PC transmits the following ASCII string: $aaDckckCR Possible instrument responses: - correct reception: &aaxy\ckckCR - incorrect reception: &&aa?\ckckCR where: x = number of decimals. y = value of division. -6-
The y field can have the following values: '3' for division value = 1; '4' for division value = 2; '5' for division value = 5; '6' for division value = 10; '7' for division value = 20; '8' for division value = 50; '9' for division value = 100; 7. KEYPAD LOCK (BLOCK THE ACCESS TO THE INSTRUMENT) The PC transmits the following ASCII string: $aaKEYckckCR Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR 8. KEYPAD UNLOCK The PC transmits the following ASCII string: $aaFREckckCR Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR 9. DISPLAY AND KEYPAD LOCK The PC transmits the following ASCII string: $aaKDISckckCR Possible instrument responses: - correct reception: &&aa!\ckckCR - incorrect reception: &&aa?\ckckCR 10. CHECK-SUM CALCULATION The two ASCII characters (ckck) are the representation of a hexadecimal digit in ASCII characters. The check digit is calculated by executing the operation of XOR (exclusive or) of 8-bit ASCII codes of only the string underlined. The procedure to perform the calculation of check-sum is the following: - Consider only the string characters highlighted with underlining; - Calculate the EXCLUSIVE OR (XOR) of 8-bit ASCII codes of the characters; -7-
Example: character decimal ASCII code hexadecimal ASCII code binary ASCII code 0 48 30 00110000 1 49 31 00110001 t 116 74 01110100 XOR = 117 75 01110101 - The result of the XOR operation expressed in hexadecimal notation is made up of 2 hexadecimal digit (that is, numbers from 0 to 9 or letters from A to F). In this case the hexadecimal code is 0x75. - The checksum is made up of the 2 characters that represent the result of the operation and XOR in hexadecimal notation (in our example the character " 7 " and the character " 5 "). MODBUS-RTU PROTOCOL INTRODUCTION The MODBUS-RTU protocol allows the management of the reading and writing of the following registries according to the specifications found on the reference document for this Modicon PI- MBUS-300 standard. To select the MODBUS-RTU communication see SERIAL COMMUNICATION SETTINGS section in instrument manual. Certain data, when specifically indicated, will be written directly in the EEPROM type memory. This memory has a limited number of writing operations (100,000), therefore it is necessary to pay particular attention to not execute useless operations on said locations. The instrument in any case makes sure that no writing occurs if the value to be memorised is equal to the value in memory. The numerical data found below are expressed in decimal notation; if the prefix 0x is entered the notation will be hexadecimal. MODBUS-RTU DATA FORMAT The data received and transmitted by way of the MODBUS-RTU protocol have the following characteristics: - 1 start bit - 8 bit of data, least significant bit sent first - Settable parity bit - Settable stop bit -8-
FUNCTIONS SUPPORTED IN MODBUS Among the commands available in the MODBUS-RTU protocol, only the following are utilised for management of communication with the instruments; other commands could be incorrectly interpreted and generate errors or blocks of the system: FUNCTIONS DESCRIPTION 03 (0x03) READ HOLDING REGISTER (READ PROGRAMMABLE REGISTERS) 16 (0x10) PRESET MULTIPLE REGISTERS (WRITE MULTIPLE DI REGISTERS) Interrogation frequency is linked to the communication speed set (the instrument stands by for at least 3 bytes before starting calculations an eventual response to the interrogation query). The DELAY parameter in the settings menu for the serial connections, allows the instrument to respond with a further delay and this directly influences the number of interrogations possible in the unit of time. For additional information on this protocol refer to the general technical specifications PI_MBUS_300. In general queries and answers toward and from one slave instrument are composed as follows: FUNCTION 3: Read holding registers (READ PROGRAMMABLE REGISTERS) QUERY Address Function Add. 1st register No. registers 2 byte A 0x03 0x0000 0x0002 CRC Tot. byte = 8 RESPONSE Address Function No. bytes 1st register 2nd register 2 byte A 0x03 0x04 0x0064 0x00C8 CRC Tot. byte = 3+2* No. registers + 2 where: No. registers = Number of Modbus registers to write beginning from the address no. 1; No. byte = Number of bytes of the following data; FUNCTION 16: Preset multiple registers (WRITE MULTIPLE DI REGISTERS) QUERY Address Function Ind. 1st reg. No. reg. No. bytes Val.reg.1 Val.reg.2 2 byte A 0x10 0x0000 0x0002 0x04 0x0000 0x0000 CRC Tot. byte = 7+2* No. registers +2 -9-
RESPONSE Address Function Ind. 1st reg. No. reg. 2 byte A 0x10 0x0000 0x0002 CRC Tot. byte = 8 where: No. registers = Number of Modbus registers to read beginning from the address no. 1; No. byte = Number of bytes of the following data; Val.reg.1 = Contents of the register beginning from the first. The response contains the number of registers modified beginning from the address no. 1. COMMUNICATION ERROR MANAGEMENT The communication strings are controlled by way of the CRC (Cyclical Redundancy Check). In case of communication error the slave will not respond with any string. The master must consider a time-out for reception of the answer. If it does not receive an answer it deduces that there has been a communication error. In the case of the string received correctly but not executable, the slave responds with an EXCEPTIONAL RESPONSE. The "FUNCTION" field is transmitted with the MSB at 1. EXCEPTIONAL RESPONSE Address Function Code 2 byte A Funct + 0x80 CRC CODE DESCRIPTION 1 ILLEGAL FUNCTION (The function is not valid or is not supported) 2 ILLEGAL DATA ADDRESS (The specified data address is not available) 3 ILLEGAL DATA VALUE (The data received has an invalid value) LIST OF AVAILABLE REGISTERS The MODBUS-RTU protocol implemented on this instrument can manage a maximum of 32 registers read and written in a single query or response. R = the register may only be read W = the register may only be written R/W = the register may be both read and written H = high half of the DOUBLE WORD containing the number L = low half of the DOUBLE WORD containing the number - 10 -
REGISTER DESCRIPTION Saving in EEPROM ACCESS 40001 Firmware Version - R 40002 Instrumento type - R 40003 Year of manufacture - R 40004 Serial Number - R 40005 Program type - R 40006 COMMAND REGISTER NO R/W 40007 STATUS REGISTER - R 40008 GROSS WEIGHT H - R 40009 GROSS WEIGHT L - R 40010 NET WEIGHT H - R 40011 NET WEIGHT L - R 40012 PEAK WEIGHT H - R 40013 PEAK WEIGHT L - R 40014 Divisions and Units of measure - R Coefficient H 40015 - R (only for “BASE” program) Coefficient L 40016 - R (only for “BASE” program) 40017 INPUTS - R 40018 OUTPUTS NO R/W SETPOINT 1 H 40019 R/W (only for “BASE” program) SETPOINT 1 L 40020 R/W (only for “BASE” program) SETPOINT 2 H 40021 R/W (only for “BASE” program) SETPOINT 2 L 40022 R/W (only for “BASE” program) SETPOINT 3 H Only after 40023 R/W (only for “BASE” program) command ‘99’ SETPOINT 3 L of the 40024 R/W (only for “BASE” program) “Command Register” SETPOINT 4 H 40025 R/W (only for “BASE” program) SETPOINT 4 L 40026 R/W (only for “BASE” program) SETPOINT 5 H 40027 R/W (only for “BASE” program) SETPOINT 5 L 40028 R/W (only for “BASE” program) Setpoint class selected by option EC/E (only 40037 for “BASE” program equipped with EC/E - R option) - 11 -
Setpoint class to be set and read (only for 40038 NO R/W “BASE” program equipped with EC/E option) HYSTERESIS 1 H 40039 R/W (only for “BASE” program) HYSTERESIS 1 L 40040 R/W (only for “BASE” program) HYSTERESIS 2 H 40041 R/W (only for “BASE” program) HYSTERESIS 2 L 40042 R/W (only for “BASE” program) HYSTERESIS 3 H 40043 Only after R/W (only for “BASE” program) command 99 of the HYSTERESIS 3 L 40044 “Command Register” R/W (only for “BASE” program) HYSTERESIS 4 H 40045 R/W (only for “BASE” program) HYSTERESIS 4 L 40046 R/W (only for “BASE” program) HYSTERESIS 5 H 40047 R/W (only for “BASE” program) HYSTERESIS 5 L 40048 R/W (only for “BASE” program) 40050 INSTRUMENT STATUS - R 40051 REGISTER 1 NO R/W 40052 REGISTER 2 NO R/W 40053 REGISTER 3 NO R/W 40054 REGISTER 4 NO R/W 40055 REGISTER 5 NO R/W 40056 REGISTER 6 NO R/W 40057 REGISTER 7 NO R/W 40058 REGISTER 8 NO R/W 40059 REGISTER 9 NO R/W 40060 REGISTER 10 NO R/W Totalized weight H (only for WDOS with 40061 - R “TOTALS” program) Totalized weight L (only for WDOS with 40062 - R “TOTALS” program) Number of pieces H (only for WDESK-L\R, 40063 WDESK-LIGHT, WINOX-L\R and WTAB-L/R - R with counting function activated) Number of pieces L (only for WDESK-L\R, 40064 WDESK-LIGHT, WINOX-L\R and WTAB-L/R - R with counting function activated) 40065 Sample weight for instrument calibration H Use with command 101 R/W of the “Command 40066 Sample weight for instrument calibration L Register” R/W - 12 -
Weight value corresponding to ZERO of the 40067 R/W analog output H Weight value corresponding to ZERO of the 40068 Only after R/W analog output L command 99 of the Weight value corresponding to the Full Scale 40069 “Command Register” R/W of the analog output H Weight value corresponding to the Full Scale 40070 R/W of the analog output L 40073 Preset tare H Use with command 130 R/W of the “Command 40074 Preset tare L R/W Register” 40080 Password seed - R 40081 Identification code / Password NO R/W 40082 Alibi memory identification number H NO R/W 40083 Alibi memory identification number L NO R/W 40084 Weight read from the alibi memory H - R 40085 Weight read from the alibi memory L - R 40086 Tare read from the alibi memory H - R 40087 Tare read from the alibi memory L - R 40088 Decimals read from the alibi memory - R Unit of measure read from the alibi 40089 - R memory 40090 Type of data read from the alibi memory - R At the moment of writing, the analog output zero and full scale values are saved in RAM (in the “BASE” program setpoint and hysteresis values are also saved); they are lost upon shut down. To save them permanently in the EEPROM so that they remain upon re-start, it is necessary to send the command 99 to the “Command Register”. ACCESS TO LEGALLY RELEVANT PARAMETERS COMMANDS To access to modification of legally relevant parameters and be able to change the instrument calibration via Modbus, apply the following procedure (a customer password table is required, supplied by the manufacturer to authorised service centres only): - write your identification code (user password) in the “Identification code / Password” register; - send the command 120 to the “Command Register”; - read the password seed in the “Password seed” register; - enter the password read in the password table in the “Identification code / Password” register - send the command 121 to the “Command Register” - If the operation is successfully completed the “Identification code / Password” and “Password seed” registers are set to zero - it is now possible to perform calibration operations (see section REAL CALIBRATION COMMANDS (WITH SAMPLE WEIGHTS)); - 13 -
REAL CALIBRATION (WITH SAMPLE WEIGHTS) To access this menu item, a qualified access is required (see section ACCESS TO LEGALLY RELEVANT PARAMETERS COMMANDS). The instrument calibration can be changed via MODBUS. To set correctly the sample weight, consider the value of the Division module (40014); E.g. if you want to set the value to 100kg and the division value is 0.001, set the register value to 100000 (100/0,001=100000). To carry out this procedure, the system must be unloaded and the weight value display reset to zero with the command 100 of the “Command Register”. Then, a sample weight must be placed on the system, and the correct weight value must be sent to the registers 40065-40066, to save this value, send the command 101 from the “Command Register”. If the operation is successfully completed, the two sample weight registers are set to zero. ANALOG OUTPUT SETTING Write the weight in the registers “Weight value corresponding to the Full Scale of analog output H” (40069) and “Weight value corresponding to the Full Scale of analog output L” (40070) or write the weight in the registers “weight value corresponding to ZERO of the analog output H” (40067) and “weight value corresponding to ZERO of the analog output L” (40068). After writing the value, send the command 99 from the “Command Register” to save it in EEPROM memory. READING AND WRITING IN ALIBI MEMORY SAVING A WEIGHT IN ALIBI MEMORY To save a weight in alibi memory, send the command 110 to the “Command register”. If the operation is successfully completed, the “Alibi memory identification number” (40082 -40083) will increase and the stored values can be read in the 40084, 40083, … 40090 registers; see the next section for more information on these registers. The alibi memory is used in a 'circular' mode: once reached the memory end, the system starts from the beginning by overwriting the first record; the "ALIBI MEMORY OVERWRITE" bit of the STATUS REGISTER is enabled until the following saving in the alibi memory. READING OF VALUES STORED IN ALIBI MEMORY To recall a stored value from the alibi memory: - write the identification number of the value to recall in the “Alibi memory identification number” register - send the command 111 to the “Command Register” - read the data from the 40084, 40083, … 40090 registers: - the “Weight read from the alibi memory” register (40084 - 40085): gross weight or net weight (check the “Net weight” bit in the TYPE OF DATA REGISTER READ FROM THE ALIBI MEMORY to determine whether it is net or gross); - the “Tare read from the alibi memory” register (40086 -40087): when the value is equal to zero, it means that you are reading a gross weight; - the “Decimals read from the alibi memory” register (40088): the number of decimals to apply to weight values; - 14 -
- the “Unit of measure read from the alibi memory” register (40089): unit of measure code (see table in DIVISIONS AND UNITS OF MEASURE REGISTER section for the codes). - see the table REGISTER OF TYPE OF DATA READ FROM THE ALIBI MEMORY (40090) for a description of the same-named register; use this register to check if the weight reading refers to a net weight and if the tare reading is a preset tare; - if the requested value does not exist, all the registers from 40084 to 40089 will be set to zero. REGISTER OF TYPE OF DATA READ FROM THE ALIBI MEMORY (40090) Bit 0 The read weight is a net weight Bit 1 The read tare is a preset tare SPECIAL REGISTERS STATUS REGISTER (40007) Bit 0 Cell Error Bit 1 AD Convertor malfunction Bit 2 Maximum weight exceeded by 9 divisions Bit 3 Gross weight higher than 110% of full scale Bit 4 Gross weight beyond 999999 or less than -999999 Bit 5 Net weight beyond 999999 or less than -999999 Bit 6 Weight below -20e Bit 7 Gross weight negative sign Bit 8 Net weight negative sign Bit 9 Peak weight negative sign Bit 10 Net display mode Bit 11 Weight stability Bit 12 Weight within ±¼ of a division around ZERO Bit 13 Research in progress Bit 14 Alibi memory overwrite Bit 15 INSTRUMENT STATUS REGISTER (40050) 0 Instrument in sleep condition 1 Formulas displaying (only for “BATCHING” programs) 2 Batching constants displaying (only for “BATCHING” programs) 3 Consumption displaying (only for “BATCHING” programs) 4 System parameters displaying 5 Setting of formula number and cycles to batch (only for “BATCHING” programs) 6 Instrument in batching condition (only for “BATCHING” programs) 7 Alarm (only for “BATCHING” programs) 8 alarm (not available for “UNLOAD” program) 9 Alarm (only for “batching” programs) - 15 -
10 Alarm (only for “batching” programs) - alarm (only for “LOAD” and “3/6/14 PRODUCTS” program) 11 - alarm (only for “UNLOAD” program) - “LOAD/UNLOAD” programs: phase elapsing between the opening of the SET and the closing of the CYCLE END 12 - “3-6-14 PRODUCTS” programs: phase elapsing between the opening of batched product contact and the next product or closing of the CYCLE END 13 Batching pause (only for “BATCHING” programs) 14 Cycle end (only for “BATCHING” programs) 15 Alarm (only for “LOAD” and “3/6/14 PRODUCTS” programs) 16 Alarm (only for “BATCHING” programs) Alarm quantity programmed in the formula lower than 20e (only for 17 “BATCHING” programs) 18 Alarm (only for “BATCHING” programs) 19 Alarm 20 Alarm 21 Alarm 22 Alarm negative weight or equal to 0 23 Alarm batched weight lower than 20e 24 Alarm (only for “UNLOAD” program) 25 Alarm (only for “BATCHING” programs) 26 Instrument waits for the printing to complete 27 Displaying of menu parameters during the batching (only for “BATCHING” programs) 28 Displaying the Setpoint class (only for “BASE” program) 29 AUTOMATIC LOADING phase (only for “UNLOAD” program) 30 Alarm (only if OPZWUSBW option is present) 31 Alarm (only for instruments WDOS) 32 Alarm (only for instruments WDOS) 33 Alarm (only for “BATCHING” programs) 34 Alarm (only if OPZWUSBW or OPZWDATIPC options are present) 35 Alarm (only if OPZWUSBW or OPZWDATIPC options are present) 36 Instrument in partial unloading phase at end of cycle (only for “3/6/14 PRODUCTS” programs) 37 Waiting for confirmation by the operator to run the partial unloading at end of cycle (only for “3/6/14 PRODUCTS” programs) 38 The operator is starting an automatic batching (only for “BATCHING” programs) 39 The operator is starting a manual batching (only for “BATCHING” programs) 40 Alarm (only for BATCHING programs) 41 CYCLE END PARTIAL UNLOADING phase (only for “3/6/14 PRODUCTS” programs) - 16 -
INPUTS AND OUTPUTS REGISTERS INPUTS REGISTER (40017) OUTPUTS REGISTER (40018) (reading only) (reading only*) * “BASE” program: reading and writing Bit 0 INPUT 1 Status Bit 0 OUTPUT 1 Status Bit 1 INPUT 2 Status Bit 1 OUTPUT 1 Status Bit 2 INPUT 3 Status Bit 2 OUTPUT 1 Status Bit 3 Bit 3 OUTPUT 1 Status Bit 4 Bit 4 OUTPUT 1 Status Bit 5 Bit 5 Bit 6 Bit 6 Bit 7 Bit 7 Bit 8 Bit 8 Bit 9 Bit 9 Bit 10 Bit 10 Bit 11 Bit 11 Bit 12 Bit 12 Bit 13 Bit 13 Bit 14 Bit 14 Bit 15 Bit 15 Only for “BASE” program: The output status can be read at any time but can be set (written) only if the output has been set as (see section OUTPUTS AND INPUTS CONFIGURATION); otherwise, the outputs will be managed according to the current weight status with respect to the relevant setpoint. DIVISION AND UNITS OF MEASURE REGISTER (40014) This register contains the current setting of the scale verification division (parameter or for multi-interval instruments) and of the units of measure (parameter ). H Byte L Byte unit of measure Scale verification division Use this register together with the Coefficient registers to calculate the value displayed by the instrument. - 17 -
Least significant byte (L Byte) Most significant byte (H Byte) Unit of Scale verification Unit of measure Divisor Decimals measure division value description value 0 Kilograms 0 100 0 1 Grams 1 50 0 2 Tons 2 20 0 3 10 0 4 5 0 5 2 0 6 1 0 7 0.5 1 8 0.2 1 9 0.1 1 10 0.05 2 11 0.02 2 12 0.01 2 13 0.005 3 14 0.002 3 15 0.001 3 16 0.0005 4 17 0.0002 4 18 0.0001 4 COMMAND REGISTER (40006) 0 No command 1 6 7 NET weight displaying (see section SEMI-AUTOMATIC TARE (NET/GROSS)) 8 SEMIAUTOMATIC ZERO 9 GROSS weight displaying (see section SEMI-AUTOMATIC TARE (NET/GROSS)) 20 21 Keypad lock 22 Keypad and display unlock 23 Keypad and display lock 98 99 -Saving data in EEPROM -Only for “BASE” program: saving the setpoint in EEPROM into class set in the register 40038 100 Zero-setting for calibration (see section 101 Sample weight storage for calibration TARE WEIGHT ZERO SETTING) 110* Weight storage in alibi memory 111* Alibi memory value reading 120 Identification code sending for qualified 121 Password sending for qualified access access - 18 -
130 Preset Tare active 131 Reserved 132*** Read PTARE1 133*** Write PTARE1 134*** Read PTARE2 135*** Write PTARE2 136*** Read PTARE3 137*** Write PTARE3 138*** Read PTARE4 139*** Write PTARE4 140*** Read PTARE5 141*** Write PTARE5 142*** Read PTARE6 143*** Write PTARE6 144*** Read PTARE7 145*** Write PTARE7 146*** Read PTARE8 147*** Write PTARE8 148*** Read PTARE9 149*** Write PTARE9 200 201 Batching: START 202 Batching: PAUSE 203 Batching: RESUMES from PAUSE 204 Batching: STOP 205** Batching: Accepts alarm and stop 206** Batching: Ignores the alarm 207** Batching: Ignores the alarm (not available for “UNLOAD” program) 208 Interruption of the AUTOMATIC 209 Batching: continues when the message LOADING (only for “UNLOAD” appears or if STATUS program) REGISTER=12 (only if = ) 210 211 250 Confirmation of batching data reading 251 2000*** See the following table 9999 Reset (Reserved) *) Only for “BASE” program. **) In case of alarm signals during the batching, send the command 205 to accept the alarm and stop the batching; in the particular case of alarm, it is possible to ignore the alarm and continue the batching by sending the command 207; for the alarm it is possible to ignore the alarm and continue the batching by sending the command 206. ***) For commands from 2000 to 2999 refer to the following section ****) WTAB: read and write of preset tares, example PTARE5: - READ: send command 140 to command register (40006); read values of 40050 and 40051 registers. - WRITE: write preset tare value into 40050 and 40051 registers; send command 141 to command register (40006). Only for “BASE” program SETPOINT PROGRAMMING Warning: if the option E\EC is not present, the new values of the setpoint are active immediately; but if the option E\EC is present, the new values of the setpoint are active only if the class to be programmed coincides with the class currently in use. - Write the number of class to be programmed in the register 40038 (only for instruments provided with E/EC option); - Write the setpoint values to be programmed in the registers 40019 – 40028; - 19 -
SETPOINT READING - Write the number of class to be read in the register 40038 (only for instruments provided with E/EC option); - Read the setpoint values in the registers 40019 – 40028. Only for “BATCHING” programs (LOAD – UNLOAD – 3/6/14 PRODUCTS) CONSTANTS AND FORMULAS READING AND WRITING Legend: CMD R: Reading command. CMD W: Writing command. H: high half of the DOUBLE WORD containing the number. L: low half of the DOUBLE WORD containing the number. For the exchange of values by using the following commands, use the "Exchange registers" from 40051 to 40060 together with the "Command Register". To perform a read command you need to set the values highlighted in bold. For example: Command 2002 - In the register 40053 set the formula number (No. Formula) for which you want to read the set total; - Send the command 2002 to the “Command Register” (40006); - Read continuously register 40060 until you find the command echo (in this case 2002) which indicates “data ready” or 0xFFFF indicates that “error in the command” - Read the values present in the registers 40051…40060 and use them according to the following table; CMD CMD VARIABLE REGISTER DESCRIPTION R W 40051 Quantity H for “3/6/14 40052 Quantity L PRODUCTS” 2000 2001 40053 No. Product programs 40054 No. Step 40055 No. Formula FORMULAS PROGRAMMING 40051 Quantity H 40052 Quantity L 1= Set for “LOAD” and 40053 2000 2001 2 = Preset “UNLOAD” programs 1= Set 40054 2 = Preset 40055 No. Formula - 20 -
Option OPZWQMC: 40051 Quantity H for “3/6/14 PROD” and “LOAD” TOTAL SET BY programs 2002 2003 40052 Quantity L FORMULA Option OPZFORPERC: for “3/6/14 PROD” 40053 No. Formula programs for W200, WDESK- 40051 Quantity H L\R, WINOX-L\R, 40052 Quantity L WTAB-L/R only for 2020 40053 No. Product “3/6/14 PROD.” programs 40054 1 = Consumption for W200, WDESK- 40051 Quantity H L\R, WINOX-L\R, 40052 Quantity L WTAB-L/R only for 2020 40053 No. Formula “LOAD”and “UNLOAD” programs 40054 1 = Consumption 40051 Quantity H TOTALS 40052 Quantity L MANAGEMENT for WDOS 40053 No. Product (Consumption & 2020 2021* 1 = Consumption Stocks) 4 = Total stocks 40054 5 = Add Stocks 6 = Subtract Stocks 7 = Minimum Stocks 40051 Quantity H 40052 Quantity L for WDOS 2020 40053 No. Formula (Production) 2 = Production (Quantity) 40054 3 = Production (No. Cycles) 40051 Day 40052 Month 40053 Year 40054 Hours DATE & TIME 2022 40055 Minutes TOTALS DELETION 40056 Seconds 1 = Consumption 40057 2 = Production (only for WDOS) 40051 No. Formula No. FORMULA AND No. CYCLES TO 2030 2031 40052 Cycles H EXECUTE 40053 Cycles L CURRENT CYCLE 2032 40051 Cycle H - 21 -
40052 Cycle L 40053 Step H 40054 Step L 40055 Product H 40056 Product L 40057 Set H 40058 Set L BATCHING DATA READING** 2100 See examples in the concerning section * WARNING: - If 40054 = 4 (total stocks): the value sent is substituted for the currently total stocks; - If 40054 = 5 (added stocks): the value sent is added to the currently total stocks; - If 40054 = 6 (subtract stocks): the value sent is subtracted to the currently total stocks FORMULAS WRITING - For “3/6/14 PRODUCTS” program - Write in the register 40051 and 40052 the quantity to be batched. - Write in the register 40053 the product number. - Write in the register 40054 the step number (only if = ) otherwise 1. - Write in the register 40055 the formula number. - For “LOAD” and “UNLOAD” program - Write in the register 40051 and 40052 the quantity to be batched. - Write in the register 40053 the value 1 to set the SET, 2 to set the PRESET. - Write in the register 40054 the value 1 to set the SET, 2 to set the PRESET. - Write in the register 40055 the formula number. Send the command 2001 to the COMMAND REGISTER (40006); FORMULAS READING - For “3/6/14 PRODUCTS” program - Write in the register 40053 the product number. - Write in the register 40054 the step number (only if = ) otherwise 1. - Write in the register 40055 the formula number. - For “LOAD” and “UNLOAD” program - Write in the register 40053 the value 1 to set the SET, 2 to set the PRESET. - Write in the register 40054 the value 1 to set the SET, 2 to set the PRESET. - Write in the register 40055 the formula number. Send the command 2000 to the COMMAND REGISTER (40006); Read continuously the register 40060 until it is different from 2000 (command echo) or 0xFFFF (control error). After reading the command echo, read the registers 40051 and 40052 to obtain the quantity defined in the formula. - 22 -
BATCHING START AND STOP To start the batching: - Write in the register 40051…40053 the formula and cycles number to be executed; send the command 2031 to the COMMAND REGISTER to set this values; - Send the command “201” to the COMMAND REGISTER to start the batching. To stop the batching: - Send the command “204” to the COMMAND REGISTER. BATCHING DATA READING **At the end of the batching, the instrument makes the data available; to verify that they are ready, send the command 1114 to the COMMAND REGISTER, read the registry 40051 to verify that it is "1" (1 = Data ready to be read); WARNING: Unlike other commands, this is the only command that doesn't use a different system to provide the execution echo. In this case, wait for the bit 7 of register 40060 to be equal to 1. Send one of the following queries to the COMMAND REGISTER and read the corresponding values in the exchange registers (40051-40060): Query: BATCHING STEP CMD CMD VARIABLE 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 R W 2100 No. STEP Note: for “LOAD” and “UNLOAD” programs NO. STEP =1 Response: CMD CMD VARIABLE 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 R W REAL REAL THEORIC. THEORIC. PRODUCT ALARM ALARM ID ALIBI ID ALIBI Value BATCHED BATCHED BATCHED BATCHED NUMBER H L H L detail H L H L Note: “Negative value” bit of the “Value detail” refers only to double word REAL BATCHED. Query: INITIAL TARE CMD CMD VARIABLE 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 R W 2100 1005 Response: CMD CMD VARIABLE 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 R W VALUE VALUE ALARM ALARM Value H L H L detail - 23 -
Query: FINAL GROSS WEIGHT ( * for “3/6/14 PROD.” programs) CMD CMD VARIABLE 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 R W 2100 1003 Response: CMD CMD VARIABIE 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 R W VALUE VALUE ALARM ALARM ID ALIBI ID ALIBI Value H L H L H L detail After the reading of batching data, report it has been read by sending the command 250 to the COMMAND REGISTER. In this case the instrument accepts the alarm and continues the sequence of batching. Content of the register “Detail value”: Bit 0 Negative value Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Data ready BATCHING DATA ALARMS (40055; 40056) An alarm take up one byte, if more than one alarm is present, up to four bytes will be sent in chronological order; up to 4 byte (up to 4 alarms). 0 no alarm 1 general alarm 2 3 4 (not available for “UNLOAD” program) 5 6 7 - (for “LOAD” and “3/6/14 PRODUCTS” programs) 8 - (for “UNLOAD” program) 9 (only for “LOAD” and “3/6/14 PRODUCTS programs”) 10 11 12 Batching STOP 13 14 15 16 17 - 24 -
18 19 20 21 22 (only for “UNLOAD” program) 23 : AUTOMATIC LOADING function (only for “UNLOAD” program) 24 (OPZWQMC option) 25 (only for WDOS instruments) 26 (only for WDOS instruments) 27 (only for OPZWUSBW_option) 28 (only for OPZWUSBW_ and OPZWDATIPC options) 29 (OPZWUSBW_ and OPZWDATIPC options) - 25 -
COMMUNICATION EXAMPLES The numerical data below are expressed in hexadecimal notation with prefix h. EXAMPLE 1 Command for multiple writing of registers (hexadecimal command 16, h10): Assuming that we wish to write the value 0 to the register 40017 and the value 2000 to the register 40020, the string to generate must be: h01 h10 h00 h12 h00 h02 h04 h00 h00 h07 hD0 h70 hD6 The instrument will respond with the string: h01 h10 h00 h12 h00 h02 hE1 hCD Query field name hex Response field name hex Instrument Address h01 Instrument Address h01 Function h10 Function h10 Address of the first register H h00 Address of the first register H h00 Address of the first register L h12 Address of the first register L h12 Number of registers to send H h00 Number of registers H h00 Number of registers to send L h02 Number of registers L h02 Byte Count h04 CRC16 H hE1 Datum 1 H h00 CRC16 L hCD Datum 1 L h00 Datum 2 H h07 Datum 2 L hD0 CRC16 H h70 CRC16 L hD6 EXAMPLE 2 Command for multiple writing of registers (hexadecimal command 16, h10): Assuming that we wish to write the two setpoint values on the instrument, at 2000 and 3000 respectively, the string must be sent: h01 h10 h00 h12 h00 h04 h08 h00 h00 h07 hD0 h00 h00 h0B hB8 h49 h65 The instrument will respond with the string: h01 h10 h00 h12 h00 h04 h61 hCF Query field name hex Response field name hex Instrument Address h01 Instrument Address h01 Fuction h10 Function h10 Address of the first register H h00 Address of the first register H h00 Address of the first register L h12 Address of the first register L h12 Number of registers H h00 Number of registers H h00 - 26 -
Number of registers L h04 Number of registers L h04 Byte Count h08 CRC16 H h61 Datum 1 H h00 CRC16 L hCF Datum 1 L h00 Datum 2 H h07 Datum 2 L hD0 Datum 3 H h00 Datum 3 L h00 Datum 4 H h0B Datum 4 L hB8 CRC16 H h49 CRC16 L h65 EXAMPLE 3 Multiple commands reading for registers (hexadecimal command 3, h03): Assuming that we wish to read the two gross weight values (in the example 4000) and net weight values (in the example 3000), reading from address 40008 to address 40011 must be performed by sending the following string: h01 h03 h00 h07 h00 h04 hF5 hC8 The instrument will respond with the string: h01 h03 h08 h00 h00 h0F hA0 h00 h00 h0B hB8 h12 h73 Query field name hex Response field name hex Instrument Address h01 Instrument Address h01 Function h03 Function h03 Address of the first register H h00 Byte Count h08 Address of the first register L h07 Number of registers H h00 Datum 1 H h00 Number of registers L h04 Datum 1 L h00 CRC16 H hF5 Datum 2 H h0F CRC16 L hC8 Datum 2 L hA0 Datum 3 H h00 Datum 3 L h00 Datum 4 H h0B Datum 4 L hB8 CRC16 H h12 CRC16 L h73 For additional examples regarding the generation of correct control characters (CRC16) refer to the manual Modicon PI-MBUS-300. Microlectra bv. Augustapolder 12. 2992 SR Barendrecht. The Netherlands. www.microlectra.nl info@microlectra.nl - 27 -
You can also read