Code Generation for Heavy Equipment with Simulink
Automatically generate production code for heavy equipment with Simulink@. Use reports to check code against specification. Perform closed-loop tests with plant model in virtual environments.
Published: 15 May 2024
Simscape helps you design heavy equipment. In this video, we're going to look at generating production code from an excavator model. Our excavator model contains the algorithms that control the pumps and valves in our hydraulic system. Those algorithms set valve positions based on inputs from operator and sensor measurements from the physical system model.
With a few clicks in Simulink, this algorithm can be automatically converted to code for use on the production machine. The code generation process produces a report that directly connects the generated code to the original implementation.
This report lets us understand and refine the algorithms we have created in Simulink. This code can be tested with the same physical system model we used to develop the algorithm. This lets us be confident that the generated code behaves the same as our original algorithm.
You can download the model we have provided and try generating code for your production control system.