FROMSLNK

Interface to Matlab/Simulink
Inputs(0)
Parameters(1) p1
Default p1=0,
History block YES
Select from Components/Blocks/Simulink
Function

The input(p1) of the MUX/S-function block in Simulink is available at the output of this FromSLNK block.

You can couple the models in Caspoc and Simulink. This is advantageous when modeling power electronics, since Caspoc is better suited for modeling switching circuits, especially power electronics.

Caspoc is running in the background and data can be interchanged between Caspoc and Simulink with the use of a S-Function block.

SIMULINK:

In Simulink select a S-Function block from the tree list and place it in your simulink model. Select a MUX-block and place it in front of the S-Function block. Select a DEMUX-block and place it behind the S-Function block.

CASPOC:

In Caspoc you use the block ToSLNK block to send data to Simulink. Use the FromSLNK block to read data from Simulink. In the ToSLNK block (first parameter), specify the number of the outputs in the DEMUX block in Simulink. In the FromSLNK block (first parameter), specify the number of the inputs in the MUX block in Simulink.

The number of ToSLNK blocks should equal the width of the DEMUX block in Simulink. Change the width of the DEMUX block by double clicking it with the left mouse button and specify the number of ToSLNK blocks.

The number of FromSLNK blocks should equal the width of the MUX block in Simulink. Change the width of the MUX block by double clicking it with the left mouse button and specify the number of FromSLNK blocks.

Special See the tutorial on the Caspoc-Matlab/Simulink coupling
© 2024 CASPOC, All rights reserved. Home   |   Terms and Conditions   |   Legal   |   Export Compliance   |   Privacy Policy   |   Site Map