® Use of Modbus Protocol with Passive Sonar Transmitters
Table of Contents 1 TRANSMITTER MODBUS CONFIGURATION OVERVIEW .............................................1-1 1.1 Introduction.................................................................................................................1-1 1.1.1 Passive Sonar Transmitters That Support MODBUS.........................................1-1 1.1.2 Modbus Variants Supported by Transmitter .......................................................1-1 1.2 CONFIGURATION SETTINGS .....................................
20959-01 Rev 02 Page ii
1 TRANSMITTER MODBUS CONFIGURATION OVERVIEW 1.1 Introduction Modbus is an application layer messaging protocol that provides client/server communication between devices connected on different types of buses or networks. Modbus has been industry’s serial de facto standard since 1979 and enables millions of automation devices to communicate. Support for the simple and elegant structure of Modbus continues to grow. Modbus is a request/reply protocol and offers services specified by function codes.
Transmission modes, serial settings and other options are available from the transmitter front panel menu. A configuration setting is available to swap 32 bit values (for example, floating point numbers) for compatibility with Modbus masters that may require it.
1.2 CONFIGURATION SETTINGS 1.2.1 Transmission Modes • RTU (Default) • ASCII 1.2.1.1 RTU In RTU (Remote Terminal Unit) mode, each 8–bit byte in a message contains two 4–bit hexadecimal characters. The main advantage of this mode is that its greater character density allows higher data throughput than ASCII mode for the same baud rate. Each message must be transmitted in a continuous stream of characters. The default parity mode in the transmitter is EVEN parity. 1.2.1.
1.2.2 Serial Communications Settings 1.2.2.1 Configuration • RS-232 • RS-485 (Default) 1.2.2.2 Data Bits • 7 bits • 8 bits (Default) The Data Bits setting should match the Transmission Mode as follows. The ability to set the Data Bits independent of Transmission Mode is to allow for maximum flexibility. • RTU • ASCII 8 Data Bits 7 Data Bits 1.2.2.3 Parity • EVEN (Default) • ODD • NONE 1.2.2.4 Stop Bits • 1 (Default) • 2 1.2.2.
1.2.3 MODBUS Options 1.2.3.1 Device Address Device Address is the address that a Modbus master will use to communicate with the transmitter. • Range: 1 – 247 (Default = 1) 1.2.3.2 ASCII Timeout ASCII Timeout is the amount of time in seconds the transmitter will wait before processing an ASCII Transmission Mode Modbus message before a CR/LF termination. This may be increased to allow for manual entry of an ASCII message on a terminal.
1.3 Transmitter Menus 1.3.1 Serial Settings Only the internal RS-232/RS-485 serial port on the transmitter supports Modbus.
1.3.
2 TRANSMITTER MODBUS REGISTER OVERVIEW 2.1 Introduction The chapter will describe the MODBUS registers available in the transmitter, and how to read and write them. Registers are arranged in groups by format (i.e. float, char) to facilitate reading and writing in blocks, and function (User, Algorithm, Filter etc.). Multiple register values (for example, Floating Point values) by default are arranged to conform to IEEE specifications for Floating Point numbers.
To use all three levels of access, set the Administrator password first, log in as Administrator, then set Level 1, and then Level 2. If any password is set to something other than 0, and others are set to 0, then only the non-zero password will function. If a Level 2 password is first set, you will not be able to log in as an Administrator, but only read holding registers. In some instances this may be a desirable mode.
2.
2.5 Other Registers Coils and Discreet inputs are not used in the transmitter. All configurations are performed with Holding Registers, and measurements read from Input Registers. 2.
3 MODBUS REGISTERS 3.1 Modbus Input Registers Note: Float values may be set to QNAN if transmitter is not configured to generate those values. (QNAN means ‘Quiet Not A Number’, a computing term for an IEEE floating point representation for the result of a numerical operation which cannot return a valid number value.) Table 4 Address Size Type Value Modbus Input Registers Description Notes Flow Rate as it appears on the LCD. Will be set to QNAN when not displayed.
Table 4 Modbus Input Registers (continued) Address Value Description 33 35 37 39 Size Type 2 2 2 2 Float Float Float Float 4-20mA Input 1 4-20mA Input 2 4-20mA Channel 1 4-20mA Channel 2 41 2 Float Sensor Alpha 1 43 2 Float Sensor Alpha 2 45 2 Float Sensor Alpha 3 47 2 Float Sensor Alpha 4 49 2 Float Sensor Alpha 5 51 2 Float Sensor Alpha 6 53 2 Float Sensor Alpha 7 55 2 Float Sensor Alpha 8 Measured analog input 1 in mA. Measured analog input 2 in mA.
Table 4 Modbus Input Registers (continued) Address Size Type Value Description Notes Fractional part of totalizer. Add this number to Total TLF Carry * 100 to calculate full total. 69 2 Float Total TLF Fraction Floating point fraction to be added to 'Total TLF Carry' * 100 to calculate full resolution total TLF.
Table 4 Modbus Input Registers (continued) Address Size Type 1501 1517 1533 16 16 16 String String String 1549 16 String 1565 16 String 1581 16 String 1597 16 String 1613 1629 16 16 String String 1645 16 String 1661 16 String 1677 16 String 1693 16 String 1709 1725 1741 16 16 16 String String String 1757 16 String 1773 16 String 1789 16 String 1805 16 String 20959-01 Rev 02 Value Description Transmitter S/N Model Number Software Revision Alchemy Software Re
Table 4 Modbus Input Registers (continued) Address Size Type 1821 16 String 1837 16 String 1853 16 String 1869 16 String 1885 16 String 1901 16 String 1917 16 String 1933 16 String 2001 4 Double 2005 4 Double 20959-01 Rev 02 Value Description Alchemy Compatibility Revision Alchemy Compatibility Revision.
3.2 Modbus Holding Registers Table 5 Modbus Holding Registers Address Size Type Value Description Values 1 1 Char Password Input Password entry, when passwords are configured. 4 1 Char Write Control Controls ability to write and commit changes to transmitter configuration. 10 11 12 20 21 22 1 1 1 1 1 1 Char Char Char Char Char Char Set Password 0 Set Password 1 Set Password 2 Reset Totalizers Clear Alarm Reset Data History Sets Password 0. Sets Password 1. Sets Password 2.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description SOS_LIQUID_SPEC GRAV_SEL SOS_LIQUID_SOS_ SEL Selects use of pre-defined SOS Specific Gravity or a custom value entered in 'SOS Specific Gravity'. Selects use of pre-defined SOS Liquid Sound Speed or a custom value* entered in 'SOS Liquid Sound Speed' Selects the source of the temperature used in GVF calculations.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Char GVF_DECIMAL_PL ACES SOS_VOL_UNITS Two character string used for display and logging of a custom flow time unit. Sets the number of decimal places used to display GVF on the front panel. Selects units used to display and log SOS.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Values Sensor Head Serial Number. Any Alpha 1042 16 Char SENSORHEAD_SE R_NUMBER 1058 1 Char TOT_UNITS Selects units used to display and log total flow. 1059 1 Char Selects totalizer multiplier. 1060 1 Char Enables or disables totalizer lowcut. 0 = Disable, 1 = Enable 1061 1 Char Selects source of totalizer - VF or TLF. 0 = VF, 1 = TLF 1062 1 Char Selects 4-20mA Channel 1 Out Of Range action.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Values 0 = Use PRIMARY_420_OUT_OF_RANG E setting when output is below/ above lowcut/highcut % (do not rail), 1 = Rail 4-20mA output if metric is below/above lowcut/highcut % for channel 1 0 = Flow Rate, 1 = SOS, 2 = GVF, 3 = Flow Rate %, 4 = Totalizer, 5 = TLF, 6 = Flow Quality, 7 = SOS Quality 0 = 0.5, 1 = 1, 2 = 20, 3 = 33, 4 = 50, 5 = 100 1069 1 Char 420_OVERRANGE_ MODE_02 Selects 4-20mA Channel 2 Overrange rail.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Values Boolean expression used for critical alarm. 0 = Blank, 1 = OR, 2 = AND 1080 1 Char ALARM_CRIT_EXP R_2 1081 1 Char ALARM_CRIT_EXP R_3 Boolean expression used for critical alarm. 2 = Blank, 3 = TMP, 4 = SPL, 5 = VQ, 6 = SQ, 7 = LOG, 8 = OVL, 9 = FAL, 10 = FLW, 11 = GVF 1082 1 Char ALARM_CRIT_EXP R_4 Boolean expression used for critical alarm.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description 1521 2 Float SOS_QUALITY_DEL TA Delta change from SOS minimum quality at minimum SOS (SOS_MIN_QUALITY) to minimum quality at max SOS (SOS_MIN_QUALITY+ SOS_QUALITY_DELTA). 1523 2 Float YELLOW_QUALITY _PERCENT Percentage of VF quality or SOS quality (depending on op mode) below which the display will indicate a 3 level of 'YEL', if configured to display 3 level quality.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Constant offset applied to primary 4-20mA output for calibration purposes. Pulse output multiplier. Define measurement value below which pulse output will not be updated. Min band temperature threshold for warning alarm in degrees C. Max band temperature threshold for warning alarm in degrees C.
Table 5 Modbus Holding Registers (continued) Address Size Type 1589 2 Float 1591 2 Float 1593 1595 2 2 Float Float 1597 2 Float 1599 2 Float 2001 1 Short 2002 1 Short 2003 2004 2005 2006 2007 2008 2009 2010 1 1 1 1 1 1 1 1 Short Short Short Short Short Short Short Short 2501 2 Long 2503 2 Long 2505 2 Long 2507 2509 2 2 Long Long 3001 2 Float 20959-01 Rev 02 Value ALARM_CRIT_VF_ QUAL_< ALARM_CRIT_SOS _QUAL_< ALARM_CRIT_VF_< ALARM_CRIT_VF_> ALARM_CRIT_GVF _< ALARM_C
Table 5 Modbus Holding Registers (continued) Address Size Type 3003 2 Float 3005 2 Float 3007 2 Float 3009 2 Float 3011 2 Float 3013 2 Float 3015 2 Float 3017 2 Float 3019 2 Float 3021 2 Float 3023 2 Float 3025 2 Float 3027 2 Float 3029 2 Float 3031 2 Float 3033 2 Float 3035 2 Float 20959-01 Rev 02 Value VF_LOW_FILTER_D ELTA_ARRAY_02 VF_LOW_FILTER_D ELTA_ARRAY_03 VF_LOW_FILTER_D ELTA_ARRAY_04 VF_LOW_FILTER_D ELTA_ARRAY_05 VF_LOW_FILTER_D ELTA_ARRAY_06
Table 5 Modbus Holding Registers (continued) Address Size Type 3037 2 Float 3039 2 Float 3041 2 Float 3043 2 Float 3045 2 Float 3047 2 Float 3049 2 Float 3051 2 Float 3053 2 Float 3055 2 Float 3057 2 Float 3059 2 Float 3061 2 Float 3063 2 Float 3065 2 Float 3067 2 Float 20959-01 Rev 02 Value VF_LOW_FILTER_T AU_ARRAY_09 VF_LOW_FILTER_T AU_ARRAY_10 VF_HIGH_FILTER_ DELTA_ARRAY_01 VF_HIGH_FILTER_ DELTA_ARRAY_02 VF_HIGH_FILTER_ DELTA_ARRAY_03 VF_HIGH_FILTER_ D
Table 5 Modbus Holding Registers (continued) Address Size Type 3069 2 Float 3071 2 Float 3073 2 Float 3075 2 Float 3077 2 Float 3079 2 Float 3081 2 Float 3083 2 Float 3085 2 Float 3087 2 Float 3089 2 Float 3091 2 Float 3093 2 Float 3095 2 Float 3097 2 Float 3099 2 Float 3101 2 Float 20959-01 Rev 02 Value VF_HIGH_FILTER_ TAU_ARRAY_05 VF_HIGH_FILTER_ TAU_ARRAY_06 VF_HIGH_FILTER_ TAU_ARRAY_07 VF_HIGH_FILTER_ TAU_ARRAY_08 VF_HIGH_FILTER_ TAU_ARRAY_09 VF_HI
Table 5 Modbus Holding Registers (continued) Address Size Type 3103 2 Float 3105 2 Float 3107 2 Float 3109 2 Float 3111 2 Float 3113 2 Float 3115 2 Float 3117 2 Float 3119 2 Float 3121 2 Float 3123 2 Float 3125 2 Float 3127 2 Float 3129 2 Float 3131 2 Float 3133 2 Float 20959-01 Rev 02 Value GVF_LOW_FILTER_ DELTA_ARRAY_10 GVF_LOW_FILTER_ TAU_ARRAY_01 GVF_LOW_FILTER_ TAU_ARRAY_02 GVF_LOW_FILTER_ TAU_ARRAY_03 GVF_LOW_FILTER_ TAU_ARRAY_04 GVF_LOW_FILTER_ TAU
Table 5 Modbus Holding Registers (continued) Address Size Type 3135 2 Float 3137 2 Float 3139 2 Float 3141 2 Float 3143 2 Float 3145 2 Float 3147 2 Float 3149 2 Float 3151 2 Float 3153 2 Float 3155 2 Float 3157 2 Float 3159 2 Float 3161 2 Float 3163 2 Float 3165 2 Float 20959-01 Rev 02 Value GVF_HIGH_FILTER _DELTA_ARRAY_06 GVF_HIGH_FILTER _DELTA_ARRAY_07 GVF_HIGH_FILTER _DELTA_ARRAY_08 GVF_HIGH_FILTER _DELTA_ARRAY_09 GVF_HIGH_FILTER _DELTA_ARRAY_10 GVF_HI
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Defines delta of the previous measurement over the range below which the flow rate is deemed valid. Damping time in seconds for the damping filter for Sensor 1 input. Damping time in seconds for the damping filter for Sensor 2 input.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description VF_SPIKE_PCT_WI NDOW_LEN GVF_NR_FILTER_E NABLE GVF_LOW_FILTER_ ARRAY_LEN GVF_HIGH_FILTER _ARRAY_LEN GVF_1ST_ORDER_ DAMPING_FILTER_ ENABLE GVF_SPIKE_FILTE R_ENABLE GVF_SPIKE_NO_FL OW_LEN GVF_SPIKE_FILTE R_LEN Number of good measures before VF spike filter passes measurements as ‘good’.
Table 5 Modbus Holding Registers (continued) Address Size Type Value 4009 2 Float SOS_SPECIFIC_GR AVITY 4011 2 Float SOS_LIQUID_SOS 4013 2 Float 4015 2 Float 4017 2 Float SOS_TEMPERATU RE 4019 2 Float SOS_PRESSURE 4021 2 Float GAIN SOS_SPECFIC_HE AT_RATIO SOS_LIQUID_DENS ITY 4023 2 Float SPL_THRESHOLD 4025 2 Float SPL_AVG 4027 2 Float SPL_STD_DEV 4029 2 Float SAMPLE_FREQ 4031 2 Float CHANNEL_SKEW 4033 2 20959-01 Rev 02 Float FREQ_MIN Description Valu
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description Set maximum frequency for k-w processing. Normally set by DSP. User modified if using single or fixed modes or auto mode with VF_OP_MODE_SETTINGS set to 1 (FIXED_FREQUENCY). Go to Idle mode, then set this parameter, then select single/fixed.
Table 5 Modbus Holding Registers (continued) Address 4055 4057 4059 Size 2 2 2 Type Value Description Values Float SOS_SAMPLE_FRE Q Set sample frequency for SOS mode. This parameter must be set for SOS and overrides the SAMPLE_FREQ setting if running in SOS mode. Enter one of the following: 3906.25 or 2055.921. 3906.25or 2055.921 SOS_FREQ_MIN Minimum frequency to use for SOS calculation. Typically in the 100 to 500hz range. Depends upon the data quality as seen on the k-w plot.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description 4071 2 Float SOS_K_MIN This value sets the lower limit in k-space that is used in the SOS auto frequency determination code. This value is equal to the first k-space bin after 0: PI/deltaX/50 (there are 50 bins from 0 to PI/deltaX). 4073 2 Float SOS_K_MAX This value sets the upper limit in k-space that is used in the SOS auto frequency determination code. This value is equal to the last k-space bin: PI/deltaX.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description 4101 4103 4105 4107 4109 2 2 2 2 2 Float Float Float Float Float SENSOR_SCALE_4 SENSOR_SCALE_5 SENSOR_SCALE_6 SENSOR_SCALE_7 SENSOR_SCALE_8 4501 2 Long OP_MODE Scaling factor in volts per PSI for sensor 4. Scaling factor in volts per PSI for sensor 5. Scaling factor in volts per PSI for sensor 6. Scaling factor in volts per PSI for sensor 7. Scaling factor in volts per PSI for sensor 8.
Table 5 Modbus Holding Registers (continued) Address Size Type Value 4519 2 Long TRANSIT_TIME_MU LT 4521 2 Long VF_PEAK_SEARCH _MODE VF_OP_MODE_SET TINGS 4523 2 Long 4525 2 Long 4527 2 Long VF_QUALITY_MOD E NUM_BLOCKS 4529 2 Long NFFT 4531 2 Long WINDOW_OVERLA P Description Default values are normally OK. Define target number of passes through array per calculation for volumetric flow. Use with caution.
Table 5 Modbus Holding Registers (continued) Address Size Type Value Description 4541 2 Long 4543 2 Long SOS_SUB_ARRAYS SOS_NORMALIZE_ FLAG SOS Sub Array Size 0 = NO normalization in the frequency domain. 1 = normalization in the frequency domain. 4545 2 Long SOS_DIFFERENCIN G_FLAG 0 = NO differencing in the frequency domain. 1 = 1st order differencing in the frequency domain. 2 = 2nd order differencing in the frequency domain.
Table 5 Modbus Holding Registers (continued) Address Size Type Value 4563 2 Long AGC_PERCENT_TH RESHOLD_LOW 4565 2 Long AGC_SAMPLE_WIN DOW 4567 2 Long AGC_RUN_MODE 5001 2 Float Pressure Input External pressure measurement input. 5003 2 Float Temperature Input External temperature measurement input. 5005 2 Float External Input 1 External Input 1. 5007 2 Float External Input 2 External Input 2. 5009 2 Float External Input 3 External Input 3.