MATLAB: Do I get the error “Property ‘PLC_TargetIDE’ does not exist” when I try to set it with set_param

"configet"codecoderconfigurationgenerationparametersplcsetSimulink PLC Coder

I am creating a model or ConfigSet programmatically, and I want to set the target IDE for "PLC Coder". However, whenever I try to set the "PLC_TargetIDE" parameter, I get an error. Furthermore, when I open the Configuration Parameters UI, I see there is no "PLC Coder" section. The section is there in other models. Why is that section missing for new models?

Best Answer

The 'PLC_TargetIDE' parameter is part of a component that needs to be created and attached the configuration set. One way to do this is to open the PLC Coder app in the Simulink Toolstrip and then open the configuration parameters window. Alternatively, you can run the following command to do the same thing:
>> plcopenconfigset(<modelName>);
Afterwards, you should be able to set the 'PLC_TargetIDE' property.