In Subsystem2, the user can see how the file handle for the file to be written is made. Every time the USB is inserted,
a new logging file is created with the name of the Raptor™ build number and number associated with the log file.
Figure 4.1.b- Subsystem2
A very important part of this code is the parameters of the Printf block. Here, the string is formatted in order to give
a path to where the file will be written. ‘disk_sda1/’ is referencing the USB. This allows the file to be written onto
the USB. bdroot is the project title, ‘_v%03.0F_%06.0F_’ formats the path to include the number of the Log created
(with leading zeros and no decimals), as well as the build number used (with leading zeros and no decimals). E.g. if
the user plugs in the USB for the third time, on their second build, the text file on the USB will read
“example_project_v003_000002”.
Figures 4.1.c&d- Path Importance
23
!!