Convert Targetlink blocks to Simulink

28 次查看(过去 30 天)
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.

回答(2 个)

Daniel
Daniel 2018-10-18
Hi, is there a way to do this automatically for all TL blocks in a subsystem?
  2 个评论
Cuzuc Vlad-Andrei
Cuzuc Vlad-Andrei 2021-2-16
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 :)

请先登录,再进行评论。


Vishwanath Salokye
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.

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by