Resolving Disabled 'Operator Control and Monitoring' (OCM) Checkbox on Custom SCL Blocks in PCS 7 CFC

Resolving Disabled 'Operator Control and Monitoring' (OCM) Checkbox on Custom SCL Blocks in PCS 7 CFC

The 'Operator Control and Monitoring' (OCM) checkbox appearing greyed out or disabled in CFC block properties occurs when the custom S7-SCL block defines { S7_m_c := 'true' } at the block header but lacks the { S7_m_c := 'true' } attribute on at least one individual input, output, or in/out parameter. In SIMATIC PCS 7, the CFC compiler requires both the block container and at least one parameter to be explicitly flagged for HMI transfer. To resolve this, add { S7_m_c := 'true' } to at least one variable in VAR_INPUT or VAR_OUTPUT, recompile the SCL source, and execute 'Update Block Types' in CFC.

Table of Contents

OCM Attribute Requirements in PCS 7 CFC and WinCC

In SIMATIC PCS 7, the Operator Control and Monitoring (OCM) mechanism governs which automation station objects and parameters are transferred to the WinCC operator system during AS-OS compilation.

When an engineer inserts a Function Block (FB) into a CFC chart:
* Opening the block's Object Properties displays the OCM possible checkbox.
* When checked, PCS 7 automatically registers the block instance in the OS tag database, allocates internal communication buffers, and enables automatic block icon generation on process screens.
* If OCM is disabled or greyed out, the block cannot communicate with WinCC faceplates or generate process alarms.

Root Cause Analysis - The Header-Only Attribute Trap

A very common stumbling block when developing custom blocks in S7-SCL is adding the system attribute only to the block header:

// Header attribute present
FUNCTION_BLOCK FB1600
TITLE = 'MyCustomBlock'
{ S7_m_c := 'true' }  // <--- Header flagged, BUT...
VAR_INPUT
  SetSpeed : REAL := 0.0; // <--- NO ATTRIBUTE HERE!
  StartCmd : BOOL := FALSE;
END_VAR

Why CFC greys out the OCM checkbox:
The PCS 7 engineering system evaluates the internal interface structure. A block marked for OCM at the header that exposes zero parameters to WinCC represents an invalid, empty HMI object. Therefore, the CFC property editor automatically disables the checkbox until at least one variable inside VAR_INPUT, VAR_OUTPUT, or VAR_IN_OUT has its own { S7_m_c := 'true' } tag.

Correct S7-SCL Source Syntax for Multi-Variable Exposure

To properly activate OCM capability, apply the attributes at both levels:

FUNCTION_BLOCK FB1600
TITLE = 'MyCustomBlock'
{ S7_m_c := 'true';
  S7_tasklist := 'OB35';
  S7_alarm_ui := 'true' }
AUTHOR : 'EngDept'
FAMILY : 'USER'
VERSION : '1.0'

VAR_INPUT
  // Elementary parameter exposed to WinCC
  Run_Enable { S7_m_c := 'true' } : BOOL := FALSE;
  Sp_Value   { S7_m_c := 'true' } : REAL := 0.0;

  // Internal parameter NOT exposed to WinCC (saves HMI tags)
  FilterTime : TIME := T#2s;
END_VAR

VAR_OUTPUT
  // Output status exposed to WinCC faceplate
  ActiveState { S7_m_c := 'true' } : BOOL := FALSE;
END_VAR

For composite structures (e.g. APL-compliant STRUCT with Value and ST), use { S7_m_c := 'true'; S7_xm_c := 'Value,true;ST,true;' }.

Updating Block Types in CFC and Verifying OCM Activation

After modifying the S7-SCL source file, complete the following update workflow:

Step NumberEngineering ActionLocation in SIMATIC ManagerExpected ResultStep 1Compile SCL SourceS7-SCL Editor -> File -> CompileGenerates updated binary FB in project block folder.Step 2Update Block TypesCFC Editor -> Options -> Block TypesDetects updated interface; updates all chart instances.Step 3Verify Object PropertiesCFC Chart -> Right-click Block -> PropertiesOCM possible checkbox is now active and checked!Step 4AS-OS CompilationSIMATIC Manager -> Right-click OS -> CompileTags and structure types generated in WinCC Tag Management.

Verification

To confirm that the OCM option is active and functional:
1. In the CFC chart, right-click the custom block instance and select Object Properties.
2. Verify that the checkbox Operator Control and Monitoring is enabled (not greyed out) and selected.
3. In the same dialog, verify that the WinCC Attributes tab lists the specific parameters flagged with S7_m_c.
4. Perform an AS-OS compilation; open WinCC Explorer and check Tag Management -> SIMATIC S7 Protocol Suite -> Named Connections.
5. Confirm that an internal tag structure corresponding to the chart/block hierarchy (e.g. Area/Unit/MyCustomBlock) is created with live operational tags.

Limitations and Operational Precautions

Do not apply { S7_m_c := 'true' } indiscriminately to all variables in a large block. Every parameter flagged for OCM generates an internal WinCC tag during OS compilation, consuming communication bandwidth on the Industrial Ethernet plant bus and exhausting licensed WinCC Tag / Process Object limits. Expose only variables strictly required for operator control, status monitoring, or trending.

Engineer FAQ

Why did the OCM checkbox remain greyed out after updating the SCL code?

You must recompile the SCL source file in the S7-SCL Editor, and then execute 'Options -> Block Types' in CFC to propagate the updated interface to existing block instances.

Can I enable OCM on standard STEP 7 Ladder (LAD) or FBD blocks?

Yes, by opening the block in the LAD/FBD/STL editor, selecting File -> Properties -> Attributes, and adding S7_m_c with value true to the block and its variable declarations.

Does checking OCM consume WinCC Process Objects (PO)?

If the block contains an Alarm_8P call or is recognized as a technological block, it consumes AS RT and OS RT Process Objects. Pure data blocks or simple logic blocks consume WinCC tags without consuming full POs.

What does the S7_tasklist attribute do?

S7_tasklist := 'OB100,OB35' specifies the default organization blocks into which the block should be inserted upon placement in a CFC chart.

Technical References

Related Articles

Related Tags

  • OCM Possible
  • S7_m_c
  • S7-SCL
  • CFC Block Properties
  • AS-OS Compile
6 respuestas