KROHNE ALTOSONIC V Reference Manual

KROHNE ALTOSONIC V Reference Manual

Ultrasonic flowmeter. modbus manual protocol description & setup
Table of Contents

Advertisement

Quick Links

© KROHNE 09/2008
7.30855.35.00
Ultrasonic
ALTOSONIC V
Flowmeters
Reference Guide
Modbus manual
Protocol description
&
setup
Applicable for
software version 0300

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ALTOSONIC V and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for KROHNE ALTOSONIC V

  • Page 1 © KROHNE 09/2008 7.30855.35.00 Ultrasonic ALTOSONIC V Flowmeters Reference Guide Modbus manual Protocol description & setup Applicable for software version 0300...
  • Page 2: Table Of Contents

    ALTOSONIC V TABLE OF CONTENTS INTRODUCTION TO MODBUS....................5 SERIAL TRANSMISSION FORMAT .................... 6 2.1 ASCII- ........................... 6 MODE 2.2 RTU- ............................. 6 MODE MODBUS MESSAGE FRAMING....................7 3.1 T ........................7 DDRESS IELD 3.2 T ........................7 UNCTION IELD 3.3 T...
  • Page 3 ALTOSONIC V 8.8 F 6 (R ASCII F ) ................ 49 IELD IELD CHARACTERS 8.9 F 6 (R ASCII F )..............49 IELD RITE IELD CHARACTERS 8.10 ................. 51 XPLANATION OF VAILABLE TO ODBUS 8.11 ......................55 YSTEM ESSAGES APPENDICES ..........................57 9.1 A...
  • Page 4 ALTOSONIC V INTRODUCTION This manual describes how to use the Modbus protocol with the ALTOSONIC V flow meter system. Product Liability and warranty Responsibility for suitability and intented use of these ultrasonic flowmeters rests solely with the operator. Improper installation and operation of the flowmeters (systems) may lead to loss of warranty.
  • Page 5: Introduction To Modbus

    ALTOSONIC V 1 INTRODUCTION TO MODBUS From this point in the manual the following abbreviations are used for the ALTOSONIC-V system: UFS-V: Ultrasonic Flow Sensor (primary flow meter body) UFC-V: Ultrasonic Flow Converter (5 converters) UFP-V: Ultrasonic Flow Processor Introduction to Modbus For communication with host systems the flow controller emulates a Modbus compatible controller.
  • Page 6: Serial Transmission Format

    ALTOSONIC V 2 SERIAL TRANSMISSION FORMAT The two transmission modes used are called: ASCII, and RTU. The user has to select the desired mode along with the serial communication parameters (baud rate, parity-type). Note that all these parameters must be the same for all controllers in the network.
  • Page 7: Modbus Message Framing

    ALTOSONIC V 3 MODBUS MESSAGE FRAMING ASCII-mode In ASCII-mode a message starts with a colon character (:) and ends with a carriage return–linefeed. Intervals up to one second can elapse between characters within the message. If the interval is longer, a timeout error occurs and the message is rejected.
  • Page 8: The Error Checking Field

    ALTOSONIC V In ASCII mode this byte is made of 2 ASCII characters. The data field of messages contains information which both master and slave use to perform an action. This includes the register address, quantity of registers, and the necessary data.
  • Page 9: Physical Communication Layer

    ALTOSONIC V 4 PHYSICAL COMMUNICATION LAYER The Modbus protocol is a half-duplex protocol. The physical layer can be half or full duplex. The Modbus driver supports both half (RS485) and full (RS232/RS422) duplex communication layers. In case of RS485, the parameter 3.8 MODBUS_UART_HALF_DUPLEX must be turned on. The transmitter is activated when the UFP-V transmits data.
  • Page 10: Supported Functions

    ALTOSONIC V 5 SUPPORTED FUNCTIONS All data addresses in Modbus messages are referenced to zero. For example: Coil 1 is addressed as Coil 0000. • Holding register 40001 is addressed as 0000. Note that the function code specifies the operation of •...
  • Page 11: Function 02: Read Input Status

    ALTOSONIC V Note how the three remaining bits (toward the high order end) are zero-filled. If the request is not applicable an exception response will be sent. See chapter 5.10 for exception responses. Function 02: READ INPUT STATUS In the UFP-V Modbus protocol, function 1 and 2 perform the same processing and are interchangeable.
  • Page 12: Function 04: Read Input Registers

    ALTOSONIC V Function 04: READ INPUT REGISTERS In the UFP-V Modbus protocol, function 3 and 4 perform the same processing and are interchangeable. Function 05: WRITE SINGLE COIL Description Function 5 forces a single coil to either ON or OFF (0x reference).
  • Page 13: Function 8: Diagnostics

    ALTOSONIC V Example Here is an example of a request to preset register 40002 to 00 03 in slave 17. Header Slave Function Register Address Data Error Trailer Address Check 00(h) 01(h) 00(h) 03(h) 11(h) 06(h) Response is an echo of the query, returned after the register contents have been pre-set.
  • Page 14: Function 16: Write Multiple Holding Registers

    ALTOSONIC V The next byte transmitted (01) addresses coils 29 and 28, with the least significant bit addressing the lowest coil (28) in this set. Unused bits in the last data byte should be left zero. Request: Header Slave Function...
  • Page 15: Exception Responses

    ALTOSONIC V 5.10 Exception Responses Except for broadcast messages, a master device expects a normal response, when it sends a query to a slave device. One of the four possible events can occur from the master’s query: If the slave device receives the query without a communication error and can handle the query normally, it returns a normal response.
  • Page 16: Handling Of Large Data Types

    ALTOSONIC V 6 HANDLING OF LARGE DATA TYPES The standard Modbus specification does not explain how data types larger than 16 bits should be handled. The standard Modbus functions to modify holding registers are used for handling larger data types.
  • Page 17: Floating Point Representation

    ALTOSONIC V Floating Point Representation The exponent is biased by 127. The mantissa is 24 bits with the most significant bit 1 (not stored), 23 bit stored. Biased exponent Mantissa 3 (high) Mantissa 2 Mantissa 1 (low) SEEE EEEE E MMM MMMM...
  • Page 18: Maximum Requested Points

    ALTOSONIC V The transmit order in both modes: IEEE Normal mode Reversed mode Doubles could be transmitted in two ways: Example The double number 4.125000001862645 will give the IEEE representation. EXPONENT MANTISSA 100 0000 0001 (1)0000 1000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0000 0000 A biased exponent of 1025 (401 hexadecimal) is exp.
  • Page 19 ALTOSONIC V Another solution is to send the data to the hosts by means of a broadcast. Now all host systems receive the same data. ModBus Manual 0300 rev07 E 7.30855.35.00 Page 19 of 64...
  • Page 20: Set-Up Of The Ufp-V Modbus Driver

    ALTOSONIC V 7 SET-UP OF THE UFP-V MODBUS DRIVER Driver Contents The driver contains: Standard Modbus protocol according to Modicon. • Simulation of Modbus Master and Slave mode. • ASCII-mode and RTU mode. • Half and full duplex communication layers supported.
  • Page 21: Rs485/422 Card: Ax4285A

    ALTOSONIC V 7.2.1 RS485/422 card: AX4285A The first generation of RS 485 cards used DIP SWITCH CH1*** : COM 3 Baseaddress ch#1: 3E8 DIP SWITCH CH2*** : COM 4 Baseaddress ch#2: 2E8 JP1*** : COM3 Interrupt IRQ4 JP2*** : COM4 Interrupt IRQ3...
  • Page 22: Rs485/422 Card: Pcl-745 S

    ALTOSONIC V 7.2.2 RS485/422 card: PCL-745 S The current generation RS485/422 card Dip switch ch1*** : COM 3 Address 3E8 (Krohne Altometer setting) Dip switch ch2*** : COM4 Address 2E8 JP1*** : Interrupt COM3 IRQ4 JP2*** : Interrupt COM4 IRQ3...
  • Page 23: Software Set-Up

    ALTOSONIC V Software set-up Now set-up the software, all the settings for the Modbus driver is done in the file [coms0300.dat]. See also chapter 9.4 Appendix D: Coms0300.dat file 7.3.1 First set the parameters for the communication line 3.1 MODBUS_UART_BASEADRESS for channel 1 is COM4 this is baseaddress 0x2E8 •...
  • Page 24: The Ufp-V As Master

    ALTOSONIC V 7.3.4 The UFP-V as Master The master mode is activated when the parameter 5.1 MODBUS_DEVICE_TYPE=2. For master mode the UFP-V must know what it should send to the connected slave device, therefore the master works with poll blocks. Each poll block defines how a transaction should take place i.e.
  • Page 25: What Can Go Wrong

    ALTOSONIC V What can go wrong? When using RS485, check: Are the connections between terminal 1 and 4 made? • Are the connections between terminal 2 and 3 made? • Is the terminate resistor placed between 1+4 and 2+3 (only if UFP-V is the end of the line).
  • Page 26 ALTOSONIC V Example of reading a status flag from an UFP-V in slave mode The status flag is read by the master. 1. If the status flag is active, the master uses this state to perform its actions and sends an acknowledgement to the UFP-V by setting the accompanying ACK_flag to 1.
  • Page 27: How Data Is Written To The Float Field

    ALTOSONIC V How data is written to the float field Field 6 (addresses are default mapped to address 7500) is the read/write field for floats. Current applications for writing to the UFP-V system are: 1. API settings for the parameters used in the UFP-Program for calculating Standard/Mass flow and totals.
  • Page 28 ALTOSONIC V To enable writing to a float field as described in application 1...5, an enable Boolean referring to the • application must be written to the xxxxx enable writing data Boolean. For example for application 1 this is Boolean 2201.
  • Page 29: Modbus Mapping Assignments

    ALTOSONIC V 8 MODBUS MAPPING ASSIGNMENTS The available data is grouped in 9 levels (groups): 1. Gross flow measurement 2. Standard flow measurement 3. Net flow measurement 4. Batching, includes normally the levels 1..3 5. Analysis, diagnostics, quality 6. Control data 7.
  • Page 30 ALTOSONIC V Totaliser standard: totaliser reset occurred Totaliser process: forward totaliser rollover occurred Totaliser process: reverse totaliser rollover occurred Totaliser standard: forward totaliser rollover occurred Totaliser standard: reverse totaliser rollover occurred Totaliser mass: sum totalizer rollover occurred Totaliser mass: totalizer reset occurred...
  • Page 31: Field 1 (Read/Write Boolean Field)

    ALTOSONIC V OVERRIDE enable possible for pressure proving (ext flowm) OVERRIDE enable possible for pressure densitometer OVERRIDE enable possible for density densitometer OVERRIDE enable possible for density standard OVERRIDE enable possible for viscosity external OVERRIDE default (automatic) temperature body if enabled in CLNT0300.dat OVERRIDE default (automatic) temperature process if enabled in CLNT0300.dat...
  • Page 32 ALTOSONIC V B+RW Acknowledge_flags_field_18 B+RW Acknowledge_flags_field_19 B+RW Acknowledge_flags_field_20 B+RW Acknowledge_flags_field_21 B+RW Acknowledge_flags_field_22 B+RW Acknowledge_flags_field_23 B+RW Acknowledge_flags_field_24 B+RW Acknowledge_flags_field_25 B+RW Acknowledge_flags_field_26 B+RW Acknowledge_flags_field_27 B+RW Acknowledge_flags_field_28 B+RW Acknowledge_flags_field_29 B+RW Acknowledge_flags_field_30 B+RW Acknowledge_flags_field_31 B+RW Acknowledge_flags_field_32 B+RW Acknowledge_flags_field_33 B+RW Acknowledge_flags_field_34 B+RW Acknowledge_flags_field_35 B+RW Acknowledge_flags_field_36...
  • Page 33 ALTOSONIC V EXT: save changed data in float write field (EXT B+RW automatic reset 222..225) B+RW EXT: restart proving of external flowmeter automatic reset Batch 1 reset averages For Continuous Pipe Line B+RW Measurement by host , not for the UFP internal CPL...
  • Page 34 ALTOSONIC V B+RW OVERRIDE: save and enable written data if enable to B+RW OVERRIDE: enable to set value temperature body override if enable to B+RW OVERRIDE: enable to set value temperature process override if enable to B+RW OVERRIDE: enable to set value temperature proving...
  • Page 35: Field 2 (Read Only Integer Field)

    ALTOSONIC V Field 2 (Read only Integer Field) This data is read only and can be accessed with Modbus function 3 and 4 in Modbus slave mode and with functions 6 and 16 in Modbus master mode. By default the start addresses are mapped to address 3000 (default value)
  • Page 36 ALTOSONIC V I16+R System messages 01..16 I16+R System messages 17..32 I16+R System messages 33..48 I16+R System messages 49..64 I16+R Number of current warnings [ ] Applicable to all levels I16+R Number of current alarms [ ] Applicable to all levels...
  • Page 37 ALTOSONIC V Batch stop: NonResetable Standard Totaliser Fract. I16+R 0.xxxx m3 (sum) I16+R Batch stop: NonResetable Standard Totaliser Fract. (fwd) 0.xxxx m3 I16+R Batch stop: NonResetable Standard Totaliser Fract. (rev) 0.xxxx m3 I16+R Batch stop: NonResetable Mass Totaliser Fract. (sum) 0.xxxx ton...
  • Page 38: Field 3 (Read Only Long Integer Field)

    ALTOSONIC V Field 3 (Read only Long Integer Field) This data is read only and can be accessed with Modbus function 3 and 4 in Modbus slave mode and with functions 6 and 16 in Modbus master mode. By default the start addresses are mapped to address 5000 (default value)
  • Page 39 ALTOSONIC V I32+R Resetable totaliser: mass forward (nett.oil) I32+R Resetable totaliser: mass reverse (nett.oil) I32+R Non resetable totaliser: process sum (nett.oil) liter I32+R Non resetable totaliser: process forward (nett.oil) liter I32+R Non resetable totaliser: process reverse (nett.oil) liter I32+R Non resetable totaliser: standard sum (nett.oil)
  • Page 40: Field 4 (Read Only Float Field)

    ALTOSONIC V I32+R CRC for UFS files I32+R CRC for UFP files I32+R CRC for DAT files I32+R CRC for (last) Ticket I32+R CRC for Executable (program) I32+R Serial number xxxxxxyyyy, project number x ( 6 or 7 digits )
  • Page 41 ALTOSONIC V F32+R Krohne use only F32+R Krohne use only F32+R Krohne use only F32+R Krohne use only F32+R Remaining hold time on real-profile sampling. By flow deviation F32+R Average by stdev: raw UFCdata Flow channel 1 0 to 1000...
  • Page 42 ALTOSONIC V F32+R Batch 1 average Ctl (15° C to process) F32+R Batch 1 average Cpl (0 bar to process) F32+R Batch 1 average Ctl (15° C to standard) F32+R Batch 1 average Cpl (0 bar to standard. always 1) F32+R Batch 1 average Ctl (15°...
  • Page 43 ALTOSONIC V F32+R Batch 2 average Ctl (15° C to standard) F32+R Batch 2 average Cpl (0 bar to standard. always 1) F32+R Batch 2 average Ctl (15° C to densitometer) F32+R Batch 2 average Cpl (0 bar to densitometer) F32+R Batch 2 average Ctl (15°...
  • Page 44 ALTOSONIC V F32+R Channel 5 indicative flow velocity in primary section F32+R Krohne use: Calibration[0] F32+R Krohne use: Calibration[1] F32+R Krohne use: Calibration[2] F32+R Krohne use: Calibration[3] F32+R Krohne use: Calibration[4] F32+R Krohne use: Calibration[5] F32+R Krohne use: Calibration[6] F32+R...
  • Page 45: Field 5 (Read Only Double Field)

    ALTOSONIC V F32+R Batch stop: Average Density external kg/m3 F32+R Batch stop: Average Flow external m3/h F32+R Batch stop: Average Inst. K-Factor external F32+R Batch stop: Average New K-Factor external F32+R Batch stop: Average Diff. K-Factor Inst.. New Field 5 (Read only Double Field) This data is read only and can be accessed with Modbus function 3 and 4 in Modbus slave mode and with functions 6 and 16 in Modbus master mode.
  • Page 46: Field 6 (Read/Write Float Field)

    ALTOSONIC V Field 6 (Read/Write Float Field) In slave mode write to field by function 16, read from field by function 3. In Master mode write to field by function 3, read from field by function 16 NOTE that for explanation on how to handle writing to these parameters: see chapters 7.6 How data is written to the float field...
  • Page 47 ALTOSONIC V UFP batch control: Normal: Setup=9 (if UFP batch1 status batch=0 is no batch) Cancel=5 (if UFP batch1 status batch=1 is set-up) Start batch=119 (if UFP batch1 status batch=1 is set-up) End batch=229 (if UFP batch1 status batch=1 is running) reset print=1009 (if UFP batch1 status batch=5…10 printing)
  • Page 48 F32+RW OVERRIDE if set is enabled: viscosity dynamic to override cSt or 10-6 m2/s F32+RW Batch reference number for internal batch ticket F32+RW Krohne use: Calibration volume F32+R Input in UFP (if enabled): BS&W Input F32+RW Reserved F32+RW Reserved...
  • Page 49: Field 6 (Read Only Ascii Field 8 Characters)

    ALTOSONIC V F32+R Batch stop: Override External Temperature F32+R Batch stop: Override Density Temperature F32+R Batch stop: Override Process Pressure F32+R Batch stop: Override External Pressure F32+R Batch stop: Override Densito Pressure F32+R Batch stop: Override Density F32+R Batch stop: Override Standard Density...
  • Page 50 ALTOSONIC V S16+RW Ascii16 String 8 (batch ticket print code 2264) To print in the batch ticket S16+R Ascii16 String 9 Serial number S16+R Ascii16 String 10 Tag number ModBus Manual 0300 rev07 E 7.30855.35.00 Page 50 of 64...
  • Page 51: Explanation Of Data Available To Modbus

    ALTOSONIC V 8.10 Explanation of Data Available to Modbus Basic Flow measurement WARNING This warning occurs if 1…4 paths fail, but the system works within specifications. Possible sources of the warning are over range, path failure, deviation in sound velocity or communication failure.
  • Page 52 ALTOSONIC V Standard volume on output Status for the corrected/calculated standard conditions of 15 °C and 1 Bar. Correction parameters HOLD. Due to flow deviation In case of large flow deviation the correction parameters are ‘frozen’ until enough statistical information is available to perform a reliable correction.
  • Page 53 ALTOSONIC V Flow of path 1…5 Available as scaled integer and float, these values represent internal UFP-V units. Sound velocity of path 1...5 Available as scaled integer and float. The floating-point numbers represent the sound velocity in m/s, the scaled integers are scaled to 32767 ( scaled 0…32767...
  • Page 54 ALTOSONIC V API: Density standard type When the correction type is 1 (Standard volume/mass by API2540): The type of density standard (at temperature and pressure standard) 0: Fill in manually 1: Calculated from process density ((measured by densito meter) 2: On AD/Modbus input...
  • Page 55: The System Messages

    ALTOSONIC V The System Messages 8.11 The system messages contains the system runtime warnings and alarms. They are stored as bits into the integer data. Each system message is packed as one message per bit of the integer. The message is active if the accompanying bit is one.
  • Page 56 ALTOSONIC V See for the communication runtime errors also the ALTOSONIC V Modbus Manual. Err no. In function Problem Consequence W: 33 Modbus master Poll block not send due to transmit error W: 34 Modbus master Poll block response time-out occurred...
  • Page 57: Appendices

    ALTOSONIC V 9 Appendices Appendix A: Time out values The character length lies between 9 and 12 bits The UFP-V determines the time between two bytes to recognise a communication failure or the end of a message. UFP-V discriminates between a timeout between 2 bytes and a timeout after the last byte, which occurs at the end of a message.
  • Page 58: Appendix B: Lrc Generation

    ALTOSONIC V Appendix B: LRC Generation (As taken from the website: www.modicon.com/techpubs/crc7.html) The Longitudinal Redundancy Check (LRC) field is one byte, containing an eight-bit binary value. The LRC value is calculated by the transmitting device, which appends the LRC to the message. The receiving device recalculates an LRC during receipt of the message, and compares the calculated value to the actual value it received in the LRC field.
  • Page 59: Appendix C: Crc Generation

    ALTOSONIC V Appendix C: CRC generation (As taken from the website: www.modicon.com/techpubs/crc7.html) The Cyclical Redundancy Check (CRC) field is two bytes, containing a 16-bit binary value. The CRC value is calculated by the transmitting device, which appends the CRC to the message. The receiving device recalculates a CRC during receipt of the message, and compares the calculated value to the actual value it received in the CRC field.
  • Page 60 ALTOSONIC V Indexing the CRC in this way provides faster execution than would be achieved by calculating a new CRC value with each new character from the message buffer. Note: This function performs the swapping of the high/low CRC bytes internally. The bytes are already swapped in the CRC value that is returned from the function.
  • Page 61 ALTOSONIC V 0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE, 0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26, 0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60,...
  • Page 62: Appendix D: Coms0300.Dat

    ALTOSONIC V Appendix D: Coms0300.dat File example as used by Altosonic-V system ----------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: COMS0300.DAT ----------------------------------------------------------------------------------------------------------------------------------------------------------- 01 [UFC500 COMMUNICATION SETUP] 01.01 UFC_UART_BASEADDRESS c=#3E8 //COM1=0x3F8, COM2=0x2F8 //COM3=0x3E8, COM4=0x2E8 01.02 UFC_UART_INTERRUPT c=#4 //3, 4: IRQ3=COM2/4, IRQ4=COM1/3 01.03 UFC_UART_BAUDRATE c=#28800 //DO NOT CHANGE ! 01.04 UFC_UART_RTS_MODE...
  • Page 63 ALTOSONIC V ACCESS MODE 7 //0, 1: 0=NORMAL, 1=REVERSED DATATYPE 06.08 DATAFIELD 8 =#4000 //RW strings, length=8 ACCESS MODE 8 //0, 1: 0=NORMAL, 1=REVERSED DATATYPE 06.09 DATAFIELD 9 =#14000 //RW strings, length=16 ACCESS MODE 9 //0, 1: 0=NORMAL, 1=REVERSED DATATYPE...
  • Page 64 FAX: +49(0)203-301 389 FAX: +39(0)2-43 00 66 66 FAX: +41(0)61-638 30 40 e-mail: export@krohne.de e-mail: info@krohne.it e-mail: info@krohne.ch China KROHNE Measurement Instruments Co. Ltd. Room 7E, Yi Dian Mansion Korea United Kingdom 746 Zhao Jia Bang Road Hankuk KROHNE KROHNE Ltd.

Table of Contents