Running Matlab code on an industrial PC
1 回表示 (過去 30 日間)
古いコメントを表示
At a remote site, we will have an industrial PC that must read incoming measurements and process them. Communication to the industrial PC will be unreliable so it must execute the code itself. I am presently writing an algorithm in Matlab to process the measurements. But getting the Matlab code to run in near real-time on the industrial PC is a new task for me and my coworkers. Questions:
- Can I simply install Matlab on the industrial PC and run my code?
- If not, what are the components of a basic stand-alone real-time system?
- How do I choose an industrial PC that can run my code fast enough? Can I run the code on my machine with simulated measurements to get metrics that will define what to look for in an industrial PC?
0 件のコメント
採用された回答
Walter Roberson
2011 年 12 月 15 日
What kind of data rates are you wanting to process, and how close to real-time do you need?
MATLAB can be installed on MS Windows, Linux, or Mac OS-X. If your industrial PC has a Real-Time Operating System (RTOS) such as QNX, then you will not be able to install MATLAB itself on it.
Normally if you want anything approaching "real-time" you would use a Real-Time Operating System (RTOS) on the Industrial PC, and you would use MATLAB Builder or Simulink Builder to create C or C++ code that would then be compiled for the industrial PC and the executable copied there.
The two Builder products require MATLAB Compiler as a base, and the Fixed Point Toolbox is usually also recommended.
There are a lot of restrictions on what can be built using the Builder products -- for example, no cell arrays.
1 件のコメント
Sriharsha
2012 年 3 月 19 日
Hi,
i am also working on the same scenario.
I need to generate C code using RTW and then compile on a processor, on which QNX is installed.
My question is,
1. how does we port the c code into QNX?
2. How does we generate make files?
3. Some where i hear that, we need to use dos2unix utility for this. How can we use this utility?
Please help me..
その他の回答 (1 件)
Fangjun Jiang
2011 年 12 月 15 日
The xPC Target seems to be a good fit for this application. It boots up your PC with a real-time operating system. All your code or model developed in MATLAB/Simulink can be readily put into application executed on the PC. You don't have to guess or estimate how fast or slow when you deploy your application because you are running it right there. It supports many IO hardware cards too.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で COM Component Integration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!