13.07.2015 Views

User manual - ICP DAS USA

User manual - ICP DAS USA

User manual - ICP DAS USA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

wBuf[6] = 0; // string debugfBuf[0] = 2.5;// AO ValuewRetVal = AnalogOut_87k(wBuf, fBuf, szSend, szReceive);if (wRetVal)printf("AO of 87022 Error !, Error Code=%d\n", wRetVal);elseprintf("AO of 87022 channel %d = %f \n",i,fBuf[0]);//--- Analog Input ---- **** 87017 -- AI ****j=1;wBuf7[0] = 3;// COM PortwBuf7[1] = 0x02;// AddresswBuf7[2] = 0x87017; // IDwBuf7[3] = 0;// CheckSum disablewBuf7[4] = 100;// TimeOut , 100 msecondwBuf7[5] = j;//Channel Number of AIwBuf7[6] = 0;// string debugwRetVal = AnalogIn_87k(wBuf7, fBuf, szSend, szReceive);if (wRetVal)printf("AI of 87017 Error !, Error Code=%d\n", wRetVal);elseprintf("AI of 87017 channel %d = %f \n",j,fBuf[0]);Close_Com(COM3);}return 0;All the steps from programming to execution are the same as those in the section 7.1.The result of execution refers to Fig. 7-12.Fig. 7-12LinPAC-8x4x SDK:258

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!