TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

21
tcn-mvb-an_ms_en_103 TCN-MVB-AN SW for MVB Analyzer Programmer’s manual Version 1.03

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

Page 1: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

tcn-mvb-an_ms_en_103

TCN-MVB-AN

SW for MVB Analyzer

Programmer’s manual

Version 1.03

Page 2: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 2/21

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 any body 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) 2015, AMiT, spol. s r. o. Producer: AMiT, spol. s r. o.

Naskové 3/1100, 150 00 Praha www.amit.cz

Technical support: [email protected]

Page 3: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

3/21 tcn-mvb-an_ms_en_103

Table of contents

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

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

2. AMiT MVB device classes ................................................................... 6

3. Definition of used terms ...................................................................... 7

4. Introduction .......................................................................................... 8

5. Technical parameters .......................................................................... 9

6. ATMA Protocol ................................................................................... 10

6.1. Description of ATMA datagram..................................................................... 10

7. Loading domains into TCN-MVB-AN ................................................ 12

7.1. TCN-MVB-AN domains ................................................................................ 12 7.2. Loading of new device .................................................................................. 13 7.3. Domain upgrade ........................................................................................... 14

Page 4: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 4/21

Revision history

Document name: tcn-mvb-an_ms_en_103.pdf

Author: Ondřej Maštálka, Adam Dočekal, Michal Tomáš

Version Date Changes

100 01. 10. 2014 New document

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

102 14. 07. 2015 Remove chapter 7, ADSmanager has independent documentation Change link to web

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

Related documentation

1. RB-MVB/AN01 – Operation manual file: rb-mvban01_g_en_101.pdf

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

3. ADSManager – Programmer’s manual file: ADSManager_ms_en_110.pdf

Page 5: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

5/21 tcn-mvb-an_ms_en_103

1. Definition of used abbreviations

AMiT Device Detection AMiT Domain Services Bus Administrator Electrical Middle Distance Master Frame Multifunction Vehicle Bus Message Data Process Data Slave Frame Train Communication Network AMiT TCN MVB Analyzer

ADD

ADS

BA

EMD

MFR

MVB

MD

PD

SFR

TCN

ATMA

Page 6: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 6/21

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 7: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

7/21 tcn-mvb-an_ms_en_103

3. Definition of used terms

Bus Administrator 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. Electrical Middle Distance This is a type of physical interface of MVB line, where a twisted pair of shielded wires is used 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. MVB Telegram Master fame and corresponding slave frame.

Page 8: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 8/21

4. Introduction

This manual describes the features of TCN-MVB-AN (MVB analyzer) software. The software is running on hardware from AMiT production which is referred 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 and the procedure of downloading the firmware.

Page 9: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

9/21 tcn-mvb-an_ms_en_103

5. Technical parameters

Compatibility IEC 61375-3-1 ed1.0:2012

Process data No

Message data No

Class 0

Database No

Configuration download No

MVB analyzer RB-MVB/AN01

MVB

Configuration

Target device

Page 10: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 10/21

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 10-byte header and data. Minimum datagram length is 14 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 (1)

Seq_number U32 32 bits Sequential number of ATMA datagram

Nr_records U16 16 bits Number of records

Record entry No. 1

Time_stamp U32 32 bits 32-bit HW record timestamp [ųs]

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 [ųs]

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 [ųs] 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

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 11: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

11/21 tcn-mvb-an_ms_en_103

The status for the frame has following format:

MVB line Res CRC 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

Reserved 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:

Frame lost line A Frame lost line B Reply timeout Bus timeout Reserved

Bit 14 Bit 13 Bit 12 Bit 11 Bit 0-10

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).

Note:

Page 12: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 12/21

7. 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.

7.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 mvb1an01_1_a_xxx.dom

Safe application mvb1an01_1_s_xxx.dom

MVB controller mvb1an01_1_f_xxx.dom

MVB controller safe mvb1an01_1_e_xxx.dom

xxx – denotes version

Page 13: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

13/21 tcn-mvb-an_ms_en_103

7.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 7.1, the ADSManager program, actual versions of application program and MVB controller. For detailed usage of ADSManager software see related documentation on page 4. Most of the operations described below can also be accomplished using the Command and Control software (see chapter 8). 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 ADSManager (see related documentation section on page 4) or Control and Control software (see chapter 8)

For loading new application to device via ADSManager, please follow procedure below: Connect device to Ethernet network with connected PC

Launch the ADSManager 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 14: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 14/21

7.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 ADSManager 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 15: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

15/21 tcn-mvb-an_ms_en_103

8. Command and Control

8.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 analog output. Program also includes a domain manager for the analyzer. Usage of an external ADSManager is therefore unnecessary.

8.2. Main window

Fig. 1 - Main window

8.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)

Exit

Search

Search Cancel

Information frame

Device selection

Main menu

Status bar

Line triggers

Common triggers Analog output options

UDP output settings

Manual trigger controls Configuration save button

Reply timeout delay

Page 16: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 16/21

8.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.

8.5. Options menu/Preferences

Fig. 2 - 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 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

8.6. Device selection

After a search is completed all found devices can be found 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 8.15). 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 8.17). Change of IP address, mask or default IP gateway (see chapter 8.16).

Status

Ethernet

Comm. channel

UDP port

Timeout

COM

Domain services

Switch to service mode

Reset device

Load XML

Ethernet settings

Page 17: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

17/21 tcn-mvb-an_ms_en_103

8.7. Information frame

The information frame provides a detailed categorized view on available information for a device selected in the device selection frame. All shown information have purely informative character.

8.8. Line triggers

One of the main functions of the Command and Control software is customizing the triggers and subsequent reaction of a MVB analyzer. Which events trigger evoke a reaction of the MVB analyzer is set independently for master and slave frames separately for each line (A/B). The triggers are based on the IEC 61375-3-1 ed1.0:2012 norm.

8.9. Common triggers

Common triggers are when active used for both lines. These triggers are also based on the IEC 61375-3-1 ed1.0:2012 norm.

8.10. Analog output options

Analog output options modify the behavior of the analog port. These options include the possibility of changing the polarity and setting the pulse length to be send when triggered.

8.11. Manual trigger controls

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.

8.12. Reply timeout delay

Period of time to wait before Reply timeout trigger is invoked.

8.13. UDP output settings

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

8.14. Configuration save button

Saves the current configuration and sends it into the MVB analyzer

Page 18: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 18/21

8.15. Domain services

Fig. 3 - Domain list window

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

The sub-table shows detail parameters of 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 %

Main table

Sub-table

Main table

Sub-table

Page 19: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

19/21 tcn-mvb-an_ms_en_103

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)

8.15.1 Operations over domains

Several operations over domains can be accessed from a context menu. The context menu for a 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 similar to the CRC calculation.

Fig. 4 - Domain data flow scheme

PC

Target Device

READ

DOWNLOAD

Page 20: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

tcn-mvb-an_ms_en_103 20/21

8.16. Ethernet settings

Fig. 5 - Ethernet settings window

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 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.

8.17. 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

PC network info

Device network info

PC network info

Device network info

Page 21: TCN-MVB/AN - SW MVB Analyzer - Programmer’s manual

TCN-MVB-AN

21/21 tcn-mvb-an_ms_en_103

Run script – run script

Fig. 6 - GUI XML script – domain update