現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
I try to programme the TMS28335 DSP with simulink blocks (ADC,SCI transmit, receive)using the serial cable communications. I have m-file programmes and I need to convert and embed to DSP. ıs there any block for using the m-file codes in DSP? I tried the embedded matlab function block, but it gives a lot of problems for my programme. Please help about my study. Thank you.
採用された回答
Kaustubha Govind
2012 年 10 月 23 日
If you have MATLAB code that you need to use in a Simulink model that you intend to generate code from, the correct way is indeed to use an (Embedded) MATLAB Function block. However, only a subset of the MATLAB language is eligible for code-generation. Please be sure that you conform to these requirements - if you run into specific error, please post them with your code and the exact error message(s).
7 件のコメント
Cigdem
2012 年 10 月 23 日
Dear Kaustubha, You said to use matlab coder. I haven't use that, Does it convert my m-file or c-code eligible for my DSP, doesn't it? I can download the converted code like all other processor blocks? İf so, I will try and notify you if there is an error, thank you.
Cigdem
2012 年 10 月 23 日
Dear Kaustubha, I looked over matlab coder toolbox.I think, I couldn't tell my problem. I use "target support package" toolbox to build the F28335 DSP. I use ADC block (texas iinstruments C2000) for the inputs and SCI transmit for sending the process done with inputs. I receive the result from DSP with SCI receive block. So, I have a artificial neural network algorithm written in m-file (also C-code), I want to implement that in DSP. I will set the ADC block and the ANN code and convert to DSP all of them from simulink with serial communication.it will work dynamically and want to scope the results again in simulink with SCI receive. Concequently, I need a tool for converting the ANN code written in m-file or C-code. I am looking forward for your suggestion. Thank you.
Kaustubha Govind
2012 年 10 月 23 日
Unfortunately, the Neural Network Toolbox is currently not supported for code-generation, so you might need to manually convert your MATLAB code to C code.
Cigdem
2012 年 10 月 23 日
I know that the NN toolbox is not supported, already I have code of the ANN algorithm written in m-file also C code. I use the simulink because it is easier for DSP programming. The problem is; I need a block which I can use the m-file code at simulink.
Kaustubha Govind
2012 年 10 月 24 日
In that case, it might be better to write a MATLAB S-function to run your MATLAB code, and an accompanying TLC file that produces the C code which you've already written. In this way, the MATLAB code is used for simulation within the Simulink environment, but your manually written C code will stand in during code generation.
Cigdem
2012 年 10 月 25 日
Kaustubha, what is the difference between embedded matlab function block and matlab S-function? Also, what is the difference between level 1 m-file s function and level 2 m-file s function? I tried the embedded matlab function, firstly it was working, but I prolonged the code (programme), it gave an error when I tried to save that. so, ıt didn't saved. There are for loops in my programme, if I use the s-function, Can it be converted with code generation, also same question with for embedded matlab function? thank you for your replies.
Kaustubha Govind
2012 年 10 月 25 日
Please see the various differences between the two blocks in the rows corresponding to them in the tables on this page. Level-1 MATLAB S-functions have long been deprecated - Level-2 MATLAB S-functions are the modern way of writing MATLAB S-functions and have better capabilities. Like I mentioned, you need to write the TLC file for code-generation with MATLAB S-function.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Texas Instruments C2000 Processors についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
