36
Programmable Systems HIMA Paul Hildebrandt GmbH + Co KG Industrie-Automatisierung Functions of the Operating System BS41q/51q V7.0-7 (9906)

h41q-h51q Operating System

Embed Size (px)

DESCRIPTION

about hima plc

Citation preview

  • Programmable Systems

    HIMA Paul Hildebrandt GmbH + Co KGIndustrie-Automatisierung

    Functions of the Operating System

    BS41q/51q V7.0-7 (9906)

  • Attention:

    Maintenance on supply, signal and data lines may only be executed by qualified personnel with consideration off all ESD protection measures. With direct contact of this lines the maintenance per-sonnel have to be electrostatic discharged!

    Important Note

    All HIMA products mentioned in this manual are protected with the HIMA trade-mark. As not diffe-rently noted down this is possibly also valid for other mentioned manufactueres and their products.

    The technology is subject to changes without notice.All technical statements and data in this manual have been worked out very carefully, and effective checks and inspections have been applied. This manual may however contain flaws or typesetting errors. Therefore HIMA does not offer any warranties nor assume legal reponsibility nor any liability for the possible consequences of any errors in this manual. HIMA would appreciate being informed on possible errors.

    Conditions of Supply and Delivery

    The General Conditions of Supply and Delivery for the Products and Services of the German Elec-trical Industry apply for our deliveries and services.

    Eventual complaints can be recognized only when we are being notified within 14 days after receipt of the merchandize.

    The prices shown in a special list are valid ex works, packing charges excluded. The prices ars sub-ject to change.

  • Table of ContentsTable of Contents

    1 The Functions of the Operating System . . . . . . . . . . . . . . . 3

    2 Identification of the Operating Systems . . . . . . . . . . . . . . . 52.1 The BS41q/51q Operating System, V7.0-7 . . . . . . . . . . . . . . . 5

    3 Assignment tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.1 Assignment of the Operating Systems to the

    Types of Central Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.2 Assignment of the Operating Systems to other Firmware . . . . 6

    4 Cycle Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    5 HIMA - Standard functions . . . . . . . . . . . . . . . . . . . . . . . . . . 95.1 Standard Building Blocks Independent of the IO level . . . . . . . 95.2 Applicable IO Modules with Associated Software Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    6 Overview of the possible couplings . . . . . . . . . . . . . . . . . . 11

    7 Coupling with Other HIMA PES . . . . . . . . . . . . . . . . . . . . . 117.1 Non-Safety Related Data Transmission . . . . . . . . . . . . . . . . . 127.2 Safety Related Data Transmission . . . . . . . . . . . . . . . . . . . . . 127.3 Safety Related Communication via

    Communication Module F 8625 . . . . . . . . . . . . . . . . . . . . . . . 12

    8 Coupling with HIMA Master Systems . . . . . . . . . . . . . . . . . 138.1 Engineering Station (ELOP II) . . . . . . . . . . . . . . . . . . . . . . . . 138.2 Visualisation system (PLESY II) . . . . . . . . . . . . . . . . . . . . . . . 139 Logic Plan Controlled Logging . . . . . . . . . . . . . . . . . . . . . . 14

    10 Coupling with External Systems . . . . . . . . . . . . . . . . . . . . 1410.1 Coupling with Process Control Systems via MODBUS Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1410.1.1 Available Reading Codes 1, 3 . . . . . . . . . . . . . . . . . . . . . . . . 1610.1.2 Available Writing Codes 5, 15, 6, 16 . . . . . . . . . . . . . . . . . . . 1710.1.3 Loop Back Diagnostic Test, Code 8 . . . . . . . . . . . . . . . . . . . . 1810.1.4 Function Codes for Events 65, 66, 67 . . . . . . . . . . . . . . . . . . 1810.1.5 Events Checks via Standard Codes 1,3 . . . . . . . . . . . . . . . . . 2010.1.6 Time Synchronization, CODE 70 . . . . . . . . . . . . . . . . . . . . . . 2310.1.7 Time Synchronization, CODE 6 . . . . . . . . . . . . . . . . . . . . . . . 2310.1.8 Hints on the Operation of the System . . . . . . . . . . . . . . . . . . 2310.2 Coupling with the 3964R Protocol (SIEMENS Devices) . . . . 2410.2.1 Overview of the Functions of the 3964R Protocol . . . . . . . . . 2410.2.2 Available Writing Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2510.2.3 Available Reading Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2510.2.4 Error Codes Transmitted to the Master . . . . . . . . . . . . . . . . . 251

  • Table of Contents11 Diagnostic Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2611.1 Information to be Called during RUN Operation . . . . . . . . . . 2611.2 Errors in the Central Area (CPU LED lights up) . . . . . . . . . 2911.3 Errors in the IO Area (IO LED lights up) . . . . . . . . . . . . . . . 2911.4 List of Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

  • The Functions of the Operating System1 The Functions of the Operating SystemThe program of the operating system contains all the basic functions of theHIMA Programmable Electronic System (PES). The functions to be per-formed by the respective PES are defined via the ELOP II system softwarein the user program. A code generator translates the user program into themachine code. This machine code is transmitted to the Flash-EPROM ofthe central module via a serial interface.

    The main functions of the operating system and the selections in the userprogram are listed in the table below.

    Functions of the operating system Work in the user programCyclic work of the user program Function blocks, functions, variables

    HIMA standard building block (stored in the operating system)

    Standard building block, variables

    Configuration of the PES1 or 2 IO-bus, number of power packs.

    Configuration in resource type

    Reload of the user program possible with restrictions(ref. manual (CD) ELOP II Resource-Type H41q/H51q)

    Tests in central area and in IO-bus

    Tests of IO-modules (dependant on type) Type of IO-moduleReaction with error fixed or configureable

    Diagnostic display

    Diagnostic mode for testable IO-modules Software building block HZ-DOS-3

    Communication with serial interfaceEngineering stationpermissible things during running

    ELOP II

    Configuration in resource type

    PLESY IIPLESY II Logline

    Variable Declaration, external couplingattributes, event - controlled

    PES-Master, non safety related Variable Declaration, attributes, HIBUS commu-nication

    PES-Master, safety related Variable Declaration, attributes, safety related HIBUS communication

    MODBUS-Mastersystems Variable Declaration, external coupling

    MODBUS-Slavesystems Software buildingblock HK-MMT-3,Variable Declaration, external coupling

    Mastersystems with protocol 3964 R Variable Declaration, external coupling

    logic controlled logging Variable Declaration, attributes, event - control-led, history3

  • The Functions of the Operating SystemIf a master system requests data (read data) via the serial interfaces (en-gineering station, process control system via MODBUS coupling, etc.) thePES answers immediately (instant answer) on the interface from which itreceived the read request.

    The write data received via the serial interfaces are stored in a buffer andtaken over at the beginning of the next cycle. Depending on the master theanswer comes either instantly (PLESY II, PES master) or when the datasare taken over.

    Maximum size of user program:

    512 kByte program96 kByte data

    Buffer size of the serial interfaces:

    512 bytes4

  • Identification of the Operating Systems2 Identification of the Operating Systems

    2.1 The BS41q/51q Operating System, V7.0-7The program of the operating system is loaded in one Flash-EPROM with1 MB. The operating system has the identification:

    BS41q/51q V7.0-7 (9906)Furthermore the signature of the operating system is used as Identificati-on. The signature can be called on the diagnostic display during operationof the automa-tion device. The signature is:

    BS-CRC: 2E495

  • Assignment tables3 Assignment tables

    3.1 Assignment of the Operating Systems to the Types of Central Modules

    3.2 Assignment of the Operating Systems to other Firmware

    The edtions in bold types are the recommended editions.

    System family H41q H51q

    H41q-S H51q-S

    System name H41q-M H41q-HH41q-HR

    H41q-MSH41q-HS

    H41q-HRS

    H51q-M H51q-HH51q-HR

    H51q-MSH51q-HS

    H51q-HRS

    Central unit F 8653 F 8653 F 8652 F 8651 F 8651 F 8650

    Operating system BS41q/51q V7.0-7

    TV tested

    Operating system Operating system CMBS51-CB V6.0-6

    Ethernet module (EN-BG)F 8625/F 8626

    Code generatorELOP II RT H41/H51

    edition

    BS41q/51q V7.0-7 (9808) V 1.0 V 2.0BS41q/51q V7.0-7 (9808) V 1.4 V 2.16

  • Cycle Run4 Cycle Run

    The operating system continually processes the user program cyclically.A greatly simplified form of the order of processing looks as follows: Reading the input signals Processing the logic functions

    according to IEC 61131-3 chapter 4.1.3 Writing the output signals

    plus the following essential functions: Extensive self-tests Tests of the IO modules during operation Data transfer and data comparison

    A cycle is processed in 7 stages.

    EN-BG = Ethernet Module

    Cycle run PES with2 central modules, 1 IO-bus

    PES with2 central modules, 2 IO-busses1 central modules, 1 IO-bus

    H41q-H, H41q-HSH51q-H, H51q-HS

    H41q-M, H41q-MS, H41q-HR, H41q-HRSH51q-M, H51q-MS, H51q-HR, H51q-HRS

    Stage 1 cyclically selftestscyclically consistency testmaster change central module

    cyclically selftestscyclically consistency test

    Stage 2 Processing of all write transmissionsreading and testing of inputs (also from EN-BG) from master central moduletake over of receive data in variables

    Processing of all write transmissionsreading and testing of inputs reading and testing of inputs (also from EN-BG)take over of receive data in variables

    Stage 3 transmission of the inputs to the slave central module

    transmission of the inputs to the other central module, if redundant central module exist

    Stage 4 copy all internal variables to import variablesworking of the user logicwrite export data to EN-BGcyclically comparison of memory

    copy all internal variables to import variablesworking of the user logicwrite export data to EN-BGcyclically comparision of the memory, if redun-dant central module exist

    Stage 5 exchange of the output and comparison exchange of the output and comparison, if redundant central module exist

    Stage 6 writing of the output signals by the master central module

    writing of the output signals

    Stage 7 reading back of the output signals by the slave central module and comparisionwith correctly output signals next cycle(stage 1)switching off of the faulty output module with unequal outputs (group shut down) and jump to stage 5

    reading back of the output signals by the slave central module and comparisionwith correctly ouput signals next cycle(stage 1)switching off of the faulty output module with unequal outputs (group shut down) and jump to stage 57

  • Cycle RunRedundant central modules are synchronized after each cycle stage.Communication via the serial interfaces and the parts of the self-test notperformed in every cycle are independent of the cycle stage.

    For further test routines and reactions on errors cf safety manual.8

  • HIMA - Standard functions5 HIMA - Standard functions The following list shows the HIMA - standard building blocks. The descrip-tion of the function of these building blocks is contained in the current CDELOP II-NT, in the manual ELOP II RT.

    5.1 Standard Building Blocks Independent of the IO level

    TV test means that the respective building block can be used in safetyrelated PES, and that it has a TV safety certificate.

    5.2 Applicable IO Modules with Associated Software Building Blocks

    Type Function TVtested

    H8-UHR-3 Date and time HA-PID-3 PID controller HK-AGM-3 H51q PES-master-monitoring HK-LGP-3 LCL evaluation and configuration HK-MMT-3 Modbus-master HZ-DOS-3 Diagnostic without safety HZ-FAN-3 Error display testable IOs

    IO-module Software building blockType TV Type Function TV BSF 3221 F 3222 F 3223 F 3224 F 3225 F 3227 F 3228 F 32351 HB-RTE-3 Monitoring of digital testable inp. F 32361 F 32371 HB-RTE-3 Monitoring of digital testable inp.. F 32381 HB-RTE-3 Monitoring of digital testable inp. F 3311 9

  • HIMA - Standard functions1) diagnostic mode wih HZ-DOS-3 possible

    TV (TV test) means that the respective IO module or software buil-ding block may be used for safety related functions, and that they have aTV safety certificate.

    F 3312 F 3313 H8-STA-3 Group shut down F 3314 H8-STA-3 Group shut down F 3321 F 3322 F 3323 HB-BLD-3/4 Module and line diagnosis F 33301 F 33311 HB-BLD-3/4 Module and line diagnosis F 3332 F 33331 F 33341 HB-BLD-3/4 Module and line diagnosis F 3412 F 3413 F 3422 F 5202 F 5203 F 6103 HA-LIN-3 Temperature linearisation F 6204 HA-PMU-3 Input converter parametrization F 6207 HA-LIN-3

    HA-PMU-3Temperature linearisationInput converter parametrization

    F 6208 HA-PMU-3 Input converter parametrization F 62131 HA-RTE-3 Monitoring analog testable inp. F 62141 HA-RTE-3 Monitoring analog testable inp. F 6215 HA-LIN-3

    HA-PMU-3Temperature linearisationInput converter parametrization

    F 6216 HA-LIN-3HA-PMU-3

    Temperature linearisationInput converter parametrization

    F 6217 HA-LIN-3HA-PMU-3

    Temperature linearisationInput converter parametrization

    F 6701 HA-PMU-3 Input converter parametrization F 67051 HZ-FAN-3

    HA-PMU-3Error display testable IOsInput converter parametrization

    F 6706 HA-PMU-3 Input converter parametrization

    IO-module Software building blockType TV Type Function TV BS10

  • Overview of the possible couplings6 Overview of the possible couplings

    The communication is only working, if the HIMA PES is in RUN-mode. Theonly exception is the communication with the Engineering Station (ELOPII).

    7 Coupling with Other HIMA PES

    The operating systems are designed for data transmission between HIMAPES via the HIBUS bus system. For this purpose, at least one H51q PESwith one coprocessor module is required which is used as PES master.Here the interfaces on the central unit as well as those on the coprocessormodule can be used.

    The safety-related transmission of data is also possible via Ethernet usingthe communication module F 8625. A physical existing PES master is notrequired, but only the definition of the configuration and monitoring of thedata transfer in ELOP II.

    The data to be sent and received by a PES are defined as variables withthe attribut HIPRO-S (for safety-related data transfer).

    The monitoring of the safety-related communication for regular receptionof data by the master system is configured in the properties of the resour-ce-type . The imported datas are set to FALSE or 0, if the master systemdoes not write any data within the defined time.

    Coupling or protocol SIO-channel

    Programming unit 1...8

    Printer (logic plan controlled logging) 2PLESY IIPLESY II Logline

    1...8

    Siemens protocol 3964R (Master) 1,2MODBUS-Master 1...8

    MODBUS-Slave (modem) with building block HK-MMT-3 1,2Safety related PES 1...8

    PES (HIBUS with PES-Master) 1...8Ethernet via communication module F 8625 acc. to IP address

    Profibus DP-Slave via communication module F 8626 Stat. addr. 0...12711

  • Coupling with Other HIMA PES7.1 Non-Safety Related Data Transmissiondeclaration will be done in the H51q variables assignments on the pagePES-Master HIPRO-N communication.

    During operation the PES master reads all the data to be transmitted in thePES connected, joins the transmissions for the PES and then sends thedata to the PES.

    7.2 Safety Related Data TransmissionStart the configuration out of the resource type. The declaration will bedone in the H51q variables assignments on the page PES-Master HIPRO-S communication.

    During operation the PES master organizes direct data transmission bet-ween the individual PES. The PES master itself does not store the data.Although data transmission runs via the HIBUS, it has to be imagined asa point-to-point connection.

    7.3 Safety Related Communication viaCommunication Module F 8625

    Using the communication module F 8625 up to 64 HIMA PES of the H51qsystem family can have a safety-related communication. This is realizedvia the Ethernet communication according to IEEE 802.3. The data to betransferred are depict from the CU through the communication module.The bus type is HIBUS. The PES master is defined only as a dummy inELOP II. Via the properties in the variable declaration the variables are de-fine as HIPRO-S variables. It is also possible to start a compiler run for the(dummy-) PES master to get a cross reference list for the communictionvariables. For further communication hints please refer to the F 8625 datasheet in the catalogue programmable systems of the H41q and H51q sy-stem families.12

  • Coupling with HIMA Master Systems8 Coupling with HIMA Master SystemsAs HIMA Master Systems we understand Personal Computers with anWindows NT operating system here. They are operated and configuredwith HIMA system software programs. Via the serial interface they are eit-her directly connected to the PES or they communicate with the HIMAPES via the MODBUS. The communication is only working, if the HIMAPES is in RUN-mode. The only exception is the communication with theEngineering Station (ELOP II).

    8.1 Engineering Station (ELOP II)The engineering station is used for programming, loading, monitoring anddocumenting the function of the HIMA PES with the programming and pla-ning system ELOP II.

    8.2 Visualisation system (PLESY II)The visualisation system PLESY II is used for the configuration of any pro-cess displays and for the interpretation and writing of variables of theHIMA PES.

    It is only possible to write variables of the PES with the attribute Modbusread/write.

    Furthermore the visualisation system stores and prints out events. Thewished variables get the attibute event controlled in the H51q variables as-signment. The events are stored in a buffer in the PES, and they are re-quested there by the visualisation system, where they are displayed on themonitor or printed out on a connected printer. For later evaluation, it is pos-sible to store the events on the hard disk. The configuration and the desti-nation of the alarm text are done in PLESY II.

    The visualisation system is able to display variables as trend curves on thescreen and store them on the hard disk. In the case the variables arestored on the hard disk, it is possible to display historical trend curves.13

  • Logic Plan Controlled Logging9 Logic Plan Controlled LoggingLogic plan controlled logging is for recording events (signal changes withtime) of the central module and for printing them out with interpretation ona printer connected to the HIBUS. Only interface 2 on the central modulecan be used for logic plan controlled logging. The wished variables get theattibute History Lcl in the variable declaration event.

    The events and texts are part of the user program. Further additionalfunctions can be realized by the HK-LGP-3 software building block (cf de-scription of the building block).

    10 Coupling with External SystemsThe operating system is designed for the serial communication with exter-nal systems (MODBUS, Fieldbus, OPC, 3964R, etc.).

    The data to be transmitted are configured in the variable declaration asBUSCOM variables.The external system can read all variables of the PES, which have the at-tirbute Read (Variable Declaration). The data received from an externalsystem has the attirbute Write.

    Directly used are the MODBUS protocol, as slave and master system, andthe Siemens 3964R protocol, as slave system. In the case the HIMA PESis used as a slave system, no further HIMA standard buildingblocks in theuser program are needed for the communication. If the HIMA PES is usedas MODBUS master, the HIMA standard building block HK-MMT-3 is ne-cessary in the user program. The function of the building block is explai-ned in the description of the building block. The interface parameters aredefined in thebookshelf (settings) of the resource, if they differ from the de-fault setting. (9600 baud or 57600 baud, 1 stop bit, even parity).The communication module F 8626 with its integrated Fieldbus communi-cation module enables the connection of a Profibus-DP slave.With the communication module F 8625 and a HIMA OPC server can berealized an Ethernet communication with the OPC protocol.

    The communication with the external systems is only working, if the HIMAPES is in RUN-mode.

    10.1 Coupling with Process Control Systems via MODBUS Protocol

    The MODBUS protocol is designed for transmission to a bus (e.g. HIBUS)as master-slave-system. It is usually applied for connecting HIMA PES toa process control system. The H41q and H51q PES can be used as slavesystems, without further building blocks, and as master system, with thebuilding block HK-MMT3. 14

  • Coupling with External SystemsThe MODBUS protocol was defined by the Gould Inc. We recommendsending your request of the documents directly to AEG-Modicon and toget some information on possible special features of the master system.

    For better understanding the essential features are explained here.

    The Principle of Data Traffic with MODBUS Protocol

    The HIMA PES only have the RTU (Remote Terminal Unit) mode of trans-mission, which is the customary way between computer systems. Thetransmission is asynchronous with 8 bits and CRC error check.

    This mode of data transmission usually has the following frame:

    * The number of bytes depends on the function, the number of addressesand data

    Start Start of transmission resp. end ofend of transmission is identified by a pause oftelegr. 3 1/2 chars (bytes) (T1 T2 T3)

    slave address of the slave system (HIMA: bus subscriber number, setting oncentral module)

    code function code writing or reading of variables, events

    data They comprise start address number of adresses and data depends on function, cf definitions in the MODBUS protocol.

    error check CRC (Cyclic Redundancy Check) whichis automatically generated by the transmitting system

    4 functions can be realized with the MODBUS protocol: Reading of variables Writing of variables Reading of events Time synchronization

    The master system can read and write the variables of the HIMA PES,which habe the attribute Modbus read and write.

    Start Slave Code Data Errorcheck

    End oftelegr.

    T1 T2T3

    1 byte 1 byte * 2 bytes T1 T2T3

    Slave AddressFunction CodeDataError check

    Slave AddressFunction CodeDataError check

    Master-system Slave-system15

  • Coupling with External SystemsAny bool signal changes of variables can be defined as an event in theELOP II (Variable Declaration). The status of the bool signal in the currentcycle is compared to the status in the previous cycle. If there is a change,the number of the event, the current status and the time of the PES at thebeginning of the cycle are stored in a buffer. Therefore events recorded inthe same cycle have the same time stamp.

    Events can be read (reading from the buffer) with special function codesnot defined in the original MODBUS protocol or with standard codes (seetrend recording).

    10.1.1 Available Reading Codes 1, 3The function code 1 READ COIL STATUS is realized for bool variablesand the function code 3 for READ HOLDING REGISTER for unsigned in-teger variables. The Modbus address of the variables is part of the resour-ce documentation RES-Docu (generated).

    ERROR CODES (IN DATA READING)

    Example:

    Reading of bool variablen

    Slave number: 17Function code: 1Bool variables: 20...56 = 37 variables

    The start address is listed in the RES-Docu (generated). Start address: 20

    Query message of the master system:

    CODE EXPLANATION

    2 address too high, variable does notexist.data >256 bytes (2048 bool values, 128 integer values)

    Type Slave Code Starting address Number Check

    DEC 17 1 20 37 CRC

    HEX 11 01 00 14 00 25 2 bytes16

  • Coupling with External SystemsResponse message of the slave:

    * = possible values

    CD (Hex) = 11001101 (binary), i.e. the variables no. 27, 26, 23, 22, and 20have 1 signal and the variables no. 25, 24 and 21 have 0 signal.

    Immediately after the request the PES sends the data to the master sy-stem.

    For an example for reading out the buffer cf paragraph 10.1.5.

    10.1.2 Available Writing Codes 5, 15, 6, 16The function code 5 FORCE SINGLE COIL and 15 FORCE MULTIPLECOILS are realized for bool variables and the function code 6 PRESETSINGLE REGISTER and 16 PRESET MULTIPLE REGISTERS for unsi-gned integer variables. The Modbus address of the variables is part of theresource documentation RES-Docu (generated).

    ERROR CODES (IN DATA WRITING)

    Example:

    Slave number: 17Function code: 5 (Force single coil) Bool variable: 37

    The start address is listed in the RES-Docu (generated).

    Address: 37

    Type Slave Code Bytes Data27-20

    Data35-28

    Data43-36

    Data51-44

    Data56-52

    Check

    DEC 17 1 5 205 107 178 14 27 CRC

    HEX 11 01 05 CD* 6B* B2* 0E* 1B* 2 bytes

    CODE EXPLANATION

    2 address too high, variable does not existdata >256 bytes (2048 bool values, 128 integer values

    3 EFFECT different from FF00 H resp. 0000 H (bool values)17

  • Coupling with External SystemsTransmission of the master:

    Response message of the slave:

    The PES receives the data transmitted and writes them to the variables atthe beginning of the next cycle. Therefore the longest response time is thecycle time of the PES.

    10.1.3 Loop Back Diagnostic Test, Code 8The diagnosis code 0 of the function code 8 is used to ask the slave sy-stem to repeat the request transmission of the master.

    Valid for all HIMA-Slaves The HIMA-master knows all 21 diagnosis codes

    10.1.4 Function Codes for Events 65, 66, 67Any bool signal changes of variables can be defined as events in theELOP II program (Variable Declaration). The status of the bool signal inthe current cycle is compared to the status of the previous cycle. If thereis a change, the number of the event, the current status and the time of thePES at the beginning of a cycle are stored in a buffer. Events recorded inthe same cycle therefore have the same time stamp.

    For the transmission of events from the slave system to a master systemcodes 65, 66, 67 which are reserved for user functions in the originalMODBUS protocol were used.

    Type Slave Code Starting address Data Check

    DEC 17 5 37 65280

    HEX 11 05 00 25 FF 00 2 bytes

    Type Slave Code Starting address Data Check

    DEZ 17 5 37 65280

    HEX 11 05 00 25 FF 00 2 bytes

    CODE EXPLANATION

    0 RETURN QUERY DATA

    CODE EXPLANATION FUNCTION

    65 read event values (status of the events)

    returns the status of all event names without the time

    66 read new events (address, status, time)

    returns the events from the event buf-fer including the time

    67 last events request to repeat the last tele-gram18

  • Coupling with External SystemsTransmission Formats (Reading Events)

    Function code 65: Reading event values (status of events)

    STARTING-POINT

    is always 0.

    QUANTITY OF POINTS

    is always the total number of events (highest number + 1). The values aretransmitted as compressed values.

    Function code 66: Reading new events

    The events are stored with 8 bytes in the buffer. The assignment is as fol-lows:

    Event number: according to Res-Docu (generated)

    LO Low byteHO High bytea 0 or 1 signal (1 byte)ms 0...99 millisecondsds 0... 9 deciseconds/tenths of secondss 0...59 secondsm 0...59 minutesh 0...23 hours

    The buffer can hold 62 events. A maximum of 8 events (=64 bytes) istransmitted at the same time.

    Buffer overflow is identified by FFFF (Hex). This overflow identification isalso transmitted if applicable. In this case the maximum length isincreased to 66 bytes. The buffer is blocked for new events until the over-flow identification is read out. Afterwards new events can be written intothe buffer.

    SLAVE CODE BC HO LO HO LO ERROR CHECK

    65 BYTE COUNT START. POINT QTY. OF PTS66 BYTE COUNT not used

    67 BYTE COUNT not used

    Event number Value Time

    LO HO a ms ds s m h19

  • Coupling with External SystemsFunction code 67: last events transmitted

    Code 67 is only possible after Code 66, if the master system has not re-ceived a correct response to code 66. It makes the slave system repeat itslatest response.

    After a new start or buffer overflow of the slave system code 65 should besent. In normal operation code 66 resp. 67 has to be sent cyclically by themaster system.

    Error messages with event checks

    10.1.5 Events Checks via Standard Codes 1,3The checks realized by the special codes 65, 66, and 67 can also be per-formed by the standard codes 1 and 3. The following functions are availa-ble:

    Status check of events via code 1. Reading out of events (number, status, time) via code 3

    The readout of events can also be performed by 2 master systems usingdifferent start addresses during readout. The first master system uses thestart address 3072 and the second the start address 3584. The events areread out from the same event buffer.

    The event variables are defined within the ELOP II (Variable Declaration,attribute event recorded). A maximum of 1024 event names can be defi-ned.

    Status check with CODE 1

    From start address 2048 on, the status of the variables defined as eventscan be accessed via READ COIL STATUS

    BYTE COUNT EXPLANATION

    0 no new events available

  • Coupling with External SystemsRequest of the master:

    Response of slave as defined in code 1.

    Event check with CODE 3

    Any bool signal changes of variables can be defined as events in ELOP II(Variable Declaration). The status of the bool signal in the current cycle iscompared to the status in the previous cycle. If there are changes, thenumber of the event, the current status and the time of the PES are storedin a buffer at the beginning of a cycle. Events recorded in the same cycletherefore have the same time stamp.

    The buffer holds a maximum of 62 events. If more events occur, the bufferoverflow thus caused is identified by 8 bytes FF (hex). New events are ta-ken into the buffer only after the overflow identification has been read.

    Each event is stored in the buffer by 8 bytes which have the following me-aning:

    The event number is documented in the RES-Docu (generated).

    ms 0...99 millisecondsds 0...9 deciseconds/tenths of secondss 0...59 secondsm 0...59 minutesh 0...23 hours

    Identification of overflow of event buffer:

    All 8 bytes have the value FF(hex).

    All events occurred are contained in the answer of the slave or the bufferis empty:

    All 8 bytes of the remaining data of the transmission have the valueEE(hex).

    When events are being checked via code 3, as many events are read outof the buffer (a maximum of 31 events x 4 integer values = max. 31 x 8bytes) as have been defined in the request of the master system. As oneevent consists of 8 bytes, 4 integer variables have to be taken together inreading.

    Slave Code Starting address Number of events Check sum

    HO LO HO LO

    xx 1 2048 max. 1024

    Event number Value Time

    LO HO ms ds s m h21

  • Coupling with External SystemsTo distinguish the repetition of a request from a new request checking hasto be performed with a minimum of two alternating start addresses duringnormal operation.

    If an inquiry with the same start address as during the previous check isreceived, the latest response is supposed to have been received incor-rectly by the master, and therefore the master asks again for the sameevents.

    When starting communication and after event buffer overflow, we recom-mend reading the status of all events with code 1.

    Start addresses:

    1st Master: 30722nd Master: 3584

    Example

    The master system requests the maximum number of events:

    1st request/transmission: start address: 3072number of integer variables: 124

    2nd request/transmission: start address: 3073number of integer variables: 124

    3rd request/transmission: start address: 3072number of integer variables: 124

    The master system requests one event each time:

    1st request/transmission: start address: 3072number of integer variables: 4

    2nd request/transmission: start address: 3076number of integer variables 4

    3rd request/transmission: start address: 3072number of integer variables: 4

    Error messages during event check

    CODE EXPLANATION

    2 start address or number of values do not correspond to the definition.22

  • Coupling with External Systems10.1.6 Time Synchronization, CODE 70Via MODBUS time and date of PES can be synchronized by a master.Code 70 is used for this purpose. Via slave address 0 (broadcast), the ma-ster addresses all PES. There is no answer.

    time: ms 0...99 millisecondsds 0...9 decisecondss 0...59 secondsmin 0...59 minutesh 0...23 hours

    date: d 1...31 daysm 1...12 monthsa 0...99 years

    If only the time is to be transmitted, d must be set to 0; if only the date isto be transmitted, ms has to be set to 255.

    The time transmitted is the point of time of sending the first character ofthis transmission. The time in the slave is corrected by the delay causedby the transmitting time.

    10.1.7 Time Synchronization, CODE 6The time in the PES can also be set via code 6. For this purpose the tele-gram with code 6 must contain the number of milliseconds passed sincethe last full minute, i.e. the values are in the 0...59999 range. Via slaveaddress 0 all PES are accessed by the master. There is no answer.

    The time transmitted is the point of time of sending the first character ofthis transmission. The time in the slave is corrected by the delay causedby the transmitting time.

    10.1.8 Hints on the Operation of the SystemThe following paragraphs underline some particular features if the systemis coupled with process control systems. We recommend getting some in-formation on the details of the MODBUS coupling.

    Communication is only performed in the RUN operating mode of the PESand exclusively in the RTU mode (Remote Terminal Unit, defined in theMODBUS reference guide).

    The values sent by the master system are processed in the user programat the beginning of the next cycle, and they are therefore treated as phy-sical inputs. Only when the data are taken over to the variables, the ack-nowledgement is sent to the master system.

    The data requested by the master system are sent directly in the cycle tothe master.

    SLAVE CODE BC DATA CRC

    o 70 8 ms ds s min h d m a xx23

  • Coupling with External SystemsThe operating system has the following default values:

    Way of transmission:RTUParity bit: 1 (even)Baud rate: 9600 Bd or 57600 Bd (DIL switch on the central module)Number of stop bits:1

    If necessary the baud rate, parity and stop bits can be changed in the set-tings of the resource.

    The slave number is defined by the user who sets the bus subscriber num-ber (encoding switch on the central module).

    With some process control systems the counting of the addresses startsat 1; in the HIMA PES it starts at 0 (according to the definition in the MOD-BUS reference guide). Take remedial measures with declaration a dummyBUSCOM variable in the HIMA PES with the adresse 0.

    10.2 Coupling with the 3964R Protocol (SIEMENS Devices)Unlike the MODBUS protocol the SIEMENS 3964R protocol is not desi-gned as a bus system but as a point-to-point connection.

    There is the recommendation to order the description of the protocol3964R at SIEMENS and please inform you about the exceptionals of themaster system.

    The HIMA H41q and H51q PES can only be applied as slave systems.Only the interfaces on the central module (1 or 2) and not the interfaceson the coprocessor modules can be used for this way of data transmissi-on. Only the data type D (Data Block) of protocol 3964R is supported.HIMA works with the Block Check Character (BCC) inside the telegram.

    The definition of the reading and writing variablen is done the resource(Variable Declaration) via the attribute Siemens-Protocol.

    10.2.1 Overview of the Functions of the 3964R ProtocolPrincipally, the Siemens 3964R protocol distinguishes between 2functions:

    Writing of variables; SEND request, command AD. Reading of variables, FETCH request, command ED

    It is possible to read or write a maximum number of 128 bytes together.24

  • Coupling with External Systems10.2.2 Available Writing CodesThe data are written after a SEND request. The variables are addressedvia data building blocks (DB) and via data words (DW).

    Coordination of Bool Variables with Data Building Blocks and DataWords:

    16 bool variables are addressed via one data word.

    The addresse are listed in the Resource-Documentation RES-Docu (ge-nerated).

    Coordination of the integer variables with Data Words:

    A integer variable is addressed via one data word.

    The addresse are listed in the Resource-Documentation RES-Docu (ge-nerated).

    10.2.3 Available Reading CodesThe data are read with a FETCH request. The variables are addressed viadata building blocks (DB) and via data words (DW).

    10.2.4 Error Codes Transmitted to the Master0 no error

    1 format error: structure of transmission incorrect, for example

    incorrect check sum incorrect coordination flag incorrect identification incorrect kind of command (not A or E) incorrect kind of data (not D) request with data (ED) write command without data (AD) no double DLEs telegram header > 10 bytes

    2 error of address: address indicated is incorrect or invalid (variables not defined by HIMA)

    3 error of number:number = 0 or greater than the number of defined variables or number >128 bytes25

  • Diagnostic Display11 Diagnostic DisplayThe diagnostic display consists of a four-digit alphanumerical display aswell as two LEDs with IO and CPU identification on the front plate of thecentral module of the PES. Via 2 pushbuttons additional information canbe called from the PES. The kind of information is explained below. Onepushbutton is for selecting the next higher or lower level, the other push-button is for selection information on the same level.

    11.1 Information to be Called during RUN OperationThe CPU and IO LEDs are not lighted up.

    Display Explanation Call of the info

    Text Expl.

    BATI ---- voltage buffer battery RAM to low, on central module

    BN 2 bus subcriber number selection on central module

    1x, 3x

    BOOT-ID CRC of the boot section 4x, 2xBS41q/51qV7.0-7(9737)

    ---- mark of the operating system

    version of the operating system(edition of the operating system)

    4x

    EPROM-CRC

    CRC of the operating system verify with the value in the safety certifi-cate of the operating system

    4x, 1x

    CB1CB2CB3

    for internal tests 5x6x7x

    CODE-VERSION

    AC34 code version 1x, 1x

    C.TIME 0064 cycle time in ms 1x, 4xDATE 0212 date, day/month 1x, 8x26

  • Diagnostic DisplayF 47 display of the last error, see list of the error code in chapter 11.4display of the actual error: ZB/CU: CPU ZB/CU: MEMORY ZB/CU: REALTIME CLOCK ZB/CU: COUPLING UNIT ZB/CU: CLOCK LOGIC EMERGENCY OFF NOISE BLANKING FATAL ERROR W-DOG COUPLING UNIT/OTHERfor internal tests

    1x

    1x,

    1x, 1x

    i i i i central module is empty

    K-IS 0120 error code for further internal tests 2x

    K-SO 0034 error code for further internal tests 3x

    KEY 0022 error code for further internal tests 4x

    Konfigura-tion

    HIMA configuration name 1x, 2x

    MAX170-ERR

    0013 error code for further internal tests 5x

    MONO ---- mono operation with redundant CM

    nnnn 1403 display of the last faulty module 1x

    RELOAD ---- mono-reload is working

    OSLD*nxy

    *1a8 OS-Loader starts updisplay during the downloadn = 0 or 1, x = 0...F, y = 5, 6, 7, 8

    Programm PRO1 program name 1x, 1xRessource H51RT resource name 1xRUN ---- PES in normal operation

    RUN-VERSION

    3402 RUN-version, creation during ope-ration, dependant on all values

    1x, 2x

    SC1 up toSC 64 0012

    safety related communication tothe 1st system (upto 64th system) no value change: no data

    2x,2(-65)x,2x,2(-65)x,1x

    SIO10012

    interface 1 on CM no value change: no data for SS1

    2x3x

    SIO20012

    interface 2 on CM no value change: no data for SS2

    2x, 1x,2x, 1x, 1x

    Display Explanation Call of the info

    Text Expl.27

  • Diagnostic DisplayThe values entered are fictitious ones.

    If ---- has been entered in the value column only the entries in the textcolumn are displayed. If a number has been entered in the value column,the text and the value are displayed alternatingly during operation of thePES. If the text contains more letters than the four letters visible, it is dis-played as running text. A point as running letter is the living sign.

    STOP stop by the engineering station, stop by operating system

    TIME 1431313232.3

    time in hours/minutes time in minutes/seconds time in seconds/deciseconds

    1x, 5x1x, 6x1x, 7x

    > > Displayerasing of the application programfor erasing useACK, , simultaneously !

    8x1xACK, ,

    Display Explanation Call of the info

    Text Expl.28

  • Diagnostic Display11.2 Errors in the Central Area (CPU LED lights up)

    11.3 Errors in the IO Area (IO LED lights up)

    If several IO modules are defective, all IO positions affected including theIO channels are displayed alternatingly.After the defective module hasbeen exchanged or the line fault has been repaired, the error display is re-set via the ACK button on the central module. Then the IO module resp.the channel is active again.

    Other information can be selected via the two pushbuttons even if the IOdisplay lights up. If within 20 seconds no new information is requested, theIO positions are again displayed.

    Display Explanation

    Text

    DEADEXCPNMI

    fatal error at start uponly switching off/on possibleno communication exchange the module

    RAMTCHCKWAIT

    display after switching on until switching on the IOs

    STOP error stopby error stop through error of output modules, coupling module and group amplifier, it is possible to call the positi-ons of the IO-modules with pushing two times the button of the central module to the right side

    Display Explanation

    1024 position of a faulty IO module04: position in the IO rack2: number of the IO rack1: number of the cabinet or the IO-bus

    1314/2/4 channel fault of a IO module with line supervision/2/4: numbers of the faulty channels14: position in the IO rack3: number of the IO rack1: number of the cabinet or the IO-bus

    14** fault of the complete IO rack4: number of the IO rack1: number of the cabinet or IO-busIt is impossible to address the IO rack (connection cable, IO-bus, power supply, connection module)29

  • Diagnostic Display11.4 List of Error CodesThe following list contains all error codes. The error codes important forthe operator are explained in more detail. They are displayed in additionto the above described diagnostic displays after being called via the twobuttons on the front of the central module. The error codes and diagnosticcodes are only interesting as far as further examination by the manufactu-rer is concerned. If an error occurs, its error code is stored. This error codeis overwritten by a new error code as soon as the next error occurs. The-refore only the latest error is stored. Older error codes can be called withELOP II. The error code is deleted only if the central module is loaded witha new project, or if the central module is deleted and loaded again..

    Error code number

    Explanation, cause of the error code

    0 no error

    1-4 error in central module

    5 cycle time exceeded

    6-8 error in central module

    9-12 error in central module

    13 outputs are not de-energized during start up of the con-trol e.g.: input module is inserted in slot, where an output module is defined

    14 logic emergency off

    15-16 error in central module

    17 discrepancy in memories which cannot be located

    18 tolerable divergence of time bases

    19 error in central module

    20-21 time delay of other central module

    22-28 error in central module

    29, 30 IO subrack defined does not exist or error in coupling module

    31-39 error in central module

    40-46 error in central module

    47 error in power supply monitoring

    48-52 error in central module

    53 unknown IO module type (wrong entry in ELOP II)54-87 error in central module

    88 wrong resource-type selected

    89-92 error in central module

    93 signature error in user program30

  • Diagnostic Display94 signature error in RWP area

    95-99 error in central module

    100 occurrence of NMI caused by non- initialized RAM, e.g. empty CU

    101 communication with other central module not possible or the versions are different

    102 time delay received from other central module

    103-126 error in central module

    127 monitoring of program run of HIMA building blocks

    128-130 error in central module

    131 start up via programmer unit

    132 start up after pressing the ACK key on central module

    133 start up after self-test

    134 start up after switching power on

    135 faulty power supply

    136, 137 error in central module

    138 time for mono reload exceeded

    139-150 error in central module

    151 cycle time exceeded selected watchdog is to small

    152-160 error in central module

    161 start after break point

    162-167 error in central module

    168-175 code does not exist

    176, 177 error in coupling module

    178, 179 IO subrack defined does not exist, or error in coupling module

    180, 181 error in IO-power supply

    182 error in coupling module

    183, 184 error in IO-power supply

    185 error in coupling module

    186 code does not exist

    187 defined IO-rack does not exist or error in the connection module H41q: wrong ressource-type or error in central module

    188 start of noise blanking

    Error code number

    Explanation, cause of the error code31

  • Diagnostic Display189 error in central module

    190 IO-rack is switched off

    191 maintenace switch of F 7553 is pressed

    192 error in coupling module

    193 error in central module

    194-196 code does not exist

    197 start of noise blanking

    198 code does not exist

    199 initialisation of the event buffer

    200 code does not exist

    201-208 faulty F 6213 or F 6214 input module

    209 error in central module

    210-214 code does not exist

    215-216 faulty F 3235 input module

    217-219 faulty F 3237/38 input module

    220-222 faulty F 6705 output module

    223-226 faulty F 3330/31/33/34 output module

    227-228 faulty F 6217 input module

    229 code does not exist

    230-239 error in central module

    240 Do not enter a digit on positions 7, 8of the resource name, will be used only for Ethernet communication

    241-252 code does not exist

    253 start erasing of the application program

    254 erasing of the application program

    255 error in central module

    Error code number

    Explanation, cause of the error code32

  • Dear reader,

    we are always eager to keep our manuals up to date and to avoid errors. But if you have found an error in this manual, or if you want to make suggestions for improvements, also for the HIMA pro-ducts, we would be very grateful to you.Please use therefore just this page or a photocopy of it and send it to us by post or by fax.(Fax No. (+49) 6202 709-123)

    Sub.: Functions of the Operating SystemTI 99.09E

    HIMA Paul Hildebrandt GmbH + Co KGIndustrie-AutomatisierungDocumentationP.O. Box 126168777 BrhlGermany

    From:Company:

    Name:Dept.:Address:

    Phone:Fax:

    Date

  • HIMA... the safe decision.

    HIMA Paul Hildebrandt GmbH + Co KGIndustrie-Automatisierung

    P.O. Box 1261 68777 Brhl GermanyTelephone: (+49 6202) 7 09-0 Telefax: (+49 6202) 7 09-1 07

    E-mail: [email protected] Internet: www.hima.comTI 99.09E(9908) 0499.10

    Functions of the Operating SystemBS41q/51q V7.0-7 (9906)Table of Contents1 The Functions of the Operating System2 Identification of the Operating Systems2.1 The BS41q/51q Operating System, V7.0-7

    3 Assignment tables3.1 Assignment of the Operating Systems to the Types of Central Modules3.2 Assignment of the Operating Systems to other Firmware

    4 Cycle Run5 HIMA - Standard functions5.1 Standard Building Blocks Independent of the IO level5.2 Applicable IO Modules with Associated Software Building Blocks

    6 Overview of the possible couplings7 Coupling with Other HIMA PES7.1 Non-Safety Related Data Transmission7.2 Safety Related Data Transmission7.3 Safety Related Communication via Communication Module F 8625

    8 Coupling with HIMA Master Systems8.1 Engineering Station (ELOP II)8.2 Visualisation system (PLESY II)

    9 Logic Plan Controlled Logging10 Coupling with External Systems10.1 Coupling with Process Control Systems via MODBUS Protocol10.1.1 Available Reading Codes 1, 310.1.2 Available Writing Codes 5, 15, 6, 1610.1.3 Loop Back Diagnostic Test, Code 810.1.4 Function Codes for Events 65, 66, 6710.1.5 Events Checks via Standard Codes 1,310.1.6 Time Synchronization, CODE 7010.1.7 Time Synchronization, CODE 610.1.8 Hints on the Operation of the System

    10.2 Coupling with the 3964R Protocol (SIEMENS Devices)10.2.1 Overview of the Functions of the 3964R Protocol10.2.2 Available Writing Codes10.2.3 Available Reading Codes10.2.4 Error Codes Transmitted to the Master

    11 Diagnostic Display11.1 Information to be Called during RUN Operation11.2 Errors in the Central Area (CPU LED lights up)11.3 Errors in the IO Area (IO LED lights up)11.4 List of Error Codes