How can I integrate PLCs with MATLAB or Simulink?

106 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2010 年 12 月 8 日
編集済み: MathWorks Support Team 2024 年 10 月 14 日
I would like to know how MATLAB/Simulink can communicate with PLCs from manufacturers such as Schneider Electric, Rockwell Automation (Allen-Bradley), Siemens, B&R Automation, Beckhoff, WAGO, ABB, Honeywell, etc.

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 10 月 14 日
編集済み: MathWorks Support Team 2024 年 10 月 14 日
Integrating MATLAB/Simulink with PLCs is essential for optimizing automation and control systems. It enables prototyping, plant simulation, and optimization across industries like manufacturing and automotive. There are several methods to integrate MATLAB/Simulink with PLCs, each suited to different needs and environments:
 

Desktop Simulation

MATLAB/Simulink provides toolboxes supporting a wide range of communication protocols commonly used with PLCs, for example:
* Configuring this Serial blocks to work with the Allan-Bradley DF-1 RS-232 protocol would require an understanding of the DF-1 messaging. This option would not work "out of the box".
Desktop simulations with MATLAB/Simulink operate in non-real-time. Use Simulation Pacing to slow down the Simulink simulation to approximate real-world time.
 

Real-Time Simulation

Simulink Real-Time can be used to run control algorithms and plant models on a dedicated Speedgoat real-time target machine, enabling Hardware-in-the-Loop (HIL) testing of PLCs. Speedgoat machines can communicate with PLCs through an extensive range of I/O modules and advanced fieldbus protocols, such as CAN, CANopen, EtherCAT®, EtherNet/IP™, Modbus (TCP and RTU), OPC UA, PROFINET®.
.

Programming PLCs with MATLAB/Simulink

Simulink PLC Coder generates hardware-independent IEC 61131 structured text from Simulink models, compatible with PLCOpen XML and other file formats supported by widely used integrated development environments (IDEs). As a result, you can compile and deploy your application to numerous programmable logic controller (PLC) and programmable automation controller (PAC) devices. It also creates test benches that help you verify the structured text using IDEs and simulation tools. Support for industry standards is available through IEC Certification Kit. More information about Simulink PLC Coder and IEC Certification Kit is available here:
Some PLCs can be programmed using C code. Simulink Coder & Embedded Coder generates C code from Simulink and Stateflow models that has the clarity and efficiency of professional handwritten code. Support for industry standards is available through IEC Certification Kit (for IEC 61508 and ISO 26262) and DO Qualification Kit (for DO-178).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink PLC Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by