I8026W_Init - ICP DAS USA I-8026W Manual

Multifunction i/o module
Table of Contents

Advertisement

3.1. i8026W_Init

This function is used to initialize the driver and confirm the hardware ID information.
Prototype
short i8026W_Init(int slot);
Parameters
slot: specifies the slot number (1 ~ 8)
Return Values
0 = the module inserted in the slot is an I-8026W.
-1 = there are no I-8026W modules inserted in this slot.
For other return values, see
Note
Before executing any functions on the I-8026W, the i8026W_Init function needs be called once
for each I-8026W module inserted in the controller unit. For example, if there are two or more
I-8026W modules inserted in the controller, the i8026W_Init function must be individually
called for each I-8026W module by including the number of the slot where the I-8026W
module is inserted.
Example
[C]
int slotIndex ,err;
Open_Slot(slotIndex);
err=i8026W_Init(slotIndex);
if(err==0)
printf("There is an I-8026W module in slot %d\n",slotIndex);
else
printf("There is no I-8026W module in slot %d\n",slotIndex);
I-8026W API User Manual, v1.0.1, June 2015
Copyright © 2015 ICP DAS Co., Ltd. All Rights Reserved.
the Error Codes in Appendix A.
E-mail: service@icpdas.com
3-15

Advertisement

Table of Contents
loading

Table of Contents