Main Content

plcrunextmode

Run external mode visualization

Description

plcrunextmode(opc_host,target_ide,mdl_name,log_file) runs external mode visualization using the settings specified in the arguments. Logged signals are displayed in the Simulation Data Inspector.

example

plcrunextmode(___,idx_list) runs external mode visualization and displays only the logged signals identified by the indices in the idx_list.

plcrunextmode(___,name_list) runs external mode visualization and displays only the logged signals identified by the names in the name_list.

Examples

collapse all

The following example uses plcrunextmode to connect to an OPC server and stream log data in to Simulation Data Inspector.

plcrunextmode ('localhost', 'studio5000', 'ext_demo1', 'plc_log_data.mat');

Input Arguments

collapse all

Host address of the OPC server.

Example: 'localhost'

Specifies the name of the PLC target IDE.

Example: 'studio5000'

Specifies the Simulink model for which the code was generated with logging instrumentation.

Example: 'extmode_demo'

Full file path of the logging data MAT-file.

Example: 'C:\plc_log_data.mat'

The index vector specifying the indices of the logged data signals to display. This argument is optional.

Example: [1 2 3]

The name vector specifying the names of the logged data signals to display. This argument is optional.

Example: {'Y1', 'Y2', 'i0_S1.Y'}

Version History

Introduced in R2018a