10. Simulating your custom controller in Simulink®¶
FORCESPRO provides a Simulink® interface for easy simulation of your custom controllers
within existing Simulink® diagrams. Once the code has been compiled, the appropriate Simulink® block and C code for the Simulink® S-function are generated along with your FORCESPRO solver inside the interface
folder. Depending on your controller configuration you will have different input and output ports on your block. The port labels are self-explanatory. Just wire the ports of the FORCESPRO block to other blocks in you Simulink diagram and run the simulation. Note that several instances of the FORCESPRO block can exist in the same Simulink® diagram.