1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | {attribute 'conditionalshow'} METHOD IoDrvUpdateConfiguration : UDINT VAR_INPUT pConnectorList : POINTER TO IoConfigConnector; nCount : DINT; END_VAR VAR pParameter : POINTER TO IoConfigParameter; Result : RTS_IEC_RESULT; pstConfig : POINTER TO IoDrvConfig; m_pConnector := IoMgrConfigGetConnector(pConnectorList, ADR(nCount), m_wModuleType, m_dwInstance); IF m_pConnector = 0 THEN IoDrvUpdateConfiguration := ERRORS.ERR_PARAMETER; //check if device is enabled in the device tree IoMgrSetDriverProperties(m_hInterface, DRVPROP_CONSISTENCY OR DRVPROP_BACKGROUND_GETDIAG); {END_IF} // Map config-, input- and output parameters pParameter := IoMgrConfigGetParameter(m_pConnector, 1000); IF (pParameter <> 0) THEN pParameter^.dwDriverSpecific := ADR(_instance.stIn); END_IF pParameter := IoMgrConfigGetParameter(m_pConnector, 2000); pParameter^.dwDriverSpecific := ADR(_instance.stOut); pParameter := IoMgrConfigGetParameter(m_pConnector, 3000); // pChild := IoMgrConfigGetFirstChild(m_pConnector, ADR(nCount), m_pConnector); // WHILE (pChild <> 0) DO // pChild := IoMgrConfigGetNextChild(pChild, ADR(nCount), m_pConnector); // END_WHILE |