I-7188XA Series User’s Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
72
The sample code for retrieving and setting DI and DO is as follows.
Refer to the demo programs in the
CD:\Napdos\7188XABC\7188XA\Demo\BC_TC\IO_Pin folder for more
information.
int Do1, Do2
InitLib(); /* Initiate the 7188xa library */
Print("DI1=%s\n\r", GetDi1()?"High":"Low"); /* Read the state of DI1 */
Print("DI2=%s\n\r", GetDi2()?"High":"Low"); /* Read the state of DI2 */
Do1=GetDo1(); /* Read the state of DO1 */
Print("DO1=%s\n\r", Do1?"High":"Low");
if(!Do1)
SetDo1On(); /* Set the DO1 to ON */
else
SetDo1Off(); /* Set the DO1 to OFF */
Do2=GetDo2(); /* Read the state of DO2 */
Print("DO2=%s\n\r", Do1?"High":"Low");
if(!Do2)
SetDo2On(); /* Set the DO2 to ON */
else
SetDo2Off(); /* Set the DO2 to OFF */
Содержание I-7188XA
Страница 62: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 62 5 6 COM1 RS 232 1 2 232...
Страница 90: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 90 1 2...
Страница 140: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 140...
Страница 146: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 146 Step 8 Make the project...
Страница 153: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 153 Step 8 Rebuild the project...
Страница 158: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 158...
Страница 161: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 161 Below snap shots are steps for install TC 3 0...
Страница 162: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 162...
Страница 164: ...I 7188XA Series User s Manual Ver1 2 Feb 2014 7MH 019 10 164...