Main Content


Set up model parameters for PLC code generation

Since R2023b


    plcsetup(modelname) sets the ProdHWDeviceType parameter of the model specified by modelname to 'Generic->Custom' for PLC code generation. You must open the model before you use the plcsetup function. After using plcsetup, you can use set_param to modify the default settings. For example:

    set_param(gcs,"ProdHWDeviceType","32-bit generic");

    Input Arguments

    collapse all

    Name of the Simulink model, specified as a string.

    Example: "plcdemo_simple_subsystem"

    Data Types: string

    Version History

    Introduced in R2023b