KROHNE MFC-010C User Manual

4 (2)
KROHNE MFC-010C User Manual

OPTIMASS MFC 010 Converter

For both OPTIMASS and OPTIGAS flowmeters

For direct measurement of mass flow rate, density and product temperature

MODBUS protocol

Software version 2.3.x

Contents

1.

Introduction

5

2.

Mechanical Installation

5

3.

Electrical Installation

6

3.1

Electrical Input Specifications for the MFC010

6

3.2

Recommended Cable Specification

7

3.3

Connection to the MFC010

8

3.4

Connection to the Modbus Bus

10

3.5

Installation Guidelines for Electromagnetic Compatibility

12

4.

Installation in Hazardous Area Applications

13

4.1

Power Supply Barrier Devices

15

4.2

Modbus Barrier Devices

16

4.3

Connection To The Modbus Bus

17

5.

Modbus Protocol Interface

19

5.1

Character Transmission Format

19

5.2

Modbus Telegram Format

20

5.3

Data Types in Modbus

20

5.4

Multidrop Operation

21

5.5

Calculating Data Transmission Rates

21

5.6

Error Messages in Modbus

22

6.

Modbus Functions Supported by the MFC010

23

6.1

01 (0116): Read Coil Status

23

6.2

02 (0216): Read Discrete Input

24

6.3

03 (0316): Read Holding Registers

25

6.4

04 (0416): Read Input Registers

26

6.5

05 (0516): Force Single Coil

27

6.6

06 (0616): Preset Single Register

28

6.7

07 (0716): Read Exception Status

29

6.8

08 (0816): Diagnostics

30

6.9

11 (0B16): Fetch Comm. Event Counter

30

6.10

16 (1016): Preset Multiple Registers

31

6.11 17 (1116): Report Slave ID

32

7.

MFC010 Modbus Data Model

33

7.1

MFC010 Register Structure

33

7.2

Discrete Status Output “Coil” Registers

39

7.3

Discrete Input (Binary) Status Registers

41

7.4

Input Registers

43

7.5

Holding Registers

49

8.

MFC010 Operations

71

8.1

Mass Flow Zero Calibration

71

8.2

Density Calibration

72

8.3

Fixed and Referred Density Operation

75

8.4

Concentration Measurement

76

8.5

Using the System Protection Passwords

76

8.6

Saving and Restoring Configuration settings

77

8.7

Implementing User Defined Units

77

8.8

Using the Internal Process Control Mechanism

78

8.9

Custody Transfer Applications

78

8.10

Pressure Suppression

79

 

 

 

 

MFC010 Interface Manual

1

9.

Error and Warning Messages

81

9.1

System Errors

81

9.2

Process Warnings

85

10.

Trouble Shooting

88

10.1

“No Response to Modbus Requests”

88

10.2

“Communication Errors”

88

10.3

“The MFC010 is responding with an Illegal Modbus Function Message”

89

10.4

“The MFC010 is responding with an Illegal Data Message”

89

10.5

“The MFC010 is responding with an Illegal Address Message”

89

Appendix A : Modbus CRC Checksum Calculation

90

Appendix B : Hexadecimal and Binary Notation

92

Appendix C : Decoding Floating Point Numbers

93

Single Precision Floating Point Numbers (“Floats”)

93

Double Precision Floating Point Numbers (“Doubles”)

94

Appendix D : Sensor Sizes and Associated Default Register Settings

95

Appendix E : Installation of Power Supplies in MFC010 Applications

97

Appendix F: MFC010 Toolbox

100

2

MFC010 Interface Manual

Product Liability and Warranty

The MFC010 mass flow sensor electronics arean integral part of theOPTIMASS and OPTIGAS mass flowmeter families designed for the direct measurement of mass flow rate, product density and product

temperature, and also indirectly enables the measurement of par ameters s uch as m ass t otal, concentration and volume flow.

When used in hazardous areas, special codes and r egulations are applicable which are specified in the section on H azardous ar ea appl ications i n t his doc umentPlease. not e t hat haz ardous area approved meters must ALWAYS be c onnected using appropriate barriers, even when used outside the hazardous area, else the approval is void.

Responsibility as to suitability and intended use of the equipment rests solely with the purchaser. KROHNE does not accept any liability resulting from misuse of the equipment by the customer.

Improper installation and operation of the flow meters may lead to loss of warranty. Warranty is also null and void if the instrument is damaged or interfered with in any way.

In addi tion, t he “ General C onditions of S ale”, w hich f orm t he bas is of t he pur chase agr eement, are applicable.

If you need to return OPTIGAS or OPTIMASS flow meters to KROHNE, please complete the form on the

last page of the Sensor manual and return it with the meter to be repaired. KROHNE regrets that it cannot repair or check returned equipment unless accompanied by the completed form.

Standards and Approvals

The M FC010 c onverter i s t ested and c ertified, w hen i nstalled according to the directions contained i n t his doc ument, t o m eet al l heof rtequirements of t he E-EMCU a nd PED directives and hence bears the CE symbol.

The MFC010 converter in association with the OPTIGAS and O PTIMASS sensor systems is

 

approved f or oper ation

i n H azardous

ar ea i nstallations

according

to

the

harmonized

European Standards (ATEX).

 

 

 

 

 

 

 

 

Approvals for

Hazardous

area

i nstallations

c ompliant w ith t he

F M and C

SA

standards are pending.

 

 

 

 

 

 

 

 

Copies of all of the certificates of conformity

f or

t he appr ovals

l isted

abov e ar e

av ailable

f rom

t he

download centre of the KROHNE website at www.krohne.com.

 

 

 

 

 

 

THE CONTENT OF THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT PRIOR NOTICE.

MFC010 Interface Manual

3

4

MFC010 Interface Manual

1.

Introduction

 

 

 

 

 

 

The

MFC010 is a

s tand al one s ignal c onverter des igned t o

di rectly

i nterface

t he O PTIMASS and

OPTIGAS f amilies of

C oriolis m ass f lowmeters into c ontrol s ystems us ing t he M odbus R TU

protocol

where t here i s no r equirement f or t he ex tensive out put c ontrol

features

provided

by more

expensive

converter solutions.

 

 

 

 

 

 

The MFC010 performs three primary direct measurements, Mass flow, Density and Temperature. Using these primary measurements the MFC010 is able t o c alculate an ar ray of s econdary v alues s uch as Volume Flow, Velocity and Concentration.

Mass Flow – Mass flow measurement doesn’t come any simpler, once installed just perform a “ Zero Calibration”, “ Reset” t he “ Totalisers” and aw ay y ou go. W here P rocess noi se i s a nui sance use the “Measurement T ime C onstant”, “ Low F low T hreshold” and “ Pressure S uppression” features to provide reliable and repeatable results.

Density – Using the inverse relationship between the Density of the process product and the oscillation

frequency of the measuring tube, the MFC010 can provide a very accurate and reliable Density reading.

 

In or der t o m aximise

t he

ex cellent

per formance theo MFC010 the user s hould per form a dens

ity

calibration after installation.

T he MFC010 provides two forms of Density Calibration, the simple “Single

Point Calibration” and t he more accurate “Two Point Calibration”. U sing the “Density Averaging” featur

 

the user can reduce noisy readings caused by process installation and noise. NB. Density measurement

 

is not available with the OPTIGAS 5000 meters.

 

Concentration – Using

the

“Density”

and “Temperature” m easurements t he M FC010 i s c apable

of

calculating the concentration of a pr oduct in the process medium, from one of a num ber of pre-defined

industry standards, such

as °Brix”“

a nd °Baumé”,“ as w ell as us er def ined m ixtures us ing

t he

programmable coefficients.

Concentration measurement is a f unction that comes with a c omprehensive

 

manual and a Coefficient calculation software package which will take the users own process data and convert it into compatible coefficients to permit the MFC010 to automatically calculate the concentrationof the target process.

Velocity – Using the measured mass flow and density, the velocity of the product is calculated using the “Pipe Diameter” setting. By default this is set to the measuring tube internal diameter to calculate the velocity of the product passing through the sensor, but it can be set to calculate the velocity in a section of

the connecting pipe work.

Process Control – Where precise process conditions are required, the “Process Control” functioncan be

used t o det ect adv erse v ariations i n t he

“ Density”

or “ Temperature” m easurements and,

as well as

indicating the condition, it can take one

of a num

ber of pr edefined ac tions ac cording

t o t he us ers

requirements.

 

 

 

2.Mechanical Installation

Refer t o t he i nstallation gui delines and i nstructions f or m ounting t he s ensor i n t he process pipe work provided in the handbook on the CD supplied with the sensor.

MFC010 Interface Manual

5

3.Electrical Installation

The MFC010 is provided with four electrical terminal connections.

V+

The power supply input terminal.

V- The power supply return path and “Common” for the Modbus interface.

AThe inverting (RS485-) terminal for the Modbus interface.

B The non-inverting (RS485+) terminal for the Modbus interface.

These terminals can be accessed in the terminal compartment of the sensor.

3.1Electrical Input Specifications for the MFC010

NB all voltages, unless otherwise stated, are with reference to the “V-” terminal.

V+ Terminal

 

Min. Input Voltage

11.4V DC

Max. Input Voltage

12.6V DC

Max. Input Current

200mA DC

A & B *

 

Min. Input Voltage

-7V DC

Max. Input Voltage

+11.8V DC

Min. Output Voltage

-6V DC

Max. Output Voltage

+6V DC

*The M odbus pr otocol r equires t hat t he c ommunications i nterface t o t he MFC010 complies with the limitations of the EIA/TIA-485 (RS485) specification.

For a standard, non hazardous area, sensor the input impedance of the MFC010 is equivalent to 1/8 of a standard RS485 load, i.e. an input impedanceof >96kΩ, permitting it to be connected to the Modbus bus in accordance with the Modbus requirements. However, when installed in a Hazardous area the MFC010 requires that suitable barrier devices must be fittedbetween the MFC010 and the Modbus main bus, see

sections 4.1 & 4.2 for details of suggested barrier devices and c onnection. I f the main Modbus Bus is configured f or m ultidrop oper ation, a M odbus c ompatible R S485 r epeater i s r equired to connect the barrier devices to the bus, see section 4.3 for further details.

6

MFC010 Interface Manual

3.2

Recommended Cable Specification

 

 

 

 

The c able us ed t o c onnect t he M FC010 t o t he M odbus m aster c ontrol s ystem

should be an

 

overall

screened t wisted pai r c able, with t wo t wisted pai rs of a m inimum 20

AWG conductor. The total

cable

capacitance s hould not ex ceed 50nF and t he c onductor inductance

should not

exceed H200μ.The

external cable insulation should be specified appropriately for the environment into which the device is to be installed. The outside diameter of the cable should be between 6.5 mm and 9.5 mm to ensure proper sealing is achieved when passed through the cable gland entry.

KROHNE can supply suitable cable that can be or dered to the required length, the part numbers are as follows

External Insulation Colour Grey

- KROHNE Part No.

X5871059989

External Insulation Colour Blue

- KROHNE Part No.

X5871069989

(For hazardous area installations)

 

 

The maximum cable length from the MFC010 to the bus “Master” device is 300m when using the default Modbus transmission speed of 19200 Baud. There are further limitations on the cable length when installing the system into a Hazardous area, refer to section 4.3 on page 17 for details.

MFC010 Interface Manual

7

3.3Connection to the MFC010

1.Unscrew the fixing screw on the junction box cover.

2.Release the two fixing screws holding the cable grip in place and remove the grip.

3.Strip approx. 50mm/2” of the outer casing of the signal cable.

4.Split the screen away from the cores and fold it back on the outer cable.

5.Fit the cable grip and secure, making sure that the screen is gripped under the grip.

6.Connect the four cores to the terminals marked A,B, 12V, - as shown

NOTE: The spring loaded connections are released by depressing the white lever above each connection

1 Cable Gland

2 Cable Grip/Earth

3 Terminal connections

4 Jumper for EOL resistor (not supplied) – off in position as shown, on in other position

Terminal

Input Connection

12V

V+

-

V-

A

A (RS485-)

B

B (RS485+)

8

MFC010 Interface Manual

MFC010 Interface Manual

9

3.4Connection to the Modbus Bus

The MFC010 is designed to be connected as a Slave device onto the 2-wire bus implementation of the Modbus physical layer definition. In this configuration the receiver and transmitter lines for each device are connected together, Transmitter A to Receiver A and T ransmitter B to Receiver B, and operated in Half Duplex mode, where the master transmits a request and only after receiving it does the nominated slave device transmit a reply. When not responding to a direct request from the Master device, the Slave devices remain passive, monitoring the bus and aw aiting a suitable request from theasterM device. In addition to the A and B signal lines the bus MUST include a “Common” signal line to act as a ground reference point for the A and B signals.

The m aster bus m ust be t erminated at i ts phy sical end poi nts by suitable termination networks

connected between the A (D0) and B (D1) signal lines. When not using bus-biasing resistors, see next paragraph, each termination network may consist of a single 150 O hm, 0.5W resistor. H owever, when bus-biasing resistors are required, a more suitable termination network would consist of a 1nF capacitor in series with a 120 Ohm, 0.25W resistor. NB It is common that the Host system “Master” is physically at one end of the bus, so one of the termination resistors is fitted at its terminals, but it should be r ealised that this is not always the case and care should be taken to ensure that the termination network is at the physical end of the bus. In a point-to-point configuration, when only one Slave device is fitted to the bus, then the terminating networks can simply be situated at the connecting terminals of the master and slave devices.

Some slave devices require that Bus-Biasing resistors are fitted to ensure that the bus is in a defined

state w hen none of t he t ransmitting devices are activeThe. MFC010

does NOT require Bus-Biasing

resistors to be f itted but is compatible with their presence on t he bus

if one or

more of the other slave

devices on the busrequire them to be fitted, as long as they

comply

with the Line

Polarization

requirements of the Modbus specification.

 

 

 

In a m ultidrop bus c onfiguration t he s lave devices ar e c onnected t o t he m ain bus c able by

branch

connections at intervals along the length of the main bus. T he branch connections, Derivations as they are termed in the Modbusspecification, must be less than 20m in length from the main bus cable to the slave device. Some slave devices permit direct connection to the main bus, known as “Daisy Chaining”,

in some

cases by providing

extra terminals and c able ac cess poi nts. H owever, as i ndicated i n t he

previous

s ections, ac cess t o

t he t erminal c ompartment

of t he M FC010limited;s

therefore i t i s not

practical to directly connect the MFC010 to the main bus.

Instead, the installation should utilise a short

branch c onnection. I f agreater length of cable is required between the MFC010 device and the main Modbus bus, the user should install a suitable RS485 repeater between the MFC010 and the bus (refer to the diagram below).

10 MFC010 Interface Manual

Because the connection to the bus requires exposingthe signal wires, the connection to the main bus should be made within a suitable EMI shielded enclosure. This connection should include the “Common” signal connection, the power supply connection (if a suitable one is provided by the bus), and the drain wire when available. Each of the cable screens must be properly terminated to the enclosure by means of appropriate EMC cable glands. For example:

If the Bus does not provide a s uitable power supply for the MFC010, a separate suitable power supply connection should be made at this point.

An RS485 Repeater can be used to extend the length of the Bus and the number of slave devices that are attached t o t he bus ( refer t o t he f igure bel ow). H owever, if the bus is extended in such a fashion, termination and polarization networks should be fitted according to the same rules as used for the main

bus (see descriptions above).

MFC010 Interface Manual

11

NB For H azardous A rea appl ications t he us er s hould r efer t o s ection4.3, on page 17, f or c onnection details.

NB For multidrop systems, ensure cycle times are properly calculated to ensure bus speeds are adequate for the application.

3.5Installation Guidelines for Electromagnetic Compatibility

Whilst t he M FC010 and i ts as sociated s ensor has been des igned, t ested and c ertified t o m eet the requirements on international s tandards of E lectromagnetic C ompatibility ( EMC), i t i s t he us ers responsibility to ensure that the connection guidelines described in this document are followed. In addition

the user should use recognised good practise in the location and cable routing of the MFC010 in relation to its surrounding environment. The user should consider the following suggestions when installing an MFC010 into a system.

1.Every effort should be made to avoid significant lengths (>50mm) of unshielded signal wire when connecting to the system, any terminal connections should be housed in a suitably shielded enclosure.

2.Avoid routing the cable in groups with or alongside other power carrying cables.

3. Avoid locating the MFC010 or routing the connection cable in close proximity to large electrically powered equipment, such as pumps, inverters etc.

4.If necessary, route the connection cable through a suitably earthed metal conduit.

12

MFC010 Interface Manual

4.Installation in Hazardous Area Applications

Before installation the user MUST ENSURE that the equipment to be installed is theardousHaz ar ea approved equipment.

Copies of the appropriate certificates can be found on the KROHNE website at www.krohne.com.

Before installation the user MUST refer to the hazardous areainstallation document, supplied with this equipment, and strictly adhere to the relevant installation instructions indicated therein.

When the MFC010 is used in Hazardous area installations, suitable barrier devicesMUST be fitted. The Safety Parameters for the MFC010 are as follows. All interface and barrier devices must be appropriately certified to meet these parameters.

ATEX

 

 

V+ & V-

Input Voltage, Ui

16.5V

 

Input Current, I i

340mA

 

Input Power, Pi

1.3W

 

Input Capacitance, Ci

35nF

 

Input Inductance, Li

10µH

A & B

Input Voltage, Ui

11.8V

 

Input Current, I i

40mA

 

Input Power, Pi

120mW

 

Input Capacitance, Ci

35nF

 

Input Inductance, Li

10µH

FM

 

 

V+ & V-

Input Voltage, Ui

16.2V

 

Input Current, I i

317mA

 

Input Power, Pi

1.28W

 

Input Capacitance, Ci

35nF

 

Input Inductance, Li

10µH

A & B

Input Voltage, Ui

11.8V

 

Input Current, I i

34mA

 

Input Power, Pi

90mW

 

Input Capacitance, Ci

35nF

 

Input Inductance, Li

10µH

MFC010 Interface Manual

13

The output safety par ameters of t he bar rier dev ices m ust not

exceed t he V oltage, P ower and C urrent

limits set out above. T he output Capacitance parameter for the

barrier devices must ceedex the sum of

the M FC010 i nput C apacitance, s pecified abov e, and t he m aximum c able

Capacitance.

The output

Inductance par ameter f or t he bar rier dev ices m ust ex ceed t he sum of the

MFC010 input

Inductance,

specified above, and maximum cable Inductance. To summarise:

 

 

Uo

Barrier

<

Ui

MFC010

 

 

Io

Barrier

<

Ii

MFC010

 

 

Po

Barrier

<

Pi

MFC010

 

 

Co

Barrier

>

Ccable + Ci

MFC010

 

 

Lo

Barrier

>

Lcable + Li

MFC010

 

 

NB The In-line resistance of the Modbus barrierMUST NOT EXCEED 1000 Ohms for each of the A and B Input terminals.

The Zener barrier devices must be i nstalled in an E MI shielded enclosure and t he cable screen(s) kept intact right up to the barrier terminals as far as is practical. The cable screen(s) should be terminated to the enclosure, chassis Earth connection, and SEPARATEkept from t he i ntrinsically s afe E arth connections of the Barrier devices. The userMUST adhere to the barrier manufacturer’s instructions for connecting the intrinsically safe Earth connection to the barrier devices.

14

MFC010 Interface Manual

4.1Power Supply Barrier Devices

The following Zener Barrier devices are those that are recommended for use on the V+ & V- power supply input connections to the MFC010.

Manufacturer :

Bartec

Part Number

:

17-1834-1000/3715

Ex Approvals :

EEx ia/ib IIC

Connection

:

 

Manufacturer :

Pepperl & Fuchs

Part Number

:

Z765

Ex Approvals :

EEx ia IIC

 

 

FM and CSA Approved

Connection

:

 

Note: For Optimass 2000 the supply voltage to the barrier should be +14V to ensure maximum voltage is supplied to the meter.

MFC010 Interface Manual

15

4.2Modbus Barrier Devices

The following Zener Barrier devices are those that are recommended for use onthe A & B Modbus input connections to t he MFC010. W hen s pecifying al ternate dev ices t he us er m ust ens ure t hat t he i n-line resistance of t he M odbus bar rieDOESr NOT EXCEED 1000 O hms f or eac h of t he A and B I nput terminals.

Manufacturer :

Bartec

Part Number

:

17-1834-4000/0031

Ex Approvals :

EEx ia/ib IIC

Connection

:

 

Manufacturer :

Pepperl & Fuchs

Part Number

:

Z764

Ex Approvals :

EEx ia IIC

 

 

FM and CSA Approved

Connection

:

 

16

MFC010 Interface Manual

4.3Connection To The Modbus Bus

When installed in hazardous area application the MFC010 i nterface i s not di rectly c ompatible with t he Modbus interface standard due to the presence of the required Zener Barrier devices.

In a poi nt-to-point configuration, when the MFC010 is the only device on the bus, the cable length from the barriers to the “Master” host system must not exceed 10m in length. If a greater distance is required,

the us e of a s uitable R S485

repeateris recommended, in which case the repeater connection to the

Zener B arrier dev ices s hould

not ex ceed 10m i n l ength. T he m aximum c able l ength bet ween t he

Repeater and the “Master” host system is determined by the operating limits of those two devices. T he cable length from the Modbus barrier device to the MFC010 must be less than 300m i.e.

Where the distance from the barrier device to the MFC010 is less than 10m, two barrier devices may be connected in parallel to the “Master” host system, or the repeater if one is being used, refer to the diagram below. The overall cable length from the Host/repeater to the barrier devices must still be less than 10m as described previously. If more than two devices are required to be connected then a dedicated repeater should be used for each.

Each MFC010 MUST have its own dedicated barrierinterface; they MUST NOT be connected in parallel on the hazardous area side of the system.

MFC010 Interface Manual

17

In a multidrop installation, see figure below, the Zener Barrier devices must be connected to the bus using

a suitable RS485 repeater, with the connecting cable between the Barrier devices and t he repeater not exceeding 10m. The connection of the repeater to the Modbus bus must then follow the rules and restrictions of the Modbus protocol as indicated previously in section 3.4.

18

MFC010 Interface Manual

5.Modbus Protocol Interface

The interface to the MFC010 is implemented in the Modbus RTU communications protocol, and i s done so in accordance with the specification and requirements of theModbus“ Protocol Reference Guide” (PI- MBUS-300 R ev J). The physical el ectrical par ameters of t he Modbus s pecification ar e def ined by t he EIA/TIA-485 (RS485) standard and t he “ Modbus ov er S erial Li-neSpecification and I mplementation Guide V1.0” interface definition.

In a serial communications system such as the Modbus protocol, data is transmitted as a series of voltage levels along the connecting data wires. A “bit”, or binary digit, value is determinedtheby logical level (high or low) of the connecting interface over a set time period. The time period for each bit is determined by the transmission speed, known as the baud rate. For a baud r ate of 9600, the bit period is 1/9600 = 104.2 microseconds. T he MFC010 supports Baud rates of 1200, 2400,4800, 9600, 19200, 38400 and 57600 baud (see the Baud rate setting in Holding Register No. 1005). The higher transmission speeds require careful attention to the cable installation in order to function reliably and error free (see Section 3.2 on page 7 for installation details).

5.1Character Transmission Format

Data is transmitted in sets of 8 bit data blocks, known as “Bytes” or “Characters”. Each character i s preceded and followed by framing bits that permit the correct detection of the transmitted character. The first “Bit” transmitted will be the “Start” bit, this permits the receiving device to detect that a character is being transmitted. The “Start” bit is then followed by the 8-bit data byte. A “Parity” bit may then follow the 8-bit character. T his “Parity” bit is optional (see the Transmission format setting in Holding Register No. 1004), it allows the system to validate the contents of the-bit8 data byte to ensure that no er rors have

occurred during transmission. Following the “Parity” bit is the “Stop” bit that indicates the end of the transmitted character to the receiving device. If no parity bit is used, two stop bits must be implemented,

this ensures a consistent character length of 11 bits is maintained.

The 8 dat a bits are annotated from bit 0 ( the least significant bit, LSB) to bit 7 ( the most significant bit, MSB). The character is transmitted “MSB first”, i.e. the first bit after the start bit, is bit 7 of the data byte. See appendix B for more details on binary coding.

MFC010 Interface Manual

19

5.2 Modbus Telegram Format

The messages between the Modbus master and slave devices are transmitted as groups of characters,

as des cribed abov e, c ollectively k nown as t elegrams.

E ach t elegram i s preceded and followed by a

“Quiet” period on t he Modbus bus of 3½ character periods.

T he “Quiet” period following the telegram is

used to indicate the end of the telegram.

 

The first character received in the telegram identifies the slave device to which or from which the telegram is bei ng t ransmitted. T his f irst c haracter i s k nown as t he S lave I D or S lave A.ddressIn multidrop configurations (see Section 5.4 below) this address character is used by the master device to individually communicate with one of the instruments on the bus connection. The Slave device returns this value to indicate to the master the source of the response telegram. The Slave Address value for the MFC010 can be set using Holding register No. 1006 (see Section 7.5).

The second character received in the telegram is the functioncommand code requested by the master device. A list of the function codes supported by the MFC010 can be found in Section6 (See Page 23) along with a description of each.

The last two characters received form a 16-bit checksum value. This checksum value is used to ensure

that t he dat a r eceived i n t he t elegram has not been c orrupted. T he c hecksum i s calculated and appended to the telegram by the transmitting device (Slave or Master) and the receiving device compares

the received checksum value against the value it calculates from the received data. If the data has been corrupted in some way during transmission, then the checksum calculated by the receiving device will be different than that which it received with the telegram. The receiving device will then ignore the telegram knowing t hat t he dat a w ithin i s unr eliable. S ee A ppendix A for information on the Modbus Checksum calculation.

Between the function code character and t he CRC checksumat the end of the telegram is the telegram data. The contents and format of these data characters is dependant upon the function code requested.

5.3Data Types in Modbus

There are two data types used to transmit information on a Modbus data bus, the “Bit” and the “Register”. The “Bit” represents a single binary state, whether as an output or an input condition. The “Register” is a 16-bit integer transmitted as two 8-bit characters. U sing multiple “Registers” the Modbus interface can transmit higher accuracy values such as “Floating Point” and “Double Precision Floating Point” numbers.

“Bit” variables are packed into 8 bit bytes, so each character sent or received can contain up t o 8 “ Bit” variables. The Master and Slave devices use only as many 8 bit data characters as are required to transmit the information. Any unused bits in the data characters are ignored. The bit that is first indexed

by the Master request address is transmitted in the LSB, Bit 0, of the first data character. The next “Bit” value i s t ransmitted i n t he nex t bi t, B it 1, of t he f irst dat a c haracter. T his c ontinues until the last bit location, Bit 7, of the first data character is used. The next “Bit” value is then transmitted in the LSB, Bit 0,

of the following data character, this continues until all of the requested values have been transmitted. Any unused bit locations in the last data character are filled out with “0”s

For simple single register variables the Most Significant Character of the register is transmitted first, with the Least Significant character following immediately after. H owever, for variables that require multiple registers, i.e. the “Floating Point” and “Double Precision Floating Point” variables, the transmission order is a little more complicated. i.e.

20

MFC010 Interface Manual

 

 

 

Single 16 Bit Register Variables, Data Transmission Order

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Byte 1, MS Byte

 

 

 

 

Byte 0, LS Byte

 

 

 

 

 

 

Long Integer & Floating Point Variables, Data Transmission Order

 

 

 

 

 

Byte 1

 

Byte 0, LS Byte

 

Byte 3, MS Byte

 

Byte 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Requested Register

 

 

 

 

Requested Register + 1

 

 

 

 

 

 

Double Precision Floating Point Variables, Data Transmission Order

 

 

 

 

1

 

0

 

3

 

2

 

5

4

 

7

 

6

 

 

 

Requested Register

 

Register + 1

 

Register + 2

 

Register + 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5.4

Multidrop Operation

 

 

 

 

 

 

 

 

 

 

 

 

A “Master” device, s uch as a P C or

P LC, c an be us ed t o

control and i nterrogate a num ber of “ Slave”

devices, such as an MFC010, connected to the Modbus bus in a “Multidrop” configuration. The “Master”

device always initiates the communication interchange with the “Slave” devices, each of which waits for

instructions

or requests from

the

“Master”

before transmitting dat a on t

he bus

i n r esponse t o t he

instruction. Although the Modbus specification allows for up to 247 “Slave” devices to be physically connected to the bus at any time, the Master device can only request information from one “Slave” device

at a time. A unique ID number or “Address” is allocated to each of the “Slave” devices to allow the “Master” to differentiate between them. Although it does not matter in which order the “Slave” devices are interrogated, the “Master” must wait for the response, or for a suitable period after the request, before making a request to any other of the slave devices on the bus.

Under some limited conditions, i.e. when the instruction to the “Slave” device does not require a detailed response, the “Master” device can send a “Broadcast” command, indicated by a “Slave” ID Address of “0”, to all of the slave devices simultaneously.

5.5Calculating Data Transmission Rates

Careful attention should be made to ensuring that the bus installation can support the amount and rate of data t ransmission r equired. C onsideration of t he l imitations of the physical installation, as previously described, s hould not be i gnored. T he m aximum us able t ransmission s peed, baud r ate, w ill depend entirely upon the installation.

The transmission format also needs to be carefully considered. In the Modbus standard, each transmitted character is 11 bi ts long, depending upon t he setting of the transmission format. A t the Modbus default transmission speed of 19200 baud, each character will have a transmission period of 573 microseconds.

For a simple data transfer of one Input value (see section6.4 on page 26 for details) between the master and slave will require an 8 character (+ 2 x 3½character “Quiet” periods) telegram in the request from the master, and a 9 character (+ 2 x 3½ character “Quiet” periods) telegram in the response from the slave. If the Slave responds immediately the cycle from the Master sending the request to receiving the response will be at least 31 characters long, or 17.8 milliseconds at 19200 baud. T herefore the maximum rate of data requests that could be made is 56 every second.

In m ost c ases f ar m ore dat a wbeill required, and i n m ultidrop s ystems t he m aster dev ice m ay be requesting data from up to 64 units. In these circumstances the user must ensure that there is sufficient time i nterval bet ween r equests f or t he m easured values t o be received without overlapping the Master request telegram with the previous slave reply telegram.

To achieve the required update rates the user may have to consider whether, in a multidrop configuration, the number of devices on a bus must be l imited or whether the cable installation will support one of the higher data transmission speeds which are available.

This is especially important where fast response is required (such as batch filling operations).

MFC010 Interface Manual

21

5.6Error Messages in Modbus

When t he M FC010

det ects anerror i n t he r equest r eceived i n a pr operly f ormatted t elegram, i t w ill

respond with an error message. The error message response telegram is formatted as follows.

 

 

 

 

 

 

 

 

 

Address

 

Function

Error Code

CRC

CRC

 

 

 

 

 

 

 

 

 

The most significant bit of the requested function code is set (add 128, 8016) in the response telegram to indicate that an error has been detected. For example, if an error were detected in a Function 1 request, then the returned function code would be 8116 (129).

The single data character in the response telegram will indicate the type of error detected. These are as follows.

1

Illegal Function

The requested function code is not supported by

 

the MFC010 or is not valid due to the current

 

settings of the device.

2

Illegal Data Address

The Register requested is not valid.

3

Illegal Data Value

The requested data (in Write operations only) is

 

invalid for the register being written.

6

Slave Device Busy

The MFC010 is unable to process the requested

 

command because an EEPROM save is in progress.

Errors

due t o c ommunications

f aults ( CRC er rors, P arity er rors et c) ar e logged but no response is

returned because the data in the received telegram is deemed unreliable. T he Master system can read the error logs by using the diagnostic command (Function 08, see Section 6.8).

22

MFC010 Interface Manual

6.Modbus Functions Supported by the MFC010

6.101 (0116): Read Coil Status

This function permits the user to read the state ofa number of consecutive Discrete Outputs, or “Coil”, registers. Within the MFC010 the majority of the Discrete Outputs are used to initiate command functions; when read, response will be “ 1” w hilst c ommand i s bei ng processed andwhen“ 0 t he c ommand i s completed (See Section 7.2 on page 39 for details of the individual Status Output registers). The format of the Master request telegram for this function should be as follows.

Request

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Request to Slave ID 1

2

Function

0116

“Read Coil Status”

 

 

 

 

3

Start Address Hi

0316

Start Address = 1002

4

Start Address Lo

E916

 

5

No of Points Hi

0016

No. of Points = 5

6

No of Point Lo

0516

( “Coils” 1002 – 1006 )

7

CRC Lo

2D16

CRC Checksum

8

CRC Hi

B916

 

 

 

 

 

The MFC010 will respond to such a request with a telegram formatted as follows.

 

Response

Field

 

For Example

 

 

Character

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

Slave Address

0116

 

Response from Slave ID 1

 

 

 

 

 

 

 

 

 

 

 

 

2

 

Function

 

0116

 

“Read Coil Status”

 

 

 

3

 

Data Bytes in Response

0116

 

1 byte (5 States requested < 8 Bits)

 

 

4

 

Data Byte 1

1516

 

Data = 000101012

 

 

 

 

 

 

 

 

 

 

 

5

 

CRC Lo

 

9016

 

CRC Checksum

 

 

 

 

 

 

 

 

 

 

6

 

CRC Hi

 

4716

 

 

 

 

 

 

 

 

The number of data bytes in the response will depend upon the number of Discrete Outputs requested.

 

The appropriate bit in each of the data bytes received will indicate each Discrete Output state requested.

 

Therefore, each data byte in the response will contain a maximum of 8 Discrete Output “Coil” states. For

 

example, if 19 Discrete Outputs are requested, then three data characters will be r eturned, with the first

 

group of 8 output states encoded in the first data byte, the second group of 8 output states coded in the

 

second data byte, and the last 3 output states coded in the first three bit locations of the lastdata byte.

 

Bit 0 of

the first response data

byte will c orrespond

t o t he “ Start A ddress” D iscrete O utput r egister

specified by the request telegram.

B it 0 of the second response data byte will correspond to the “Start

 

Address” + 8 Discrete Output register and so on.

 

 

 

 

 

In the example above, 5 Discrete Outputs

are r equested, s o onl y one dat a by te i s r equired i n

t he

response.

The response data value shown

above i ndicates t hat r egisters 1002, 1004 and 1006 ar

e

active, and that registers 1003 and 1005 are inactive.

MFC010 Interface Manual

23

6.202 (0216): Read Discrete Input

This function permits the user to read the state of a number of consecutive Discrete Input registers. (See Section 7.3, on page 41, for details of the individual registers). The format of the Master request telegram for this function should be as follows.

Request

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Request to Slave ID 1

2

Function

0216

“Read Discrete Input”

 

 

 

 

3

Start Address Hi

0316

Start Address = 1001

4

Start Address Lo

E816

 

5

No of Points Hi

0016

No. of Points = 12

6

No of Point Lo

0C16

( “Inputs” 1001 – 1011 )

7

CRC Lo

F816

CRC Checksum

8

CRC Hi

7F16

 

 

 

 

 

The MFC010 will respond to such a request with a telegram formatted as follows.

Response

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Response from Slave ID 1

 

 

 

 

2

Function

0216

“Read Discrete Input”

3

Data Bytes in Response

0216

2 bytes

4

Data Byte 1

CD16

Data = 110011012

 

 

 

 

5

Data Byte 2

0916

Data = 000010012

6

CRC Lo

2D16

CRC Checksum

7

CRC Hi

2E16

 

 

 

 

 

The num ber of dat a bytes i n t he r esponse will depend upon the number of Discrete Inputs requested. The appropriate bit in each of the data bytes received will indicate each Discrete Input state requested. Therefore, each data by te i n t he r esponse w ill c ontain a m aximum of 8 di screte i nput s tates. F or example, if 19 Discrete Inputs are requested, then three data characters will be returned, with the first group of 8 input states encoded in the first data byte, the second group of 8 i nput states coded in the second data byte, and the last 3 input states coded in the first three bit locations of the last data byte. Bit

0 of the first response data byte will correspond to the “Start Address” Discrete Input register specified by the request telegram. B it 0 of the second response data byte will correspond to the “Start Address” + 8 Discrete Input register and so on.

In the example above, 12 Discrete Inputs are requested, so two data bytes are required in the response.

24

MFC010 Interface Manual

6.303 (0316): Read Holding Registers

This f unction per mits t he us er t o r ead t he v alue of a

number of consecutive Holding registers. (See

Section 7.5 on page 49 for details of the individual registers). The format of the Master request telegram

for this function should be as follows.

 

 

 

 

 

 

 

 

 

 

 

 

Request

Field

For Example

 

Character

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

Slave Address

0116

 

Request to Slave ID 1

 

2

Function

0316

 

“Read Holding Registers”

 

 

 

 

 

 

 

 

3

Start Address Hi

0316

 

Start Address = 1023

 

4

Start Address Lo

FE16

 

 

 

 

 

5

No of Points Hi

0016

 

No. of Points = 3

 

6

No of Point Lo

0316

 

( Input Registers 1023 – 1025 )

 

 

7

CRC Lo

6416

 

CRC Checksum

8

CRC Hi

7F16

 

 

 

 

 

 

 

 

 

 

 

The MFC010 will respond to such a request with a telegram formatted as follows.

Response

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Response from Slave ID 1

 

 

 

 

2

Function

0316

“Read Holding Registers”

3

Data Bytes in Response

0616

6 bytes ( 3 x 2 Byte Registers )

4

Data Byte 1

3F16

Register 1023 = 16201

 

 

 

5

Data Byte 2

4916

 

6

Data Byte 3

0216

Register 1024 = 724

7

Data Byte 4

D416

 

 

 

 

 

8

Data Byte 5

F116

Register 1025 = 61730

9

Data Byte 6

2216

 

10

CRC Lo

7D16

CRC Checksum

 

 

 

11

CRC Hi

BD16

 

MFC010 Interface Manual

25

6.404 (0416): Read Input Registers

This function permits the user to read the value of a number of consecutive Input registers. (See Section 7.5 on page 493 for details of the individual registers). The format of the Master request telegram for this function should be as follows.

Request

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Request to Slave ID 1

2

Function

0416

“Read Input Registers”

 

 

 

 

3

Start Address Hi

0B16

Start Address = 3001

4

Start Address Lo

B816

 

5

No of Points Hi

0016

No. of Points = 2

6

No of Point Lo

0216

( Input Registers 3001 – 3002 )

7

CRC Lo

F316

CRC Checksum

8

CRC Hi

CA16

 

 

 

 

 

The MFC010 will respond to such a request with a telegram formatted as follows.

Response

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Response from Slave ID 1

 

 

 

 

2

Function

0416

“Read Input Registers”

3

Data Bytes in Response

0416

4 bytes ( 2 x 2 Byte Registers )

4

Data Byte 1

9416

 

 

 

 

 

5

Data Byte 2

7B16

Register 3001 / 3002 = 75.29

6

Data Byte 3

4216

 

7

Data Byte 4

9616

 

 

 

 

 

8

CRC Lo

1716

CRC Checksum

9

CRC Hi

6316

 

In t he ex ample abov e t he I nput r egister r equested c ontains a f loating poi nt num ber and needs to be accessed as a pai r of r egisters ( 3001/3002). T he r esulting 4 by tes i n t he dat a r esponse c an t hen be decoded into a floating-point number (See Section 5.3 on page 20 and Appendix C on page 93 for further details on encoding and decoding floating point numbers).

26

MFC010 Interface Manual

6.505 (0516): Force Single Coil

This function permits the user to set the state of asingle Discrete Output “Coil” register. (See Section 7.2

on page 39 for det ails of t he i ndividual r egisters). I n t he MFC010 implementation, these registers are used t o i nitiate c ommands and functions. S etting t he Output s tate i nitiates t he f unction, at tempting t o

clear t he O utput s tate w ill r esult i n a dat a er ror.

The format of the Master request telegram for this

function should be as follows.

 

 

 

 

 

 

 

 

 

 

Request

Field

For Example

 

Character

 

 

 

 

 

 

 

 

 

 

 

 

1

Slave Address

0116

Request to Slave ID 1

 

2

Function

0516

“Force Single Coil”

 

 

 

 

 

 

3

Coil Address Hi

0316

Coil Address = 1001

 

 

 

 

 

4

Coil Address Lo

E816

 

 

5

Force Data Hi

FF16

Set Coil “Active”

 

 

 

 

6

Force Data Lo

0016

 

 

 

 

 

 

 

 

 

7

CRC Lo

0C16

CRC Checksum

 

8

CRC Hi

4A16

 

 

The MFC010 will respond to such a request with a telegram formatted as follows.

Response

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Response from Slave ID 1

 

 

 

 

2

Function

0516

“Force Single Coil”

 

 

 

 

3

Coil Address Hi

0316

Coil Address = 1001

4

Coil Address Lo

E816

 

5

Force Data Hi

FF16

Set Coil “Active”

 

 

 

6

Force Data Lo

0016

 

7

CRC Lo

0C16

CRC Checksum

8

CRC Hi

4A16

 

 

 

 

 

The MFC010 (slave) response telegram should be an exact duplicate of the master request telegram.

MFC010 Interface Manual

27

6.606 (0616): Preset Single Register

This function permits the user to set the value of a single Holding register. For this reason this command cannot be used to write to variables that occupy multiple consecutive registers such as floating point and long integer variables (See Section7.5 on page 49 for details of the individual registers). The format of the Master request telegram for this function should be as follows.

Request

Field

For Example

Character

 

 

 

 

 

 

 

1

Slave Address

0116

Request to Slave ID 1

 

 

 

 

2

Function

0616

“Preset Single Register”

3

Register Address Hi

0316

Register Address = 1020

4

Register Address Lo

FB16

 

 

 

 

 

5

Preset Data Hi

0016

Set Register 1020 = 35

6

Preset Data Lo

2316

 

7

CRC Lo

B916

CRC Checksum

 

 

 

8

CRC Hi

A616

 

The MFC010 will respond to such a request with a telegram formatted as follows.

 

Response

Field

For Example

 

Character

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

Slave Address

0116

 

Response from Slave ID 1

 

 

2

Function

0616

 

“Preset Single Register”

 

3

Register Address Hi

0316

 

Register Address = 1020

 

 

 

 

 

 

4

Register Address Lo

FB16

 

 

 

5

Preset Data Hi

0016

 

Set Register 1020 = 35

6

Preset Data Lo

2316

 

 

 

 

 

 

 

 

 

 

 

7

CRC Lo

B916

 

CRC Checksum

 

8

CRC Hi

A616

 

 

The MFC010

(slave) response telegram

should be

an ex act dupl icate of t he m aster r equest

28

MFC010 Interface Manual

Loading...
+ 74 hidden pages