pmonGetStartMode()

The function pmonGetStartMode() returns the start mode of a WinCC OA manager.

Synopsis

int pmonGetStartMode(int idx);

Parameters

Parameter Description
idx The WinCC OA manager index. See chapter Details on the Pmon

Return value

The function pmonGetStartMode() returns the start mode of a WinCC OA manager or in the event of errors, -1.

Description

The function pmonGetStartMode() returns the start mode of a WinCC OA manager. A manager is started in the WinCC OA console and the start mode is shown in the console - see figure below. The following start modes are available for the WinCC OA managers: 0 = manual, 1 = once and 2 = always.

Figure: WinCC OA console and start mode of managers

NOTE that the function can only be used on a local computer. A remote UI cannot query the PMON of a server.

EXAMPLE

In the following example, the names as well as the start modes of WinCC_OA managers are returned and output.

  1. main(mapping event)
    
    
    {
    
    
      string pName;
    
    
      int i, sMode;
    
    
      for (int i = 0; i < pmonGetCount(); i++)
    
    
      {
    
    
       sMode = pmonGetStartMode(i);
    
    
       pName = pmonGetName(i);
    
    
       DebugN("Manager name: ", pName, "Start mode of the manager:", sMode);
    
    
      }
    
    
     }

The function outputs the names as well as the start modes of the managers as follows:

WCCOAui2:["Manager name: "]["WCCILpmon"]["Start mode of the
                manager:"][0]

WCCOAui2:["Manager name: "]["WCCILdata"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCILevent"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCILproxy"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOActrl"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCILsim"]["Start mode of the manager:"][2]

WCCOAui2:["Manager name: "]["WCCOAui"]["Start mode of the manager:"][1]

Assignment

PMON functions.

Availability

UI