Creating a Continuous Time Block in C Code
- In the Component Manager, select a folder for the new block.
- In the Insert menu, point to Continuous Time Block and select C Code.
- Type in a name for the component and press <Enter>.
Do one of the following:
- In the Edit menu, select Open Component.
- Press <Enter>.
- In the "Database" / "Workspace" list, double-click the component name.
The C code editor for CT blocks opens.
Select direct or nondirect from the Block Behavior combo box in the toolbar.
CT blocks specified in C code support either direct or nondirect outputs, but not both. You can set this in the Block Behavior combo box. If you selected direct, only the directOutputs method is available; with nondirect, only the nondirectOutputs method is available. See Algebraic Loops for details on direct and nondirect outputs.
Enter the code or import external modules as required.
Note |
|---|
Using the C code editor is described in detail in C Code Editor. |
See also