Convert Targetlink blocks to Simulink
Ältere Kommentare anzeigen
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.
1 Kommentar
Amana
am 26 Nov. 2024
Did you solve this?
Antworten (2)
Daniel
am 18 Okt. 2018
1 Stimme
Hi, is there a way to do this automatically for all TL blocks in a subsystem?
2 Kommentare
Cuzuc Vlad-Andrei
am 16 Feb. 2021
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 :)
Victor-Vladut Rusu
am 23 Sep. 2021
Sure did!
Vishwanath Salokye
am 5 Sep. 2017
0 Stimmen
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.
Kategorien
Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!