ConnectorFlagController

Code example for setting:

myCf: IoDrvUtility.ConnectorFlagController; // Define in FB of IoDrv

/// In UpdateConfiguration:
myCf.Init(m_pConnector, nCount, TRUE); // Last parameter is _xSetChildren

/// Somewhere else (UpdateConfiguration, IoDrvStartBusCycle, AsyncTask, ...):
myCf.State := IoDrvUtility.ConnectorState.NO_DRIVER_FOUND;
myCf.DiagnosticAvailable := FALSE;
myCf.DemolicenseActive := FALSE;

Code example for reading:

myCf: ConnectorFlagController; // Define in FB of IoDrv

/// In UpdateConfiguration:
myCf.Init(m_pConnector, 0, FALSE); // Last parameter is _xSetChildren, nCount dosen´t matter -> no Children are set

/// Somewhere in your code, e.g. PLG_PRG
if( myCf.State = IoDrvUtility.ConnectorState.RUNNING) THEN
   ;
END_IF
if( myCf.DiagnosticAvailable ) THEN
   ;
END_IF
if( myCf.DemolicenseActive ) THEN
   ;
END_IF

This lib/folder/project simplifies the use of the ConnectorFlags, which are processed in 4 different locations:

  1. In AutomationPlatform\Implementation\Sources and Proj­ects\DefaultNavigators\Common.cs are set the pictures in the tree and the color for the text in the tree:

    D1_Tree.png  

  2. In AutomationPlatform\Implementation\Sources and Projects\Devi­ceEditor\StatusControl.cs is set the status text over "_tbStatus.Text":

    D4_StatusText.png  

  3. In AutomationPlatform\Implementation\Sources and Projects\Devi­ceEditor\IOMappingEditorPage.cs in UpdateModuleStatus is set a warning in the I/O Mapping tab, if an errorflag is set:

    D3_Ausrufez.png  

  4. In the Device Diagnosis (Enduser can wait until the bus is in "running"-state to start his programm or can react, if the bus has crashed) :

    D5_ded.png  

    DED can be activated over the PLC settings:D6_ded2.png 

The following table shows the result of the 4 different locations to the 3 changeable properties (ConnectorFlagController.State, ConnectorFlag­Controller.DiagnosticAvailable, ConnectorFlagController.Demolicense­Active) in the version 3.5 SP9:

D2_bev.png

In the version 3.5 SP8 and before it is:

D_BehaveBev35SP9.png