Running Matlab code on an industrial PC

조회 수: 1 (최근 30일)
K E
K E 2011년 12월 15일
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:
  1. Can I simply install Matlab on the industrial PC and run my code?
  2. If not, what are the components of a basic stand-alone real-time system?
  3. 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?

채택된 답변

Walter Roberson
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
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
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.

카테고리

Help CenterFile Exchange에서 COM Component Integration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by