Convert Targetlink blocks to Simulink

Hello, I have been working with Targetlink blocks to build my models. However lately other departments who do not have Targetlink lisences want to convert these models in Simulink for Simulations. As the models are relatively big, it would take an enormous time to build these models again. I have been trying to find a solution where through an mfile we can convert the blocks. However due to lack of documentation, I haven't been able to come to a conclusion if it is possible. Is there a solution to convert these Targetlink blocks (most of which are simple math operations, ports, logic operators etc.) to their Simulink counterparts. Thank you in advance.

Risposte (2)

Daniel
Daniel il 18 Ott 2018
Hi, is there a way to do this automatically for all TL blocks in a subsystem?

2 Commenti

Hi Daniel :)
You can automatically Enhance all blocks in a subsystem like this:
BlocksToEnhance = tl_check_system('system',YourSubsystem); -> this will return a structure with all blocks checked by TargetLink.
BlocksToEnhance = BlocksToEnhance.hUnEnhBlocks; -> this will select you only the blocks you need that are not enhance
x = tl_enhance_block(BlocksToEnhance); -> with this you enhance all your blocks. If you don't use an output 'x' a prompt will appear every time. To avoid this you must assign an output to the function call (in this case x). The function will return an empty array if no error has occurred.
I hope this information helped you :)

Accedi per commentare.

Vishwanath Salokye
Vishwanath Salokye il 5 Set 2017
Hello Apurv Koregave There are many ways to convert TL to SL block. select all blocks, right click go to TargetLink and de-enhance TargetLink property. Write a script to read TL block properties and replace with SL block with same properties.

Categorie

Scopri di più su Simulink in Centro assistenza e File Exchange

Richiesto:

il 4 Mag 2017

Commentato:

il 26 Nov 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by