[r4]: / trunk / IoDrvMEGAIO / ICmpIoDrv / IoDrvUpdateConfiguration / svnobj  Maximize  Restore  History

Download this file

17 lines (16 with data), 9.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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);
	pParameter := IoMgrConfigGetParameter(m_pConnector, 1000);		(* digital inputs *)
	IF (pParameter <> 0) THEN
		pParameter^.dwDriverSpecific := 0;					(* Device offset 0 *)
	END_IF
//Setup I/O area for 2000 to 2003 DO
		pParameter := IoMgrConfigGetParameter(m_pConnector, INT_TO_DWORD(1100+i));	(* Analog inputs *)
		IF (pParameter <> 0) THEN
			pParameter^.dwDriverSpecific := 1;					
		END_IF
	END_FOR
//Setup  I/O area for 2100 and 2101 AO