C Code (External File)

Description
C Code (External File)
The differences between the C Code (External File) and the C Code models are:
- The source code must be edited outside SIMBA in an external file. Use the
Source file pathparameter to point to the.cfile. - The code is compiled in Debug mode without optimization(lower performance).
- It is not possible to have multiple instances of the
C Code(External File)model pointing to the same source file.
The "C Code" model allows the user to write C Code directly in SIMBA to build custom control models. See this documentation for more information.
Library
Control > Code
Parameters
| Property | Display Name | Parameter Type | Description |
|---|---|---|---|
| NumberOfInputs | Number of Inputs | IntParameter | Number of Inputs |
| NumberOfOutputs | Number of Output | IntParameter | Number of Output |
| SourceFilePath | Source File Path | FilePathParameter | Path to the Source File |
| OptionalAdditionalIncludeDirectory | Optional Additional Include Directory | FolderPathParameter | Optional file to an additional include directory |
| SamplingTime | Sampling Time [s] | DoubleParameter | Sampling Time |
Pins
| Property | Pin Name | Type | Description |
|---|---|---|---|
| - | inputs[0] | ControlIn | inputs[0] |
| - | inputs[1] | ControlIn | inputs[1] |
| - | outputs[0] | ControlOut | outputs[0] |
| - | outputs[1] | ControlOut | outputs[1] |
Default Size
| Width | Height |
|---|---|
| 10 | 10 |