Applies To
GC5050, GX5050, GX5055, GX5150, GX5280, GX5290, GX5290e, GX5295
Purpose
Initializes a Master board and all Slave boards associated with it.
Syntax
DioInitialize (nMasterNum, pnMasterHandle, pnStatus)
Parameters
Name |
Type |
Comments |
nMasterNum |
SHORT |
Master board number in the system (1-8). |
pnMasterHandle |
PSHORT |
Returned Master handle, 0 for error. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Comments
The DioInitialize can be used to initialize the DIO system configuration (Master and Slave boards) with one command. The required parameters (base address, density and banks) are taken from the last configuration set by one of the following:
· A previous call to DioSetupInitialization.
· DioPanel configure push button.
· GTDIO.INI file.
The function calls DioSetupInitialization for the Master and its Slaves.
The pnMasterHandle should be used in all subsequent calls to the driver library.
Example
The following example initializes a Master board and ARM it:
SHORT nStatus, nMasterHandle;
DioInitialize (1, &nMasterHandle, &nStatus);
DioArm(&nMasterHandle, &nStatus);
See Also
DioSetupInitialization, DioGetSlaveHandle