B Interface description 12.01/

Similar documents
DataVU 5 - Interface Manual Modbus

DataVU 5 - Interface Manual Modbus

Type Type Type Type Type B Interface Description /

JDICON 1000 JDICON B Interface Description 3.99/ Universal Process Controller. Universal Profile Controller

JUMO di 308. Digital Indicator. B Interface Description Modbus 12.07/

JUMO ctron 04/08/16. Compact controller with timer and ramp function. B Interface Description Modbus /

JUMO dtron 304/308/316 JUMO dtron 304/308/316 plast

JUMO Quantrol LC100/LC200/LC300

JDICON 400/500 JDICON 401/501. B Interface Description. Universal process controller

Screen recorder LON interface. B Interface description 6.99/

JUMO ecoline O-DO/NTU

BINDER Interface Technical Specifications

Elotech Standard Protocol. for Single R8200 SC

Type 70906X. Thyristor power units TYA 201, 202 and 203. Interface description for Types ,-62, and T92Z001K000. Typ /

JUMO LOGOSCREEN 600. Paperless Recorder with Touchscreen. Interface Description T92Z001K000 V2.00/EN/

JUMO mtron T. Measuring, Control, and Automation System Central Processing Unit. Interface Description Modbus T92Z001K000 V3.

Paperless Recorder with CompactFlash card as storage medium. B Interface Description LON interface 12.06/

J LOGOSCREEN nt Paperless Recorder with TFT display and CompactFlash card. B Operating Instructions 08.06/

Version Action Author Date

Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION

CE4DMID01 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION

SPM90 MODBUS PROTOCOL AND REGISTER LIST V1.0

COMMUNICATION MODBUS PROTOCOL

Modbus Protocol For FTS/FTM 3x&8x

DULCOMETER Multi-parameter Controller dialog DACa

Manual 09/11 MN Z-EN. NZM-XATS-C Automatic Transfer Switch-Controller Modbus Communication Protocol

Modbus Protocol For TGP03 / THP03

1. Implemented CM11 protocol

VISY-Command. Technical Documentation. with Modbus Protocol. Edition: Version: 1 Art. no.:

Additional instructions Memograph M, RSG45 Advanced Data Manager

Input Channels: 4 differential or four single-ended. Address / Baud rate / range configurable by the user

Protocol VIT5. Communications RS485. Version 1.0. Pg.Up ENTER. Pg.Up ENTER. Pg.Up ENTER. Pg.Up ENTER. Pg.Up ENTER. Pg.Up ENTER. Pg.Up ENTER. Pg.

LMV2 / LMV3... Modbus. User Documentation. Building Technologies Division

CTT MODBUS-RTU COMMUNICATION PROTOCOL TEMPERATURE MONITOR DEVICE

Type JUMO dtrans xx 02

[ 公司地址 ] Modbus Protocol. For THS/THM 30X&80X_Temp.&Humididy & THS8X/THM8X_Dew Point Series V7.0

The RS-485 user manual for B800 series communication

Modbus Protocol For PMX / PXM3X

MPU-32 AND FPU-32 TIA-485 NETWORK

Real Time Clock with Temperature Sensor and RS485/Modbus Comunications

IF96017 MODBUS COMMUNICATION PROTOCOL

SC2004MBS 20x4 Characters MODBUS RTU Slave LCD

Using the MODBUS Protocol with Athena Series C (1ZC, 16C, 18C, and 25C) Controllers

COMMUNICATION MODBUS PROTOCOL

INTEGRA DL1 DUAL LOAD DIGITAL METER COMMUNICATIONS GUIDE DIGITAL ENERGY METER FOR MULTIPLE LOADS IN AN ELECTRICAL SYSTEM

COMMUNICATION MODBUS PROTOCOL MF96001 / 021 NEMO 96HD

TORRIX RS485. Technical Documentation. with MODBUS Protocol. Edition: Version: 3 Art. no.:

General Monitors S5000 Modbus Specification. Order No.: MANS5000M/00. MSAsafety.com

Modbus on K45 asense. Table of contents:

PowerLogic ION6200 Serial Communications Protocol and ION / Modbus Register Map

Modbus Manual Version Modbus Manual for Clean Room Panel CRP5

Modbus/TCP is supported on some controllers. See QCI-AN028 Modbus TCP.

Modbus on SenseAir S8

COMMUNICATION MODBUS PROTOCOL

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM102(1739) For 4511 devices from ser. no:

COMMUNICATION MODBUS PROTOCOL

DRS-100-3P MID Energy Meter Direct Connect, 100A, Three phase Communications Guide

Application Note: Using Modbus With the Conext CL Series. Important Safety Instructions

Modbus on S8. Modbus is a simple, open protocol for both PLC and sensors. Details on Modbus can be found on

Modbus on S8. Modbus is a simple, open protocol for both PLC and sensors. Details on Modbus can be found on

Conto D1 MODBUS COMMUNICATION PROTOCOL

Interface design document MODBUS Protocol. Ab s t r a c t Description of the MODBUS implementation for the Modbus I/O board

Modbus on tsense. Table of contents:

Specification E2 Interface

INNOVATIVE TECHNOLOGY LTD CC2. Communications Protocol Manual GA863. Issue version Page 1 of 108

Host Controller Systems. Instruction Manual

TORRIX RS485. Technical Documentation. with MODBUS Protocol. Edition: Version: 2 Art. no.:

CONTO IMP PROTOCOL COMMUNICATION CONTENTS 1.0 INTRODUCTION

IQ Home Modbus-RTU Master

EXD-TEVI Economizer Controller for Tandem Compressors

ModBus Communication protocol. The ModBus protocol is an industrial communications and distributed control system

$GDSWLYH0LFUR6\VWHPV

Revision 1.2. July 24, COM Protocol Manual. for MDC and ADC N 11th St - San Jose CA

TR600 with RS485 Appendix 1

Interface Definition RISH EM 2340/1320/30/ _Rev. D - 8/2016

Modbus TCP Client Ethernet Modbus TCP Client Modbus TCP Server Ethernet Modbus TCP Server 5

Sample F4T 32-bit Modbus RTU Packet

VPGate Manual PROFIBUS to serial

T7 Modbus Communication User Guide

In-Situ Modbus Communication Protocol Version 5.8

Sample F4T 32-bit Modbus RTU Packet

INTELLIS. Modbus Direct Network Monitor

MODEL CIO-EN PROGRAMMING GUIDE MODBUS/TCP, MODBUS/RTU I/O MODULE. Revision A1 Rapid City, SD, USA, 09/2008

Preface, Table of Contents

MODBUS. M920 protocol description. User s manual

Getting Started with your D3000M Series Module

8 data bits, least significant bit sent first 1 bit for even/odd parity (or no parity) 1 stop bit if parity is used; 1 or 2 bits if no parity

1.Eastron SDM230Modbus Smart Meter Modbus Protocol Implementation V1.2

1.Eastron SDM530-Modbus Smart Meter Modbus Protocol Implementation V1.1

Instruction Manual Modbus Converter Unigate-CL-RS

FLOWSIC 600. Secification MODBUS

TECH TIP. Tritex Modbus Protocol Specification

Golander Peristaltic Pump MODBUS Communication Instruction

IFC 100 Supplementary instructions

Interface Module XC Modbus Protocol Converter / User Manual

Modbus Manual Version Modbus Manual for PF4/5

MODBUS Protocol. The ecode Encoders contain both single register (16 bit) and double register (32 bit) values.

User Manual version 1.04 TLM8 COMMUNICATION PROTOCOLS

Chapter 5: Communications 5 1 SR55 Communications Overview 5 2

Technical Specification. Third Party Control Protocol. AV Revolution

Transcription:

B 95.3530.2 Interface description 12.01/00340396

Contents 1 Introduction 1.1 Preface... 3 1.2 Typographical conventions... 4 1.2.1 Warning signs... 4 1.2.2 Note signs... 4 1.2.3 Presentation... 4 2 Protocol description 2.1 Master-slave principle... 5 2.2 Transfer mode (RTU)... 5 2.3 Instrument address... 6 2.4 Timing of the communication... 6 2.4.1 Timing sequence of a data request... 8 2.4.2 Communication during the internal processing time of the slave... 9 2.4.3 Communication during the response time of the slave... 9 2.5 Structure of the data blocks... 9 2.6 Error handling... 9 2.7 Differences between MODbus and Jbus... 10 2.8 Checksum (CRC16)... 11 2.9 Interface... 12 3 Functions 3.1 Read n bits... 14 3.2 Read n words... 15 3.3 Write one bit... 16 3.4 Write one word... 17 3.5 Write n bits... 18 3.6 Write n words... 19 4 Data flow 4.1 Receive non-cyclic data from the instrument... 21 4.2 Transmit non-cyclic data to the instrument... 23 4.3 Transmission format... 26 5 Error messages 5.1 Error messages from the interface... 27 5.2 Error messages for invalid values... 27 5.3 System and running errors... 28 I

Contents 6 Address tables 6.1 Cyclic data... 31 6.1.1 Instrument data... 31 6.1.2 Process data... 31 6.2 Non-cyclic data... 33 6.2.1 Text for printing... 33 6.2.2 Text for display... 34 6.2.3 Flags for the display controller... 34 6.2.4 float values for the maths module... 35 6.2.5 Reset recognition... 36 II

1 Introduction 1.1 Preface Please read this manual before starting up the interface. Keep the manual in a place which is accessible to all users at all times. Please assist us to improve this manual. Your suggestions will be most welcome. Phone Germany (0661) 6003-725 abroad (+49) 661 6003-0 Fax Germany (0661) 6003-681 abroad (+49) 661 6003-607! All the information which is necessary to operate the interface is included in this manual. If any difficulties should still arise during start-up you are asked not to carry out any manipulations on the unit which are not permitted. You could endanger your rights under the instrument warranty! Please contact the nearest JUMO office or the main factory. E When returning instrument modules, assemblies or components, the rules of EN 100 015 Protection of electrostatic-sensitive devices must be followed. Use only the appropriate ESD packaging to transport them. Please note that we cannot be held liable for any damage caused by ESD (electrostatic discharge). 3

1.2 Typographical conventions 1 Introduction 1.2.1 Warning signs The signs for Danger and Warning are used in this manual under the following conditions: V Danger This symbol is used where there may be danger to personnel if the instructions are disregarded or not followed accurately! " E Warning Warning This symbol is used where there may be damage to equipment or data if the instructions are disregarded or not followed accurately! This symbol is used where special precautions must be observed for the handling of electrostatic-sensitive components. 1.2.2 Note signs! # Note Reference This symbol is used if your special attention is drawn to a remark. This symbol refers to additional information in other manuals, chapters or sections. abc 1 Footnote Footnotes are comments which refer to certain points in the text. Footnotes consist of two parts: The marking in the text, and the footnote text. Markings in the text are arranged as continuous raised numbers. The footnote text (in a smaller typeface) is placed at the bottom of the page, and begins with a number and a full stop. 1.2.3 Presentation 0x0010 Hex. number A hexadecimal number is identified by a preceding 0x (this example = decimal 16). 4

2.1 Master-slave principle 2 Protocol description The communication between a PC (master) and an instrument (slave) using MODbus/Jbus takes place according to the master-slave principle, in the form of data request/instruction response. Master Slave 1 Slave 2 Slave n 2.2 Transfer mode (RTU) The master controls the data exchange, the slaves only have a response function. They are identified by their instrument address. A maximum of 255 slaves can be accessed. The transfer mode which is used is the RTU mode (Remote Terminal Unit). The transfer of the data is made in binary format (hexadecimal) with 8 bits, 16 bits for integers, and 32 bits for float values. The LSB (least significant bit) is transferred first. The ASCII operating mode is not supported. Data format The data format describes the structure of a byte which is transferred. The following format options are available for data transfer: Data word Parity bit Stop bit 1 or 2 bits No. of bits 8 bits 1 9 8 bits 2 10 8 bits even 1 10 8 bits odd 1 10 8 bits always 0 1 10 5

2.3 Instrument address 2 Protocol description The instrument address of the slave can be set between 1 and 255. Address 0 is reserved.! A maximum of 31 slaves can be accessed via the RS422/ RS485 interface. 2.4 Timing of the communication The start and end of a data block are identified by pauses in transmission. The maximum permitted interval between two consecutive characters is three times the transmission time of a single character. The character transmission time (the time taken to transmit one character) depends on the baud rate and the data format which is used. For a data format with 8 data bits, no parity bit, and one stop bit, this is: character transmission time [msec] = 1000 9 bits/(baud rate) For the other data formats it is: character transmission time [msec] = 1000 10 bits/(baud rate) Sequence Date request from master transmission time = n characters 1000 x bi ts / (baud rate) Marker for end of data request 3 characters 1000 x bits/(baud rate) Processing of the data request by the slave (max. 250msec) Response of slave transmission time = n characters 1000 x bits/(baud rate) Marker for end of response 3 characters 1000 x bits/(baud rate) 6

2 Protocol description Example Marker for end of data request or end of response for 10/9 bit data format Waiting time = 3 characters 1000 10 bits/(baud rate) Baud rate Data format [bit] Waiting time [msec] 187k 10 0.160 9 0.144 125k 10 0.240 9 0.216 38400 10 0.781 9 0.703 19200 10 1.563 9 1.406 9600 10 3.125 9 2.813 4800 10 6.250 9 5.625 2400 10 12.500 9 11.250 1200 10 25.000 9 22.500 600 10 50.000 9 45.000 300 10 100.000 9 90.000 150 10 200.000 9 180.000 7

2 Protocol description 2.4.1 Timing sequence of a data request Timing scheme A data request runs according to the following timing scheme: Master Data request Data request Slave Response t t 0 t 1 t 0 t 2 t 0 t 1! A End marker = 3 characters (the time depends on the baud rate) This time depends on the internal processing. The maximum processing time is 250 msec. minimum response time can be set in the instrument, under the menu item Interface. This preset time (0 500 msec) is the minimum time which will be waited before a response is transmitted. If a smaller value is set, then the response time may be longer than the preset value (because the internal processing time is longer) and the instrument answers as soon as the internal processing is completed. A preset time of 0 msec means that the instrument responds with the maximum possible speed. t 2 The minimum response time which can be set is required by the RS485 interface in the master, in order to switch over the interface driver from receive to transmit. This parameter is not required by the RS422 interface. This time is needed by the instrument, to switch from transmit back to receive. The master must wait for this time before presenting a new data request. This time must always be observed, even when the new data request is directed to a different instrument. RS422 interface: t 2 = 1msec RS485 interface: t 2 = 10msec 8

2 Protocol description 2.4.2 Communication during the internal processing time of the slave No data requests from the master can be permitted during the internal processing time of the slave. Any data requests which are made in this period will be ignored by the slave. 2.4.3 Communication during the response time of the slave No data requests from the master can be permitted during the response time of the slave. Any data request which is made in this period will result in the invalidation of all the data on the bus at that moment. 2.5 Structure of the data blocks All data blocks have the same structure: Data structure Slave address Function code Data field Checksum CRC16 1 byte 1 byte x byte(s) 2 bytes Each data block contains four fields: Slave address instrument address of a specific slave Function code function selection (read, write, bit, word) Data field contains the information: bit address (word address) bit number (word number) bit value (word value) Checksum recognition of transmission errors 2.6 Error handling Error codes There are five error codes: 1 invalid function 2 invalid parameter address 3 parameter value outside range of values 4 slave not ready 8 write access to parameter is denied 9

2 Protocol description Response on error event Slave address Function XX OR 80h Error code Checksum CRC16 1 byte 1 byte 1 byte 2 bytes The function code is ORed with 0x80, in other words, the MSB (most significant bit) is set to 1. Example Data request: 01 02 00 00 00 00 CRC16 Response: 01 82 01 CRC16 Special cases The slave will not respond in the following cases: - the checksum (CRC16) is not correct - the instruction from the master is incomplete or over-defined - the number of words or bits to be read is zero - the instrument is being configured from the keypad 2.7 Differences between MODbus and Jbus The MODbus protocol is compatible with the Jbus protocol. The structure of the data blocks is identical.! MODbus differs from Jbus in the absolute addresses of the data. The MODbus addresses are shifted by one compared with those of Jbus. Absolute address Jbus address MODbus address 1 1 0 2 2 1 3 3 2......... 10

2.8 Checksum (CRC16) 2 Protocol description The checksum (CRC16) is used to recognise transmission errors. If an error is identified in the evaluation, the corresponding instrument will not respond. Method of calculation Example 1 CRC = 0xFFFF CRC = CRC XOR ByteOfMessage For (1 to 8) CRC = SHR(CRC) if (flag shifted right = 1) then else CRC = CRC XOR 0xA001 while (not all ByteOfMessage processed);! The low byte of the checksum is transmitted first. Data request: Read two words, starting at address 1 (CRC16 = 0x0E97) 14 03 00 01 00 02 97 0E Response: (CRC16 = 0x953E) 14 03 04 03 E8 01 F4 3E 95 Word 1 Word 2 Example 2 Instruction: Set bit at address 24 (CRC16 = 0xF80E) 14 05 00 18 FF 00 0E F8 Response (same as instruction): 14 05 00 18 FF 00 0E F8 11

2 Protocol description 2.9 Interface Configuration of the interface in the instrument. Display edit select/enter with key accept continue with INTERFACE E PROTOCOL: J-BUS Select protocol: JBUS MODBUS h, R E 2 2 BAUD: 9.6kbaud Select baud rate (values in kbaud): 0.15, 0.3, 1.2, 2.4, 4.8, 9.6, 19.2, 38.4, 12.5, 187.5kbaud h, R E 3 3 DATA FORMAT: 8/1/NONE Select data format (data bits / stop bits / parity): 8/1/NONE, 8/1/ODD, 8/1/EVEN, 8/2 NONE, 8/1/ZERO h, R E 4 4 ADDRESS: 001 Select address: 1... 255 h, R, l, r E check: 1 address 255 5 5 MIN. RESPONSE TIME: 000msec select minimum response time: 0... 999msec h, R, l, r E check: 0 response time 999 h forwards R backwards! In the Logoline 500 version with a scale, the interface is configured through the setup program. 12

3 Functions The following functions are available for the instrument: Function number Function 0x01/0x02 read n bits (max. 256 bits) 0x03/0x04 read n words (max. 80 words) 0x05 0x06 write one bit write one word 0x0F write n bits (max. 256 bits) 0x10 write n words (max. 80 words) There are no separate areas available for bits and words of the system variables. The bit and word areas overlap, and can be read from and written to both as bit areas and word areas. The bit address is calculated as follows: bit address = word address 16 + bit number 13

3.1 Read n bits 3 Functions This function reads n bits, starting from a defined address. Data request Response Example Data request Response Slave address Function 0x01 or 0x02 Address of first bit Read the position of the first 4 binary inputs (process data),! Section 6.1.2 Process data Bit address = (base address + process data address) 16 = (0x002F + 0x0008) 0x10 = 0x0370 Number of bits Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes Slave address Function 0x01 or 0x02 Number of bytes read Bit value Checksum CRC16 1 byte 1 byte 1 byte x byte(s) 2 bytes 0A 01 03 70 00 04 CRC16 0A 01 01 0F CRC16 " Regardless of the number of bits to be read, at least 8 bits (1 byte) are always read, since the response is made in bytes. In the example above, this means that the bits 0x0370 0x0377 will be read. 0x0377 0x0376 0x0375 0x0374 0x0373 0x0372 0x0371 0x0370 8 bits = 1 byte For all the irrelevant bits (0x0374 0x0377) the re sponse will be the value 0. 14

3.2 Read n words 3 Functions This function reads n words, starting from a defined address. Data request Response Example Slave address Function 0x03 or 0x04 Read the 3 measurement inputs! Section 6.1.2 Process data Address of first word Word address = base address + process data address = 0x002F + 0x0002 = 0x0031 Data request: No. of words Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes Slave address Function 0x03 or 0x04 No. of bytes read Word value(s) Checksum CRC16 1 byte 1 byte 1 byte x byte(s) 2 bytes 14 03 00 31 00 06 CRC16 Response: 14 03 10 1999 4348 4CCC 4348 2666 4396 CRC16 Meas. 1 200.1 Measurement 2 200.3 Meas. 3 300.3 15

3.3 Write one bit 3 Functions In the bit writing function, the data blocks for the instruction and the response are identical. Instruction Response Slave address Function 0x05 Bit address Bit value XX 00 Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes Slave address Function 0x05 Bit address Bit value XX 00 Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes " The bit values mean: FF00 = set bit 0000 = erase bit Example Set the status bit 0 of the data block Text for printing! Section 6.2.1 Text for printing Bit address = (base address + address Data structure status ) 16 + bit number = (0x0075 + 0x0) 0x10 + 0x0 = 0x0750 Instruction: 14 05 07 50 FF 00 CRC16 Response (same as instruction): 14 05 07 50 FF 00 CRC16 16

3.4 Write one word 3 Functions In the word writing function, the data blocks for the instruction and the response are identical. Instruction Response Slave address Function 0x06 Word address Word value Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes Slave address Function 0x06 Word address Word value Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes Example Write flag 1 for the display controller (= 0x0001)! Section 6.2.3 Flags fo r the display controller Word address = base address + address flag 1 = 0x00E9 + 0x0002 = 0x00EB Instruction: 14 06 00 EB 00 01 CRC16 Response (same as instruction): 14 06 00 EB 00 01 CRC16 17

3 Functions 3.5 Write n bits Instruction Slave address Function 0x0F Address of first bit Number of bits Number of bytes Bit value(s) Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 1 byte x byte(s) 2 bytes Response Example Slave address Function 0x15 Address of first bit Number of bits Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes Set the status bit 0 and bit 1 of the data block Text for printing Status bit 0 = 1, Status bit 1 = 0! Section 6.2.1 Text for printing Bit address = (base address + address Data structure status ) 16 + bit number = (0x0075 + 0x0) 0x10 + 0x0 = 0x0750 Instruction: 14 0F 07 50 00 02 01 01 CRC16 Response: 14 0F 07 50 00 02 CRC16 18

3 Functions 3.6 Write n words Instruction Slave address Function 0x10 Address of first word Number of words Number of bytes Word value(s) Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 1 byte x byte(s) 2 bytes Response Example Slave address Write Text for printing (2 words: ABC = 0x4142, 0x4300)! Section 6.2.1 Text for printing Word address Instruction: Function 16 Address of first word = base address + process data address = 0x0075 + 0x0002 = 0x0077 Number of words Checksum CRC16 1 byte 1 byte 2 bytes 2 bytes 2 bytes 14 10 00 77 00 02 04 41 42 43 00 CRC16 Response: 14 10 00 77 00 02 CRC16 19

4 Data flow System EEPRO M System - Processor Dual-port RAM Interface processor MODbus RAM Contro ler Interface m odule For data transmission to the MODbus, the system processor places the process values in a dual-port RAM. Not all the system variables which are present in the controlller are cyclically refreshed in the dual-port RAM. The dual-port RAM is divided into two areas: System variables Data after data request These variables can be read and written directly by the MODbus driver (cyclic data). The data are cyclically refreshed in the dual-port RAM (within the sampling time). This area is not cyclically refreshed by the system processor (non-cyclic data). Variables in this data area must be requested by the MODbus driver. They are available only after processing by the system processor.! The length information for char data types as given below is generally to be understood as being the string length including the string termination characters \0 20

4 Data flow 4.1 Receive non-cyclic data from the instrument 21

4 Data flow Example Read the reserve flag for the display controller v Section 6.2.3 Flags fo r the display controller Step 1: The data structure Flags fo r the display controller is requested Set status bit 0 = 1, status bit 1 = 0 and status bit 2 = 0 MODbus command: Write 1 word 01 06 00 E9 00 01 CRC16 Response: 01 06 00 E9 00 01 CRC16 Step 2: Cyclic request (polling) whether the corresponding data structure is available Read status bit 1 MODbus command: Read n bits 01 01 0E 91 00 01 CRC16 Response: 01 01 01 00 CRC16 Status bit 1 = 0 (data structure is not yet available) 01 01 01 01 CRC16 Status bit 1 = 1 (data structure is available) Step 3: Read error code of the structure which is requested MODbus command: Read 1 word 01 03 00 EA 00 01 CRC16 Response: 01 03 02 0000 CRC16 No error occurred Step 4: Read reserve flag MODbus command: Read 1 word 01 03 00 EE 00 01 CRC16 Response: 01 03 02 0001 CRC16 reserve flag is set 22

4 Data flow 4.2 Transmit non-cyclic data to the instrument 23

4 Data flow Example Write a float value for the maths module (float-value 1 = 20.32) Step 1: The data structure is requested Set status: bit 0 = 1, bit 1 = 0, bit 2 = 0 MODbus command: Write 1 word 01 06 00F9 0001 CRC16 Response: 01 06 00F9 0005 CRC16 Step 2: Cyclic request (polling) whether the corresponding data structure is available Read status bit 1 MODbus command: Read n bits 01 01 0F 91 00 01 CRC16 Response: 01 01 01 00 CRC16 Status bit 1 = 0 (data structure is not yet available) 01 01 01 01 CRC16 Status bit 1 = 1 (data structure is available) Step 3: Read error code of the structure which is requested MODbus command: Read 1 word 01 03 00FA 0001 CRC16 Response: 01 03 02 0000 CRC16 No error occurred Step 4: Write 20.32 to float value 1 (20.32 is equivalent to 0x41A28F5C in IEEE-format) MODbus command: Write 2 words 01 10 00FB 0002 04 8F5C 41A2 CRC16 Response: 01 06 00FB 0002 CRC16 24

4 Data flow Step 5: The data structure is transmitted Set status: bit 0 = 1, bit 1 = 0, bit 2 = 1 MODbus command: Write 1 word 01 06 00F9 0005 CRC16 Response: 01 06 00F9 0005 CRC16 Step 6: Cyclic polling whether the corresponding data structure is available Read status bit 1 MODbus command: Read n bits 01 01 00F9 00 01 CRC16 Response: 01 01 01 00 CRC16 Status bit 1 = 0 (data structure not yet transmitted) 01 01 01 01 CRC16 Status bit 1 = 1 (data structure has been transmitted) Step 7: Read the error code of the transmitted structure MODbus command: Read 1 word 01 03 00FA 0002 CRC16 Response: 01 03 02 0000 CRC16 No error occurred 25

4 Data flow 4.3 Transmission format Integer values Float values Integer values are transmitted over the MODbus in the following format: first the high byte, then the low byte. e.g. : Write the integer value 1 (= 0x0001) to the address 0x00EB: 010600EB0001383E Float values are handled on the MODbus with the IEEE-754 standard format (32bit), but with the difference that bytes 1 and 2 are swapped with bytes 3 and 4. Single-float format (32 bit) to standard IEEE 754 SEEEEEEE EMMMMMMM MMMMMMMM MMMMMMMM byte 1 byte 2 byte 3 byte 4 S - sign bit E - exponent (complement to base 2) M - 23bit normalised mantissa Modbus-float format MODbus address x MODbus address x+1 MMMMMMMM MMMMMMMM SEEEEEEE EMMMMMMM byte 3 byte 4 byte 1 byte 2 e.g. : Write the float value 550.0 (= 0x44098000 in IEEE-754 format) to the address 0x00FB: 011000FB00020480004409679E The bytes of the float value must be appropriately swapped before/after the transmission to/from the instrument. Many compilers (e.g. Microsoft C++, Turbo C++, Turbo Pascal, Keil C51) record the float values in the following sequence: float value Address x Address x+1 Address x+2 Address x+3 MMMMMMMM MMMMMMMM EMMMMMMM SEEEEEEE byte 4 byte 3 byte 2 byte 1 26

5 Error messages 5.1 Error messages from the interface The error numbers can be found under the error code in the data blocks of the non-cyclic data. v Section 6.2.1 Section 6.2.4 Error code 0x0014 0x0015 0x0016 0x0017 0x0018 0x0019 0x001C Error: Setup command processing Command busy flag not reset by master Invalid command Error on data acceptance No cyclic data available Invalid structure length Invalid header Write error in the serial EEPROM (Calib.) 5.2 Error messages for invalid values For setpoints/process values and values which are derived from them, the convention is that the error number is represented in the value itself, i.e. the error number is recorded instead of the measurement. Error number Error 200000.0 Measurement overrange/underrange 27

5 Error messages 5.3 System and running errors The system or running errors are part of the process data (cyclic data). v Section 6.1.2 The numbers which are recorded there have the following meaning: System error If one of the following errors occurs, then the measurement acquisition and recording is interrupted. All other process data are no longer valid. If error number 13 occurs, then the instrument is still in the initialisation phase, during which valid process data are not yet available. The instruction to the instrument should be repeated after a short delay. Error number Error 0 no error 1 reserved 2 reserved 3 reserved 4 EEPROM fault 5 reserved 6 reserved 7 reserved 8 A/D converter fault 9 reserved 10 Hall sensor fault 11 reserved 12 reserved 13 initialisation phase 28

5 Error messages Running errors Please see the descriptions in the Operating Manual B 95.3530 for the response of the instrument to one or more of the following errors. All other data can continue to be read out from the instrument. Error number Error 0 no error 1 reserved 2 reserved 3 no paper 4 relay module does not respond 5 clock must be reset 6 battery low/empty 7 reserved 8 reserved! It is possible for several runing errors to occur at the same time. The error which is displayed is always the one with the highest priority. Event no paper relay module does not respond clock must be reset battery low no error Priority higher lower For instance, if all the paper has been used up and the battery is low, then error no. 3 (no paper) will be signalled as a running error. 29

6 Address tables All the process values (variables), together with their addresses, data types and access modes, are described below. The abbreviations used are: R/O read access only R/W read and write access char ASCII character (8 bits) byte byte (8 bits) int integer (16 bits) char xx character string of length xx; xx = length including string termination characters \0 bit x bit no. x float float value (4 byte) The process values are divided into logical areas. The absolute MODbus address is given by the base address of the appropriate area and the address offset. In the address tables below, bit 0 is always the least significant bit. 30

6 Address tables 6.1 Cyclic data 6.1.1 Instrument data Base address: 0x0000 Address Access Data type Signal designation 0x0000 R/O int instrument group (7) 0x0001 R/O int instrument type (0) 0x0002 R/O char 9 instrument name ( L500/540 ) 0x0007 R/O char 11 software version 0x000D R/O char 13 VdN number 0x0014 R/O char 10 production number 0x0019 R/O char 15 date/time of last change configuration 0x0021 R/O char 15 date/time of last change parameter 0x0029 R/O 12 byte reserve 6.1.2 Process data Base address: 0x002F Address Access Data type Signal designation 0x0000 R/O int system error v Chapter 5 Error messages 0x0001 R/O int running error v Section 5.3 System an d running errors 0x0002 R/O float measurement input 1 0x0004 R/O float measurement input 2 0x0006 R/O float measurement input 3 0x0008 R/O int state of the logic inputs: 0 = open / 1 = closed R/O bit0 logic input 1 R/O bit1 logic input 2 R/O bit2 logic input 3 R/O bit3 logic input 4 R/O bit4 logic input 5 31

6 Address tables Address Access Data type Signal designation R/O bit5 logic input 6 R/O bit6 logic input 7 R/O bit7 logic input 8 R/O bit8 15 free 0x0009 R/O int relay states: 0 = not active / 1 = activated R/O bit0 relay output 1 R/O bit1 relay output 2 R/O bit2 relay output 3 R/O bit3 relay output 4 R/O bit4 relay output 5 R/O bit5 relay output 6 R/O bit6 relay output 7 R/O bit7 relay output 8 R/O bit8 15 free 0x000A R/O float event counter 1 0x000C R/O float event counter 2 0x000E R/O int present chart speed 0x000F R/O int Stop status: 0 = no stop / 1 = stop 0x0010 R/O int paper end: 0 = paper available / 1 = no paper 0x0011 R/O char 20 present date and time ( yyyy-mm-dd-hh:mm:ss ) 0x001B R/O char 20 last switch-off of the recorder (date/time) 0x0025 R/O char 20 last switch-on of the recorder (date/time) 0x002F R/O int number of mains switch-off events 0x0030 R/O int number of operating hours 0x0031 R/O int polling flag for the text transmitted for printing: 0 = no print request 1 = print request for the text is still present 32

6 Address tables 6.2 Non-cyclic data Status bits The following address tables (for non-cyclic data) are only read from or written to on request of the MODbus drivers. The state of these address tables (non-cyclic data) is shown in the status word. The status word and error code are each placed at the start of the data block for the non-cyclic data. Status Significance for the master bit 0 bit 1 bit 2 0 0 X master has not made a data request 1 0 X master has made a data request to the instrument X the data request is being processed 0 1 X processing finished, the response is available X in the buffer, ready for the master 1 1 X not valid 0 data transmission from dual-port RAM to instrument 1 data transmission from instr. to dual-port RAM bit 3... bit 15 are not used 6.2.1 Text for printing Base address: 0x0075 Address Access Data type Signal designation 0x0000 R/W int status of the data structure R/W bit0 1 = process data request R/W bit1 0 = response not yet present / 1 = processing ended, response is present in the buffer R/W bit2 0 = transmission interface recorder 1 = transmission recorder interface bit3 15 free 0x0001 R/W int error code vchapter 5 Error Messages 0x0002 R/W char36 text for output to paper 33

6 Address tables 6.2.2 Text for display Base address: 0x009D Address Access Data type Signal designation 0x0000 R/W int status of the data structure R/W bit0 1 = process data request R/W bit1 0 = response not yet present 1 = processing ended, response is present in the buffer R/W bit2 0 = transmission interface recorder 1 = transmission recorder interface bit3 15 free 0x0001 R/W int error code v Chapter 5 Error messages 0x0002 R/W char 36 text 1 for display 0x0014 R/W char 36 text 2 for display 0x0026 R/W char 36 text 3 for display 6.2.3 Flags for the display controller Base address: 0x00E9 Address Access Data type Signal designation 0x0000 R/W int status of the data structure R/W bit0 1 = processing data request R/W bit1 0 = response not yet present 1 = processing ended, reponse is present in the buffer R/W bit2 0 = transmission interface recorder 1 = transmission recorder interface bit3 15 free 0x0001 R/W int error code v Chapter 5 Error messages 0x0002 R/W int flag 1: 0 = do not display text 1 1 = display text 1 34

6 Address tables 0x0003 R/W int flag 2: 0 = do not display text 2 1 = display text 2 0x0004 R/W int flag 3: 0 = do not display text 3 1 = display text 3 0x0005 R/W int reserve 6.2.4 float values for the maths module Base address: 0x00F9 Address Access Data type Signal designation 0x0000 R/W int status of the data structure R/W bit0 1 = processing data request R/W bit1 0 = response not yet present / 1 = processing ended, response present in the buffer R/W bit2 0 = transmission interface recorder 1 = transmission recorder interface bit3 15 free 0x0001 R/W int error code v Chapter 5 Error messages 0x0002 R/W float float value 1 = freely usable in the maths module 0x0004 R/W float float value 2 = freely usable in the maths module 0x0006 R/W float float value 3 = freely usable in the maths module 35

6 Address tables 6.2.5 Reset recognition Base address: 0x0406 Address Access Data type Signal designation 0x0000 R/W int reset recognition of the interface module This storage address be used for a reset recognition of the interface module. A value other than zero must be entered and then cyclically polled. If a reset appears at the interface module of the recorder, then the byte will be erased (set to zero). The polling thus enables a reset to be recognised. A reset of the interface module can have the following reasons: - Mains off - Configuration of the instrument from the keypad (if the codeword has been entered properly) - Setup connector is plugged into the instrument. 36

M. K. JUCHHEIM GmbH & Co 36035 Fulda Germany Phone (int. +49) 661 60 03-0 Fax (int. +49) 661 60 03-607 Telex 49701 juf d email JUMO_de@e-mail.com