Академический Документы
Профессиональный Документы
Культура Документы
UserManualBlackBoxDat
Platform: AMC
Subsystem: AMCOS
Contents
1 Introduction ..............................................................................................................................2
1.1 Purpose.............................................................................................................................2
1.2 Summary...........................................................................................................................2
2 Developer Manual AMCOS / Application Level .........................................................................2
2.1 Include Functions to the Project ........................................................................................2
2.2 Define Ring Buffer Size .....................................................................................................2
2.3 Monitoring the Ring Buffer Size .........................................................................................3
2.4 Log User Entry ..................................................................................................................4
2.4.1 Log User Entries With Limited Data Size ....................................................................4
2.4.2 Log User Entries With Unlimited Data Size ................................................................5
3 User Manual Level ...................................................................................................................6
3.1 Faults ................................................................................................................................6
3.2 Alarms ...............................................................................................................................6
3.3 The Data Logger Manager User Interface .........................................................................7
4 PC Tool <BlackBox_Upload> ...................................................................................................8
4.1 Installing <BlackBox_Upload> ...........................................................................................8
4.2 Starting <BlackBox_Upload>.............................................................................................8
4.3 <BlackBox_Upload> Command Line Parameters ..............................................................8
4.4 Known limitations ............................................................................................................10
Revision History
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
1 Introduction
1.1 Purpose
This User Manual is intended to be used from two different groups of users.
One group are the developers of AMCOS and their applications. The other group are the users of
the systems using the AMCOS based platform, e.g. service.
1.2 Summary
The 'AMCOS Black Box' is a kind of flexible logging system, which allows the recording of log
messages to a permanent storage place (dedicated FLASH) on the AMC board. During system
operation the data to be logged is automatically collected, time-stamped, identified and stored. This
chronological journal holds all faults, alarms, events, parameter modifications and system relevant
entries (e.g. software version builds). An open programming interface allows user-defined
(application related) entries to be logged, too. As the on-board storage capacity is limited, the
logged information is stored in a first-in-first-out buffering system. The amount and character of the
logged information to be kept can be configured.
For a log analysis the black box data may be uploaded to a PC. These data may be used post-
mortem by means of examination the journal data and explain, understand and give evidence on
<what happened on the system>. The journalised data may allow a reconstruction of the case to
be analysed.
File <TARGET.H>
#define TOPT_LOGGER_FLASH TOPTSEL_AM29F016D
#define TOPT_BLACKBOX_LOGGER TOPTSEL_YES
File <BB_LogToRingBuffer.c>
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
#ifndef _MSC_VER
#pragma asm
;---------------------------------------------------------------------------
; Black Box ring buffer
; DEFINITION OF CONSTANTS
;---------------------------------------------------------------------------
global BLACKBOX_RING_BUFFER_SIZE_ASM
BLACKBOX_RING_BUFFER_SIZE_ASM equ $100 ;Max ???
#pragma endasm
Background information:
Black box logger entries created on time levels are first copied to the ring buffer. This happens on
the task level the entries are generated. The ring buffer is overwrite protected. New entries are
written to the ring buffer until there is no more space, in this case these entries are lost. The ring
buffer size is monitored and the inhibited overflows are counted to the monitoring variables.
The ring buffer is emptied from the background task. The ring buffer data is written to the FLASH
memory and the used ring buffer space is freed. Writing to the FLASH memory is a slow process
and when the FLASH has to be maintained (sector delete) every now and then the data could NOT
be consumed and will stay in the ring buffer.
The following events are stored in the black box ring buffer:
Type of black box logger entry used memory locations
- 5 memory locations
-
Alarm/Fault buffer entries 5 memory locations
- set / set external / reset fault
- set external / clear external alarm
- set / clear alarm
Event buffer (set/delete) entries 5 memory locations
- register event
Alarm/Fault status change entries 4 memory locations
User defined entries 4 + (1..MAX_DATA_SIZE) memory locations
The fault and event buffer sizes are NOT of help to calculate the proper size. The needed ring
buffer size depends on the application and the operational conditions. The question is how
frequent are, worst case, events send to the ring buffer. However, the ring buffer should be big
enough to handle bursts of events sent to the black box logger.
The ring buffer used size is monitored (background task) and the highest value is stored. Maximal
used size of the black box ring buffer, this value has to be monitored during testing new system
configurations.
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
File <BB_LogToRingBuffer.c>
visible unsigned int _Y _u24BlackBoxRingBuffer_MaxUsedSize = 0;
Black box ring buffer overflow counter is incremented for each black box entry NOT written,
because of ring buffer full. The entry sequence number is incremented anyway.
File <BB_LogToRingBuffer.c>
unsigned int _Y BB_u24BlackBoxRingBuffer_OverflowCounter = 0;
File <BB_LogToRingBuffer.c>
#define MAX_DATA_SIZE 60
Create black box logger entries and feed them to the ring buffer by calling the wrapper functions:
File <BB_BlackBox.h>
enum E_BB_ErrorCodes BB_eLogUserEntry_LimitedDataSize_00(
unsigned int* ipau24XMemUserData,
unsigned int iu24UserDataSize)
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
continued
BB_USER_ENTRY_STATUS_WORD_00
...
BB_USER_ENTRY_STATUS_WORD_1F
Create black box logger entries and feed them to the ring buffer by calling the wrapper functions:
File <BB_BlackBox.h>
enum E_BB_ErrorCodes BB_eLogUserEntry_UnLimitedDataSize_00(unsigned int*
ipau24XMemUserData, unsigned int iu24UserDataSize)
continued
BB_USER_ENTRY_STATUS_WORD_00
...
BB_USER_ENTRY_STATUS_WORD_1F
For this function it is possible to log also data from the y-memory. Just set the bit 0x100000
(Y_MEM_BIT) of the address and the function will interpret it as a pointer to the Y memory. E.G.:
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
3.1 Faults
The black box data archived are checked after booting the device. It is essential that the archived
data structures are valid. In case the archive is found corrupted the user should upload the
archives for later data processing. All further writing to the corrupted archive has to be paused.
So in case the archive is found corrupted, a fault is triggered. The common fault bit and the black
box fault bit 11 in fault word ssw_fault is set. The fault is additionally logged to the fault logger with
the text “Black Box Incons.”.
The user has the possibility to make an UPLOLAD of the flash using the PC Tools. After the upload
or without upload the user will reset the FAULT, and then the flash recovering will take place. While
recovering takes place, corrupted archived data may be erased.
3.2 Alarms
An alarm condition will disable the black box logger and the data logger manager function.
An alarm condition sets the black box alarm bit 11 in alarm word ssw_alarm and writes the alarm
message ”Black Box Inact.” into the fault logger.
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
Data Logger Manager user interface handled through AMC Table parameter Group 106:
The stored data loggers can be read using the BlackBox upload tool (see next chapter) or by
loading a stored data logger into the normal data logger memory:
The signals 106.13 and 106.14 show the amount of stored data loggers.
With parameter 106.15 and 106.16 one can select a data logger to be restored.
Data in the normal data logger memory will be overwritten.
After restoring it can be displayed using a standard DriveWare tool, DriveWindow or
DriveDebug, by opening the normal data logger 1 or 2 inside the tool.
Finally the data logger mode needs to be reset with 106.17.
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
4 PC Tool <BlackBox_Upload>
BlackBox_Upload.exeis the PC tool for uploading and maintaining the Black Box and Data Logger
Manager Archives stored on the AMC board.
Options: Description:
/? Shows the command line options
/mbaud= Set link speed (only for PCMCIA and AMC3 CH3)
[default = 1 (no write to control register)
8=8MBaud
4=4MBaud
2=2MBaud
1=1MBaud)]
Faster speed is only possible if drive is not in ReadyRun, i.e. the drive is
either ReadyOn or Tripped.
For faster speeds (2…8) use a point to point connection with PCMCIA
card. The USB adapter RUSB-02 does not support faster speeds.
/channel= Set the DDCS channel of the DDCS hardware.
(0 [default] or 1)
If both, PCMCIA and USB, adapter are installed, PCMCIA is always
channel 0 and USB channel 1.
If only one of them is installed it is always channel 0.
/bb_info Shows the Black Box logger info
Black Box logger enabled state, flash writer description and for each
flash sector the state, ...
/bb_upload_data Uploads the Black Box logger data.
The following files are written:
BBUpload.CSV raw data in comma separated format
BBText.CSV readable text file in comma separated format
BBRecords.CSV comma separated format; one line for each black box
entry.
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
Examples:
A typical batch file for uploading the logger data from inside the loading package folder looks like:
if not exist .\Uploads\nul md Uploads
cd Uploads
..\Prog\BlackBox_Upload.exe 1 /mbaud=8 /bb_upload_data >nul
cd ..
Hint: Suppressing the output to the screen with „> nul‟ speeds up the uploading process.
The data and log-file will be stored in the defined folder (e.g. Uploads). The file BBRecords.CSV is
meant to be used for fault analysis. The other 2 CSV-files contain only intermediate and debugging
data.
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.
Black Box and Data Logger 2DB100151
UserManualBlackBoxDat
Speed
The upload of a completely full logger flash may take some minutes because the tool has to
load all related fault and parameter texts from the target.
Currently there is no possibility to just upload the latest „x‟ events or all new events since the
last upload.
If such a feature is needed please place your request at the MV Drives support line.
System buffer
The upload tool uses a system buffer inside the AMC operating system during uploading.
It has to share the buffer with other internal function executions. Therefore it is recommended
to do the upload only when the drive is offline (MCB open).
If the system buffer is reserved by the tool and the tool closes abnormally it is not possible to
release the buffer anymore; one way is to reboot the AMC board.
The fault message is the following:
OS-buffer reservation
***ERROR (503 – Operating system buffer already reserved.) !
After booting it takes at least one minute until the OS buffer is released for use. Please wait
that time before starting the upload tool.
USB
One limitation of the RUSB-02 DDCS USB-adapter is:
It works smoothly only with a baud rate of 1 or 2 MBaud. Using a higher baud rate makes the
communication unstable and slower.
Für dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte vor. Vervielfältigung, Bekanntgabe an
Dritte oder Verwendung ausserhalb des vereinbarten Zwecks sind nicht gestattet. Copyright BootUp GmbH.