2.1. File Loading and Handling
This section outlines the handling of JSON files, detailing both reading at startup and safe writing mechanisms to preserve configuration integrity.
2.1.1. JSON File Reading
JSON files are always read during the startup of voraus Robot Control. Any changes made directly to the files during runtime, or any files added by the user, will only be recognized on the next restart. There are both required and optional JSON files. If a required JSON file is missing, outdated, or corrupted, voraus Robot Control will terminate to prevent inconsistent or unsafe operation.
2.1.2. File Loading Sequence
During startup, voraus Robot Control reads files in a specific order to ensure proper configuration and operation. The sequence is as follows:
Main Configuration File (required)
Robot Configuration File (required)
Robot Part Numbers (optional, Yu-specific)
Realtime Settings (required)
Main Data File (optional)
Tool Configs (from the configuration directory, optional)
Tool Configs (from the data directory, optional)
User Limit Sets (from the data directory, optional)
Cartesian Constraints (from the data directory, optional)
Compliant Behaviour Configs and Compliant Behaviour Data (optional, Yu-specific)
Fieldbus Configs (e.g., KUKA, SEW, …, optional or required depending on the fieldbus)
2.1.3. Writing JSON Files
To preserve real-time performance, JSON files are always written only when the robot is in a non-real-time state. It is therefore important to ensure that the robot is not switched off during this process, even in simulation, as any changes made could otherwise be lost.
The writing procedure follows a multi-step approach to protect against crashes or file corruption. First, a temporary
.tmp file is created containing the new settings. Next, the existing configuration file is copied to a
.backup file. Finally, the .tmp file is renamed to replace the original file.
This sequence - Original → .tmp → .backup → Original - ensures that at least one
functional JSON file is always available, even in the event of an error during the writing process.
By following this procedure, voraus Robot Control maintains both data integrity and operational safety, preventing the loss of critical configuration information.
2.1.4. Upgrading Deprecated Config Files
New versions of the voraus Robot Control may introduce changes to the configuration file schema to support new features or improvements. Although the voraus Robot Control aims to maintain backward compatibility, it cannot be guaranteed that every change will be fully non-breaking. To minimize disruption, an automated upgrade mechanism attempts to patch and migrate older configuration and data files during the File Loading Sequence to the latest format whenever possible. If manual adjustments are required, the software will provide clear guidance, and all automatically applied changes will be documented in the changelog.