redlogix has implemented a HiL test system and a SiL environment (HiL = hardware in the loop, SiL = software in the loop) for a dialysis machine of a well-known manufacturer of medical equipment. It can be used to operate the software of individual electronic modules as well as the complete machine on development computers with Windows or Linux. The SiL environment serves as a platform for further target software development as well as the implementation of automated tests without target hardware. A very interesting benefit of this approach is the possibility to run the system in specific test phases more slowly or more quickly than during normal operation on the integrated target system. This significantly shortens long lasting setup times on the real system and speeds up test development considerably.
Employed Technologies and Development Tools
- C and C++
- Framework SWIG
- Socket Communication
- Multithreading and Interprocess Communication
- PXI Components (from National Instruments and Pickering)
Software in the Loop Environment
In the target system, the embedded software is distributed across different microcontrollers on multiple separate electronic modules. In order to operate the system within the SiL environment, only the low-level driver layer has been replaced by SiL drivers. With this approach, the target systems’ source code can be compiled and executed within the SiL environment on development computers without further modifications. The CAN and UART communication between the individual modules on the target system is simulated by socket communication in the SiL environment.
A particular challenge during the implementation was, that the embedded software had been in productive operation for several years and was initially designed to work on another platform or in a SiL environment. Since the software was already certified in Europe according to the medical technology standard, it had to be proven that the binary code on the target platform was not changed through the necessary source code changes on the introduction of the hardware abstraction layer. With this strategy it was possible to avoid a complete re-certification process.
Another very important project requirement was compatibility between the SiL runtime environment for automated tests and the test interface of the HiL test environment which was developed in parallel. This way it is possible to implement and check HiL test scripts within the SiL environment, which takes much less time due to the already mentioned option to operate the system within the SiL environment in accelerated mode. The Python programming language is used to implement the automated tests.
One of the reasons why our customer decided to work with redlogix is our long-standing experience in the development of SiL simulation environments for embedded software applications, such as the redBlocks Simulator, a product offered by redlogix.
Hardware in the Loop Test System
In the context of the SiL development project redlogix also designed and implemented a HiL test system for a module, that measures the extracorporeal blood temperature within the dialysis machine and used it for software verification. For this purpose, the requirements for the HiL test system were worked out in order to be able to test the external and also some internal interfaces of the module. On this basis the HiL test system was implemented using PXI components from National Instruments and Pickering (controllers, multi-IO cards, resistance simulators, CAN interface). Apart from setting up the test hardware, redlogix integrated the software drivers for the components into a self-developed test environment (implemented with C++ and Python) and generated the associated Python API using the SWIG framework.
Based on the software requirements for the component to be tested, test scenarios were defined and fully automated test cases implemented using the SiL environment. These were used to verify the software of the component under test in the HiL environment.
For the recertification of the device on the US market, redlogix has carried out essential formal verification tasks in accordance with the customer's development processes, which are compliant to the requirements of the FDA:
- Formal definition and verification of functional and non-functional requirements
- Reviews of existing and newly developed source code
- Formal proof of the binary image’s equality after the introduction of a hardware abstraction layer required for the SiL environment
- Test specification, implementation of automated system tests and execution of manual system tests