Python for Real-Time Testing
- Synchronous execution of test scripts and simulation model
- Concurrent execution of several independent test scripts
- Python interpreter integrated into application via Real-Time Workshop build option
- Real-time-capable Python interpreter for the DS1005 PPC Board and the DS1006 Processor Board
- Dynamic test loading during model and test execution
- Library of read and write functions to variables of the simulation model
- NEW: Use of MAT file data located on host PC for real-time stimulation of model variables
- NEW: Transparent variable access in multiprocessor systems
- NEW: Support of MicroAutoBox
Describing Real-Time Tests in Python
Automated testing usually is performed by executing tests on a standard PC connected to the hardware-in-the-loop (HIL) system. However, this method often cannot cope where greater timing precision is required – for example, if ECU interaction has to be captured and responded to in a range of milliseconds. Python scripts for real-time testing coming with AutomationDesk are the answer. They run on the processor board of the HIL system in real time, i.e., synchronously with the model, so all test actions are performed on a real-time basis. This opens up expanded test options with dSPACE simulator. Reactive tests which respond to changes in model variables within the same simulation step can be implemented. Time measurements in tests are also far more precise, as there are no latencies in communication. Simulation step size is now the only limit to the maximum time resolution of measurements.
Real-Time-Capable Python Interpreter
A real-time Python interpreter, running on the processor board along with the model, allows the script to execute synchronously with the model. The interpreter can execute several real-time tests simultaneously and independently of one another. The tests can interact with the simulation model in real-time via the memory on the processor board. You can therefore observe and influence the ECUs connected to the HIL simulator in every individual simulation step.
Advantages of Python Real-Time Tests
- Real-time tests programmed in Python standard language
- Test descriptions can be extended by user libraries
- Test action descriptions with precise timing information
- Reproducible execution of test cases
- Simulation models need no modification for real-time tests
- Read and write access to model variables possible in every simulation step
- Dynamic reloading and execution of tests during model simulation
- Real-time tests can be managed by the host PC via Python scripts and a dedicated GUI (Real-Time Test Manager)