182
Spectra 100 Developer’s Guide DANIEL MEASUREMENT AND CONTROL Houston, Texas Manual Part Number 3-9000-102 Revision E SEPTEMBER 2000 DANIEL

Spectra 100 Developer’s Guide - Emerson Global | Emerson › documents › automation › ...Spectra 100 Developer’s Guide DANIEL MEASUREMENT AND CONTROL Houston, Texas Manual

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • S p e c t r a 1 0 0

    D e v e l o p e r ’ s G u i d e

    DANIEL MEASUREMENT AND CONTROLHouston, Texas

    Manual Part Number 3-9000-102

    Revision ESEPTEMBER 2000

    DANIEL

  • Spectra 100 Developer’s GuideDaniel Industries, Inc.

    NOTICE

    Daniel Industries, Inc. and Daniel Measurement and Control ("Daniel") shall not be liable for technical or editorial errors in this manual or omissions from this manual. Daniel makes no warranties, express or implied, including the implied warranties of merchantability and fitness for a particular purpose with respect to this manual and, in no event, shall daniel be liable for any special or consequential damages including, but not limited to, loss of production, loss of profits, etc.

    Product names used herein are for manufacturer or supplier identification only and may be trademarks/registered trademarks of these companies.

    Copyright © 2000 by Daniel Measurement and Control, Houston, Texas, U.S.A.

    All rights reserved. No part of this work may be reproduced or copied in any form or by any means — graphic, electronic, or mechanical — without first receiving the written permission of Daniel Measurement and Control, Houston, Texas, U.S.A.

  • Spectra 100 Developer’s Guide

    WARRANTY

    Daniel Measurement and Control ("Daniel") warrants all equipment manufactured by it to be free from defects in workmanship and material, provided that such equipment was properly selected for the service intended, properly installed, and not misused. Equipment which is returned, transportation prepaid to Daniel within twelve (12) months of the date of shipment (eighteen (18) months from date of shipment for destinations outside of the United States), which is found after inspection by Daniel to be defective in workmanship or material, will be repaired or replaced at Daniel's sole option, free of charge, and return-shipped at lowest cost transportation. All transportation charges and export fees will be billed to the customer. Warranties on devices purchased from third party manufacturers not bearing a Daniel label shall have the warranty provided by the third party manufacturer.

    Extended warranty - Models 2470, 2480 and 2500 are warranted for a maximum of twenty-four (24) months. The Danalyzer valves are warranted for the life of the instrument and the columns for five years.

    The warranties specified herein are in lieu of any and all other warranties, express or implied, including any warranty of merchantability or fitness for a particular purpose.

    Daniel shall be liable only for loss or damage directly caused by its sole negligence. Daniel's liability for any loss or damage arising out of, connected with, or resulting from any breach hereof shall in no case exceed the price allocable to the equipment or unit thereof which gives rise to the claim. Daniel's liability shall terminate one year after the delivery of the equipment except for overseas deliveries and extended warranty products as noted above.

    In no event, whether as a result of breach of warranty or alleged negligence, shall Daniel be liable for special or consequential damages, including, but not limited to, loss of profits or revenue; loss of equipment or any associated equipment; cost of capital; cost of substitute equipment, facilities or services; downtime costs; or claims of customers of the purchaser for such damages.

    SEP 2000

  • TABLE OF CONTENTS i Spectra 100 Developer’s Guide

    TA B L E O F C O N T E N T S

    INTRODUCTION

    1.1 Purpose of This Manual ...................................................................................... 1-1

    1.2 Documentation Suite for Spectra 100 ................................................................ 1-2

    EMBEDDED DATABASE AND DATA POINTS OF THE SPECTRA 100

    2.1 About the Spectra 100 Database and Data Points............................................ 2-1

    2.2 Online Guide to Spectra 100 Data Points .......................................................... 2-2

    MODBUS GUIDE FOR THE SPECTRA 100

    3.1 General Principles of Modbus Protocol............................................................. 3-23.1.1 About Modbus................................................................................................. 3-23.1.2 Modbus Modifications for Daniel Flow Computer Systems ............................ 3-33.1.3 Communication Transmission Modes, ASCII vs RTU .................................... 3-33.1.4 Framing in ASCII Modbus Transmission ........................................................ 3-53.1.5 Framing in RTU Modbus Transmission .......................................................... 3-63.1.6 Address Field.................................................................................................. 3-73.1.7 Function Code Field........................................................................................ 3-73.1.8 Data Field ....................................................................................................... 3-83.1.9 Function Codes Supported by the Spectra100............................................... 3-83.1.10 Understanding Function Codes and Nominal Responses .............................. 3-93.1.11 Exception Responses Supported by Spectra100 ......................................... 3-123.1.12 Error Detection, CRC.................................................................................... 3-143.1.13 Error Detection, LRC .................................................................................... 3-163.1.14 Data Type: Boolean ...................................................................................... 3-183.1.15 Data Type: Short Word (Integer 16-bit) ........................................................ 3-183.1.16 Data Type: Long Word (Long Integer 32-bit) ................................................ 3-193.1.17 Data Type: Floating Point (32-bit) ................................................................. 3-19

    3.2 Function Code Details ....................................................................................... 3-213.2.1 Function Code 01, Read Boolean Status ..................................................... 3-213.2.2 Function Code 03, Read Numeric Variables ................................................ 3-243.2.3 Function Code 05, Set Single Boolean......................................................... 3-26

    SEP 2000

  • ii TABLE OF CONTENTSSpectra 100 Developer’s Guide

    3.2.4 Function Code 06, Set Single Numeric Variable .......................................... 3-283.2.5 Function Code 15, Set Multiple Boolean Variables ...................................... 3-303.2.6 Function Code 16, Set Multiple Numeric Variables ...................................... 3-32

    3.3 Modbus Register Contents ............................................................................... 3-343.3.1 Modbus Data Types...................................................................................... 3-343.3.2 Registers 0002-0009, Clock ......................................................................... 3-353.3.3 Registers 0032, 0701-0704, 0797-0799, Logs (Event, Alarm, Data,

    and System).................................................................................................. 3-353.3.4 Registers 1001-7999, Boolean and Numeric Data Points ............................ 3-36

    3.4 Special Modbus Operations for Spectra100 ................................................... 3-383.4.1 Setting the Spectra100 Clock ....................................................................... 3-383.4.2 Reading the Spectra100 Clock..................................................................... 3-403.4.3 Reading and Configuring Spectra100 Logs.................................................. 3-42

    SPECTRA100 LOGS

    4.1 Basic Concepts of Spectra100 Logs.................................................................. 4-24.1.1 The Five Types of Logs .................................................................................. 4-24.1.2 Timed Data Log: Memory Storage.................................................................. 4-44.1.3 Contract Data Log: Memory Storage .............................................................. 4-64.1.4 Operator Event (or Audit) Log: Memory Storage ............................................ 4-64.1.5 Alarm Event Log: Memory Storage................................................................. 4-84.1.6 System Log: Memory Storage ...................................................................... 4-10

    4.2 Data Logs: Read with Modbus ......................................................................... 4-114.2.1 Timed Data Log: Read with Modbus ............................................................ 4-114.2.2 Contract Data Log: Read with Modbus......................................................... 4-144.2.3 Timed Data Log: Read with Modbus ............................................................ 4-174.2.4 Contract Data Log: Read with Modbus......................................................... 4-20

    4.3 Data Logs: Configure with Modbus ................................................................. 4-224.3.1 Timed Data Log: Default Configuration ........................................................ 4-224.3.2 Timed Data Log: Read Configuration with Modbus ...................................... 4-254.3.3 Timed Data Log: Write Configuration with Modbus ...................................... 4-284.3.4 Contract Data Log: Default Configuration..................................................... 4-324.3.5 Contract Data Log: Read Configuration with Modbus .................................. 4-344.3.6 Contract Data Log: Write Configuration with Modbus................................... 4-37

    SEP 2000

  • TABLE OF CONTENTS iii Spectra 100 Developer’s Guide

    4.4 Operator and Alarm Logs: Read with Modbus................................................ 4-414.4.1 Operator and Alarm Logs: Combined ........................................................... 4-414.4.2 Operator and Alarm Logs: Modbus Framing ................................................ 4-414.4.3 Operator and Alarm Logs: Bitmasks............................................................. 4-434.4.4 Handshaking Sequence: Read / Clear / Reset ............................................. 4-444.4.5 Operator Event Log: Read with Modbus....................................................... 4-464.4.6 Alarm Event Log: Read with Modbus ........................................................... 4-514.4.7 Operator/Alarm Event Log: Clear or Reset................................................... 4-56

    4.5 System Log: Read with Modbus....................................................................... 4-594.5.1 Log Types ..................................................................................................... 4-604.5.2 Log Data Description .................................................................................... 4-644.5.3 Log Collection via Modbus Register ............................................................. 4-66

    Appendix A, DEFAULT MODBUS REGISTER ASSIGNMENTS

    Appendix B, UNITS OF MEASUREMENT INDEX NUMBERS USED IN DATA LOG CONFIGURATIONS

    Appendix C, GLOSSARY

    SEP 2000

  • iv TABLE OF CONTENTSSpectra 100 Developer’s Guide

    This page is intentionally left blank.

    SEP 2000

  • INTRODUCTION 1-1Spectra 100 Developer’s Guide

    1

    INTRODUCTION

    1.1 PURPOSE OF THIS MANUAL

    ��������������������������

    ������������������

    ������������������������������������������������

    ����������������������������� ��������������

    ����� ������!����� ������ �������������������

    ���������� �����������������"�� ��������#���

    $�������%

    �����������������������������������������&

    ��������

    ������ �������������������������� ���������������

    �� ����������������������������������"�� ��������

    #���$�������%

    ��������

    "�����'��� ������������������������������������

    ����������������'�"�� �����������������������������

    ����������� ��������!������������%

    ���������

    $��������������������!���������� ���������'�����

    "�� �������(��� ��������

    �����������(����������

    ��� ����� ���(�������������) �������������(�������

    ���� �����������(�������'���������������

    �������(������� ���*���!��������������%

    ���������

    ����������������������!���������� �����������������

    ������ ��������������� ��������������� ����������

    ���� ���������������%

    �������

    +�������������!��������������

    �������%�+������

    �����������������������)�����������������������

    ������������%�,�

    ��'������������������������

    ������"�� �������������%

    SEP 2000 Purpose of This Manual

  • 1-2 INTRODUCTIONSpectra 100 Developer’s Guide

    1.2 DOCUMENTATION SUITE FOR SPECTRA 100

    ���������������������� �������������� �����������

    �������������"�� ��������#���$�������(� �����������

    ��������������������� ���������������������������

    ����������������� �����%�������� �������� ����

    �����������&

    - ��������������������������������������������

    �������������������������������

    � .������������

    � ��������(�������(���������� �(������������

    �������������� ����������������(������� ���

    ���� ���� ����%�/�� �������� ��������

    �������%�01���������� ��� ����������

    �������%

    - ����������� ���!��"������������������

    �����2�����

    � 3������������4����������

    � 5��6����������������"�� ���$�������

    �������������� ���� �������������������������

    "�� ��������#���$�������%�$����)����������

    �����������������������%����"�� ���$��(�

    ���

    �����#��7�'����� �

    (������ �����������

    8�������%�

    � #������&�������#$��

    - �����������%����&������"������������������

    �����2�����

    � 3������������4����������

    � 9������ �����������������������������'���

    �'�����"�� ��������#���$����������������

    "�� ���$��������������%�� �������

    �����������������������������������������

    ���� ��������������������� ������������%����

    "�� ���$��(��� �����������8�������%�

    � #������&�������#$��

    All the online manuals can be found in the ...\Help subdirectory that is made by installing the SpectraCom software. You can make Windows shortcuts to the filenames of the manuals for quicker access to them.

    Documentation Suite for Spectra 100 SEP 2000

  • INTRODUCTION 1-3Spectra 100 Developer’s Guide

    - �����������%�'������!��"������������������

    �����������

    � .�����������������������:�����: ������

    %.�#�

    � 9������ ����������� ��������������!�����

    ����� ��������� ������������'�����"�� ����

    ����#���$�������������'���������

    ������� �������������"�� ������������!�����

    ����� �%��5�����������:�����: ������9������

    �������(�����������������%�����% ��(����

    ��������������������%�

    � #������&������'#���

    - �������������������"������������������

    �����2�����

    � 3������������4����������

    � 5��6����������������"�� ���$�������

    ��������������� ���� �����������������������

    ��"�� ��������#���$�������%�$����)��

    ��������������������������������%��������

    "�� ���$���������� ����(����

    �����#��7�'(����

    �� ������8���������%�

    � #������&��������#$��

    ��'��������1��������������������'�����������

    �������(� ���� ��������$�������"���� �%��9��������

    ���� ���� ���������������������������

    �������������

    ������������%�

    SEP 2000 Documentation Suite for Spectra 100

  • 1-4 INTRODUCTIONSpectra 100 Developer’s Guide

    This page is intentionally left blank.

    Documentation Suite for Spectra 100 SEP 2000

  • EMBEDDED DATABASE AND DATA POINTS OF THE SPECTRA 100 2-1Spectra 100 Developer’s Guide

    2

    EMBEDDED DATABASE AND DATA POINTS OF THE SPECTRA 100

    2.1 ABOUT THE SPECTRA 100 DATABASE AND DATA POINTS

    ����������������������������"�� ��������#���

    $������������������������������� ����������� ����

    �������������������� � ����������������(�

    � �����������(���������������%

    ���������������� �������������������������� �����

    ����������������������������%�������������������������

    ����������)���������������� �

    �������������������

    ������������������%

    #���������� ��������(��������������������������*���

    ����������������������� ����������������������

    ��� ����%

    :�(�����!��������������������"�� ������������

    ���������������������'�������� ����������������������

    ������%�;���(����(������!��������������

    ��������

    ������������������������������������������������

  • 2-2 EMBEDDED DATABASE AND DATA POINTS OF THE SPECTRA 100Spectra 100 Developer’s Guide

    2.2 ONLINE GUIDE TO SPECTRA 100 DATA POINTS

    ���������������������'�������������"�� �������������

    �����(���������������������4����������(�

    �����������%����&������"����(��������������������

    �����2�����(������������������������"�� ���$���

    �����������%�������������� ��������������������'�

    ����������������'��������� �������%������� ��������

    ����������6�����'�������������(����������������� �����

    �����(�� �

    ����������(�����'� �� 7�����(��������

    ����(����������������(��������!�������������

    �������(������ ����'�������%

    3� ��'������������"�� �������������.�����,����(�'���

    ���1�� 7'�������������������� ��������������'������

    ����4����������=��� �6��������%�>��� ������ ������

    ������������)��'������������������(���������������(�

    �������!��������������

    �������(���������������%

    Online Guide to Spectra 100 Data Points SEP 2000

  • EMBEDDED DATABASE AND DATA POINTS OF THE SPECTRA 100 2-3Spectra 100 Developer’s Guide

    :������������������������� ������������'����

    �������������������%�>��� ���������������(����'���

    ���(����������������� ��'�������� �%

    ���� �

    �����"�� �������������.�����,����������'���

    �������������"�� ���$������������������(��� �����

    ���������"�� ���$���=8��6�����%

    ���� �

    ����������.�����,���������������

    "�� ���$��(��������4������0)���������� ��������

    ����������#$��(�����=9��6�����'������� � 7�������

    �����������%������������%����������������� �'�

    ������������"�� ���$����������(��������%%%?8���

    ������ ���'(������������"�� ���$������������%��#���

    ������������������ �

    �����������(� ��������4������

    ���� ������������'����4��������7��������4������

    �������=���� ��(�����������������7���6�%

    SEP 2000 Online Guide to Spectra 100 Data Points

  • 2-4 EMBEDDED DATABASE AND DATA POINTS OF THE SPECTRA 100Spectra 100 Developer’s Guide

    This page is intentionally left blank.

    Online Guide to Spectra 100 Data Points SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-1Spectra 100 Developer’s Guide

    3

    MODBUS GUIDE FOR THE SPECTRA 100

    Section Contents

    General Principles of Modbus .......................................................................See section 3.1About Modbus............................................................................................................ 3.1.1Modbus Modifications for Daniel Flow Computer Systems........................................ 3.1.2Communications Transmission Modes, ASCII vs RTU .............................................. 3.1.3Framing in ASCII Modbus Transmission.................................................................... 3.1.4Framing in RTU Modbus Transmission...................................................................... 3.1.5Address Field ............................................................................................................. 3.1.6Function Code Field................................................................................................... 3.1.7Data Field................................................................................................................... 3.1.8Function Codes Supported by the Spectra100 .......................................................... 3.1.9Understanding Function Codes and Nominal Responses ....................................... 3.1.10Exception Responses Supported by Spectra100 .................................................... 3.1.11Error Detection, CRC ............................................................................................... 3.1.12Error Detection, LRC................................................................................................ 3.1.13Data Type: Boolean ................................................................................................. 3.1.14Data Type: Short Word (Integer 16-bit) .................................................................... 3.1.15Data Type: Long Word (Long Integer 32-bit) ........................................................... 3.1.16Data Type: Floating Point (32-bit) ............................................................................ 3.1.17

    Function Code Details ....................................................................................See section 3.2Function Code 01, Read Boolean Status................................................................... 3.2.1Function Code 03, Read Numeric Variables .............................................................. 3.2.2Function Code 05, Set Single Boolean ...................................................................... 3.2.3Function Code 06, Set Single Numeric Variable ........................................................ 3.2.4Function Code 15, Set Multiple Boolean Variables .................................................... 3.2.5Function Code 16, Set Multiple Numeric Variables.................................................... 3.2.6

    Modbus Register Contents ............................................................................See section 3.3Modbus Data Types ................................................................................................... 3.3.1Registers 0002-0009, Clock....................................................................................... 3.3.2Registers 0032, 0701-0704, Logs (Event, Alarm, and Data) ..................................... 3.3.3Registers 1001-7999, Boolean and Numeric Data Points ......................................... 3.3.4

    Special Modbus Operations for Spectra100.................................................See section 3.4Setting the Spectra100 Clock .................................................................................... 3.4.1Reading the Spectra100 Clock .................................................................................. 3.4.2Reading and Configuring Spectra100 Logs ............................................................... 3.4.3

    SEP 2000

  • 3-2 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    3.1 GENERAL PRINCIPLES OF MODBUS PROTOCOL

    3.1.1 About Modbus

    !������������������� ������ ����������

    ����������� ������'��������� ���������'�����������

    ���������������������� �������(� �������(�

    ����������������������������(����������� ������

    ���� �%

    !���������!��� ���������������7�������'����

    ,����� ���������%�$������'(�!��� �������������

    ���������,������" ��������"%:%(�#��� �%�����!�����

    ������ ����������� ������'��� �����������

    ������� ����������������@!�����.���� �@���

    ��������������������������������������'�!��� ���

    �������&

  • MODBUS GUIDE FOR THE SPECTRA 100 3-3Spectra 100 Developer’s Guide

    3.1.2 Modbus Modifications for Daniel Flow Computer Systems

    ��������� ����������������������"�� ������������

    �)��������������,����!��� ���:"$

    �!�����

    ����� �(�����������'��������������(�� %(���������

    ������������������� ���������'�0�����

    $����������%

    �������������� ����:"$

    ��������������!�����

    �������������������������������'��%�������������

    �������� ����������������(��������� �����000�

    ���������������������(���������������%

    .�������������0������� ��� �����(�!�������������

    ����������� ����'������������������������������*���%�

    ������(���������������A���� �������1������(������ ����

    ������������������������������������'�������������

    ������������������

    ������������A#����)�(�������A�

    ��� ��������������A0����)�(�������2���� ����%

    ����"�� ������� ������'���'��������:"$

    !����� ������ �����%

    �������������������������A(��(�0(�!����(�:"$

    (���%%%

    � A���������

    � ���������

    � 0���������'� �� 7

    � !�����:"$

    ������ �%

    3.1.3 Communication Transmission Modes, ASCII vs RTU

    ����������������������������

    �������������������

    �������!�����'���%�/�������������������������

    ������������� ������ ��������������(���������

    ������� ���������������������1����������������

    ���������%

    The Spectra100 currently only supports ASCII Modbus communi-cations.

    SEP 2000 General Principles of Modbus Protocol

  • 3-4 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    3�'������������'�����������������������'���%�����

    ���������:"$

    �����9�5��9��������������5����(�

    ������������ ���������������%

    �����(�������%

    )��*������+����,��$��������%

    [*LSF: least significant bit sent first]

    -������$��.��(#

    ASCII (7-bit) RTU (8-bit)

    Hexadecimal, using only the ASCII characters 0 to 9 and A to F.

    8 bit binary

    ASCII (7-bit) RTU (8-bit)

    Start bits 1 1

    Data bits (LSF*)

    7 8

    Parity (optional)

    • 1 (1 even or odd)

    • 0 (no parity)

    • 1 (1 even or odd)

    • 0 (no parity)

    Stop bits

    • 1 (1 for even/odd parity

    • 2 (2 bits if no parity)

    • 1 (1 for even/odd parity

    • 2 (2 bits if no parity)

    ASCII (7-bit) RTU (8-bit)

    LRC CRC

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-5Spectra 100 Developer’s Guide

    ������(�%����������#���������(�����������������������

    ����������������

    �������������� ��������������9�5�

    ����:"$

    �!�����������

    ��������%�������D���

    �������� ��������������'������������ �� 7����

    �������������������

    ���(��������������:"$

    �!�����

    ��

    ������������)�����'���� ����������������

    ���� ���������'�����9�5�!�������

    ���%

    3.1.4 Framing in ASCII Modbus Transmission

    #����������:"$

    �!�����������

    �����������

    � ���������'������������������1��� �����&��

    ���� ����������� ����������������������(����� ��������

    ��������$9������������+#��������������������������%

    ;�����7������� ��������������������7����

    ��������'��������� �����&�� ���� ���%�4����������

    �� �����(��� ������ ���� ����������)������������

    �����

    ������������������������������������

    ������� �%

    ������������� ���� ���(������������������������(����

    ���������'� �����*���� ���� ������� ������ ����

    �������������������������������'������ ��������

    �������������'����������%

    Beg of frame

    Address Function DataError check

    EOFReady to receive response

    : 2-char 2-char n-char 2-char CR LF

    char = character(s).1 character = 7 data bits, 1 start bit, 1 or 2 stop bits, and, optionally, 1 parity bit.

    SEP 2000 General Principles of Modbus Protocol

  • 3-6 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    3.1.5 Framing in RTU Modbus Transmission

    #�����'� �����*������ ��������������������9�5�

    !�����������

    �����������'��'������������

    '� ���������

    ���%

    ��9�5�����(���

    ��������������������������������

    ��������%E� ���� ��������%��������������'�

    ������������������������� ���� ����������������

    ����������������������������������������7��������

    ���������������'�������������B���������������������

    �����%����������������������������������������� ��

    �����

    %

    :������������ ���� �����������������������������(��%E�

    ���� ������������7������������������

    ���%

    �������������

    ��������������������������������

    ��������������%��������������������������������%E�

    ���� ���������� ���������� ���������������������(�

    ������ ����������� ������������� ���������

    ����

    �����

    ���������������)���'������������������

    ������

    �����������

    ���%

    "�����'(������������

    �����������������������%E�

    ���� �����������������������������

    ���(�����

    �� ����������� ����� ������������ �������������������

    ����������

    ���%�������������������(���������������

    ���������$9$����������������������������� ��������

    ��

    ���%�:��'�� ����

    ���������������������%

    Address Function DataError check

    EOF

    T1 T2T3 T4

    8-bits 8-bits n x 8-bits 16-bits 16-bits T1 T2T3 T4

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-7Spectra 100 Developer’s Guide

    3.1.6 Address Field

    �����������������(����������

    ���������������'�

    �������������������������������� ��������F�����

    �9�5������� ���� �����:"$

    �%�������������� ��������

    �����

    �����������

    ���������������� ������������

    �� �����������

    ���������'��������� ���������%

    0� ��������������

    �����������1��������

    �������'�

    ���������

    ����������������������1���'������

    ���������������

    %�4������������������������(�

    �������������

    ��������������������� ��������

    ������ �����%

    +��������������(�#���������� �����

    ���(����

    �����

    �����������%�:������������������������

    ����� �������������������7��� ��������������

    ���(�����

    ��������

    ��������������

    ���%

    3.1.7 Function Code Field

    ������� ����� �����������������������������������

    �����

    ��������������� ���������������%

    ���������������������������������� ����� �������

    ���� ����������'�������������������������

    ����������������"�� ����������� �������%

    -��������������#�4��������������������������

    �����(�������������� ����� ���������������� �����������

    ���������������������������(�������������7�������

    ������� ������� ��������) ��������������%

    ������� �������������) ������������������ ��������

    ������

    ����������������(������������������ ���������

    ���1�������������������������� ����� ���(�������������

    ���������� ������������������� ��%�3�������(�������

    ������������(������������'�� ����������������

    ��� ����� ���%

    SEP 2000 General Principles of Modbus Protocol

  • 3-8 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    0G:!.+0&��������������� ����������� ����� ����

    ���������)�(�������������������'(��������������������

    ��������������%��������������� ����7������

    ��1������� ������������������(������������������� ����

    ������������%�������) �������� ��(��������������

    ������� ����� �������F�����)�(�������������������'%�

    ����������'�������(�����������������������������

    ��

    ���(������) �������������� ��������)����������

    7�������������� ����������������������������) ������%

    3.1.8 Data Field

    �������������������

    ����������������������������

    ���� �� �������������������������������� ������

    ����������������7������� ��������������'�����

    ��� ����� ���%����� ����� ����������7���� ���������

    �������������

    �(�����1������'���������������������(�

    �������� ��������� ����������'��������������%

    #���������� ����� ����������

    ���(���������������

    ����������)�����(�������*���������%

    3.1.9 Function Codes Supported by the Spectra100

    ����������������!�������� ����� �������������

    �'�����"�� ������&

    Code Operation

    01 Read booleans / Read coil status

    03 Read numeric / Read holding register

    05 Set single boolean / Force single coil

    06 Set single numeric / Write holding register

    15 Set multiple boolean / Force multiple coils

    16 Set multiple numeric / Write holding registers

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-9Spectra 100 Developer’s Guide

    /��"������#�!�

    ���������#�� �����$�������

    ���������2��������� ������ ��� �'���� ��� ��������

    ������� ����������������������� �

    ��%

    #�� �����$������(��E������E����������/������

    �������(������$������(��2(������2���������������� �

    ��2����(����������������������������������������%

    +��������������(�#�#�� ����� �����E(��2(��E(�����

    �2�����������'���� ����� ������������������ �����%�%(�

    ��������������

    �������%

    3.1.10 Understanding Function Codes and Nominal Responses

    ����� ����������'��)���������!�������� �����

    �����������������������������������!��������(�

    ����������������������������'��������������

    �����������%

    %�������������������*��������(����������������

    ���0���1����)��#�������������,��������!��� ���

    ������� ������!����� ������ ������������������

    �����������������������������

    ������������� ������

    *���%�"�(������!��������������������� �������

    1������(����������� ���'���������������������������

    ������������������������������������������������)�(�

    �� ��������������������!������������%�"�����'(����

    �����������A���� �������1������(������ �������������

    ��������A0����)�(�������2���� ����%

    �������������(��������������!�����

    ������ ��������������"�� ������(���� ������������

    �����������������%������(���������������������

    ������������������������������'�0����(�������'�

    ������������������������������%�$���1����'(��������'�

    �����������

    ������������A���� ����(����������

    � ���������������������A#����)�(�������A�

    ��� ����%

    SEP 2000 General Principles of Modbus Protocol

  • 3-10 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    �����)��������������(������������ ���������������

    ���� ��������� ������������ ����� ���(��������������

    ����������%

    -������������������������������������#�����

    �)������������������������������'����1���������

    �������������������������(����F�������/$��/$�(�

    ��)�(��������!�������������������

    ������2(���)%�

    #����������������������9�5�������

    �������������

    :"$

    �������

    ��������%

    -�������2����#

    Message RTU ASCII

    Header none colon

    Slave address 0000 0110 0 6

    Function code 0000 0011 0 3

    Data: Start reg. H.O. 0000 1011 0 B

    “ “ L.O. 1100 0000 C 0

    Data: Qty. of reg. H.O. 0000 0000 0 0

    “ “ L.O. 0000 0011 0 3

    Error check H.O. CRC 16 bits LRC 2 chars.

    “ “ L.O.

    Trailer none CR LF

    TOTAL BYTES 8 17

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-11Spectra 100 Developer’s Guide

    -���������������#

    )����#

    - ��//����*��������(���*����3��������4��(

    ����:"$

    ���

    ���(����������������(�������'�

    ��������)�����'���� ����������������'����������

    ���������9�5���

    ���%

    ������9�5� ������ ����������(����'������

    ����������������������������������F�����

    ���� ���%�������:"$

    � ������ ����������(��� ��

    F�����:"$

    � ���� ���� �������B��������������B�

    ������������������������� ��� �:"$

    � ���� ����

    Message RTU ASCII

    Header none colon

    Slave address 0000 0110 0 6

    Function code 0000 0011 0 3

    Byte count 0000 1011 0 B

    Data: Status H.O. 0000 0000 0 0

    Data: Status L.O. 0000 0101 0 5

    Data: Status H.O. 0000 0000 0 0

    Data: Status L.O. 0000 0011 0 3

    Data: Status H.O. 0000 0000 0 0

    Data: Status L.O. 0000 0000 0 0

    Error check H.O. CRC 16 bits LRC 2 chars.

    “ “ L.O.

    Trailer none CR LF

    TOTAL BYTES 11 23

    SEP 2000 General Principles of Modbus Protocol

  • 3-12 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    ���%�$���1����'(�����:"$

    � ���� ��������

    ��1�����������������F���������'������������������%

    - 5����*���4��(�$�����������4��(�$����������

    �������������������

    �����������������

    �����������)�� �����

    �����������������������

    ����!�������� ����� ���%������)�� ����������

    ����������������������������%������'��� �����

    �������������������������������������F��������

    �'���������������� ������������������%

    ������������������������������������

    ������������������������������%�#�����)���������

    ������������'��� ��������������������������'�

    ������������������������%

    3.1.11 Exception Responses Supported by Spectra100

    ����������������!������) �������������� ����

    ����������'�����"�� ������&

    *����-������������������#�3�������������������

    �������������������������������

    ���(��������� ��'�

    ��� ������ �����%������������������������) �������

    ����������������������������� ������������������(�

    ������������������'�����������%������) ��������������

    ������������������������������%

    4�������������� ����������(�����������������

    ��

    ����������������%��������������

    ���� �����

    Code Interpretation

    01 Illegal function

    02 Illegal data address

    03 Illegal data value

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-13Spectra 100 Developer’s Guide

    ��������������

    (���� ����� ���(������� ��������������

    �� 7�����%

    ������� ������������������������������ ������������

    �����(������������������������������ ����� �������������%

    /����������)������������� ���� ��1���'���������

    ���1������) �������������� ���%

    -�������2����������(�#

    -�������-�������������#�"�� ������1������'����

    �����������

    �������������(�������������������

    ������������������������&

    Slave address 0A

    Function code 01

    Data: Start reg. H.O. 04

    “ “ L.O. A1

    Data: Qty. of reg. H.O. 00

    “ “ L.O. 00

    Error check LRC H.O. --

    “ “ L.O. --

    Slave address 0A

    Function code 81

    Exception code 02

    Error check LRC H.O. --

    “ “ L.O. --

    SEP 2000 General Principles of Modbus Protocol

  • 3-14 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    ������������������(�������� ����� ���������������

    ����������� ����� �������������������������������������

    ����������'�C�F��8�)�%�0) ������� ����������� �����

    ������������������

    %

    3.1.12 Error Detection, CRC

    ����!���������� �����������������������������

    �� 7�����������������

    ��������1����'�������������

    ������

    ���%�������� ���������������������������

    �����'�������� ������(�����'��������������� '�

    �� 7&�$' � �9������� '�$�� 7��$9$������

    +�����������9������� '�$�� 7��+9$�%

    4�� ���������� '� �� 7������������������������

    ������������������

    ���%�9�5�������������$9$(�

    ��������:"$

    ���������+9$%

    ����"���������#�����$' � ��9������� '�$�� 7�

    �$9$��������������'��(� �������������2����������'�

    ����%�����$9$�������� � �������'�����������������

    ���� �(���� �������������$9$����������

    ���%�����

    �� ����������� ���� � �������$9$���������� ��������

    ������

    ���(����� ����������� � ������������������

    � �������������� �������������$9$�����%�����������

    ��������������1��(��������������%

    ����$9$�����������'�������������������2�������������

    ������H%����������� �

    �������������'����� �

    ����

    �����������'������������

    ����������� ������� �������

    ��������������%�3�'���������������������������� ��

    ���� �������������������������������$9$%�"���������

    �������(��������������'����(�����������'��������$9$%

    �������������������������$9$(��� ������������ ���� ����

    ���) �����39�������������������� ������%����������

    �������������������� ���������������������� ��������

    �+"/�(��������*���������������������������� ��������

    �!"/���������%�����+"/����)��� ���������)������%�

    ������+"/������(���������������������) �����39���

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-15Spectra 100 Developer’s Guide

    ������������(���)�������%�������+"/������(����

    �) �����39���7���� �%

    ������� �

    ��������������������������������������

    ���������%�:�������������������������(�������)��������

    ���� ���� �������) �����39�������������������H�

    �����������(������������ �

    �����������������������

    ��������� �����������%���������� ��������������

    �������(������������� ���� �������������

    ���������

    �����������(�������$9$�����%

    �����*�������/�����������#

    �% +�������2������������������####���)�����H�%�$��

    ��������$9$��������%

    �% 0) �����39���������������������'����������

    ��

    �����������������������'�����������2�����$9$�

    �������(�������������������������$9$��������%

    �% "���������$9$��������������������������������������

    ����+"/�(�*��������������!"/%�0)��� ������

    �)����������+"/%

    B% ������+"/����(��������"��������������������%�������

    +"/����(�0) �����39�����$9$������������������

    ��'�����������:������)�����������������

    �����%

    E% 9������"����������B���������������������������

    ���������%�4��������������(��� �����������������

    �'������������������� �

    ��%

    2% 9������"������%%%�E�����������)�������������'����������

    ��

    ���%�$��������������������������'��������

    �������� �

    ��%

    A% ��������� ��������������$9$���������������$9$�

    ����%

    F% 4���������2�����$9$�����������������'������

    �� ��������������

    ���(��������������������'���

    �������������%���������������'���������

    ���������������(���������'�����������������'��%�

    SEP 2000 General Principles of Modbus Protocol

  • 3-16 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    0G:!.+0&�������$9$����������B����)�(������

    ����$9$���������������������������(��������

    ������������������(���(�����������%

    3.1.13 Error Detection, LRC

    4���-������$��.���6�����#����������� �� 7�

    �1��� ����������:"$

    ��������+9$%����������� �� 7�

    �����F����������'����������������������������������

    ������:"$

    ���)��� �������)�� ���� ���%

    ���������� �� 7�������� ����'� ����������������)�

    ���� ������������'(�����������������'� ���� ����

    ������������������� ���'(��������H� ������������

    ��������%�:�������� ��������������+9$����� � ������

    ���� �������������������+9$%����� ���(�$9(�+#(�����

    ��'��������������:"$

    ���)� ���� ����������������

    ��� � �����������+9$%

    �"����)����(���)������%�

    41(hex) L.O. 0100 0001

    12(hex) H.O. 0001 0010 (last byte transmitted)

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-17Spectra 100 Developer’s Guide

    -������#�����+9$�����������������������������������

    �F��������(������� ����� ������(����������&

    ;3�0&����������������+9$� �� 7���'��) ����������

    �F�����%�3�'���������������������������������%

    Slave address 0 2 0000 0010Function code 0 1 0000 0001Data: Start reg. H.O. 0 0 0000 0000“ “ L.O. 0 0 0000 0000Data Qty. of reg. H.O. 0 0 0000 0000“ “ L.O. 0 8 + 0000 1000

    0000 1011

    1’s complement 1111 0100+1 0000 0001

    2’s complement 1111 0101

    Error check F 5

    Receiving PC sums all data bytes received, including LRC at end.

    0000 00100000 00010000 00000000 00000000 0000

    OK 0000 10008-bit sum should equal zero (0).

    Error check 1111 0101Sum 0000 0000

    SEP 2000 General Principles of Modbus Protocol

  • 3-18 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    3.1.14 Data Type: Boolean

    ����/��������������������������������������3;<

    3##��������������������������

    � ���������������

    �������������!������������%

    �����������������!�������������������� 7���

    �����F�����������'���������������������� ��/������

    �������%����������������������������������� ���� ����

    �������������������������������/�������������%�����

    ���������������������������/�������������������

    �������� �

    ��������������������%�#���/������

    1������������������������������������������(��������

    ���� �����������������������*����������������������

    ���%

    0G:!.+0&��������������������/��������������

    ������������������������������������

    ���������

    �������$�����)�(��������������������'�%�9�������

    �����������������(���������+"/����!"/(��������������

    /����������(�����(����B(����A��������F�������

    �����3;(����/����������������������������������

    �������������

    ��%

    3.1.15 Data Type: Short Word (Integer 16-bit)

    �������������������� ��������������2������������%�:�

    �����������������������������F������'������9�5�

    !����(��������� ���� �������:"$

    �!����(����

    �)� ������� ������%

    -�������#

    1B6D (hex) = 7021 (decimal)

    0020 (hex) = 32 (decimal)

    General Principles of Modbus Protocol SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-19Spectra 100 Developer’s Guide

    3.1.16 Data Type: Long Word (Long Integer 32-bit)

    ������������������� ���������������������������%�:�

    �����������������������������F������'������9�5�

    !����(���������� ���� �������:"$

    �!����(����

    �)� ������� ������%

    -�������#

    3.1.17 Data Type: Floating Point (32-bit)

    ��������������� �����������������������������������

    �����������������'���������� ���� �������:"$

    !������������������������� ��� ����������&

    ��(��+��#�����I"J�������������������&

    � "������������������������������������������%

    � "�����������*������������������������������%

    -��������+���#�����I0J���������������6��)������%���

    �������6� �����������������������'���A�

    ��� ����%

    ���������+���#�����@!@�������������������������*���

    �����

    �%��������������� ���������!"/�������'�

    ������������(�����������������)�� ��'������%�����

    '����������� �������� ���������B����%

    0001D52E (hex) = 120110 (decimal)

    00018CD5 (hex) = 101589 (decimal)

    Sign Exponent Mantissa

    (1 bit) (8 bits) (23 bits)

    SEEE EEEE EMMM MMMM MMMM MMMM MMMM MMMM

    byte 3 byte 2 byte 1 byte 0

    SEP 2000 General Principles of Modbus Protocol

  • 3-20 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    �������(�&�����5����#��������������������������

    �� ������������������������'������'��������������

    �����������������������������)������(��'����������'�

    �����

    �%

    �����

    ���������������������'������

    �������!"/�����

    �����������������(������������������������������������

    ��� �������������%�%(����������������������

    ����

    �����������������1�������%�������

    �������%��%

    ;������������������������'������������������������

    ���������������������)� ������� ������%������� ������

    +3

  • MODBUS GUIDE FOR THE SPECTRA 100 3-21Spectra 100 Developer’s Guide

    3.2 FUNCTION CODE DETAILS

    3.2.1 Function Code 01, Read Boolean Status

    ������� �������������������������������3;

  • 3-22 MODBUS GUIDE FOR THE SPECTRA 100Spectra 100 Developer’s Guide

    -�������2����7����������������#

    -���������������7����������������#

    ���������)����#�������������� 7����������������� ��

    /�����������������%�������������� ������������

    Slave address 11

    Function code 01

    Data: Start reg. H.O. 03

    “ “ L.O. FC

    Data: Qty. of reg. H.O. 00

    “ “ L.O. 25

    Error check LRC H.O. --

    “ “ L.O. --

    Slave address 11

    Function code 01

    Byte count 05

    Data: Status 1020-1027 CD

    Data: Status 1028-1035 6B

    Data: Status 1036-1043 B2

    Data: Status 1044-1051 0E

    Data: Status 1052-1056 1B

    Error check LRC H.O. --

    “ “ L.O. --

    Function Code Details SEP 2000

  • MODBUS GUIDE FOR THE SPECTRA 100 3-23Spectra 100 Developer’s Guide

    �����

    (���� ����� ���(�1������'��������� ���� ���(�����

    ����� ���� ���(����������� �� 7���%

    "���������������� 7��������F�����������'����������������

    ������ ��/�������������C�3;(���C�3##�%

    !.39�:;�&��������������(���������������*������

    �������������� ���� ���� ����������������������$��

    �������(�+���������(�����%����������������������

    ����������/��������������������������� �

    ����

    ����������������%

    �������)����������(�������������/�����������

    ���A����������$�����)��C�����������������'�%�

    9�������������������(��������������/���������A(�

    ���2(�����(�����(���������������������3;����C�

    3;�%�����������/������������'��������� �����

    �����'%

    !.39�:;�&��#���/������1����������������������

    ��������������������(�����������$��������������*��

    �������������$�8��������������������������%�������

    ����(����(���������)����������%������������1������'�

    ���/��������������1�����(�����������������(�

    ��� ������������/����)��C�����������������'�(�

    ���������������������'������/��������������

    ���E����E2�����������������%�������������������(����

    ���������������������������������*��������������F�

    ����������%

    ����1������'��������� ���� ���������'��� ��������

    1������'����9�5� ���� ���L��%�%(������������������

    ������������9�5����:"$

    ������%

    "��������������������1������'����/������

    ����������� ��