EKE-Electronics EKE-Trainnet MVB2791B User manual

EKE-Trainnet® MVB2791B MVB ESD Interface Module
Technical Manual
EKE-Electronics Ltd
Piispanportti 7
02240 Espoo, Finland

|Contents|ii
Contents
1 Multifunction Vehicle Bus Electrical Short Distance Module MVB2791B.............4
1.1 Warning symbols used in EKE manuals.......................................................................................................................4
1.2 Safety considerations......................................................................................................................................................4
1.3 Correct handling of the module.................................................................................................................................... 5
1.4 Ambient conditions for storage.................................................................................................................................... 5
2 About this document..............................................................................................6
3 Module features and operation............................................................................. 7
3.1 Module identification.......................................................................................................................................................7
3.2 Functional block diagram................................................................................................................................................8
3.3 CPU.....................................................................................................................................................................................8
3.4 Duplicated line.................................................................................................................................................................. 8
3.5 Shared memory................................................................................................................................................................8
4 Installation.............................................................................................................. 9
4.1 Warnings............................................................................................................................................................................9
4.2 Installation procedure................................................................................................................................................... 10
4.3 Cable recommendations...............................................................................................................................................11
4.3.1 Bus cable types..............................................................................................................................................11
4.3.2 Bus cable connector...................................................................................................................................... 11
4.3.3 Termination......................................................................................................................................................12
4.4 Firmware update........................................................................................................................................................... 12
5 Configuration........................................................................................................ 14
5.1 References...................................................................................................................................................................... 14
5.2 CPU File System (tms-base)........................................................................................................................................14
5.2.1 Configuring MVB related CPU files............................................................................................................. 15
5.2.2 Installing the file system.............................................................................................................................. 17
6 ISaGRAF Project................................................................................................... 18
6.1 Data types......................................................................................................................................................................18
6.2 C functions and function blocks................................................................................................................................. 19
6.3 I/O devices..................................................................................................................................................................... 22
6.4 Initialising the MVB interface...................................................................................................................................... 26
7 Serial console........................................................................................................28
7.1 Establishing a serial console connection...................................................................................................................28
7.2 Debug commands..........................................................................................................................................................29
7.2.1 Introduction..................................................................................................................................................... 29
7.2.2 Module debug commands............................................................................................................................ 30
7.2.3 MVB debug commands.................................................................................................................................34
MVB2791BTechnical Manual 1.0

|Contents|iii
8 Console from the Master CPU............................................................................. 46
9 Signalling...............................................................................................................47
9.1 Diagnostics from LEDs.................................................................................................................................................47
9.2 Connecting the oscilloscope........................................................................................................................................ 48
9.3 Example waveforms......................................................................................................................................................48
9.3.1 No transmission errors..................................................................................................................................49
9.3.2 Low signal level..............................................................................................................................................49
9.3.3 Missing half of a differential signal.............................................................................................................50
9.3.4 Missing signal..................................................................................................................................................51
9.3.5 Missing or incorrect termination..................................................................................................................51
10 Technical specifications......................................................................................54
10.1 Dimensions...................................................................................................................................................................54
10.2 Front connectors.........................................................................................................................................................54
10.3 Electrical specifications.............................................................................................................................................. 57
10.4 Non-metallic parts.......................................................................................................................................................57
10.5 Conformal coating.......................................................................................................................................................57
10.6 Reliability.......................................................................................................................................................................58
10.7 Safety............................................................................................................................................................................58
10.8 Compliance with standards.......................................................................................................................................58
11 Disposal of the module......................................................................................60
12 Glossary.............................................................................................................. 61
12.1 C..................................................................................................................................................................................... 61
12.2 E..................................................................................................................................................................................... 61
12.3 F..................................................................................................................................................................................... 61
12.4 I...................................................................................................................................................................................... 61
12.5 M.................................................................................................................................................................................... 62
12.6 P.....................................................................................................................................................................................62
12.7 T..................................................................................................................................................................................... 62
12.8 V.....................................................................................................................................................................................62
12.9 W....................................................................................................................................................................................62
MVB2791BTechnical Manual 1.0

|1 Multifunction Vehicle Bus Electrical Short Distance Module MVB2791B|4
1 Multifunction Vehicle Bus Electrical Short Distance Module
MVB2791B
Technical manual for Multifunction Vehicle Bus Electrical Short Distance Module MVB2791B.
1.1 Warning symbols used in EKE manuals
In EKE manuals, situations that require caution are marked with special warning symbols. The warning symbols appear
in the beginning of the appropriate chapter or paragraph. The following symbols are used.
Table 1: Warning symbols
Symbol Description
Electric shock warning symbol
Laser warning symbol
Hot surface warning symbol
ESD warning symbol
General caution symbol
Note symbol
Separate collection for Waste Electrical and Electronic Equipment according to Directive 2002/96/EC
(WEEE)
1.2 Safety considerations
The module is a low voltage device. In a normal situation, it presents no safety risk to the user.
Electric shock warning:
In the case of a severe train malfunction or wiring errors, there is a risk of an electric shock through connection
cables.
Electric shock warning:
The module contains components with large capacitance, and can hold voltage charge for one minute.
CAUTION:
The rack and modules can contain sharp edges. Use protective clothing, such as gloves.
CAUTION:
The protection components on the module are intended to protect the module from external surges and
transients only. They do not provide protection against incorrect wiring or connection.
MVB2791BTechnical Manual 1.0

|1 Multifunction Vehicle Bus Electrical Short Distance Module MVB2791B|5
CAUTION:
In a warm environment, some components may become very hot. This does not harm the module, but it could
harm you. Touching hot components may cause burning of skin. Carefully hold the module by the front panel or
sides, and DO NOT TOUCH ANY COMPONENTS.
1.3 Correct handling of the module
Electrostatic discharge (ESD) can damage electronic circuits. EKE products are protected against ESD. However, you
run the risk of delivering electrostatic discharges to the module whenever you handle it or any of its components.
To avoid this risk, only handle the module at a static-free workstation. If this is not possible, you must ground yourself
using a wrist strap and a resistive connection cord. Remember to handle the module according to these instructions,
even when you are removing a defective module, and sending it to the service.
CAUTION:
When you install, remove or handle a module, always hold it by the front panel or the sides. Do not touch the
components.
1.4 Ambient conditions for storage
The table below lists the ambient conditions for storage, for the products.
Note:
These are general conditions. You can find product specific conditions (if any) in product documentation.
Table 2: Ambient conditions for storage
Factor Condition
Storage location • Enclosed building
• Good ventilation
• No dust, dirt or vibration
• No direct sunlight
• No heat sources in the immediate vicinity
• No ozone-producing lamps (fluorescent lamps or mercury-vapor lamps) in the
immediate vicinity
Air temperature > -40 °C and < +85 °C
Temperature fluctuations • < ± 10 °C within 24 h
• Condensation must be avoided
Relative humidity < 60 %
MVB2791BTechnical Manual 1.0

|2 About this document|6
2 About this document
Important:
Read this documentation carefully before use.
Keep this documentation for future reference.
This is the Technical Manual for the EKE-Trainnet® MVB2791B MVB ESD Interface Module.
This document forms the data sheet and user manual of the module. If there are any references to more specific
documentation, such as application notes, optional parts, or accessories, the references are included as separate
chapters in the documentation.
Important:
This manual does not include information on other EKE-Trainnet® products than the MVB module. If you need
information about other EKE-Trainnet® products (such as modules, racks or accessories), refer to the manual of
the product in question.
The module type is also the ordering code.
This chapter includes general information about this manual.
Document information
•Document version:
1.0
•Publishing date:
27.05.2019
•Publisher:
EKE-Electronics Ltd
Piispanportti 7, 02240 Espoo, Finland
Tel: +358 9 6130 30
We reserve the right to update or modify this document at any time without prior notice.
Table 3: Change History
Date Version Author Change description
27.05.2019 1.0 TTL This is the first version of the document.
MVB2791BTechnical Manual 1.0

|3 Module features and operation|7
3 Module features and operation
This chapter contains information on the module features and operation.
3.1 Module identification
The figure below shows where to find the version and the modification information.
Figure 1: The location of version and modification information
Located on the back connector, the modification label indicates the module modification. The label has letters, and the
modification is indicated by crossing out one. If letter A is crossed out, the modification is A, and so on. If nothing is
crossed out, modification is 0 (that is, no modifications). This modification field is for the entire module.
The circuit board may have a different modification level, indicated by numbers printed on the board’s modification
field. This is found on the back side of the circuit board.
The Board test label indicates that the module has gone through the required testing cycle. It is located above the
board modification field.
The Board serial number identifies the module. It is located above the board test label.
The Board ID next to the board test label indicates an ID for the circuit board.
The Module ID, located just below the front connector, indicates an ID for the entire module.
Manufacturer's name
The manufacturer's name is EKE-Electronics Ltd.
MVB2791BTechnical Manual 1.0

|3 Module features and operation|8
3.2 Functional block diagram
The figure below presents a general functionality diagram of the MVB module.
Figure 2: Functionality diagram of the MVB module
The module has a fully IEC 61375-3-1 compliant redundant Multifunction Vehicle Bus interface with Electrical Short
Distance Media (ESD) with galvanic isolation. The maximum bus cable length for MVB ESD is 20 metres.
The MVB module is designed to ensure reliable data transmission on board a train. The following sections present
some MVB features intended for this purpose.
3.3 CPU
The local CPU MPC8306 combines a high-performance CPU core with a variety of resources useful in a broad range of
applications.
3.4 Duplicated line
To ensure uninterrupted functionality of the Multifunction Vehicle Bus, the bus is duplicated: there are two lines (A and
B), through which devices transmit data. If one line is temporarily out of order, the other line can take over, and full
redundancy is ensured. In this way, the flow of important data can continue without interruption, even in the case of
potential problems.
3.5 Shared memory
The MVB module configuration is done through the Gateway CPU, and the MVB reads it through its shared memory at
the start-up of the system. The configuration is for the MVB module read-only, and it is managed by the CPU software.
If any changes are made through the debug terminal, the original configuration is retained when the module is reset.
The module has a Medium Attachment unit (MAU) with a MVB FPGA, which supports internally the ESD interface.
MVB2791BTechnical Manual 1.0

|4 Installation|9
4 Installation
This chapter includes instructions on how to install the module into a rack.
The items below have been allowed for in product design. If the product has some equipment integration constraints,
these constraints are separately pointed out in documentation.
• Type of mechanical frame needed for mounting the electronic equipment: mounting frame, mounting plate, rack,
subrack, case, etc.
• Mechanical drawing (dimension, fixing, mounting points)
• Orientation constraints for mounting the equipment
• Natural cooling or forced ventilation constraints for the equipment
• Required free space inside integration volume for natural cooling
• Need of preheating or air outlet
• Need of free space for access to parts, or for mounting – dismounting
• Mechanical protection constraints, screening
• Earth terminals location
• Shielding requirements for input or output wired signals
• Possible recommendation for wire gauges
• Mechanical polarization or coding where applicable
• External filters to add for EMC compliance
• External overcurrent protections to add: fuses, micro circuit breakers, etc., on power supply 1548 circuit or output
circuits
• External overvoltage protections to add: TVS, ESD protection, etc.
• Interconnection diagrams and charts
• Hardware and software Interface information
4.1 Warnings
This section contains warnings you need to consider before and during the module installation.
CAUTION:
Do not turn on the rack power, before you have finished the installation of the modules.
Never remove a module from a rack with active power, as this can damage the installed module or other
modules in the system. Always switch OFF the rack power first BEFORE removing the rack.
ESD warning:
When handling the module, only touch the front panel. Do not touch the board or any of the components on it.
Even when you are removing a defective module and sending it to maintenance, handle the module according
to these instructions.
CAUTION:
Make sure that the module or any of the components on it do not get wet
The module has no implosion or explosion hazards in use or in handling.
ESD warning:
Electrostatic discharge can damage electronic circuits. Always handle the module at a static-free workstation. If
this is not possible, ground yourself using a wrist strap and a resistive connection cord.
MVB2791BTechnical Manual 1.0

|4 Installation|10
CAUTION:
The module and rack can contain sharp edges. Use protective clothing, such as gloves.
Do not drop the module.
CAUTION:
If your module contains M12 X-coded connectors, pay special attention when plugging them. This connector
type is easily broken due to bent pins. The type test setup has shown that plugging M12 X-coded connectors
with force, or turning/twisting the connector to find the correct orientation, will cause problems, which are
directly or indirectly identified later.
CAUTION:
If your module contains M12 X-coded connectors, pay special attention when plugging them. This connector
type is easily broken due to bent pins. The type test setup has shown that plugging M12 X-coded connectors
with force, or turning/twisting the connector to find the correct orientation, will cause problems, which are
directly or indirectly identified later.
4.2 Installation procedure
This section describes how to install the hardware.
Before you start installing the module to a rack:
• Make sure you have a Pozidriv® Pz0 or Pz1 screwdriver to tighten the front panel fastening screws on the module.
• Check the shipping container to see that it is not damaged.
• Take the module out of its shipping container carefully. The module is always shipped in an ESD protective
wrapping.
• Check the module, especially the connectors, for any visible signs of damage that may have occurred during
shipping.
Install the MVB module in a VME or VME/IO slot on the rack.
Figure 3: Modules installed in a rack
Proceed as follows:
1. Hold the module by the front plate.
2. Place the module on the rails of the rack.
3. Slide the module towards the back plane of the rack until it clicks into its place.
MVB2791BTechnical Manual 1.0

|4 Installation|11
CAUTION:
Do not use force. If the module does not fit in the rack easily, take it out of the rack and inspect it for any
visible signs of damage. As each module is intended to fit in a specific rack, it is possible that the rack does
not match the individual module you have.
4. Tighten the two screws on the front panel.
The screws are slotted head collar screws.
5. If there are other modules in the rack, make sure that the front plate of the module is at the same level with the
other modules.
4.3 Cable recommendations
This chapter includes cable recommendations for the MVB module.
Important:
When using a shielded cable, connect the cable shield directly to the metallic connector housing. Metallic
connector housing provides low impedance path for interference to the rack casing that is connected to the
Protective Earth (PE).
4.3.1 Bus cable types
EKE suggests using Huber+Suhner cables. These cables comply with the EN 45545-2 fire safety standard.
Table 4: Bus cables
Manufacturer Item number Description
Huber+Suhner 85003600 2 x 2 x 0.5 mm2, two pairs
Huber+Suhner 85001338 4 x 0.5 mm2, star quad
Figure 4: Connection of start-quad cable
Note:
The older Huber+Suhner cable (item 12553902) has additional equipotential wires (4 x 0.25 mm2). If you use
this type of cable, leave these wires disconnected.
4.3.2 Bus cable connector
The following tables contain suggested parts for assembling the MVB bus cable connectors:
MVB2791BTechnical Manual 1.0

|4 Installation|12
Table 5: Bus cable connector part list for the S1 connector
Description Manufacturer Type
Connector housing, Metal, M3 Harting 09 67 009 0335
D-Sub crimp 9-pole female Harting 09 67 009 4701
Crimp socket, AWG 22-18; 0.33—0.82 mm2 (4 pcs
required)
Harting 09 67 000 3476
Table 6: Bus cable connector part list for the S2 connector
Description Manufacturer Type
Connector housing, Metal, M3 Harting 09 67 009 0335
D-Sub crimp 9-pole male Harting 09 67 009 5601
Crimp pin, AWG 22-18; 0.33—0.82 mm2 (4 pcs required) Harting 09 67 000 3576
4.3.3 Termination
A cable segment must be electrically terminated at each end, by a terminator.
The terminator shall bias the line so that the potential of the Data_P wire is lower by at least 750 mV ± 10 % with
respect to the Data_N wire when no transmitter is active.
Standard terminators are available from EKE-Electronics:
• MVT2754A, MVB-S1 Terminator, ESD Female
• MVT2755A, MVB-S2 Terminator, ESD Male
Figure 5: MVB-S1 and MVB-S2 terminator
4.4 Firmware update
This section describes how to update the module firmware.
To update the firmware, you will need:
• A computer with the USBFloader Interface and the program
• The Floader adapter cable (FAC1027)
• The firmware file (UFO file)
MVB2791BTechnical Manual 1.0

|4 Installation|13
Note:
Disconnect power from the rack, before connecting the download cable.
The 16-pin flat ribbon cable connector is connected to the module's download connector, which is marked X4 (DLOAD)
on the PCB. The USBFloader adapter box is connected to the other end.
Proceed as follows:
1. Connect power to the rack.
2. Double-click the *.ufo file (for example, MVB_PPC_B021_P0000_010.ufo).
The loading will start and a loading progress window will appear. During the download, the download status
indicator is yellow.
Figure 6: USBFloader status dialog
3. Wait until the program informs you upon a succesful download, by a green indicator.
If the firmware downloading fails, the download status indicator is red.
Figure 7: Download failed
If the firmware downloading fails, check that:
• USBFloader cables are properly connected
• The rack power supply is on
• The FAC1027 Flat cable is in good condition
4. Disconnect power from the rack.
5. Disconnect the download cable from the module.
MVB2791BTechnical Manual 1.0

|5 Configuration|14
5 Configuration
This chapter describes how to configure the module.
5.1 References
• /15449/
• 15449.doc
• ISaGRAF MVB I/O Card
• /16819/
• 16819.doc
• MVB – C Application Interface
• /22800/
• 22800.doc
• MVB – ISaGRAF Application Interface
5.2 CPU File System (tms-base)
All necessary Linux software and parameter files, as well as application software and its configuration, are stored
in the CPU module file system. Most of stored information is used by the CPU module or Linux OS, and shall not be
modified.
Template file systems are delivered as zip files; tms-base.zip. Upload and extract the file system onto a working
directory, as the file systems contain configuration files that may be modified later.
Figure 8: Example CPU file system content
The only locations having user defined information are in folders
•var/opt/tms-base
•var/opt/tms-base/isagraf
For this demo implementation, some existing definitions are there for possible future use only. Mandatory parts are
described in detail.
The CPU module can be accessed with a serial link or Ethernet (Telnet & FTP or SCP). For detailed instructions, see the
specific module manual. For connection details, refer to the specific CPU module manual.
MVB2791BTechnical Manual 1.0

|5 Configuration|15
5.2.1 Configuring MVB related CPU files
This section describes how to configure MVB related CPU Files.
Tip:
EKE CPU contains an inbuilt text editor called Nano. You can use this editor for convenient, direct editing of the
files on the CPU module.
Proceed as follows:
1. Establish a terminal connection.
2. Use Linux commands to change the directory to /var/opt/tms-base.
3. Give command nano [filename], to start the editor.
Table 7: Summary of configuration files
File Description
startup Executed at startup, defining network addresses and starting tasks with parameters.
mvb.txt MVB Bus definition file.
Defines devices, ports, polling cycles and so on. Information in this file is loaded from the
CPU to MVB module at start-up.
tcn.dat TCN definition file. Defines stations, busses, functions and groups for the TCN
communication in WTB and MVB networks.
Note:
Unless otherwise advised by EKE, do not modify any other files than the above.
Further configuring of the MVB bus process and message data definitions are done in the ISaGRAF application,
using the Target Definition Builder.
See below for example file templates:
startup
# EKE-Electronics ltd 2016
# Created:
# Modified:
[NETWORK]
DEVICE eth0
ADDRESS 10.0.0.11
[TCN]
CONFIG /var/opt/tms-base/tcn.dat
[ISAGRAF]
SCHEDULER NONE
CONFIG /var/opt/tms-base/isagraf/
SOCKET 1
mvb.txt
#
# MVB master configuration example
#
MVB2791BTechnical Manual 1.0

|5 Configuration|16
THIS DEVICE 10h MASTER # MVB master, address 10h
DEVICE 20h SLAVE # MVB slave, address 20h
OWN EVENT TYPE HIGH # Own event type is high priority
POLL EVENTS LOW_AND_HIGH # Poll both event priority types
MACRO CYCLES PER TURN 5 # Mastership transfer after 5 macro periods
REPORTING ACTIVE # Send MVB_Reports
# Process data port configurations:
#Type Port Address Size (bytes) Cycle (ms)
SINK 1h 4 1
SINK 4h 32 4
SINK 16h 4 16
SINK 64h 2 64
SINK 256h 16 256
SINK 24h 8 1024
#Type Port Address Size (bytes) Cycle (ms)
SOURCE 2h 8 2
SOURCE 8h 32 8
SOURCE 32h 16 32
SOURCE 128h 4 128
SOURCE 512h 4 512
tcn.dat
# EKE-Electronics ltd 2016
# Created:
# Modified:
# This station identification. NAME,Station number
THIS STATION GW_STATION 10h
#Busses defined for the TCN kernel. Possible types are WTB,MVB and INTERNAL
#Notice. If there is more than one module for same bus type. Definitions are
#based on rack configuration. Leftmost module is defined first
#BUS WTB1
BUS MVB1
#STATIONS DEFINED IN SYSTEM. Station name = Station Number,BUS,ADDRESS
#If station is not directly reachable the next station is defined
#Only stations (devices) under MVB contain device address
# Functions defined in this system.
# Functions between F0-FF are set by the system. They are EKE/TCN specific and should not be
used by application
# Function 1h is used internally in application between x and y
FUNCTION 1h CPU_STATION
FUNCTION 2h CPU_STATION
FUNCTION 3h CPU_STATION
FUNCTION 4h CPU_STATION
FUNCTION 5h CPU_STATION
FUNCTION 9h CPU_STATION
FUNCTION Bh CPU_STATION
FUNCTION 10h CPU_STATION
FUNCTION 11h CPU_STATION
FUNCTION FCh CPU_STATION
FUNCTION 0fh CPU_STATION # UIC-556 mapping server fucntion
FUNCTION FAh CPU_STATION # Event manage
MVB2791BTechnical Manual 1.0

|5 Configuration|17
FUNCTION FBh CPU_STATION # ROUTER FUNCTION THIS HAS TO BE DEFINED FOR THE GATEWAY
INITIALISING WTB
FUNCTION FDh CPU_STATION # TCN Agent function
FUNCTION FEh CPU_STATION # TCN manager function
#Groups defined for this node.
GROUP COACH 1
GROUP COACH 2
GROUP ALL_UNITS 10
5.2.2 Installing the file system
This section describes how to install the tms-base file system onto the module.
Proceed as follows:
1. Pack the tms-base folder to tms-base.zip using, for example, the 7-zip program.
2. Send the tms-base.zip to the CPU module /tmp/ folder using FTP (use, for example, WinSCP).
3. Open a console connection to the VCU, and install file system:
tms-setup /tmp/tms-base.zip --erase
Tip:
You can also transfer files one by one, or edit them directly on the target by using the vi or nano editor.
MVB2791BTechnical Manual 1.0

|6 ISaGRAF Project|18
6 ISaGRAF Project
This chapter describes the ISaGRAF project.
6.1 Data types
The ISaGRAF project data types are:
MVB_device_status
This structure contains a definition of the device status information, obtained as a response to the F-code 15 frame.
The frame structure definition is found from IEC 61375-1, paragraph 3.6.4.1.2.1.
MVB_STRUCT
This structure is an example of one MVB port definition. This structure contains port data elements with copying rules.
Each project will contain its own MVB structure, based on the MVB ports found from the system. In other words,
there shall be a project-specific TDB created for each project.
MVB_TrainNode
This structure is required on an MVB train. See also MVB_TrainNodeArray on page 18 and mvb_set_train_structure
on page 22.
Table 8: MVB Train Node Structure
Name Type Comment
StationId USINT Station ID of an MVB train node. This ID mapped to the MVB device
address in tcn.dat file, located in that node’s CPU.
UICIdentificationNR ULINT Serial number of the coach, in which the MVB node is located.
MVB_TrainNodeArray
Array of MVB Train Node structures. It imitates the Node Address Dictionary (NADI) in a train without a Wire Train Bus
(WTB). See also MVB_TrainNode on page 18 and mvb_set_train_structure on page 22.
Table 9: MVB Train Node Array
Name Type Comment
MVB_TrainNodeArray ARRAY[32] of
MVB_TrainNode
List of 32 MVB Train Node structures.
MVB_StatusStruct
This structure contains a definition of the MVB status card.
Name Type Comment
HeartBeat DINT The value increments on every macro period. Before initialisation of
the MVB card, the counter increments every 10 ms.
CommunicationErrors DINT The number of erroneous frames (or RTIs) sent or received.
CommunicationCnt DINT The amount of successfully sent/received frames
MVB2791BTechnical Manual 1.0

|6 ISaGRAF Project|19
Name Type Comment
ChStatusA BOOL Channel status
• FALSE — Communication failed
• TRUE — Communication OK
ChStatusB BOOL Channel status
• FALSE — Communication failed
• TRUE — Communication OK
LinesBroken BOOL Indicates disconnect cables or a missing terminator
• FALSE — Terminator detected
• TRUE — Cable disconnected/no terminator detected
ModuleStatus BOOL • FALSE — Module communicating
• TRUE — Module not configured
6.2 C functions and function blocks
This section lists the C functions and function blocks.
DisableMVB
This function can be used to stop MVB module communication.
Table 10: Function DisableMVB
Name Direction Type Comment
Index Input SINT MVB card index to which message is sent.
1. Leftmost module
2. Second module
Output BOOL • FALSE — MVB disconnected
• TRUE — Failure
EnableMVB
After disabling MVB communication, this function can be used to enable it back to the active communication state.
Table 11: Function EnableMVB
Name Direction Type Comment
Index Input SINT MVB card index to which message is sent.
1. Leftmost module
2. Second module
Output BOOL • FALSE — MVB enabled
• TRUE — Failure
MVB2791BTechnical Manual 1.0

|6 ISaGRAF Project|20
InitialiseMVB
Configures the MVB module and enables it to the line. Usually, this function is called once at a start up phase of the
ISaGRAF application. If the configuration of the module is large, the function call can take even one second. For this
reason, call this function during the first cycle, before watchdog kick call.
See MVB master configuration example for an example of a configuration file.
Table 12: Function InitialiseMVB
Name Direction Type Comment
Index Input SINT The MVB card index, to which the message is
sent.
1. Leftmost module
2. Second module
ConfFile Input STRING[80] Configuration file name with path.
Output BOOL 1. FALSE — MVB configured
2. TRUE — Failure
mvb_get_device_status
A function call to read the device status. The device status is given back as a 32-bit field, which can be split to
ISaGRAF structure by calling the mvb_dev_stat_i_conv function.
Table 13: Function Mvb_get_device_status
Name Direction Type Comment
Index Input SINT The MVB card index, to which the message is
sent.
1. Leftmost module
2. Second module
Device Input DINT Status read from the given device address.
Status Output DINT Status got from the line.
ReturnValue Output SINT • 0 — Success
• 1 — Given device address was not found from
MVB configuration.
mvb_dev_stat_i_conv
This function converts the given 32-bit device field to an ISaGRAF structure, based on the copying rules given in the
structure definition.
Table 14: Function mvb_dev_stat_i_conv
Name Direction Type Comment
DevStatus Input DINT The device status field.
DevStatusIsa Output MVB_device_status The fields are copied to this structure based
on the copying rules found from the structure
elements.
MVB2791BTechnical Manual 1.0
Table of contents
Other EKE-Electronics Control Unit manuals