If you are confident that your model produces Structured Text that does not require visual examination, you can generate and automatically import Structured Text code to one of the following target PLC IDEs:
3S-Smart Software Solutions CoDeSys Version 2.3
PHOENIX CONTACT (previously KW) Software MULTIPROG® Version 5.0 or 5.50
Phoenix Contact® PC WORX™ Version 6.0
Rockwell Automation® RSLogix™ 5000 Version 17, 18, or 19
For the Rockwell Automation RSLogix routine format, you must generate testbench code for automatic import and verification.
Siemens® SIMATIC® STEP® 7 Version 5.4 only for the following versions:
Siemens SIMATIC Manager: Version V5.4+SP5+HF1, Revision K5.4.5.1
S7-SCL: Version V5.3+SP5, Revision K5.3.5.0
S7-PLCSIM: Version V5.4+SP3, Revision K5.4.3.0
Working with the default CoDeSys Version 2.3 IDE should require additional changes for only the PHOENIX CONTACT (previously KW) Software MULTIPROG 5.0/5.50 and Phoenix Contact PC WORX 6.0 IDE. For information about automatically importing Structured Text code to these IDEs, see Import and Verify Structured Text to PHOENIX CONTACT (previously KW) Software MULTIPROG 5.0 and Phoenix Contact PC WORX 6.0 IDEs.
You can generate and automatically import Structured Text code. Before you start:
In the target IDE, save your current project.
Close open projects.
Close the target IDE and target IDE-related windows.
Note
While the automatic import process is in progress, do not use your mouse or keyboard. Doing so might disrupt the process. When the process completes, you can resume normal operations.
You must have already installed your target PLC IDE in a default location, and it must use the CoDeSys V2.3 IDE. If you installed the target PLC IDE in a nondefault location, open the Configuration Parameters dialog box. In the PLC Coder node, set the Target IDE Path parameter to the installation folder of your PLC IDE. See Target IDE Path.
If it is not already started, open the Command Window.
Open the plcdemo_simple_subsystem
model.
Right-click the Subsystem block and select PLC Code > Generate and Import Code for Subsystem.
The software:
Generates the code.
Starts the target IDE interface.
Creates a project.
Imports the generated code to the target IDE.
If you want to generate, import, and run the Structured Text code, see Import and Verify Structured Text Code.
Following are guidelines, hints, and tips for questions or issues you might have while using the automatic import capability of the Simulink® PLC Coder™ product.
The Simulink PLC Coder software supports only the following versions of target IDEs for automatic import and verification:
3S-Smart Software Solutions CoDeSys Version 2.3
PHOENIX CONTACT (previously KW) Software MULTIPROG 5.0 or 5.50 (English)
Phoenix Contact PC WORX 6.0 (English)
Rockwell Automation RSLogix 5000 Series Version 17, 18, 19 (English)
For the Rockwell Automation RSLogix routine format, you must generate testbench code for automatic import and verification.
Siemens SIMATIC STEP 7 Version 5.4 (English and German)
Note
Some antivirus softwares falsely identify the executables that implement the automatic import feature as malware. This can be safely ignored. For more information, see Issues with Anti-Virus Software.
The following target IDEs currently do not support automatic import. For these target IDEs, the automatic import menu items (Generate and Import Code for Subsystem and Generate, Import, and Verify Code for Subsystem) are disabled.
3S-Smart Software Solutions CoDeSys Version 3.3
3S-Smart Software Solutions CoDeSys Version 3.5
B&R Automation Studio® IDE
Beckhoff® TwinCAT® 2.11, 3
Generic
PLCopen
Rockwell Automation Studio 5000 Logix Designer (both routine and AOI constructs)
When the Simulink PLC Coder software fails to finish automatically importing for the target IDE, it reports an issue in a message dialog box. To remedy the issue, try the following actions:
Check that the coder supports the target IDE version and language setting combination.
Check that you have specified the target IDE path in the subsystem Configuration Parameters dialog box.
Close currently open projects in the target IDE, close the target IDE completely, and try again.
Some target IDEs can have issues supporting the large data sets the coder test bench generates. In these cases, try to shorten the simulation cycles to reduce the data set size, then try the automatic import again.
Other applications can interfere with automatic importing to a target IDE. Try to close other unrelated applications on the system and try the automatic import again.