12.07.2015 Views

こちらから - インタフェース

こちらから - インタフェース

こちらから - インタフェース

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GPC-MA001 Help for Windows// -------------------------------------------------------// チャンネル/レンジの 設 定ChCount = 1;ChReq.Channel = 1;ChReq.Range = DA_RNG_10V;Ret = DaSetChRange(DeviceHandle, ChCount, &ChReq);// -------------------------------------------------------// アナログ 出 力 データ 設 定// -------------------------------------------------------// Create the output data.for (i = 0; i < OutputConf.OutputNum; i++) {if (i%2) {wSmplData[i] = 0xFFFF;} else {wSmplData[i] = 0x0000;}}// バッファのクリアnRet = DaClearOutputData(hDeviceHandle);// 連 続 出 力 データの 設 定nRet = DaSetOutputData(hDeviceHandle, wSmplData, OutputConf.OutputNum);// -------------------------------------------------------// 連 続 出 力 スタート// -------------------------------------------------------// 連 続 出 力 スタートnRet = DaStartOutput(hDeviceHandle);// ソフトトリガnRet = MaSoftTrigger(hDeviceHandle, MA_TRG_SOFT0);// -------------------------------------------------------// 待 機// -------------------------------------------------------// 連 続 出 力 状 態 取 得do {nRet = DaGetOutputStatus(hDeviceHandle, &SmplStatus);if (SmplStatus.OutputStatus == MA_STATUS_STOP_SAMPLING) break;Sleep(100);} while(!kbhit());// 連 続 出 力 が 停 止 していない 場 合if (SmplStatus.OutputStatus != MA_STATUS_STOP_SAMPLING) {nRet = DaStopOutput(hDeviceHandle);© 2012, 2014 Interface Corporation. All rights reserved.45

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

Saved successfully!

Ooh no, something went wrong!