TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual...

35
tcn-mvb-an_ms_en_107 TCN-MVB-AN SW for MVB Analyzer Programmer’s manual Version 1.07

Transcript of TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual...

Page 1: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

tcn-mvb-an_ms_en_107

TCN-MVB-AN

SW for MVB Analyzer

Programmer’s manual

Version 1.07

Page 2: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 2/35

AMiT spol. s r.o. does not provide any warranty concerning the contents of this publication and reserves the right to change the documentation without obligation to inform anyone or authority about it.

This document can be copied and redistributed under following conditions:

1. The whole text (all pages) must be copied without any changes. 2. All redistributed copies must retain the AMiT, spol. s r.o. copyright notice

and any other notices contained in the documentation. 3. This document may not be distributed for purpose making of profit. The names of products and companies used herein can be trademarks or registered trademarks of their respective owners.

AMiT is a registered trademark.

Copyright (c) 2017, AMiT, spol. s r. o. Producer: AMiT, spol. s r. o.

Naskové 1100/3, 150 00 Praha www.amit-transportation.com

Technical support: [email protected]

Page 3: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

3/35 tcn-mvb-an_ms_en_107

Table of contents

Revision history .............................................................................................. 4 Related documentation ................................................................................... 4

1 Definition of used abbreviations ........................................................ 5

2 AMiT MVB device classes ................................................................... 7

3 Definition of used terms ...................................................................... 8

4 Introduction ........................................................................................ 10

5 Technical parameters ........................................................................ 11

6 ATMA Protocol ................................................................................... 12

6.1 Description of ATMA datagram..................................................................... 12

7 Example tool for MVB frame analysis .............................................. 14

7.1 Dissector installation ..................................................................................... 14

7.2 Post processing and frame filtering .............................................................. 15

8 Loading domains into TCN-MVB-AN................................................ 18

8.1 TCN-MVB-AN domains ................................................................................ 18

8.2 Loading of new device .................................................................................. 19 8.3 Domain upgrade ........................................................................................... 20

9 Configuration and Control ................................................................ 21

9.1 Program description ..................................................................................... 21

9.2 Main window ................................................................................................. 21 9.3 File menu ...................................................................................................... 22

9.4 Status bar ..................................................................................................... 22 9.5 Options menu/Preferences ........................................................................... 22

9.6 Device selection ........................................................................................... 23 9.7 Information frame window ............................................................................ 23

9.8 Line triggers .................................................................................................. 23 9.9 Common triggers .......................................................................................... 24

9.10 Trigger output options ................................................................................... 24 9.11 Reply timeout delay ...................................................................................... 24

9.12 UDP output settings...................................................................................... 24 9.13 Configuration save button ............................................................................. 24

9.14 MVB bus medium – Electrical mode ............................................................. 24 9.15 MVB master frame trigger ............................................................................ 24

9.16 MVB slave frame trigger ............................................................................... 26 9.17 MVB Statistics and Recording ...................................................................... 26

9.18 Load and Convert to PCAPNG ..................................................................... 29 9.19 Domain services ........................................................................................... 31

9.19.1 Operations over domains ............................................................................. 32 9.20 Ethernet settings........................................................................................... 33

9.21 XML script .................................................................................................... 34 9.21.1 Command line mode .................................................................................... 34

Page 4: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 4/35

Revision history

Document name: tcn-mvb-an_ms_en_107.pdf

Version Date Author of change Changes

100 01. 10. 2014 Dočekal New document

101 05. 01. 2015 Dočekal Add related documentation, AMiT MVB device classes and Technical parameters.

102 14. 07. 2015 Dočekal Remove chapter 7, ADSmanager has independent documentation, change link to web.

103 30. 07. 2015 Dočekal Corrections, chapter Command and Control added.

104 7. 12. 2015 Tomáš New hardware RB-MVB/AN02, trigger output, support of EMD, ESD media.

105 20. 05. 2016 Tomáš Corrections, chapter 6.1 – time resolution, Inserted chapter 7 – example tool, Chapter 9.2 – update figure, Add chapter 9.15 – MVB master frame trigger.

106 11. 01. 2017 Tomáš Add figures to chapter 9.15. Add frame record alignment and events from 4 to 10 bits chapter 6.1. Edit chapter 7.2 – ATMA Convet utility Edit Chapter 9.3 - add file item Load & Convert Add chapter 9.16 – MVB slave frame trigger Add chapter 9.17 – MVB Statistics and Recording Add chapter 9.18 – Load and Convert to PCAPNG Add chapter 9.21.1 – Command line mode

107 20. 01. 2017 Maštálka, Tomáš Add abbreviations to chapter 1 and terms definitions to chapter 3 Correction status bits in chapter 6.1 Chapter 9.17 – MVB Statistics and Recording – seq window, context menu and find item Chapter 9.18 – Load and Convert to PCAPNG – update items

Related documentation

1. RB-MVB/AN02 – Operation manual

file: rb-mvban02_g_en_xxx.pdf

2. IEC 61375-3-1 ed1.0:2012 – Multifunction Vehicle Bus (MVB)

3. ADSManager – Programmer’s manual

file: ADSManager_ms_en_xxx.pdf

Page 5: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

5/35 tcn-mvb-an_ms_en_107

1 Definition of used abbreviations

AMiT Device Detection AMiT Domain Services Active level overbalance AMiT TCN MVB Analyzer Bus Administrator Bus not idle Bus timeout Check sequence error Duplicate master frame Duplicate slave frame Electrical Middle Distance Erroneous master frame Electrical Short Distance Erroneous slave frame Frame check sequence Frame lost on MVB line X Manchester code violation Master Frame Multifunction Vehicle Bus Message Data Process Data Receive frame error Redundant line disturbed Reply timeout

ADD

ADS

ALO

ATMA

BA

BNI

BTI

CSE

DMF

DSF

EMD

EMF

ESD

ESF

FCS

FLL X

MCV

MFR

MVB

MD

PD

RFE

RLD

RTI

Page 6: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 6/35

Slave Frame Signal quality error Train Communication Network Trigger frame content Valid master frame Valid slave frame

SFR

SQE

TCN

TFC

VMF

VSF

Page 7: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

7/35 tcn-mvb-an_ms_en_107

2 AMiT MVB device classes

XXX – denotes customer modifications

Class SW identification Description

0 TCN-MVB-LG TCN-MVB-AN

Devices which do not participate in the application data exchange. These devices are invisible (transparent) for other MVB devices.

1 TCN-MVB11_XXX MVB slave devices with DS and PD capabilities.

2 TCN-MVB12_XXX MVB slave devices with DS, PD and MD capabilities.

3 TCN-MVB13_XXX MVB devices with BA, DS and PD capabilities.

4 TCN-MVB14_XXX MVB devices with BA, DS, PD and MD capabilities.

Page 8: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 8/35

3 Definition of used terms

Active level overbalance (ALO)

A garbled frame with valid delimiter has been detected. The difference between sampled "High" and "Low" halfbits exceeds +5. This is usually result of a collision. Bus Administrator (BA) MVB device with Bus Administrator functionality is able to work as an MVB bus Master. This function supposes the device is able to transfer the process data and messages as well as transmit and receive the device status information. Bus not idle (BNI)

At least 5 pulses with minimum pulse length of 42 ns (2 clock cycles à 48 MHz) has been detected on the active MVB line during frame reception. Bus Timeout (BTI)

Indicates that no master frame has been received within 1.3 ms. Check sequence error (CSE) Indicates that a MVB frame with incorrect or missing FCS has been received. Duplicate master frame (DMF)

Indicates that a master frame has been received within reply timeout of previous master frame. Duplicate slave frame (DSF)

Indicates that a slave frame has been received after previous slave frame (i.e. without preceding master frame). The reply timeout is not relevant in this case. Electrical Middle Distance (EMD)

This is one type of physical interfaces (media) of MVB line defined in [2]. This medium uses a twisted pair of shielded wires for interconnection. The EMD bus driver is always galvanically separated, typically by the transformer coupling. EMD medium is used for up to 32 nodes and for distances up to 200 m. Erroneous master frame (EMF) Indicates that an erroneous master frame has been received. The received master frame had an uncorrectable error (wrong length, check sequence error or manchester code violation). Electrical Short Distance (ESD)

This is one type of physical interfaces (media) of MVB line defined in [2]. This medium uses a pair of wires with differential transmission according to the RS-485 standard, ESD medium is used for up to 32 nodes and for distances up to 20 m without need for galvanic separation.

Page 9: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

9/35 tcn-mvb-an_ms_en_107

Erroneous slave frame (ESF) Indicates that an erroneous slave frame has been received. The received slave frame had an uncorrectable error (wrong length with respect to the previous master frame, check sequence error or manchester code violation) or it has been received after reply timeout elapsed. Manchester code violation (MCV) Indicates that no transition is found in the middle of a received bit. MVB Telegram

Master fame and corresponding slave frame. Receive frame error (RFE) Indicates that an erroneous frame has been received. Redundant line disturbed (RLD)

Indicates that an error has been detected in the last receive frame on the observed line. RLD is clear after valid reception of frame on both MVB lines. Reply timeout (RTI)

Indicates that after reception of a master frame no slave frame has been received within the specified timeout. Signal quality error (SQE)

Bad signal quality has been detected. Signal quality detection is based on the detection of the misplaced edges outside of the expected edge time window. Trigger frame content (TFC)

Indicates that a trigger output has been activated.

Page 10: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 10/35

4 Introduction

This manual describes the functionality of TCN-MVB-AN (MVB analyzer) software. The software is running on hardware from AMiT production which is referred to in the following text as target device. List of compatible hardware can be found in chapter Technical parameters. TCN-MVB-AN resends information about frame exchange and events on MVB bus to Ethernet network. The TCN-MVB-AN is a MVB device class 0. TCN-MVB-AN listens to all frames on the MVB bus and forwards them to Ethernet network into UDP ATMA datagrams. The TCN-MVB-AN doesn't transmit any frames on MVB bus hence the TCN-MVB-AN is invisible for other MVB devices. TCN-MVB-AN also evaluates important events on MVB bus and sends information about them to Ethernet network into UDP ATMA datagrams. This document describes the format of ATMA datagrams, user interface of PC configuration tool and the download firmware procedure. A trigger output is supported by the MVB analyzer RB-MVB/AN02. The trigger can be arisen when an event occurs on the bus. More precisely the trigger is arisen in case of an event which is included in a group of triggered events. The group of triggered events is configured by a user using a PC tool TCN-MVB-AN-CFG, see chapter 9. MVB Analyzer supports EMD (Electrical Medium Distance) medium as well as ESD (Electrical Short Distance) medium. The used medium of the monitored MVB bus is selected using TCN-MVB-AN-CFG, see chapter 9.

Page 11: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

11/35 tcn-mvb-an_ms_en_107

5 Technical parameters

Compatibility IEC 61375-3-1 ed 1.0:2012

Process data No

Message data No

Class 0

Database No

Configuration download Yes

MVB bus monitoring Supported

Trigger output Supported

MVB analyzer RB-MVB/AN02,

RB-MVB/AN01 (obsolete, replaced by RB-MVB/AN02)

MVB

Configuration

Analyzer

Target device

Page 12: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 12/35

6 ATMA Protocol

ATMA Protocol encapsulates and concentrates MVB frames into flow of UDP datagrams. UDP datagrams are sent as broadcast on UDP destination port 56012.

6.1 Description of ATMA datagram

ATMA datagram is composed from 12-byte header and data. Minimum datagram length is 18 bytes, maximum datagram length is 1460 bytes. Datagram is structured as follows: Item Type Length Description

Identification U8[2] 16 bits Identification of the ATMA protocol (4Dh 41h = “MA”)

Version U16 16 bits Version of the ATMA datagram (202)

Seq_number U32 32 bits Sequential number of ATMA datagram

Time_resolution U16 16 bits Timestamp resolution [tick/ ųs]

Nr_records U16 16 bits Number of records

Record entry No. 1

Time_stamp U32 32 bits 32-bit HW record timestamp [ticks]

Control U16 16 bits Record control

Data U8 [2-32] 16-256 bits Frame data (frame record only)

ChkSeq U8 [1-4] 8-32 bits Check sequence (frame record only)

Reserved U8 [0-3] 0-24 bits Reserved for alignment

Record entry No. 2

Time_stamp U32 32 bits 32-bit HW record timestamp [ticks]

Control U16 16 bits Record control

Data U8 [2-32] 16-256 bits Frame data (frame record only)

ChkSeq U8 [1-4] 8-32 bits Check sequence (frame record only)

Reserved U8 [0-3] 0-24 bits Reserved for alignment

Record entry No. n

Time_stamp U32 32 bits 32-bit HW record timestamp [ticks]

Control U16 16 bits Record control

Data U8 [2-32] 16-256 bits Frame data (frame record only)

ChkSeq U8 [0-4] 0-32 bits Check sequence (frame record only)

Reserved U8 [0-2] 0-16 bits Reserved for alignment

The record control has following format:

Type Bit 15

Status Bit 0 – 14

0 = event 1 = frame

Status of record (depends on record type)

ATMA

datagram

Page 13: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

13/35 tcn-mvb-an_ms_en_107

The frame record has following format 16-bit alignment (ranges include collision frames):

Frame Length Byte

ChkSeq Length Byte

Reserved Length Byte

>= 32 4 0

>= 16 and < 32 2 2

>= 2 and < 16 1 1

< 2 0 2

The status for the frame has following format:

MVB line TFC CSE SQE ALO BNI MCV RFE Frame type Frame length

Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit8 Bit7 Bit6 Bit 0 – 5

0 = line B 1 = line A

Trigger frame

content

Check sequence

error

Signal quality error

Active level overbalance

Bus not idle

Manchester code

violation

Receive frame error

0 = slave frame

1 = master frame

Length of the frame

The status for the event has following format:

ESF VMF VSF RLD Reserved

Bit 7 Bit 6 Bit 5 Bit 4 Bit 0 – 3

Error slave frame Valid master frame (active RLD only)

Valid slave frame (active RLD only)

Redundant line disturbed

All multibyte numeric bytes are little endian ordered.

All datagram items are aligned to multiple of its length. Sequential number starts at 1 and it is incremented for each a new outgoing ATMA datagram. It provides possibility to detect a lost datagram. Little endian ordering relates to ATMA datagram items only. Contents of MVB frames are transmitted like byte-stream without endian conversion. It’s up to application to process MVB frames properly, in accordance with data type specification in TCN standard (TCN standard codes all multi-byte numerical types with big endian order).

FLLA FLLB RTI BTI DMF DSF EMF

Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8

Frame lost line A

Frame lost line B

Reply timeout Bus timeout Duplicated master frame

Duplicated slave frame

Error master frame

Note:

Page 14: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 14/35

7 Example tool for MVB frame analysis

MVB frame analysis is done on PC using GNU Wireshark Ethernet frame analysis tool (http://www.wireshark.org)1. ATMA protocol plug-in dissectors were created. The dissectors are written as Lua scripts. The example codes for MVB frame analysis covers IEC 61375 and UIC 556 including E-telegram decoding.

This architecture facilitates the data analysis and user script adaptation for user specific purposes.

Following dissectors are supported: Script Functionality

tcn-mvb-an.lua MVB frame analysis acc. to TCN IEC 61375-3-1

tcn-an-msg.lua TCN message analysis acc. to TCN IEC 61375-2-1

tcn-an-uic.lua UIC message communication analysis acc. to UIC 556

7.1 Dissector installation

Scripts can be installed using the installation tool – TCN-AMiT-AN.exe. The installation tool performs following steps. These steps can be done just as in the case of manual installation.

1. In Wireshark installation directory create a subdirectory “amit”, e.g. “C:\Program Files\Wireshark\amit”.

2. Copy the dissector files tcn-mvb-an.lua, tcn-an-msg.lua, and tcn-an-uic.lua.

3. Edit the file “…\Wireshark\init.lua”

4. Check the attribute disable_lua = false

5. Add following code:

AMIT_SCRIPT_PATH=".\\amit\\"

dofile(AMIT_SCRIPT_PATH.." tcn-mvb-an.lua ")

dofile(AMIT_SCRIPT_PATH.." tcn-an-msg.lua ")

dofile(AMIT_SCRIPT_PATH.." tcn-an-uic.lua ")

6. Wireshark requires restart to apply the new dissectors. Then ATMA dissector should appear among enabled protocols.

1 The tool is well described on http://wiki.wireshark.org.

Basic

characteristic

Page 15: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

15/35 tcn-mvb-an_ms_en_107

7.2 Post processing and frame filtering

Each ATMA (TCN-MVB-AN) datagram displayed in Wireshark contains one or several records captured by the analyzer. One datagram can include several MVB records. These datagrams allow MVB frame analysis at the TCN level (IEC standard). More convenient analysis including record filtering and coloring rules requires a datagram post-processing. This post-processing splits the records so each ATMA datagram contains one frame or a couple of a master frame and a related slave frame.

A new record is created by the analyzer always when a MVB frame is received or an erroneous event is announced.

To post-process the Wireshark records, it is possible to use ATMA Converter utility TcnMvbAnCfg (command line mode or GUI). This utility works with “.pcapng” Wireshark record file. This kind of record file can be created by Wireshark (File → Save As … and choose file type with extension “pcapng”). The parameters of ATMA Convert utility are subsequently the original pcapng file and the new pcapng split file.

Example of use for command line mode:

TcnMvbAnCfg.exe [–i] <inputfile> [–o] <outputfile> [-m<mode>]

TcnMvbAnCfg.exe –i original_file.pcapng –o split_file.pcapng –m4

Using command line mode see chapter 9.21.1 – Command line mode. Using GUI, see chapter 9.18 – Load and Convert to PCAPNG.

ATMA Converter utility supports 4 modes of converting ATMA datagrams into MVB records:

1 – single record in one ATMA datagram,

2 – pairs of master frame and related slave frame in one ATMA datagram, MVB lines A and B stored separately,

3 – a pair of master frame and related slave frame received on line A or B in one ATMA datagram, each frame stored only once (line A or B). This mode is recommended for message data processing.

4 – pairs of master frame and related slave frame lines A and B together in one ATMA datagram.

In the output file, ATMA datagrams are split so the coloring rules and records filters can be applied. It is also possible to analyze the communication up to the layer of UIC 556 with tcn-an-uic.lua plugin.

These filters enable to select certain types of records which are inspected. Particular filtering keywords are accessed using the dot convention or using interactive help of Wireshark environment. For more information, please refer to Wireshark documentation.

Recording

ATMA

Converter

ATMA Converter

modes

Record filtering

Page 16: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 16/35

The root keywords of filtering are

Keyword Functionality

tcn-mvb-an Filtering according to TCN IEC 61375-3-1:2012

tmsg Message filtering according to TCN IEC 61375-2-1:2012

uicmsg Message filtering according to UIC 556:2010

Fig. 1 Filter expression

Other most important keywords for the tcn-mvb-an filtering are:

Keyword Description

id Identification

ver Version

seq_nr Sequence number

tmps_res Timestamp resolution [ticks/us]

nr_recs Number of records

recs_data Records data

recs_data.rec recs_data.rec.timestamp recs_data.rec.ctrl recs_data.rec.ctrl.type recs_data.rec.ctrl.sts

Record Timestamp [ticks] Control Type Status

recs_data.frm recs_data.frm.data recs_data.frm.fcode recs_data.frm.addr

MVB Frame Frame data FCode Address

Page 17: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

17/35 tcn-mvb-an_ms_en_107

Other most important keywords for the tmsg filtering are:

Keyword Description

data Packet Message Data

cc Packet Connect Confirm

cr Packet Connect Request

dc Packet Disconnect Confirm

dr Packet Disconnect Request

dstaddr Destination Network Address

mtc MTC

srcaddr Source Network Address

Other most important keywords for the uicmsg filtering are:

Keyword Description

current_nadi Current NADI Items

national_application_code Application code

national_telegram_code Telegram code

rucode RU code

source_function Source function

source_vehicle Source vehicle

status E-telegrams status

target_function Target function

target_vehicle Target vehicle

uic_telegram_code UIC telegram code

ums UIC Mapping Server Status Information

Filtering for frames for fcode equals 15 (message data) and with address equals 1 can be defined for instance as:

Fig. 2 Example of FCode and Address frame filtering

Page 18: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 18/35

8 Loading domains into TCN-MVB-AN

This chapter describes how to load the current domain version into a new device, or how to perform the domain upgrade for used device. Domain can be considered as contiguous memory block.

8.1 TCN-MVB-AN domains

TCN-MVB-AN on target device contains the following domains:

Domain Manufacturing status

Description / Upgrade

Loader Loaded Loader Upgrade: No

Executed application Free Information about running application Only informative

Application update Free Valid application Upgrade: Yes

Safe application Loaded Safe application, no analyzer functionality Upgrade: Yes

MVB controller Free FPGA data in device Upgrade: Yes

MVB controller safe Loaded FPGA safe data Upgrade: Yes

Journal Loaded Operating journal Upgrade: No

All domains are supplied by AMiT company. Current versions are available here:

http://imp.amit.cz/www/mvb/tcn-mvb-an/index.htm Only correct domain file can be loaded into appropriate domain. When loading, the data header is checked, therefore incorrect data cannot be loaded. Domain filenames:

Domain File

Loader mvb10_l_xxx.bin

Application update mvb1an02_1_a_xxx.dom

Safe application mvb1an02_1_s_xxx.dom

MVB controller mvb1an02_1_f_xxx.dom

MVB controller safe mvb1an02_1_e_xxx.dom

xxx – denotes version

Page 19: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

19/35 tcn-mvb-an_ms_en_107

8.2 Loading of new device

Target device comes from production with station firmware loader (mark as Safe Application) and safe MVB controller copy. It is necessary to load the Application and MVB controller before the first use. To load files, it is necessary to download, from web address mentioned in chapter 8.1, the TcnMvbAnCfg program, actual versions of application program

and MVB controller. Service mode is indicated by permanently lighting LED RUN.

Device is switched to service mode, if at least one of following cases is completed:

Device stays in service mode, when it is produced by manufacture, until application loaded.

RESTORE button is pressed.

Safe mode is activated using the TcnMvbAnCfg. For loading new application to device via TcnMvbAnCfg, please follow procedure below: Connect device to Ethernet network with connected PC

Launch the TcnMvbAnCfg program

Set in the Menu – Options – Preferences

Communication channel to Ethernet

Port to value 75

Optionally you can select default folders with *.dom files

Power on target device.

In Device list, the target device will appear (if not, click Search again). Premature search termination can be done with Esc key.

Launch the Domain services by click on device (context menu is activated by right mouse button).

Click on “MVB controller” domain and start the Download domain service from the context menu. After loading, the device restarts itself.

Click on Application update domain and start the Download domain service from the context menu. After loading, the device restarts itself.

Now the device is completely operational.

Service mode

Procedure

Page 20: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 20/35

8.3 Domain upgrade

When any domain needs to be upgraded on device in operation, follow the procedure below: Connect device to Ethernet network with connected PC.

Launch the TcnMvbAnCfg program.

Set in the Menu – Options – Preferences.

Communication channel to Ethernet,

Port to value 75,

Optionally you can select default folders with *.dom files.

Power on target device.

Start auto detection in main program window.

In the Device list, the target device will appear (if not, click Search again).

Launch the Domain services by click on device (context menu is activated by right mouse button).

Click on domain which is to be upgraded and start the Download domain service from the context menu. After loading domain, the device restarts itself.

Procedure

Page 21: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

21/35 tcn-mvb-an_ms_en_107

9 Configuration and Control

The MVB analyzer is controlled and configured using a PC tool TCN-MVB-AN-CFG. The PC tools can be downloaded from website:

http://imp.amit.cz/www/mvb/tcn-mvb-an/index.htm The website is maintained by AMiT as the project website for the MVB Analyzer.

9.1 Program description

The software provides simple way to configure the behavior of the MVB analyzer e. g. setting up triggers for both lines and configuring the subsequent communication with Ethernet or the behavior of the trigger output. Program also includes a domain manager for the analyzer. Usage of an external ADSManager is therefore unnecessary.

9.2 Main window

Fig. 3 Main window

Number Description

1 Main menu

2 Device selection

3 Information frame

Legend

Page 22: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 22/35

4 Status bar

5 Switch hide/view control

6 Line triggers

7 MVB slaver frame trigger

8 MVB master frame trigger

9 Common triggers

10 Reply timeout delay

11 Medium of MVB bus

12 Trigger output options

13 UDP output settings

14 Configuration save button

9.3 File menu

Terminate the program. (Hotkey: Alt + F4). Initiate the search for compatible devices. The search can also be initiated by

pressing the button. (Hotkey: F5). Cancel a search in progress. (Hotkey: Esc). Load a file *.pcapng with MVB records and convert the records into groups.

9.4 Status bar

The text aligned to the left on the status bar indicates the result of the most recent operation. The text aligned to the right on the status bar indicates currently used port of the UDP communication. Unless changed the value should stay on a value of 75.

9.5 Options menu/Preferences

Fig. 4 Preferences window

Preferences provide a way to change settings that are necessary for communication in the direction from the Command and Control software to the

Exit

Search

Search Cancel

Load & Convert

Status

Ethernet

Page 23: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

23/35 tcn-mvb-an_ms_en_107

connected analyzer. It is advised to not change these setting without a strong reason. Communication channel type, for Command and Control software only Ethernet. Ethernet port number. This field corresponds with the Ethernet field on status bar. The period of time to wait before connection times out. Serial port number – not used.

9.6 Device selection

After a search is completed, all found devices are shown in a list in the Device selection frame. Basic information about any displayed device can be found here as well. Upon selecting a device by left mouse click more detailed information can be found in the Information pane below.

Upon right mouse click on a found device a context menu for such device is invoked. This context menu provides tools for in depth management of used devices. It consists of following items: Read the list of domain from a device (see chapter 9.19).

Switch the device in to the service mode; Safe application starts.

Reset a device. Display window for reading XML script. XML scripts serve, for example, for multiple domain update (see chapter 9.21). Change of IP address, mask or default IP gateway (see chapter 9.20).

9.7 Information frame window

The information frame window provides a detailed categorized view on available information for a device selected in the device selection frame. All displayed data is for informative purpose only.

9.8 Line triggers

One of the main functions of the tool is customizing the triggers and subsequent reaction of a MVB analyzer. Triggers are configured independently for master and slave frames separately for each MVB line (A/B). The triggers are based on the IEC 61375-3-1 ed1.0:2012 standard.

Comm.

channel

UDP port

Timeout

COM

Domain

services

Switch to service mode

Reset device

Load XML

Ethernet settings

Page 24: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 24/35

9.9 Common triggers

Common triggers are configured for both lines. These triggers are also based on the IEC 61375-3-1 ed1.0:2012 standard.

9.10 Trigger output options

Trigger output options modify the behavior of the trigger output available on the device. These options include the possibility of changing the polarity and setting the pulse length to be sent when triggered. Manual trigger controls are to simulate a trigger and evoke the reaction of the device without the need of such event happening on the MVB bus.

9.11 Reply timeout delay

This option sets length of time to wait before Reply timeout trigger is invoked.

9.12 UDP output settings

Configuration of how the MVB analyzer sends data to the Ethernet.

9.13 Configuration save button

Saves the current configuration and upload it into the MVB analyzer.

9.14 MVB bus medium – Electrical mode

This option sets configuration of the following media of the MVB bus according [2]:

EMD – Electrical Medium Distance medium,

ESD – Electrical Short Distance medium.

9.15 MVB master frame trigger

This group of controls sets configuration of trigger generation on trigger output according content of the MVB master frame. The following modes are supported:

only F-Code triggering,

only address triggering,

F-Code and address triggering.

The address can be masked so a group of addresses can be captured. Configurable master frame content can be applied separately to MVB line A or to MVB line B or to both. The trigger is active on the output on the device after master frame reception with a delay depending on the active line which is

Page 25: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

25/35 tcn-mvb-an_ms_en_107

approximately from 2 to 3 microseconds for line A and from 6 to 8 microseconds for line B.

Fig. 5 Configuration master frame triggering for line A and B for process data length of 16 bits and the address equal to 1000

Fig. 6 Configuration master frame triggering for line A and B for the group of masked addresses in the range 0x100 to 0x10F (address + mask)

Page 26: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 26/35

9.16 MVB slave frame trigger

This group of controls sets configuration of trigger generation on trigger output according to the content of the pair MVB master and slave frame.

The slave frame data length depends on the content of the master frame. The slave frame content control contains data and mask settings. Configurable slave frame content can be applied separately to MVB line A or to MVB line B or to both. The trigger is active on the output after master frame and related slave frame pair reception with a delay depending on the active line which is approximately from 3 to 6 microseconds for line A and from 8 to 16 microseconds for line B.

Fig. 7 Configuration slave frame triggering for line A and B for process data length of 256 bits and master frame address equal to 1000

9.17 MVB Statistics and Recording

After selecting this option the device is started calculating statistics of MVB records. The data sources are ATMA UDP datagrams that the selected device sends when it is connected to an active MVB bus. If statistics are not running it is necessary to check the settings for ATMA UDP protocol.

Statistics window is divided into parts.

Section UDP FRAMES contains:

the number of valid received ATMA UDP datagrams

the number of decode erroneous ATMA UDP datagrams,

the number of incorrect sequence of ATMA UDP datagrams,

– for holding the windows update,

– to hide MVB frames and events flags,

- for clear and restart statistics

UDP FRAMES

Page 27: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

27/35 tcn-mvb-an_ms_en_107

Section MVB FRAMES contains:

number of MVB frame records

view filter for Supervisory telegrams (FCode 8, 9, 13, 14, 15)

view filter for PD telegrams (FCode 0 - 4)

view filter for MD telegrams (FCode12)

view filter for Unknown telegrams (FCode 5, 6, 7, 10, 11)

main table of filtered records – displays counters, addresses+fcodes as master frames, periods, content of slave frames

table of Device status flags – it decodes the contents of the selected table row record

table of MVB frame flags – it decodes the contents of the selected table row record

Section MVB EVENTS contains:

number of MVB events records

table of MVB event flags – for all records

Section RECORDING contains:

elapsed time of records,

– type recording from now,

– type recording on trigger (the same event as TRIG OUT)

Note: trigger must be set on the device,

Max records – maximum number of MVB records

for type “On trigger” it is maximal delta with trigger in the middle -> pre-buffering is half of maximum,

– start recording, – stop recording,

– save records to a file*.pcapng (with selecting of grouping),

– sequence window, displaying a maximum of 10 000 records to stop recording. Entries are displayed from the beginning or near the trigger.

MVB FRAMES

MVB EVENTS

RECORDING

Page 28: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 28/35

Fig. 8 Statistics and Recording Window

After switching on the Sequence Window displays entries depending on:

sequence index,

sequence time,

delta time from the previous original record,

type of record,

content length,

content,

detail (address and f-code of master or related slave frame, sequence number).

Fig. 9 Sequence window

Sequence window

Page 29: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

29/35 tcn-mvb-an_ms_en_107

Above the Sequence Window can invoke the context menu (right click), where items are available for working with records:

Next window (Hotkey: P),

Previous window (Hotkey: N),

From index – view from a certain index,

Find item – finding required items (Hotkey: CTRL+F),

Find next (Hotkey: F3),

Orig.Time – information about original timestamp from ATMA protocol

Fig. 10 Context menu of Sequence window

It can be searched by event status or frame status under Chapter 6.1 – Description of ATMA datagram, or by the content of the master frame as an address or a f-code.

Fig. 11 Finding the required items in the sequences of records.

9.18 Load and Convert to PCAPNG

The File Menu contains an item Load & Convert and after activation is displayed window for only loading or re-converting MVB records.

For the conversion, it is necessary to fill the items.

Find Item

Page 30: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 30/35

The input file name (*.pcapng) with MVB records.

Optionally with Saving enable, the output file name (*.pcapng).

Optionally , type of group for re-conversion as:

MVB single record,

MVB lines A and B separately,

MVB line A or B

MVB lines A and B together.

Optionally, it can filter results by source IP address and source UDP port.

Optionally, hold the data for display in the sequence window.

Fig. 12 Conversion process

Input file

Output file

Grouping

Filter src address

Hold data

Page 31: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

31/35 tcn-mvb-an_ms_en_107

9.19 Domain services

Fig. 13 Domain list window

Number Description

1 Main table

2 Sub-table

The main table shows current list of domains.

If the domain is active, the line is blue, when damaged or free, the line is red. Otherwise the line is black.

ID – the domain ID.

Memory – type of used memory (ROM, Flash, …).

User rights – RE = reading, WR = writing, DW = download, SR = sequential reading, RU = rights to run, DI = dictionary with parameters.

Version – domain version.

Description – domain description.

Legend

Main table

Page 32: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 32/35

The sub-table shows detail parameters of the particular domain. Sub-table content varies according to line selected in main table.

File – file name specified by AMiT company.

DB name – database name specified by user in configurator tool (N/A).

MAC – network interface MAC address.

Offset – retrieved domain offset (0 to DMNS – 1).

DMNS – overall number of domains included in device.

Max Size – domain total size.

Current Size – occupied domain size.

Free Size – domain free size in %.

Time – time of domain creation/change.

Usage – domain occupation type (empty, debug, internal, release).

State – domain data status.

Appl ID – bottom Word = HWID, Upper Word = PID.

Hwid ID – station identifier.

PID – process/application identifier.

Cfg ID – station modification identifier.

Cfg Mask – Cfg ID mask for given domain.

Sig – domain signature (specifies meaning of domain content).

9.19.1 Operations over domains

Several operations over domains can be accessed from a context menu. The context menu for the particular domain can be invoked by first selecting the domain with a left mouse click on a domain line and the pressing the right mouse button. When invoking the context menu it is important to have right domain selected since the context menu is always opened for the selected domain.

Read Domain – domain contents retrieval. Provides retrieval of domain

content from the device and it's storing to *.dom type file. For Journal type domain – the text form *.log can be displayed.

Download Domain – loading the domain into device. Provides loading of selected domain into the device. After successful downloading, the user is prompted to activate data. When refused, the domain will be inactive up to next device restart.

Compute CRC – retrieving/calculating CRC. When user activates the item, program first tries to read CRC from the device, if available. If unavailable, calculation is made. User can also force the calculation by pressing the Compute button in window for calculation.

Compute SHA1 – retrieving/calculating SHA1. The process is analogical to the CRC calculation.

Sub-table

Page 33: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

33/35 tcn-mvb-an_ms_en_107

Fig. 14 Domain data flow scheme

9.20 Ethernet settings

Fig. 15 Ethernet settings window

Number Description

1 PC network info

2 Device network info

Pc network info shows network parameters of currently used network PC network adapter.

IP – IP address of currently used network adapter.

Mask – Network mask of currently used network adapter.

Adapter – Name of currently used network adapter.

Legend

PC network info

PC

Target Device

READ

DOWNLOAD

Page 34: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

tcn-mvb-an_ms_en_107 34/35

Device network info shows network parameters of selected device.

IP – Current IP address of selected device.

Mask – Network mask of selected device.

Gateway – Gateway of selected device.

9.21 XML script

XML script contains list of domains for update. Scripts are provided by AMiT company.

Window for working with XML scripts can be invoked from context menu “Load XML” after the device is found.

Browse script – browse script.

Clear – clear the command line window.

Run script – run script.

Fig. 16 GUI XML script – domain update

9.21.1 Command line mode

In the command line mode, it is also possible to run XML script in order to download multiple domains but it still is possible to download only one domain. In such case the parameter Domain ID must be supplied and the device itself checks the validity of the ID. Format:

TcnMvbAnCfg –a<IP> -x <xml>

TcnMvbAnCfg –a<IP> -d<id> <dom>

Device network info

ADS CMD

Page 35: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual · SW for MVB Analyzer Programmer’s manual Version 1.07 . TCN-MVB-AN ... CSE DMF DSF EMD EMF ESD ESF FCS FLL X MCV MFR MVB MD

TCN-MVB-AN

35/35 tcn-mvb-an_ms_en_107

Parameters:

-h -help

-a<IP> -ethernet IP address

(-a192.168.1.1, -a192.168.1.1:75)

-x <*.xml> -XML file, script for oparation with domain(s)

(domains.xml)

-d<number> <*.dom> -ID domain and DOM file for update (-d8 nsdb.dom)

-j<number> <name> -ID domain and journal target file name*.log or

*.rtf (-j6 journal.log)

-t<number> -communication Ethernet timeout (-t3000)

-n<IP,GW,MK> -set new IP address, GW gateway, MK mask (not set

empty, for set mask –n,,255.255.255.0)

-r -reset device

-p -information about device

Utility for re-converting MVB records for files type of *.pcapng. Format:

TcnMvbAnCfg [–i] <infile> [–o] <outfile> [-m<mode>] [-a<ip:port>]

TcnMvbAnCfg –i original_file.pcapng –o split_file.pcapng –m4

Parameters:

-i <infile> -path to input pcapng file for conversion

(*.pcapng)

-o <outfile> -(optionally) name of output pcapng file

(*.pcapng)

-m<mode> -(optionally) mode: 1, 2, 3, 4 (default 1). All

UDP ATMA datagrams with MVB records are converted

into ATMA datagrams with:

1 – MVB single record

2 - couple of master frame and related slave

frame, MVB lines A & B separately

3 - couple of master frame and related slave

frame, MVB line A or B (this mode is recommended

for message data)

4 - couple of master frame and related slave

frame, MVB lines A & B together

-a<ip:port> -(optionally) filtering source IP address and UDP

port of device

ATMA Convert