• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Blackbox3 (Data Recorder) Released

Messages
1,564
Country
thailand
File write capability using Logger has been added in Blackbox release 3. Using Blackbox3, real time values of up to several hundred Flight Simulator system variables (A, E, P) and L:Vars from any or all xml gauges in the panel can be recorded to file each update cycle. Blackbox3 also retains all of the screen output formats included in Blackbox release 2.

What Blackbox does:
BlackBox3 constructs an xml diagnostic gauge that can be used to display in readout form on the screen or write to HDD file the number or string values of user-selected A:, E:, or P: system variables, or any L:Var in the panel. It can display important parameters such as L: and A: variables, booleans, enums, etc., that are not usually displayed directly by the gauge you are building. As such, it is very useful for debugging xml gauge logic; you can see what all variables are doing in real time as MS Flight Simulator flies.

The BlackBox3 application can be used with either FS9 or FSX and requires installation of the Logger module which can be downloaded from the Blackbox website. Please follow the simple installation instructions for Logger as well as the Setup instructions for Blackbox3 which are included in the Help file for each product.

Blackbox3 and Logger were written by Robbie McElrath.

Blackbox3 can be freely downloaded here http://www.robbiemcelrath.com/blackbox/?blackbox and feedback is solicited and welcome.

Cheers, Bob
 
Excellent !
That sounds not only very useful for debugging, but also a serious alternative to AFSD for flight and data logging, with variables freely selectable.
Thanks a lot !
 
Excellent !
That sounds not only very useful for debugging, but also a serious alternative to AFSD for flight and data logging, with variables freely selectable.
Thanks a lot !

Thank you very much for the kind words.

We never intended to compete with Pete's legendary FSUIPC or AFSD, of course. The Blackbox interface (interactive and simple to click your desired variables) is just a tool that I wanted as I tried designing xml gauges. Same with the Logger module. Luckily, Robbie can turn my ideas into very professional products.

Bob
 
This is an awesome tool, thanks for that.

Two questions:
- When logging to a file the file can only be read by a different program after stopping the recording. Can this be changed (e.g. closing the file after each write)?

- Is it possible to limit the number of lines to write to the file so that you have only the ten last update cycles?

Regards,
T.
 
This is an awesome tool, thanks for that.

Two questions:
- When logging to a file the file can only be read by a different program after stopping the recording. Can this be changed (e.g. closing the file after each write)?


- Is it possible to limit the number of lines to write to the file so that you have only the ten last update cycles?

Regards,
T.

- When logging to a file the file can only be read by a different program after stopping the recording. Can this be changed (e.g. closing the file after each write)?

You mentioned Blackbox3, which can use Logger as an output format. But, Logger is also a stand alone program. Take a look at the Logger 1.1 documentation and example xmls. By using closeWrite, you can close the file you are writing to after each Logger write instruction if you want, but you must issue a closeWrite command. Once that is done, the file can be opened and read by a text editor or spreadsheet application right away.

Your Logger xml would be something like:

'Filename.txt' (>C:Logger:openAppend)
Some variable (>C:Logger:number or string)
1 (>C:Logger:closeWrite)

Obviously, this works for infrequent Logger Writes such as those that might be triggered by a mouse click. Repetitive writes might be a different case.


- Is it possible to limit the number of lines to write to the file so that you have only the ten last update cycles?

The last ten update cycles... before what? I'm not completely sure what you have in mind. Do you mean a Logger file that is continuously overwritten every 10 update cycles?

Anyway, yeah, this can be done with some code logic within an <Update> section using a simple cycle counter approach. If you indeed mean to continuously overwrite the file every 10 update cycles, then open the file using openWrite or openCsvWrite as that erases the file if it already exists.

Having said all of the above, openRead and closeRead are extremely fast operations, but you might (probably will) run into issues with Write not being able to open and close as quickly as every 10 cycles.

I guess I would have to think about the last question a little more.

Interesting questions, thx.

Bob
 
Last edited:
The last ten update cycles... before what? I'm not completely sure what you have in mind. Do you mean a Logger file that is continuously overwritten every 10 update cycles?
Bob

O.K. let's say I log every 18 gauge cycles i.e. every second. The log file always contains 10 lines representing the last ten seconds. Then all lines will get shifted up 1 line, deleting the oldest line. The newest line is added at the bottom.
 
O.K. let's say I log every 18 gauge cycles i.e. every second. The log file always contains 10 lines representing the last ten seconds. Then all lines will get shifted up 1 line, deleting the oldest line. The newest line is added at the bottom.

Oh, now I understand. That's an interesting use, but unfortunately no, there is no way simply within Logger.

However, using Tom Aguilo's XMLVars, or even standard L:Vars in a shift register type approach, it would be possible to accomplish the shift 1 up, delete the oldest part, followed by a Logger openWrite to store those 10 lines of variables to HDD file, completely erasing the previous file write.

Tom, if you are reading this thread, feel free to jump in.

Bob
 
Hi Bob,

thanks for your help. I managed to modify the "Flight Data Recorder XML example" to do what I want. Without user input it will always log (and overwrite) one line of flight data. I can try making a shift register (couldn't come up with that term) but it's not priority.

Code:
                <!-- FULL FILE PATH - WHEREVER YOU WANT THE FILE -->
<Gauge Name="Flight Rec">
<Macro Name="Path">'C:\Programme\Microsoft Games\Microsoft Flight Simulator X\Gauges\SimVars\'</Macro>
<Size X="400" Y="300" />

<Update Frequency="18" Hidden="No">
<!-- FLIGHT DATA RECORDER EXAMPLE -->  
18 (>L:RecorderSkipCycles, enum)	<!-- Number of Update Cycles to skip between recording data -->

	(L:NumberOfCyclesSkipped, enum) ++ (>L:NumberOfCyclesSkipped, enum)
	(L:NumberOfCyclesSkipped, enum) (L:RecorderSkipCycles, enum) >= 
		if{
		          @Path 'FlightRecorderFile.csv' scat (>[B]C:LOGGER:openCsvWrite[/B])
	
                                  (A:PLANE LONGITUDE, degrees) (>C:LOGGER:number)
			(A:PLANE LATITUDE, degrees) (>C:LOGGER:number)
			(A:PLANE ALTITUDE, meters) (>C:LOGGER:number)
                                      <!--additional data here-->
   			(P:ABSOLUTE TIME, seconds) (>C:LOGGER:number)
			1 (>[B]C:LOGGER:closeWrite[/B])
			0 (>L:NumberOfCyclesSkipped, enum)
			
		}
</Update>		
</Gauge>


By the way, the XML example is missing the <Gauge> tag and also <size> is not defined, so the mouse touch area is not active.
 
Last edited:
Back
Top