12.07.2015 Views

GPC-3100

GPC-3100

GPC-3100

SHOW MORE
SHOW LESS

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

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

AD(PCI/C-PCI)<strong>GPC</strong>-<strong>3100</strong>アナログ 入 力 製 品 Windows 対 応 ドライバソフトウェア.NET 用 補 足 ヘルプfor Windowswww.interface.co.jp


<strong>GPC</strong>-<strong>3100</strong> Help for Windows目 次第 1 章 はじめに ....................................................................................... 31.1 概 要 ...........................................................................31.2 クラスライブラリの 参 照 方 法 .....................................................41.3 注 意 事 項 .......................................................................5第 2 章 リファレンス ................................................................................ 62.1. DLL 関 数 一 覧 ....................................................................62.2. 関 数 個 別 説 明 ...................................................................92.3. 構 造 体 定 義 ...................................................................2333.1. 戻 り 値 一 覧 ...................................................................2733.2. プログラム 例 .................................................................276第 3 章 サンプルプログラム ................................................................. 2824.1. 実 行 手 順 .....................................................................2824.2. サンプルプログラム 一 覧 .......................................................283第 4 章 重 要 な 情 報 ................................................................................ 285© 2000, 2014 Interface Corporation. All rights reserved.2


<strong>GPC</strong>-<strong>3100</strong> Help for Windows第 1 章 はじめに1.1 概 要本 書 では.NET 対 応 の 言 語 において <strong>GPC</strong>-<strong>3100</strong> を 使 用 するための 情 報 を 記 載 しています。その 他 の 情 報 につきましては 最 新 情 報 ドキュメントファイル、オンラインヘルプを 参 照 してください。対 応 言 語Microsoft Visual C++ .NET 2002, .NET 2003, 2005, 2008, 2010Microsoft Visual C# .NET 2002, .NET 2003, 2005, 2008, 2010Microsoft Visual Basic .NET 2002, .NET 2003, 2005, 2008, 2010Borland Delphi 8 for the Microsoft .NET Framework※Visual C# 2005 の 場 合 は「*.csproj」ファイルを、Visual Basic 2005 の 場 合 は「*.vbproj」ファイルを、それぞれ Visual Studio 変 換 ウィザードで、プロジェクトの 変 換 を 行 ってからビルドしてください。.NET 対 応 に 関 しての 詳 細 は 弊 社 Web サイトで 無 料 でダウンロード 可 能 なチュートリアル「Microsoft Visual Studio .NET 移 行 ガイド」をご 参 照 ください。本 書 では、 各 API 関 数 のリファレンスのみを 説 明 しています。その 他 の 内 容 に 関 しては、オンラインヘルプ(help.htm)をご 参 照 ください。© 2000, 2014 Interface Corporation. All rights reserved.3


<strong>GPC</strong>-<strong>3100</strong> Help for Windows1.2 クラスライブラリの 参 照 方 法1. クラスライブラリの 作 成.NETにおいてDLL 関 数 を 呼 び 出 すには、まずクラスライブラリを 用 意 する 必 要 があります。・Visual C# .NET の 場 合Visual Studio を 起 動 し、 以 下 のプロジェクトファイルを 開 きます。\interface\<strong>GPC</strong><strong>3100</strong>\samples\CS_NET\IFCAD\IFCAD.csprojこのプロジェクトをビルドすると、bin フォルダにクラスライブラリ IFCAD.dll が 作 成 されます。・Visual Basic .NET の 場 合Visual Studio を 起 動 し、 以 下 のプロジェクトファイルを 開 きます。\interface\<strong>GPC</strong><strong>3100</strong>\samples\VB_NET\IFCAD\IFCAD.vbprojこのプロジェクトをビルドすると、bin フォルダにクラスライブラリ IFCAD.dll が 作 成 されます。・Delphi 8 の 場 合Delphi を 起 動 し、 以 下 のプロジェクトファイルを 開 きます。\interface\<strong>GPC</strong><strong>3100</strong>\samples\DELPHI_NET\IFCAD\IFCAD.bdsprojこのプロジェクトを 再 構 築 すると、クラスライブラリ IFCAD.dll が 作 成 されます。(クラスライブラリのソースファイルを 用 意 しています。DLL 関 数 の 呼 び 出 しをカスタマイズしたい 場 合 は、クラスライブラリのソースを 参 照 してください。)2. クラスライブラリの 参 照・Visual C# .NET, Visual Basic .NET の 場 合Visual Studio のメニューの「プロジェクト」の「 参 照 の 追 加 」を 選 択 してください。参 照 」ボタンをクリックして 上 記 にて 作 成 したクラスライブラリ DLL を 指 定 します。「 選 択 されたコンポーネント」に 指 定 した DLL が 表 示 されます。「OK」ボタンをクリックすると 設 定 は 完 了 です。・Delphi 8 の 場 合Delphi 8 のメニューの「プロジェクト」の「 参 照 の 追 加 」を 選 択 してください。「 参 照 」ボタンをクリックして 上 記 にてクラスライブラリ DLL を 指 定 します。「 新 しい 参 照 」に 指 定 した DLL が 表 示 されます。「OK」ボタンをクリックすると 設 定 は 完 了 です。次 にソースのヘッダで 各 言 語 毎 に 下 記 のように InterfaceCorpDllWrap の 名 前 空 間 を 追 加 すればDLL 関 数 を 次 章 の「 使 用 例 」の 方 法 で 呼 び 出 すことができるようになります。・Visual C# .NET の 場 合using InterfaceCorpDllWrap;・Visual Basic .NET の 場 合Imports InterfaceCorpDllWrap・Delphi 8 の 場 合uses InterfaceCorpDllWrap;uses InterfaceCorpDllWrap.IFCAD; (コールバック 関 数 を 使 用 する 場 合 )© 2000, 2014 Interface Corporation. All rights reserved.4


<strong>GPC</strong>-<strong>3100</strong> Help for Windows1.3 注 意 事 項■ 非 同 期 処 理 で 参 照 渡 しする 変 数 について各 関 数 はアンマネージ 関 数 です。非 同 期 処 理 を 使 用 する 際 は、ガーベジコレクションによりメモリの 開 放 ・ 移 動 があるタイミングで 発 生 します。それにより 関 数 内 で 保 持 しているポインタと、アプリケーション 内 での 変 数 のポインタでずれが 発 生 し、メモリ 破 壊 が 発 生 する 可 能 性 があります。マネージオブジェクトの 参 照 渡 しをする 際 は、GCHandle 構 造 体 を 使 用 してマネージオブジェクトがコレクトされるのを 防 いでください。コールバック 関 数 については 下 記 の 対 策 例 のように 対 策 してください。対 象 となる 関 数AdSetBoardConfig 関 数□ 対 策 例// グローバル 変 数static IFCAD_ANY.LPADCALLBACK lpcallback =new IFCAD_ANY.LPADCALLBACK(CallBackProc);// メインルーチンnRet = IFCAD_ANY.AdSetBoardConfig( hDeviceHandle , 0 , lpcallback , 0 );■ 構 造 体 についてStructLayout クラスのオプションに「LayoutKind.Sequential」を 指 定 しています。© 2000, 2014 Interface Corporation. All rights reserved.5


<strong>GPC</strong>-<strong>3100</strong> Help for Windows第 2 章 リファレンス弊 社 アナログ 入 力 製 品 を 制 御 するにあたって、 知 っておく 必 要 がある 事 項 を 説 明 します。2.1. DLL 関 数 一 覧No 関 数 名 機 能1 AdOpen デバイスのオープンを 行 い、 以 後 製 品 へのアクセスを 行 なえるようにします。2 AdClose デバイスのクローズを 行 い、デバイスアクセスのために 使用 されていた 各 種 リソースの 解 放 を 行 い、 以 後 デバイスへのアクセスを 禁 止 します。3 AdGetDeviceInfo デバイスの 仕 様 を 取 得 します。4 AdSetBoardConfig デバイスのコールバック 関 数 の 発 生 要 因 を 取 得 します。5 AdGetBoardConfig デバイスのコールバック 関 数 の 設 定 を 行 います。6 AdSetSamplingConfig デバイスのサンプリング 条 件 の 設 定 を 行 います。7 AdGetSamplingConfig デバイスの 現 在 設 定 されているサンプリング 条 件 を 取 得します。8 AdBmSetSamplingConfig デバイスのサンプリング 条 件 の 設 定 を 行 います。9 AdBmGetSamplingConfig デバイスの 現 在 設 定 されているサンプリング 条 件 を 取 得します。10 AdMemSetSamplingConfig デバイスのサンプリング 条 件 の 設 定 を 行 います。11 AdMemGetSamplingConfig デバイスの 現 在 設 定 されているサンプリング 条 件 を 取 得します。12 AdLvSetSamplingConfig PCI-3179, CTP-3179, CPZ-3179 のサンプリング 条 件 の 設 定を 行 います。13 AdLvGetSamplingConfig PCI-3179, CTP-3179, CPZ-3179 の 現 在 設 定 されているサンプリング 条 件 を 取 得 します。14 AdAllocateSamplingBuffer デバイスのサンプリングバッファを 確 保 します。15 AdGetSamplingData デバイスから 入 力 されたサンプリングデータを 取 得 します。16 AdBmGetSamplingData デバイスから 入 力 されたサンプリングデータを 取 得 します。17 AdFifoGetSamplingData デバイスから 入 力 されたサンプリングデータとデジタルデータを 取 得 します。18 AdLvGetSamplingData PCI-3179,CTP-3179,CPZ-3179 から AdLvStartSampling 関数 で 入 力 されたサンプリングデータを 取 得 します。19 AdReadSamplingBuffer サンプリングバッファに 格 納 されているサンプリングデータを 取 得 します。20 AdClearSamplingData サンプリング 入 力 バッファ 内 のサンプリングデータをクリアします。21 AdStartSampling デバイスのサンプリングをスタートさせます。22 AdBmStartSampling デバイスのサンプリングをスタートさせます。(DMA 直 接 転 送 )23 AdStartFileSampling デバイスからのサンプリングデータをデータファイルに書 き 込 みながらサンプリングを 行 います。© 2000, 2014 Interface Corporation. All rights reserved.6


<strong>GPC</strong>-<strong>3100</strong> Help for Windows24 AdBmStartFileSampling デバイスからのサンプリングデータをデータファイルに書 き 込 みながらサンプリングを 行 います。25 AdSyncSampling 複 数 枚 同 期 サンプリング 機 能 を 使 用 したサンプリングを行 います。26 AdLvStartSampling PCI-3179, CTP-3179, CPZ-3179 の 連 続 サンプリングをスタートさせます。27 AdStopSampling デバイスのサンプリングを 停 止 させます。28 AdLvStopSampling AdLvStartSampling 関 数 でスタートさせた PCI-3179,CTP-3179, CPZ-3179 の 連 続 サンプリング 入 力 を 停 止 させます。29 AdTriggerSampling トリガ(EXTRG IN)が 入 力 されるたびに、デバイスから 1件 のアナログ 入 力 を 行 います。30 AdMemTriggerSampling トリガ(EXTRG IN)が 入 力 されるたびに、デバイスから 指定 件 数 のサンプリングを 行 います。31 AdGetStatus デバイスのサンプリング 動 作 状 態 を 取 得 します。32 AdLvGetStatus PCI-3179, CTP-3179, CPZ-3179 のサンプリング 動 作 状 態 を取 得 します。33 AdInputAD デバイスから 1 件 のアナログ 入 力 を 行 います。34 AdSetRangeEvent デバイスのフルスケール 検 出 イベント 条 件 の 設 定 を 行 います。35 AdResetRangeEvent フルスケール 検 出 イベントをリセットします。36 AdGetRangeEventStatus デバイスのフルスケール 検 出 イベントのステータスを 取得 します。37 AdGetOverRangeChStatus デバイスの 過 電 圧 入 力 時 自 動 レンジ 切 換 イベントのステータスを 取 得 します。38 AdResetOverRangeCh デバイスの 過 電 圧 入 力 時 自 動 レンジ 切 換 イベントのステータスをリセットします。39 AdLvCalibration PCI-3179, CTP-3179, CPZ-3179 のオートキャリブレーション( 較 正 )を 行 います。40 AdMeasureTemperature PCI-3179, CTP-3179, CPZ-3179 の 内 部 コネクタ 付 近 の 温 度を 取 得 します。41 AdSetInterval PCI-3525, CPZ-3525 に 搭 載 されているインターバルタイマの 設 定 を 行 います。42 AdGetInterval PCI-3525, CPZ-3525 に 搭 載 されているインターバルタイマの 設 定 を 取 得 します。43 AdSetFunction デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。44 AdGetFunction デバイスの 外 部 出 力 信 号 の 設 定 値 を 取 得 します。45 AdSetOutMode アナログ 入 力 モードの 外 部 出 力 信 号 制 御 設 定 を 取 得 します。46 AdGetOutMode アナログ 入 力 モードの 外 部 出 力 信 号 制 御 設 定 を 取 得 します。47 AdSetFilter アナログ 入 力 デバイスのデジタルフィルターの 設 定 を行 います。48 AdGetFilter アナログ 入 力 デバイスのデジタルフィルター 設 定 を 取得 します。49 AdMemSetDiPattern デバイスの DI パターン 一 致 条 件 を 設 定 します。50 AdMemGetDiPattern デバイスの DI パターン 一 致 条 件 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.7


<strong>GPC</strong>-<strong>3100</strong> Help for Windows51 AdInputDI デバイスの 汎 用 デジタル 入 力 端 子 を 読 み 出 します。52 AdOutputDO デバイスの 汎 用 デジタル 出 力 端 子 へデータを 出 力 します。53 AdDataConv アナログデータの 形 式 を 変 換 します。54 AdReadFile ファイルに 保 存 されているサンプリングデータを、 指 定 のバッファに 読 み 込 みます。55 fnConv AdDataConv 関 数 で 使 用 するコールバック 関 数 のプレースホルダです。データ 変 換 時 に fnConv 関 数 を 呼 び 出 すことができます。fnConv 関 数 は、データ 1 点 毎 に 呼 び 出 されます。56 CallBackProc 非 同 期 サンプリング 終 了 時 に 呼 び 出 されるコールバック関 数 のプレースホルダです。 非 同 期 サンプリング 終 了 時 にCallBackProc 関 数 を 呼 び 出 すことができます。57 AdCommonGetPciDeviceInfo デバイスのリソース 情 報 を 取 得 します。58 AdOutputSync アナログ 入 力 デバイスの 内 部 同 期 制 御 を 設 定 します。59 AdCalibration アナログ 入 力 デバイスのオートキャリブレーションを実 行 します60 AdAdjustVR アナログ 入 力 デバイスの 電 子 ボリュームを 調 整 します。61 AdReadAdjustVR アナログ 入 力 デバイスの 電 子 ボリュームの 値 をロードします62 AdReadAdjustVREx アナログ 入 力 デバイスの 電 子 ボリュームの 値 をロードします(PCI-362616 専 用 )63 AdMeasureTemperatureEx 内 部 コネクタ 付 近 の 温 度 を 取 得 します。(PCI-362616 専 用 )© 2000, 2014 Interface Corporation. All rights reserved.8


<strong>GPC</strong>-<strong>3100</strong> Help for Windows2.2. 関 数 個 別 説 明1. AdOpen【 機 能 】デバイスのオープンを 行 い、 以 後 のデバイスへのアクセスを 行 えるようにします。「デバイス マネージャ」に「FbiPciAd」が 追 加 され 認 識 された 弊 社 アナログ 入 力 製 品 が 一 覧表 示 されます。一 覧 の 製 品 型 式 の 横 にデバイス 上 のロータリスイッチの 値 とデバイス 名 が 表 示 されます。AD診 断 プログラム(DiagAd.exe)、AD 調 整 プログラム(AdAdjust.exe)、AD 波 形 入 力 プログラム(AdWaveSmp.exe)でも 確 認 できます。デバイス 名 は 使 用 する 製 品 枚 数 やスロット 位 置 の 変 更 等 でシステム 構 成 が 変 化 すると 割 り 当てられる 名 前 が 変 化 する 場 合 があります。システム 構 成 が 変 化 する 環 境 でご 使 用 になる 場 合 は、デバイス 名 の 指 定 が 変 更 できるようにアプリケーションを 作 成 ください。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern uint AdOpen (IntPtr LpszName);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern uint AdOpen (string LpszName);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdOpen Lib "FbiAd.DLL"(ByVal LpszName As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdOpen Lib "FbiAd.DLL"(ByVal LpszName As String)As Integer●Delphi 8(x86 専 用 )class function AdOpen (LpszName: String): Integer; static;【パラメータ】lpszName© 2000, 2014 Interface Corporation. All rights reserved.9


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsオープンするデバイスのデバイス 名 を 指 定 してください。デバイス 名 は FBIAD1~FBIAD255。【 戻 り 値 】AdOpen 関 数 が 正 常 に 終 了 した 場 合 には、 有 効 なハンドルが 返 されます。オープンに 失 敗 した 場 合 には、INVALID_HANDLE_VALUE(FFFFFFFFh)が 返 されます。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IntPtr hDeviceHandle;string lpszName;lpszName = “FBIAD1”;hDeviceHandle = IFCAD_ANY.AdOpen(lpszName );●Visual Basic .NET(x86、x64 共 用 )Dim hDeviceHandle As IntPtrDim lpszName As IntegerlpszName = “FBIAD1”hDeviceHandle = IFCAD_ANY.AdOpen(lpszName )●Delphi 8VarlpszName: String;beginlpszName := ‘FBIAD1’;hDeviceHandle := IFCAD.ADOpen(lpszName );end;デバイス 名 "FBIAD1"のデバイスをオープンし、 変 数 hDeviceHandle にデバイスハンドルを 返 します。© 2000, 2014 Interface Corporation. All rights reserved.10


<strong>GPC</strong>-<strong>3100</strong> Help for Windows2. AdClose【 機 能 】デバイスのクローズを 行 い、デバイスアクセスのために 使 用 されていた 各 種 リソースの 解 放 を行 い、 以 後 のデバイスへのアクセスを 禁 止 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdClose(IntPtr hDeviceHandle);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdClose(uint hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdClose Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdClose Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer)As Integer●Delphi 8(x86 専 用 )class function AdClose (hDeviceHandle: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdClose 関 数 は 処 理 が 正 常 終 了 するとAD_ERROR_SUCCESSを 返 します。 正 常 に 処 理 が 終 了 しなかった 場 合 AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.11


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )int nRet;IntPtr hDeviceHandle;string lpszName;lpszName = “FBIAD1”;hDeviceHandle = IFCAD_ANY.AdOpen(lpszName);:::nRet = IFCAD_ANY.AdClose(hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Dim nRet As IntegerDim lpszName As StringDim hDeviceHandle As IntPtrlpszName = "FBIAD1"hDeviceHandle = IFCAD_ANY.AdOpen(lpszName)::nRet = IFCAD_ANY.AdClose(hDeviceHandle)●Delphi 8VarlpszName: String;hDeviceHandle: Integer;nRet: Integer;lpszName := 'FBIAD1';hDeviceHandle := IFCAD.AdOpen(lpszName);::nRet := IFCAD.AdClose(hDeviceHandle);デバイス 名 「FBIAD1」のデバイスのクローズ 処 理 を 行 います。© 2000, 2014 Interface Corporation. All rights reserved.12


<strong>GPC</strong>-<strong>3100</strong> Help for Windows3. AdGetDeviceInfo【 機 能 】デバイスから 各 種 仕 様 の 取 得 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetDeviceInfo (IntPtrhDeviceHandle,out ADBOARDSPEC pAdBoardSpec);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetDeviceInfo (uinthDeviceHandle,out ADBOARDSPEC pAdBoardSpec);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetDeviceInfo Lib " fbiad.DLL"(ByVal HDeviceHandle As IntPtr,ByRef pAdBoardSpec As ADBOARDSPEC)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetDeviceInfo Lib " fbiad.DLL"(ByVal HDeviceHandle As Integer,ByRef pAdBoardSpec As ADBOARDSPEC)As Integer●Delphi 8(x86 専 用 )class function AdGetDeviceInfo (hDeviceHandle: Integer;var pAdBoardSpec: ADBOARDSPEC): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。PAdBoardSpecAD 製 品 の 仕 様 を 格 納 する 構 造 体 (ADBOARDSPEC 構 造 体 )へのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.13


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdGetDeviceInfo 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )int nRet;IntPtr hDeviceHandle;IFCAD_ANY.ADBOARDSPEC AdBoardSpec;hDeviceHandle = IFCAD_ANY.AdOpen(“FBIAD1”);nRet = IFCAD_ANY.AdGetDeviceInfo (hDeviceHandle, &AdBoardSpec);●Visual Basic .NET(x86、x64 共 用 )Dim lpszName As StringDim hDeviceHandle As IntPtrDim AdBoardSpec As IFCAD_ANY.ADBOARDSPECHDeviceHandle = IFCAD_ANY.AdOpen("FBIAD1")nRet = IFCAD_ANY.AdGetDeviceInfo( hDeviceHandle, AdBoardSpec);●Delphi 8VarHDeviceHandle: Integer;AdBoardSpec: ADBOARDSPEC;hDeviceHandle := IFCAD.AdOpen ('FBIAD1');nRet := IFCAD.AdGetDeviceInfo (hDeviceHandle, AdBoardSpec);デバイス 名 「FBIAD1」のデバイスのデバイス 情 報 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.14


<strong>GPC</strong>-<strong>3100</strong> Help for Windows4. AdSetBoardConfig【 機 能 】デバイスのイベント 設 定 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetBoardConfig (IntPtrhDeviceHandle,IntPtrhEvent,LPADCALLBACK lpCallBackProc,uintdwUser);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetBoardConfig (uinthDeviceHandle,uinthEvent,LPADCALLBACK lpCallBackProc,uintdwUser);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetBoardConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal hEvent As Integer,ByVal lpCallBackProc As LPADCALLBACK,ByVal dwUser As Integer)As IntegerDeclare Function AdSetBoardConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal hEvent As IntPtr,ByVal lpCallBackProc As Integer,ByVal dwUser As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.15


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86 専 用 )Declare Function AdSetBoardConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal hEvent As Integer,ByVal lpCallBackProc As LPADCALLBACK,ByVal dwUser As Integer)As IntegerDeclare Function AdSetBoardConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal hEvent As Integer,ByVal lpCallBackProc As Integer,ByVal dwUser As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSetBoardConfig (hDeviceHandle: Integer;hEvent:Integer;lpCallBackProc: LPADCADCALLBACK;dwUser:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。hEventサンプリング 停 止 時 / 指 定 件 数 時 にシグナル 状 態 に 設 定 されるイベントを 識 別 します。イベント 通 知 を 行 わない 場 合 には、C#では 0,Visual Basic では 0,Delphi では nil を 指 定してください。・デフォルト:0 または NULLlpCallBackProcサンプリング 停 止 時 に 呼 び 出 すユーザ・コールバック 関 数 のアドレスを 指 定 します。ユーザ・コールバック 関 数 の 呼 び 出 しを 行 わない 場 合 には、C 言 語 では NULL,Visual Basicでは 0,Delphi では nil を 指 定 してください。・デフォルト:NULLdwUserユーザ・コールバック 関 数 へ 引 き 渡 すユーザ・データを 指 定 します。ユーザ・コールバック 関 数 の 呼 び 出 しを 行 わない 場 合 には、0 を 指 定 してください。・デフォルト:0© 2000, 2014 Interface Corporation. All rights reserved.16


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdSetBoardConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・サンプリング 中 に 本 関 数 を 実 行 した 場 合 には、すぐに 変 更 が 反 映 されます。・ 本 関 数 は、AdStartSampling 関 数 を 非 同 期 で 実 行 した 場 合 にのみ 有 効 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )hEvent = CreateEvent(0, TRUE, FALSE, NULL);nRet = IFCAD_ANY.AdSetBoardConfig( hDeviceHandle, hEvent, CallBackProc, 0);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetBoardConfig( hDeviceHandle, hEvent, CallBackProc, 0 )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdSetBoardConfig( hDeviceHandle, hEvent, CallBackProc, 0 );デバイスハンドル hDeviceHandle のデバイスのイベント 設 定 をします。© 2000, 2014 Interface Corporation. All rights reserved.17


<strong>GPC</strong>-<strong>3100</strong> Help for Windows5. AdGetBoardConfig【 機 能 】現 在 の 基 本 周 波 数 、 周 波 数 倍 率 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetBoardConfig (IntPtr hDeviceHandle,out uint ulAdSmplEventFactor);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetBoardConfig (uint hDeviceHandle,out uint ulAdSmplEventFactor);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetBoardConfigLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef ulAdSmplEventFactor As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetBoardConfigLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef ulAdSmplEventFactor As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetBoardConfig (hDeviceHandle:Integer;var ulAdSmplEventFactor: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.18


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulAdSmplEventFactorAD サンプリングのイベント 要 因 を 格 納 する 変 数 へのポインタを 指 定 します。識 別 子AD_EVENT_SMPLNUMAD_EVENT_STOP_TRIGGERAD_EVENT_STOP_FUNCTIONAD_EVENT_STOP_SAMPLINGAD_EVENT_STOP_LV_1AD_EVENT_STOP_LV_2AD_EVENT_STOP_LV_3AD_EVENT_STOP_LV_4AD_EVENT_RANGEAD_EVENT_STOP_RANGEAD_EVENT_STOP_SCERAD_EVENT_STOP_ORERAD_EVENT_SCERAD_EVENT_ORERAD_EVENT_OVPMAD_EVENT_STOP_OVPM状 態指 定 された 数 のデータがサンプルされたトリガによるサンプリング 停 止関 数 によるサンプリング 停 止サンプリング 終 了チャンネル 1 サンプリング 終 了(PCI-3179, CTP-3179, CPZ-3179 の 場 合 )チャンネル 2 サンプリング 終 了(PCI-3179, CTP-3179, CPZ-3179 の 場 合 )チャンネル 3 サンプリング 終 了(PCI-3179, CTP-3179, CPZ-3179 の 場 合 )チャンネル 4 サンプリング 終 了(PCI-3179, CTP-3179, CPZ-3179 の 場 合 )フルスケールレンジを 検 出フルスケール 検 出 によりサンプリング 終 了サンプリングクロックエラー 発 生 によるサンプリング 停 止オーバランエラー 発 生 によるサンプリング 停 止サンプリングクロックエラー 発 生オーバランエラー 発 生過 電 圧 保 護 入 力 時 自 動 レンジ 切 り 換 え 発 生過 電 圧 保 護 入 力 時 自 動 レンジ 切 り 換 え 発 生 によりサンプリング 終 了【 戻 り 値 】AdGetBoardConfig 関 数 は 正 常 に 終 了 するとAD_ERROR_SUCCESSを 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・サンプリングクロックエラーは、バスマスタ 方 式 サンプリングにおいて、 複 数 チャンネルでのサンプリング 時 のチャンネル 切 り 替 え(スキャン) 中 に 次 のサンプリングクロックが 入 力された 場 合 に 発 生 します。・オーバランエラーは、バスマスタ 方 式 サンプリングにおいて、PCI バスの 負 荷 によりサンプリングデータの DMA 転 送 が 間 に 合 わず、データ 抜 けが 発 生 した 場 合 に 発 生 します。【 対 象 製 品 】対 象 製 品 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.19


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )Integer AdEventFactor;nRet = IFCAD_ANY.AdGetBoardConfig ( hDeviceHandle, out AdEventFactor);●Visual Basic .NET(x86、x64 共 用 )Dim AdEventFactor As IntegernRet = IFCAD_ANY.AdGetBoardConfig ( hDeviceHandle, AdEventFactor)●Delphi 8varhDeviceHandle: Integer;AdEventFactor : Integer;nRet := IFCAD.AdGetBoardConfig ( hDeviceHandle, AdEventFactor);デバイスハンドル hDeviceHandle のアナログ 入 力 デバイスからイベント 要 因 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.20


<strong>GPC</strong>-<strong>3100</strong> Help for Windows6. AdSetSamplingConfig【 機 能 】デバイスのサンプリング 条 件 の 設 定 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetSamplingConfig (IntPtrhDeviceHandle,ref ADSMPLREQ pAdSmplConfig);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetSamplingConfig (uinthDeviceHandle,ref ADSMPLREQ pAdSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetSamplingConfigLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pAdSmplConfig As ADSMPLREQ)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSetSamplingConfigLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdSmplConfig As ADSMPLREQ)As Integer●Delphi 8(x86 専 用 )class function AdSetSamplingConfig (hDeviceHandle: Integer;pAdSmplConfig: ADSMPLREQ): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pAdSmplConfigAD サンプリング 構 造 体 (ADSMPLREQ 構 造 体 )へのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.21


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdSetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 をサンプリング 中 に 実 行 した 場 合 、 次 回 のサンプリング 開 始 時 から 有 効 になります。・メモリ 方 式 の 製 品 ではサンプリング 中 に 本 関 数 を 実 行 する 事 ができません。・ 設 定 を 変 更 しない AD サンプリング 構 造 体 のメンバにはデフォルト 値 を 設 定 して 下 さい。・デフォルト 値 は 設 定 の 変 更 を 行 う 前 に AdGetSamplingConfig 関 数 により 取 得 できます。・ 製 品 によって 使 用 する 外 部 トリガ、 外 部 クロックの 端 子 がことなりますので、 端 子 の 一 覧 をHelp.htm にて 参 照 してください。【 対 象 製 品 】対 象 製 品 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IFCAD_ANY.ADSMPLREQ AdSmplConfig;AdSmplConfig.ulChCount = 4;AdSmplConfig.SetChNo(0, 1);AdSmplConfig.SetChRange(0, IFCAD_ANY.AD_5V;AdSmplConfig.SetChNo(1, 2);AdSmplConfig.SetChRange(1, IFCAD_ANY.AD_5V);AdSmplConfig.SetChNo(2, 3);AdSmplConfig.SetChRange(2, IFCAD_ANY.AD_5V);AdSmplConfig.SetChNo(3, 4);AdSmplConfig.SetChRange(3, IFCAD_ANY.AD_5V);AdSmplConfig.ulSamplingMode = IFCAD_ANY.AD_IO_SAMPLING;AdSmplConfig.ulSingleDiff = IFCAD_ANY.AD_INPUT_SINGLE;AdSmplConfig.ulSmplNum = 1024;AdSmplConfig.ulSmplEventNum = 0;AdSmplConfig.fSmplFreq = 1000.0;AdSmplConfig.ulTrigPoint = IFCAD_ANY.AD_TRIG_START;AdSmplConfig.ulTrigMode = IFCAD_ANY.AD_FREERUN;nRet = IFCAD_ANY.AdSetSamplingConfig ( hDeviceHandle, &AdSmplConfig );© 2000, 2014 Interface Corporation. All rights reserved.22


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Dim AdSmplConfig As IFCAD_ANY.ADSMPLREQAdSmplConfig.ulChCount = 4AdSmplConfig.SetChNo(0, 1)AdSmplConfig.SetChRange(0, IFCAD_ANY.AD_5V)AdSmplConfig.SetChNo(1, 2)AdSmplConfig.SetChRange(1, IFCAD_ANY.AD_5V)AdSmplConfig.SetChNo(2, 3)AdSmplConfig.SetChRange(2, IFCAD_ANY.AD_5V)AdSmplConfig.SetChNo(3, 4)AdSmplConfig.SetChRange(3, IFCAD_ANY.AD_5V)AdSmplConfig.ulSamplingMode = IFCAD_ANY.AD_IO_SAMPLINGAdSmplConfig.ulSingleDiff = IFCAD_ANY.AD_INPUT_SINGLEAdSmplConfig.ulSmplNum = 1024AdSmplConfig.ulSmplEventNum = 0AdSmplConfig.fSmplFreq = 1000.0AdSmplConfig.ulTrigPoint = IFCAD_ANY.AD_TRIG_STARTAdSmplConfig.ulTrigMode = IFCAD_ANY.AD_FREERUNnRet = IFCAD_ANY.AdSetSamplingConfig ( hDeviceHandle, &AdSmplConfig )●Delphi 8var AdSmplConfig: IFCAD.ADSMPLREQ;AdSmplConfig.ulChCount := 4;AdSmplConfig.SetChNo(0, 1);AdSmplConfig.SetChRange(0, IFCAD.AD_5V;AdSmplConfig.SetChNo(1, 2);AdSmplConfig.SetChRange(1, IFCAD.AD_5V);AdSmplConfig.SetChNo(2, 3);AdSmplConfig.SetChRange(2, IFCAD.AD_5V);AdSmplConfig.SetChNo(3, 4);AdSmplConfig.SetChRange(3, IFCAD.AD_5V);AdSmplConfig.ulSamplingMode := IFCAD.AD_IO_SAMPLING;AdSmplConfig.ulSingleDiff := IFCAD.AD_INPUT_SINGLE;AdSmplConfig.ulSmplNum := 1024;AdSmplConfig.ulSmplEventNum := 0;AdSmplConfig.fSmplFreq := 1000.0;AdSmplConfig.ulTrigPoint := IFCAD.AD_TRIG_START;AdSmplConfig.ulTrigMode := IFCAD.AD_FREERUN;nRet := IFCAD.AdSetSamplingConfig ( hDeviceHandle, AdSmplConfig );© 2000, 2014 Interface Corporation. All rights reserved.23


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsデバイスハンドル hDeviceHandle のデバイスのサンプリング 条 件 (3 チャンネル、±5V レンジ、サンプリング 周 波 数 :1000Hz、サンプリング 件 数 :1024 件 )を 設 定 します。© 2000, 2014 Interface Corporation. All rights reserved.24


<strong>GPC</strong>-<strong>3100</strong> Help for Windows7. AdGetSamplingConfig【 機 能 】デバイスの 現 在 設 定 されているサンプリング 条 件 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetSamplingConfig (IntPtrhDeviceHandle,out ADSMPLREQ pAdSmplConfig);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetSamplingConfig (uinthDeviceHandle,out ADSMPLREQ pAdSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetSamplingConfigLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pAdSmplConfig As ADSMPLREQ)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetSamplingConfigLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdSmplConfig As ADSMPLREQ)As Integer●Delphi 8(x86 専 用 )class function AdGetSamplingConfig (hDeviceHandle: Integer;var pAdSmplConfig: ADSMPLREQ): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pAdSmplConfig現 在 の 設 定 されているサンプリング 条 件 を 格 納 するための AD サンプリング 構 造 体(ADSMPLREQ 構 造 体 )へのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.25


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdGetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】デバイスオープン 直 後 に 本 関 数 を 実 行 することにより AD サンプリング 構 造 体 (ADSMPLREQ 構 造体 )のデフォルトの 設 定 値 を 取 得 することができます【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IFCAD_ANY.ADSMPLREQ AdSmplConfig;nRet = IFCAD_ANY.AdGetSamplingConfig ( hDeviceHandle, &AdSmplConfig );●Visual Basic .NET(x86、x64 共 用 )Dim AdSmplConfig As IFCAD_ANY.ADSMPLREQnRet = IFCAD_ANY.AdGetSamplingConfig ( hDeviceHandle, &AdSmplConfig )●Delphi 8var AdSmplConfig: IFCAD.ADSMPLREQ;nRet := IFCAD.AdGetSamplingConfig ( hDeviceHandle, AdSmplConfig);デバイスハンドル hDeviceHandle のデバイスから 各 種 サンプリング 条 件 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.26


<strong>GPC</strong>-<strong>3100</strong> Help for Windows8. AdBmSetSamplingConfig【 機 能 】デバイスのサンプリング 条 件 の 設 定 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdBmSetSamplingConfig (uinthDeviceHandle,ref ADBMSMPLREQ pAdBmSmplConfig);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdBmSetSamplingConfig (uinthDeviceHandle,ref ADBMSMPLREQ pAdBmSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdBmSetSamplingConfig "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdBmSmplConfig As ADBMSMPLREQ)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdBmSetSamplingConfig "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdBmSmplConfig As ADBMSMPLREQ)As Integer●Delphi 8(x86 専 用 )class function AdBmSetSamplingConfig (hDeviceHandle: Integer;pAdBmSmplConfig: PADBMSMPLREQ): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pAdBmSmplConfigAD サンプリング 構 造 体 (ADBMSMPLREQ 構 造 体 )へのポインタを 指 定 します© 2000, 2014 Interface Corporation. All rights reserved.27


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdBmSetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 をサンプリング 中 に 実 行 した 場 合 、 次 回 のサンプリング 開 始 時 から 有 効 になります。・ 設 定 を 変 更 しない AD サンプリング 構 造 体 のメンバにはデフォルト 値 を 設 定 して 下 さい。・デフォルト 値 は 設 定 の 変 更 を 行 う 前 に AdBmGetSamplingConfig 関 数 により 取 得 できます。・ 製 品 によって 使 用 する 外 部 トリガ、 外 部 クロックの 端 子 がことなりますので、 端 子 の 一 覧 をHelp.htm にて 参 照 してください。【 対 象 製 品 】対 象 製 品 型 式 、 対 応 製 品 型 式 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。【 使 用 例 】●Visual C# .NETIFCAD_ANY.ADBMSMPLREQ AdBmSmplConfig;AdBmSmplConfig.ulChCount = 4;AdSmplConfig.SetChNo(0, 1);AdSmplConfig.SetChRange(0, IFCAD_ANY.AD_5V;AdSmplConfig.SetChNo(1, 2);AdSmplConfig.SetChRange(1, IFCAD_ANY.AD_5V);AdSmplConfig.SetChNo(2, 3);AdSmplConfig.SetChRange(2, IFCAD_ANY.AD_5V);AdSmplConfig.SetChNo(3, 4);AdSmplConfig.SetChRange(3, IFCAD_ANY.AD_5V);AdBmSmplConfig.ulSingleDiff = IFCAD_ANY.AD_INPUT_SINGLE;AdBmSmplConfig.ulSmplNum = 1024;AdBmSmplConfig.ulSmplEventNum = 0;AdBmSmplConfig.ulSmplRepeat = 1;AdBmSmplConfig.ulBufferMode = IFCAD_ANY.AD_APPEND;AdBmSmplConfig.fSmplFreq = 1000.0;AdBmSmplConfig.fScanFreq = 10000.0;AdBmSmplConfig.ulStartMode = IFCAD_ANY.AD_FREERUN;AdBmSmplConfig.ulStopMode = IFCAD_ANY.AD_FREERUN;nRet = IFCAD_ANY.AdBmSetSamplingConfig ( hDeviceHandle, &AdSmplConfig );© 2000, 2014 Interface Corporation. All rights reserved.28


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NETDim AdBmSmplConfig As IFCAD_ANY.ADBMSMPLREQAdBmSmplConfig.ulChCount = 4AdSmplConfig.SetChNo(0, 1)AdSmplConfig.SetChRange(0, IFCAD_ANY.AD_5V)AdSmplConfig.SetChNo(1, 2)AdSmplConfig.SetChRange(1, IFCAD_ANY.AD_5V)AdSmplConfig.SetChNo(2, 3)AdSmplConfig.SetChRange(2, IFCAD_ANY.AD_5V)AdSmplConfig.SetChNo(3, 4)AdSmplConfig.SetChRange(3, IFCAD_ANY.AD_5V)AdBmSmplConfig.ulSingleDiff = IFCAD_ANY.AD_INPUT_SINGLEAdBmSmplConfig.ulSmplNum = 1024AdBmSmplConfig.ulSmplEventNum = 0AdBmSmplConfig.ulSmplRepeat = 1AdBmSmplConfig.ulBufferMode = IFCAD_ANY.AD_APPENDAdBmSmplConfig.fSmplFreq = 1000.0AdBmSmplConfig.fScanFreq = 10000.0AdBmSmplConfig.ulStartMode = IFCAD_ANY.AD_FREERUNAdBmSmplConfig.ulStopMode = IFCAD_ANY.AD_FREERUNnRet = IFCAD_ANY.AdBmSetSamplingConfig ( hDeviceHandle, &AdSmplConfig )●Delphi 8Var AdBmSmplConfig: IFCAD.ADBMSMPLREQ;AdBmSmplConfig.ulChCount := 4;AdSmplConfig.SetChNo(0, 1);AdSmplConfig.SetChRange(0, IFCAD.AD_5V;AdSmplConfig.SetChNo(1, 2);AdSmplConfig.SetChRange(1, IFCAD.AD_5V);AdSmplConfig.SetChNo(2, 3);AdSmplConfig.SetChRange(2, IFCAD.AD_5V);AdSmplConfig.SetChNo(3, 4);AdSmplConfig.SetChRange(3, IFCAD.AD_5V);AdBmSmplConfig.ulSingleDiff := IFCAD.AD_INPUT_SINGLE;AdBmSmplConfig.ulSmplNum := 1024;AdBmSmplConfig.ulSmplEventNum := 0;AdBmSmplConfig.ulSmplRepeat := 1;AdBmSmplConfig.ulBufferMode := IFCAD.AD_APPEND;AdBmSmplConfig.fSmplFreq := 1000.0;AdBmSmplConfig.fScanFreq := 10000.0;AdBmSmplConfig.ulStartMode := IFCAD.AD_FREERUN;AdBmSmplConfig.ulStopMode := IFCAD.AD_FREERUN;© 2000, 2014 Interface Corporation. All rights reserved.29


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsnRet := IFCAD.AdBmSetSamplingConfig ( hDeviceHandle, AdSmplConfig );デバイスハンドル hDeviceHandle のデバイスをシングルエンド 4 チャンネル、±5V レンジでサンプリングを 行 う 条 件 を 設 定 します。© 2000, 2014 Interface Corporation. All rights reserved.30


<strong>GPC</strong>-<strong>3100</strong> Help for Windows9. AdBmGetSamplingConfig【 機 能 】デバイスの 現 在 設 定 されているサンプリング 条 件 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingConfig (IntPtrhDeviceHandle,out ADBMSMPLREQ pAdSmplConfig);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingConfig (uinthDeviceHandle,out ADBMSMPLREQ pAdSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdBmGetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pAdSmplConfig As ADBMSMPLREQ)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdBmGetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdSmplConfig As ADBMSMPLREQ)As Integer●Delphi 8(x86 専 用 )class function AdBmGetSamplingConfig (hDeviceHandle: Integer;var pAdSmplConfig: ADBMSMPLREQ): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pAdSmplConfig現 在 の 設 定 されているサンプリング 条 件 を 格 納 するための AD サンプリング 構 造 体(ADSMPLREQ 構 造 体 )へのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.31


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdBmGetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】デバイスオープン 直 後 に 本 関 数 を 実 行 することにより AD サンプリング 構 造 体 (ADBMSMPLREQ 構造 体 )のデフォルトの 設 定 値 を 取 得 することができます。【 対 象 製 品 】対 象 製 品 型 式 、 対 応 製 品 型 式 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IFCAD_ANY.ADBMSMPLREQ AdBmSmplConfig;nRet = IFCAD_ANY.AdBmGetSamplingConfig ( hDeviceHandle, &AdBmSmplConfig );●Visual Basic .NET(x86、x64 共 用 )Dim AdBmSmplConfig As IFCAD_ANY.ADBMSMPLREQnRet = IFCAD_ANY.AdBmGetSamplingConfig ( hDeviceHandle, &AdBmSmplConfig )●Delphi 8var AdBmSmplConfig: IFCAD.ADBMSMPLREQ;nRet := IFCAD.AdBmGetSamplingConfig ( hDeviceHandle, AdSmplConfig);デバイスハンドル hDeviceHandle のデバイスから 各 種 サンプリング 条 件 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.32


<strong>GPC</strong>-<strong>3100</strong> Help for Windows10. AdMemSetSamplingConfig【 機 能 】デバイスのサンプリング 条 件 の 設 定 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMemSetSamplingConfig (IntPtrhDeviceHandle,ref ADMEMSMPLREQ pAdMemSmplConfig);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdMemSetSamplingConfig (uinthDeviceHandle,ref ADMEMSMPLREQ pAdMemSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMemSetSamplingConfig"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pAdMemSmplConfig As ADMEMSMPLREQ)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMemSetSamplingConfig"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdMemSmplConfig As ADMEMSMPLREQ)As Integer●Delphi 8(x86 専 用 )class function AdMemSetSamplingConfig (hDeviceHandle:Integer;var pAdMemSmplConfig: ADMEMSMPLREQ): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pAdMemSmplConfigAD サンプリング 構 造 体 (ADMEMSMPLREQ 構 造 体 )へのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.33


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdMemSetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 をサンプリング 中 に 実 行 した 場 合 、 次 回 のサンプリング 開 始 時 から 有 効 になります。・ 設 定 を 変 更 しない AD サンプリング 構 造 体 のメンバにはデフォルト 値 を 設 定 して 下 さい。・デフォルト 値 は 設 定 の 変 更 を 行 う 前 に AdMemGetSamplingConfig 関 数 により 取 得 できます。・ 製 品 によって 使 用 する 外 部 トリガ、 外 部 クロックの 端 子 がことなりますので、 端 子 の 一 覧 をHelp.htm にて 参 照 してください。【 対 象 製 品 】本 関 数 は CSI-320110, CBI-320110, CBI-320110TK, CBI-320110TL, LPC-320910, PEX-320910,CPZ-360810 でのみ 使 用 できます。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IFCAD_ANY.ADMEMSMPLREQ AdMemSmplConfig;AdMemSmplConfig.ulChCount = 2;AdSmplConfig.SetChNo(0, 1);AdSmplConfig.SetChRange(0, IFCAD_ANY.AD_10V;AdSmplConfig.SetChNo(1, 2);AdSmplConfig.SetChRange(1, IFCAD_ANY.AD_10V);AdMemSmplConfig.ulSingleDiff = IFCAD_ANY.AD_INPUT_SINGLE;AdMemSmplConfig.ulSmplNum = 1024;AdMemSmplConfig.ulSmplEventNum = 0;AdMemSmplConfig.fSmplFreq = 200000.0;AdMemSmplConfig.ulStartMode = IFCAD_ANY.AD_FREERUN;AdMemSmplConfig.ulStopMode = IFCAD_ANY.AD_EXTRG;nRet = IFCAD_ANY.AdMemSetSamplingConfig(hDeviceHandle, &AdMemSmplConfig );© 2000, 2014 Interface Corporation. All rights reserved.34


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Dim AdMemSmplConfig As IFCAD_ANY.ADMEMSMPLREQAdMemSmplConfig.ulChCount = 2AdSmplConfig.SetChNo(0, 1)AdSmplConfig.SetChRange(0, IFCAD_ANY.AD_10V)AdSmplConfig.SetChNo(1, 2)AdSmplConfig.SetChRange(1, IFCAD_ANY.AD_10V)AdMemSmplConfig.ulSingleDiff = IFCAD_ANY.AD_INPUT_SINGLEAdMemSmplConfig.ulSmplNum = 1024AdMemSmplConfig.ulSmplEventNum = 0AdMemSmplConfig.fSmplFreq = 1000.0AdMemSmplConfig.ulStartMode = IFCAD_ANY.AD_FREERUNAdMemSmplConfig.ulStopMode = IFCAD_ANY.AD_EXTRGnRet = IFCAD_ANY.AdMemSetSamplingConfig( hDeviceHandle, AdMemSmplConfig )●Delphi 8var AdMemSmplConfig: IFCAD.ADMEMSMPLREQ;AdMemSmplConfig.ulChCount := 2;AdSmplConfig.SetChNo(0, 1);AdSmplConfig.SetChRange(0, IFCAD.AD_10V;AdSmplConfig.SetChNo(1, 2);AdSmplConfig.SetChRange(1, IFCAD.AD_10V);AdMemSmplConfig.ulSingleDiff := IFCAD.AD_INPUT_SINGLE;AdMemSmplConfig.ulSmplNum := 1024;AdMemSmplConfig.ulSmplEventNum := 0;AdMemSmplConfig.ulSmplRepeat := 1;AdMemSmplConfig.ulBufferMode := IFCAD.AD_APPEND;AdMemSmplConfig.fSmplFreq := 1000.0;AdMemSmplConfig.fScanFreq := 10000.0;AdMemSmplConfig.ulStopMode := IFCAD.AD_EXTRG;nRet := IFCAD.AdMemSetSamplingConfig ( hDeviceHandle, AdBmSmplConfig );デバイスハンドル hDeviceHandle のデバイスをシングルエンド 2 チャンネル、±10V レンジでサンプリングを 行 う 条 件 を 設 定 します。© 2000, 2014 Interface Corporation. All rights reserved.35


<strong>GPC</strong>-<strong>3100</strong> Help for Windows11. AdMemGetSamplingConfig【 機 能 】デバイスの 現 在 設 定 されているサンプリング 条 件 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMemGetSamplingConfig (IntPtrhDeviceHandle,out ADMEMSMPLREQ pAdMemSmplConfig);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdMemGetSamplingConfig (uinthDeviceHandle,out ADMEMSMPLREQ pAdMemSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMemGetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pAdMemSmplConfig As ADMEMSMPLREQ)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMemGetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pAdMemSmplConfig As ADMEMSMPLREQ)As Integer●Delphi 8(x86 専 用 )class function AdMemGetSamplingConfig (hDeviceHandle:Integer;var pAdMemSmplConfig: ADMEMSMPLREQ): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pAdMemSmplConfig現 在 の 設 定 されているサンプリング 条 件 を 格 納 するための AD サンプリング 構 造 体(ADMEMSMPLREQ 構 造 体 )へのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.36


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdMemGetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】デバイスオープン 直 後 に 本 関 数 を 実 行 することにより AD サンプリング 構 造 体 (ADMEMSMPLREQ構 造 体 )のデフォルトの 設 定 値 を 取 得 することができます。【 対 象 製 品 】本 関 数 は CSI-320110, CBI-320110, CBI-320110TK, CBI-320110TL, LPC-320910, PEX-320910,CPZ-360810 でのみ 使 用 できます。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IFCAD_ANY.ADMEMSMPLREQ AdMemSmplConfig;nRet= IFCAD_ANY.AdMemGetSamplingConfig(hDeviceHandle, &AdMemSmplConfig);●Visual Basic .NET(x86、x64 共 用 )Dim AdMemSmplConfig As IFCAD_ANY.ADMEMSMPLREQnRet = IFCAD_ANY.AdMemGetSamplingConfig ( hDeviceHandle, AdMemSmplConfig)●Delphi 8var AdMemSmplConfig: IFCAD.ADMEMSMPLREQ;nRet := IFCAD.AdMemGetSamplingConfig ( hDeviceHandle, AdMemSmplConfig);デバイスハンドル hDeviceHandle のデバイスから 各 種 サンプリング 条 件 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.37


<strong>GPC</strong>-<strong>3100</strong> Help for Windows12. AdLvSetSamplingConfig【 機 能 】デバイスのサンプリング 条 件 を 設 定 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvSetSamplingConfig (IntPtrhDeviceHandle,uintulChNo,uintulSmplNum,floatpSmplFreq,uintulRange,uinthEvent,LPADCALLBACK lpCallBackProc,uintdwUser);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvSetSamplingConfig (uinthDeviceHandle,uintulChNo,uintulSmplNum,floatpSmplFreq,uintulRange,uinthEvent,LPADCALLBACK lpCallBackProc,uintdwUser);© 2000, 2014 Interface Corporation. All rights reserved.38


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvSetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByVal ulSmplNum As Integer,ByVal fSmplFreq As Single,ByVal ulRange As Integer,ByVal hEvent As Integer,ByVal lpCallBackProc LPADCALLBACK,ByVal dwUser As Integer)As IntegerDeclare Function AdLvSetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByVal ulSmplNum As Integer,ByVal fSmplFreq As Single,ByVal ulRange As Integer,ByVal hEvent As Integer,ByVal lpCallBackProc As Integer,ByVal dwUser As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvSetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByVal ulSmplNum As Integer,ByVal fSmplFreq As Single,ByVal ulRange As Integer,ByVal hEvent As Integer,ByVal lpCallBackProc LPADCALLBACK,ByVal dwUser As Integer)As IntegerDeclare Function AdLvSetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByVal ulSmplNum As Integer,ByVal fSmplFreq As Single,ByVal ulRange As Integer,ByVal hEvent As Integer,ByVal lpCallBackProc As Integer,ByVal dwUser As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.39


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdLvSetSamplingConfig (hDeviceHandle: Integer;ulChNo:Integer;ulSmplNum: Integer;fSmplFreq: Single;ulRange: Integer;hEvent:Integer;lpCallBackProc: LPADCALLBACK;dwUser:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChNoサンプリングを 行 うチャンネルを 指 定 します。 指 定 できるチャンネルは 1 つのみです。ulSmplNumサンプリングを 行 う 件 数 を 指 定 します。fSmplFreqサンプリング 周 波 数 を 指 定 します。設 定 できるサンプリング 周 波 数 は 50Hz、60Hz、250Hz、500Hz です。ulRangeサンプリングを 行 うチャンネルのレンジを 指 定 します。設 定 できるレンジは 次 の 通 りです。識 別 子意 味AD_1P25V電 圧 バイポーラ ±1.25VAD_0P125V電 圧 バイポーラ ±0.125VAD_0P156V電 圧 バイポーラ ±0.156VAD_0P625V電 圧 バイポーラ ±0.625VAD_1P25V_AC 電 圧 バイポーラ ±1.25V(AC カップリング 機 能 搭 載 )AD_0P156V_AC 電 圧 バイポーラ ±0.156V(AC カップリング 機 能 搭 載 )AD_0P625V_AC 電 圧 バイポーラ ±0.625V(AC カップリング 機 能 搭 載 )AD_0_1P25V電 圧 ユニポーラ 0~1.25VAD_0_0P125V 電 圧 ユニポーラ 0~0.125VAD_0_0P156V 電 圧 ユニポーラ 0~0.156VAD_0_0P625V 電 圧 ユニポーラ 0~0.625VhEventサンプリング 停 止 時 にシグナル 状 態 に 設 定 されるイベントを 識 別 します。イベント 通 知 を 行 わない 場 合 には、C 言 語 では NULL,Visual Basic では 0,Delphi では nil© 2000, 2014 Interface Corporation. All rights reserved.40


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.41


<strong>GPC</strong>-<strong>3100</strong> Help for WindowslpCallBackProcサンプリング 停 止 時 に 呼 び 出 すユーザ・コールバック 関 数 のアドレスを 指 定 します。ユーザ・コールバック 関 数 の 呼 び 出 しを 行 わない 場 合 には、C 言 語 では NULL,Visual Basicでは 0,Delphi では nil を 指 定 してください。dwUserユーザ・コールバック 関 数 へ 引 き 渡 すユーザ・データを 指 定 します。ユーザ・コールバック 関 数 の 呼 び 出 しを 行 わない 場 合 には、0 を 指 定 してください。【 戻 り 値 】AdLvSetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・サンプリング 中 に 本 関 数 を 実 行 することはできません。・ 本 関 数 で 設 定 するサンプリング 条 件 は AdLvStartSampling 関 数 によるサンプリングで 使 用します。・ 本 関 数 でサンプリング 条 件 を 設 定 した 後 に AdSetSamplingConfig 関 数 で 同 じチャンネルの設 定 を 変 更 した 場 合 、レンジ、サンプリング 周 波 数 が 変 更 されます。・ 設 定 を 変 更 しない AD サンプリング 構 造 体 のメンバにはデフォルト 値 を 設 定 して 下 さい。デフォルト 値 は 設 定 の 変 更 を 行 う 前 に AdLvGetSamplingConfig 関 数 により 取 得 できます。・ 製 品 によって 使 用 する 外 部 トリガ、 外 部 クロックの 端 子 がことなりますので、 端 子 の 一 覧 をHelp.htm にてを 参 照 してください。【 対 象 製 品 】下 記 対 象 製 品 一 覧 で 記 載 されていない 型 式 では、 本 関 数 を 使 用 することができません。製 品 型 式PCI-3179CTP-3179CPZ-3179AC カップリング 機 能-○○【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvSetSamplingConfig ( hDeviceHandle,1,1000,50.0,IFCAD_ANY.AD_1P25V,hEvent,CallBackProc,0);© 2000, 2014 Interface Corporation. All rights reserved.42


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvSetSamplingConfig (hDeviceHandle,1,1000,50.0,IFCAD_ANY.AD_1P25V,hEvent,CallBackProc,0)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdLvSetSamplingConfig (hDeviceHandle,1,1000,50.0,IFCAD.AD_1P25V,hEvent,CallBackProc,0);デバイスハンドル hDeviceHandle のデバイスのサンプリング 条 件 を 以 下 の 通 り 設 定 します。チャンネル 番 号 :1サンプリング 件 数 :1000 件サンプリング 周 波 数 :50Hzレンジ:±1.25Vイベント 通 知 :ありコールバック 関 数 :ありコールバック 関 数 への 引 数 :0© 2000, 2014 Interface Corporation. All rights reserved.43


<strong>GPC</strong>-<strong>3100</strong> Help for Windows13. AdLvGetSamplingConfig【 機 能 】デバイスのサンプリング 条 件 を 設 定 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingConfig (IntPtr hDeviceHandle,out uint ulChNo,out uint ulSmplNum,out float pSmplFreq,out uint ulRange);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingConfig (uinthDeviceHandle,out uint ulChNo,out uint ulSmplNum,out float pSmplFreq,out uint ulRange);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvGetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByVal ulSmplNum As Integer,ByVal fSmplFreq As Single,ByVal ulRange As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvGetSamplingConfig Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByVal ulSmplNum As Integer,ByVal fSmplFreq As Single,ByVal ulRange As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.44


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdLvGetSamplingConfig (hDeviceHandle: Integer;ulChNo:Integer;var ulSmplNum: Integer;var fSmplFreq: Single;var ulRange: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChNoサンプリング 条 件 を 取 得 するチャンネル 番 号 を 指 定 します。 指 定 できるチャンネルは 一 つのみですulSmplNumサンプリングを 行 う 件 数 を 格 納 する 変 数 へのポインタを 指 定 します。fSmplFreqサンプリング 周 波 数 を 格 納 する 変 数 へのポインタを 指 定 します。ulRangeサンプリングを 行 うチャンネルのレンジを 格 納 する 変 数 へのポインタを 指 定 します。【 戻 り 値 】AdLvGetSamplingConfig 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 対 象 製 品 】下 記 対 象 製 品 一 覧 で 記 載 されていない 型 式 では、 本 関 数 を 使 用 することができません。製 品 型 式PCI-3179CTP-3179CPZ-3179AC カップリング 機 能-○○© 2000, 2014 Interface Corporation. All rights reserved.45


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvGetSamplingConfig (hDeviceHandle,1,&ulSmplNum,&fSmplFreq,&ulRange);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvGetSamplingConfig (hDeviceHandle,1,ulSmplNum,fSmplFreq,ulRange)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdLvGetSamplingConfig (hDeviceHandle,1,ulSmplNum,fSmplFreq,ulRange);デバイスハンドル hDeviceHandle のデバイスから 各 種 サンプリング 条 件 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.46


<strong>GPC</strong>-<strong>3100</strong> Help for Windows14. AdAllocateSamplingBuffer【 機 能 】デバイスのサンプリングバッファを 確 保 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdAllocateSamplingBuffer (IntPtr hDeviceHandle);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdAllocateSamplingBuffer (uint hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdAllocateSamplingBuffer Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdAllocateSamplingBuffer Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer)As Integer●Delphi 8(x86 専 用 )class function AdAllocateSamplingBuffer (hDeviceHandle: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdAllocateSamplingBuffer 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.47


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdAllocateSamplingBuffer ( hDeviceHandle );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdAllocateSamplingBuffer (hDeviceHandle)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdAllocateSamplingBuffer (hDeviceHandle);デバイスハンドル hDeviceHandle のデバイスでサンプリングバッファを 確 保 してから 連 続 サンプリングを 開 始 します。© 2000, 2014 Interface Corporation. All rights reserved.48


<strong>GPC</strong>-<strong>3100</strong> Help for Windows15. AdGetSamplingData【 機 能 】デバイスから 入 力 されたサンプリングデータを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (IntPtr hDeviceHandle,out byte pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (IntPtr hDeviceHandle,out ushort pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (IntPtr hDeviceHandle,out uint pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (IntPtr hDeviceHandle,byte[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (IntPtr hDeviceHandle,ushort[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (IntPtr hDeviceHandle,uint[] pSmplData,© 2000, 2014 Interface Corporation. All rights reserved.49


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsref uint);*ulSmplNum© 2000, 2014 Interface Corporation. All rights reserved.50


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (uinthDeviceHandle,out byte pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (uinthDeviceHandle,out ushort pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (uinthDeviceHandle,out uint pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (uinthDeviceHandle,byte[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (uinthDeviceHandle,ushort[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdGetSamplingData (uinthDeviceHandle,uint[] pSmplData,ref uint *ulSmplNum);© 2000, 2014 Interface Corporation. All rights reserved.51


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Integer,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Byte,ByRef UlSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Short,ByRef UlSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Integer,ByRef ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.52


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86 専 用 )Declare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Integer,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Byte,ByRef UlSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Short,ByRef UlSmplNum As Integer)As IntegerDeclare Function AdGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Integer,ByRef ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.53


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdGetSamplingData (hDeviceHandle: Integer;var pSmplData: BYTE;var ulSmplNum Integer): Integer; overload; static;class function AdGetSamplingData (hDeviceHandle: Integer;var pSmplData: WORD;var ulSmplNum Cardinal): Integer; overload; static;class function AdGetSamplingData (hDeviceHandle: Integer;var pSmplData: Integer;var ulSmplNum Cardinal): Integer; overload; static;class function AdGetSamplingData (hDeviceHandle: Integer;pSmplData: array of BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdGetSamplingData (hDeviceHandle: Integer;pSmplData: array of WORD;var ulSmplNum Cardinal): Integer; overload; static;class function AdGetSamplingData (hDeviceHandle: Integer;pSmplData: array of Integer;var ulSmplNum Cardinal): Integer; overload; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pSmplDataデバイスから 取 得 するサンプリングデータを 格 納 するためのバッファへのポインタを 指定 します。© 2000, 2014 Interface Corporation. All rights reserved.54


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulSmplNumデバイスから 取 得 するサンプリングデータ 件 数 が 格 納 されている 変 数 へのポインタを 指定 します。希 望 する 件 数 を 指 定 して 本 関 数 を 呼 び 出 します。 本 関 数 呼 び 出 し 後 、 実 際 に 取 得 したデータ 件 数 が 格 納 されます。【 戻 り 値 】AdGetSamplingData 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】本 関 数 ではサンプリングバッファからデータを 取 得 したら、 取 得 したデータはサンプリングバッファ 内 からクリアされます。PCI-3153 を FIFO 方 式 で 使 用 される 場 合 について<strong>GPC</strong>-<strong>3100</strong> Ver1.41-26 以 前 のバージョンで、PCI-3153 を FIFO 方 式 で 使 用 した 場 合 には、サンプリングデータの 上 位 3bit に 汎 用 入 力 と FIFO 状 態 の 情 報 が 付 加 されていました。しかし、 現 在 のバージョンでは 付 加 されなくなりました。 汎 用 入 力 と FIFO 状 態 の 情 報 が 必 要な 場 合 は、AdFifoGetSamplingData 関 数 をご 使 用 ください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetSamplingData(hDeviceHandle, pSmplData, &ulSmplNum );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetSamplingData ( hDeviceHandle, pSmplData, &ulSmplNum )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdGetSamplingData ( hDeviceHandle, pSmplData, ulSmplNum );デバイスハンドル hDeviceHandle のデバイス( 分 解 能 を 12bit または 16bit と 仮 定 )から 入 力 した 256 件 ×3 チャンネル 分 のサンプリングデータ( 各 2 バイト)をバッファ(pSmplData)に格 納 します。 実 際 に 取 得 したデータ 件 数 が ulSmplNum に 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.55


<strong>GPC</strong>-<strong>3100</strong> Help for Windows16. AdBmGetSamplingData【 機 能 】デバイスから 入 力 されたサンプリングデータを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPTr hDeviceHandle,out byte pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPTr hDeviceHandle,out ushort pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPTr hDeviceHandle,out uint pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPTr hDeviceHandle,byte[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPTr hDeviceHandle,ushort[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPTr hDeviceHandle,uint[] pSmplData,© 2000, 2014 Interface Corporation. All rights reserved.56


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsref uint);*ulSmplNum© 2000, 2014 Interface Corporation. All rights reserved.57


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPtr hDeviceHandle,out byte pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPtr hDeviceHandle,out ushort pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPtr hDeviceHandle,out uint pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPtr hDeviceHandle,byte[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPtr hDeviceHandle,ushort[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdBmGetSamplingData (IntPtr hDeviceHandle,uint[] pSmplData,ref uint *ulSmplNum);© 2000, 2014 Interface Corporation. All rights reserved.58


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Declare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPTr,ByRef pSmplData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPTr,ByRef pSmplData As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPTr,ByRef pSmplData As Integer,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPTr,ByRef pSmplData() As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPTr,ByRef pSmplData() As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPTr,ByRef pSmplData() As Integer,ByRef ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.59


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86 専 用 )Declare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Integer,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdBmGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Integer,ByRef ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.60


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdBmGetSamplingData (hDeviceHandle: Integer;var pSmplData: BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdBmGetSamplingData (hDeviceHandle: Integer;var pSmplData: WORD;var ulSmplNum Cardinal): Integer; overload; static;class function AdBmGetSamplingData (hDeviceHandle: Integer;var pSmplData: Integer;var ulSmplNum Cardinal): Integer; overload; static;class function AdBmGetSamplingData (hDeviceHandle: Integer;pSmplData: array of BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdBmGetSamplingData (hDeviceHandle: Integer;pSmplData: array of WORD;var ulSmplNum Cardinal): Integer; overload; static;class function AdBmGetSamplingData (hDeviceHandle: Integer;pSmplData: array of Integer;var ulSmplNum Cardinal): Integer; overload; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pSmplDataデバイスから 取 得 するサンプリングデータを 格 納 するためのバッファへのポインタを 指定 します。© 2000, 2014 Interface Corporation. All rights reserved.61


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulSmplNumデバイスから 取 得 するサンプリングデータ 件 数 が 格 納 されている 変 数 へのポインタを 指定 します。希 望 する 件 数 を 指 定 して 本 関 数 を 呼 び 出 します。 本 関 数 呼 び 出 し 後 、 実 際 に 取 得 したデータ 件 数 が 格 納 されます。【 戻 り 値 】AdBmGetSamplingData 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet=IFCAD_ANY.AdBmGetSamplingData(hDeviceHandle,pSmplData, &SmplNum );●Visual Basic .NET(x86、x64 共 用 )nRet=IFCAD_ANY.AdBmGetSamplingData(hDeviceHandle,pSmplData, &SmplNum )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdBmGetSamplingData ( hDeviceHandle, pSmplData, ulSmplNum );デバイスハンドル hDeviceHandle のデバイス( 分 解 能 を 12bit または 16bit と 仮 定 )から 入 力 した 256 件 ×3 チャンネル 分 のサンプリングデータ( 各 2 バイト)をバッファ(pSmplData)に格 納 します。 実 際 に 取 得 したデータ 件 数 が ulSmplNum に 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.62


<strong>GPC</strong>-<strong>3100</strong> Help for Windows17. AdFifoGetSamplingData【 機 能 】デバイスから 入 力 されたサンプリングデータを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (IntPTr hDeviceHandle,out byte pSmplData,ref byte pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (IntPTr hDeviceHandle,out ushort pSmplData,ref byte pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (IntPTr hDeviceHandle,out uint pSmplData,ref byte pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (IntPTr hDeviceHandle,byte[] pSmplData,byte[] pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (IntPTr hDeviceHandle,ushort[] pSmplData,byte[] pDiData,ref uint *ulSmplNum);© 2000, 2014 Interface Corporation. All rights reserved.63


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.64


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (IntPTr hDeviceHandle,uint[] pSmplData,byte[] pDiData,ref uint *ulSmplNum);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (uint hDeviceHandle,out byte pSmplData,ref byte pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (uint hDeviceHandle,out ushort pSmplData,ref byte pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (uint hDeviceHandle,out uint pSmplData,ref byte pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (uint hDeviceHandle,byte[] pSmplData,byte[] pDiData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (uint hDeviceHandle,ushort[] pSmplData,byte[] pDiData,© 2000, 2014 Interface Corporation. All rights reserved.65


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsref uint);*ulSmplNum© 2000, 2014 Interface Corporation. All rights reserved.66


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdFifoGetSamplingData (uint hDeviceHandle,uint[] pSmplData,byte[] pDiData,ref uint *ulSmplNum);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Byte,ByRef pDiData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Short,ByRef pDiData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Integer,ByRef pDiData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Byte,ByRef pDiData() As Byte,ByRef UlSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Short,ByRef pDiData() As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,© 2000, 2014 Interface Corporation. All rights reserved.67


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsByRef pSmplData() As Integer,ByRef pDiData() As Byte,ByRef ulSmplNum As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Byte,ByRef pDiData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Short,ByRef pDiData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Integer,ByRef pDiData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Byte,ByRef pDiData() As Byte,ByRef UlSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Short,ByRef pDiData() As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdFifoGetSamplingDataLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Integer,ByRef pDiData() As Byte,ByRef ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.68


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.69


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdFifoGetSamplingData (hDeviceHandle: Integer;var pSmplData: BYTE;var pDiData: BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdFifoGetSamplingData (hDeviceHandle: Integer;var pSmplData: WORD;var pDiData: BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdFifoGetSamplingData (hDeviceHandle: Integer;var pSmplData: Integer;var pDiData: BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdFifoGetSamplingData (hDeviceHandle: Integer;pSmplData: array of BYTE;pDiData: array of BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdFifoGetSamplingData (hDeviceHandle: Integer;pSmplData: array of WORD;pDiData: array of BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdFifoGetSamplingData (hDeviceHandle: Integer;pSmplData: array of Integer;pDiData: array of BYTE;var ulSmplNum Cardinal): Integer; overload; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.70


<strong>GPC</strong>-<strong>3100</strong> Help for WindowspSmplDataデバイスから 取 得 するサンプリングデータを 格 納 するためのバッファへのポインタを 指定 します。pDiDataデバイスから 取 得 するデジタルデータを 格 納 するためのバッファへのポインタを 指 定 します。ulSmplNumデバイスから 取 得 するサンプリングデータ 件 数 が 格 納 されている 変 数 へのポインタを 指定 します。希 望 する 件 数 を 指 定 して 本 関 数 を 呼 び 出 します。 本 関 数 呼 び 出 し 後 、 実 際 に 取 得 したデータ 件 数 が 格 納 されます。【 戻 り 値 】AdFifoGetSamplingData 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet=IFCAD_ANY.AdFifoGetSamplingData(DeviceHandle,pSmplData,pDiData, &SmplNum);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdFifoGetSamplingData ( hDeviceHandle, pSmplData, pDiData,&ulSmplNum )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdFifoGetSamplingData ( hDeviceHandle, pSmplData, pDiData, ulSmplNum );デバイスハンドル hDeviceHandle のデバイス( 分 解 能 を 12bit と 仮 定 )から 入 力 した 256 件 ×3チャンネル 分 のサンプリングデータ( 各 2 バイト)をバッファ(pSmplData)に、デジタルデータをバッファ(pDiData)に 格 納 します。 実 際 に 取 得 したデータ 件 数 が ulSmplNum に 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.71


<strong>GPC</strong>-<strong>3100</strong> Help for Windows18. AdLvGetSamplingData【 機 能 】デバイスから AdLvStartSampling 関 数 で 入 力 されたサンプリングデータを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (IntPtr hDeviceHandle,uint ulChNo,ref byte pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (IntPtr hDeviceHandle,uintulChNo,ref ushort pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (IntPtr hDeviceHandle,uint ulChNo,ref uint pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (IntPtr hDeviceHandle,uint ulChNo,byte[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (IntPtr hDeviceHandle,uint ulChNo,ushort[] pSmplData,ref uint *ulSmplNum);© 2000, 2014 Interface Corporation. All rights reserved.72


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.73


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (IntPtr hDeviceHandle,uint ulChNo,uint[] pSmplData,ref uint *ulSmplNum);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (uint hDeviceHandle,uint ulChNo,ref byte pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (uinthDeviceHandle,uintulChNo,ref ushort pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (uint hDeviceHandle,uint ulChNo,ref uint pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (uint hDeviceHandle,uint ulChNo,byte[] pSmplData,ref uint *ulSmplNum);[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (uint hDeviceHandle,uint ulChNo,ushort[] pSmplData,© 2000, 2014 Interface Corporation. All rights reserved.74


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsref uint);*ulSmplNum© 2000, 2014 Interface Corporation. All rights reserved.75


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdLvGetSamplingData (uint hDeviceHandle,uint ulChNo,uint[] pSmplData,ref uint *ulSmplNum);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef pSmplData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef pSmplData As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef pSmplData As Integer,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef pSmplData() As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef pSmplData() As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,© 2000, 2014 Interface Corporation. All rights reserved.76


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsByVal ulChNo As Integer,ByRef pSmplData() As Integer,ByRef ulSmplNum As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef pSmplData As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef pSmplData As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef pSmplData As Integer,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef pSmplData() As Byte,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef pSmplData() As Short,ByRef ulSmplNum As Integer)As IntegerDeclare Function AdLvGetSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef pSmplData() As Integer,ByRef ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.77


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdLvGetSamplingData (hDeviceHandle: Integer;ulChNo:Integer;var pSmplData: BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdLvGetSamplingData (hDeviceHandle: Integer;ulChNo:Integer;var pSmplData: WORD;var ulSmplNum Cardinal): Integer; overload; static;class function AdLvGetSamplingData (hDeviceHandle: Integer;ulChNo:Integer;var pSmplData: Integer;var ulSmplNum Cardinal): Integer; overload; static;class function AdLvGetSamplingData (hDeviceHandle: Integer;ulChNo:Integer;pSmplData: array of BYTE;var ulSmplNum Cardinal): Integer; overload; static;class function AdLvGetSamplingData (hDeviceHandle: Integer;ulChNo:Integer;pSmplData: array of WORD;var ulSmplNum Cardinal): Integer; overload; static;class function AdLvGetSamplingData (hDeviceHandle: Integer;ulChNo:Integer;pSmplData: array of Integer;var ulSmplNum Cardinal): Integer; overload; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.78


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulChNoデータを 取 得 するチャンネル 番 号 を 指 定 します。pSmplDataデバイスから 取 得 するサンプリングデータを 格 納 するためのバッファへのポインタを 指定 します。© 2000, 2014 Interface Corporation. All rights reserved.79


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulSmplNumデバイスから 取 得 するサンプリングデータ 件 数 が 格 納 されている 変 数 へのポインタを 指定 します。希 望 する 件 数 を 指 定 して 本 関 数 を 呼 び 出 します。 本 関 数 呼 び 出 し 後 、 実 際 に 取 得 したデータ 件 数 が 格 納 されます。【 戻 り 値 】AdLvGetSamplingData 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3179, CTP-3179, CPZ-3179 でのみ 使 用 可 能 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvGetSamplingData(hDeviceHandle,pSmplData, &SmplNum );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvGetSamplingData(hDeviceHandle, pSmplData, &SmplNum )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdLvGetSamplingData ( hDeviceHandle, pSmplData, ulSmplNum );デバイスハンドル hDeviceHandle のデバイス( 分 解 能 を 12bit または 16bit と 仮 定 )から 入 力 した 256 件 ×3 チャンネル 分 のサンプリングデータ( 各 2 バイト)をバッファ(pSmplData)に格 納 します。 実 際 に 取 得 したデータ 件 数 が ulSmplNum に 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.80


<strong>GPC</strong>-<strong>3100</strong> Help for Windows19. AdReadSamplingBuffer【 機 能 】デバイスから 入 力 されたサンプリングデータを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (IntPtr hDeviceHandle,uint lOffset,ref uint ulSmplNum,out byte pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (IntPtr hDeviceHandle,uint lOffset,ref uint ulSmplNum,out ushort pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (IntPtr hDeviceHandle,uint lOffset,ref uint ulSmplNum,out uint pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (IntPtr hDeviceHandle,uint lOffset,ref uint ulSmplNum,byte[] pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (IntPtr hDeviceHandle,uint lOffset,ref uint ulSmplNum,ushort[] pSmplData);© 2000, 2014 Interface Corporation. All rights reserved.81


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.82


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (IntPtr hDeviceHandle,uint lOffset,ref uint ulSmplNum,uint[] pSmplData);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (uint hDeviceHandle,uint lOffset,ref uint ulSmplNum,out byte pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (uint hDeviceHandle,uint lOffset,ref uint ulSmplNum,out ushort pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (uint hDeviceHandle,uint lOffset,ref uint ulSmplNum,out uint pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (uint hDeviceHandle,uint lOffset,ref uint ulSmplNum,byte[] pSmplData);[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (uint hDeviceHandle,uint lOffset,ref uint ulSmplNum,© 2000, 2014 Interface Corporation. All rights reserved.83


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsushort[]);pSmplData© 2000, 2014 Interface Corporation. All rights reserved.84


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdReadSamplingBuffer (uint hDeviceHandle,uint lOffset,ref uint ulSmplNum,uint[] pSmplData);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData As Byte)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData As Short)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData As Integer)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData() As Byte)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData() As Short)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,© 2000, 2014 Interface Corporation. All rights reserved.85


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData() As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData As Byte)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData As Short)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData As Integer)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData() As Byte)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData() As Short)As IntegerDeclare Function AdReadSamplingBuffer"FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal lOffset As Integer,ByRef ulSmplNum As Integer,ByRef pSmplData() As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.86


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.87


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdReadSamplingBuffer (hDeviceHandle: Integer;lOffset; Cardinal;var ulSmplNum; Cardinal;var pSmplData: BYTE): Integer; overload; static;class function AdReadSamplingBuffer (hDeviceHandle: Integer;lOffset; Cardinal;var ulSmplNum; Cardinal;var pSmplData: WORD): Integer; overload; static;class function AdReadSamplingBuffer (hDeviceHandle: Integer;lOffset; Cardinal;var ulSmplNum; Cardinal;var pSmplData: Integer): Integer; overload; static;class function AdReadSamplingBuffer (hDeviceHandle: Integer;lOffset; Cardinal;var ulSmplNum; Cardinal;pSmplData: array of BYTE): Integer; overload; static;class function AdReadSamplingBuffer (hDeviceHandle: Integer;lOffset; Cardinal;var ulSmplNum; Cardinal;pSmplData: array of WORD): Integer; overload; static;class function AdReadSamplingBuffer (hDeviceHandle: Integer;lOffset; Cardinal;var ulSmplNum; Cardinal;pSmplData: array of Integer): Integer; overload; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.88


<strong>GPC</strong>-<strong>3100</strong> Help for WindowslOffsetサンプリングバッファ 内 のサンプリングデータを 取 得 開 始 するオフセットアドレスを 指定 します。アドレスは 件 数 単 位 で 指 定 します。-1 を 指 定 した 場 合 、 最 新 の ulSmplNum 件 数 分 のデータを 取 得 できます。ulSmplNumサンプリングバッファから 取 得 するサンプリングデータ 件 数 が 格 納 されている 変 数 へのポインタを 指 定 します。希 望 する 件 数 を 指 定 して 本 関 数 を 呼 び 出 します。 本 関 数 呼 び 出 し 後 、 実 際 に 取 得 したデータ 件 数 が 格 納 されます。pSmplDataサンプリングバッファから 取 得 するサンプリングデータを 格 納 するためのバッファへのポインタを 指 定 します。【 戻 り 値 】AdReadSamplingBuffer 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdReadSamplingBuffer(hDeviceHandle, 100, &ulSmplNum, pSmplData);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdReadSamplingBuffer(hDeviceHandle, 100, ulSmplNum, SmplData(0,0))●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdReadSamplingBuffer(hDeviceHandle, 100, ulSmplNum, pSmplData);デバイスハンドル hDeviceHandle のデバイス( 分 解 能 を 12bit または 16bit と 仮 定 )のサンプリングバッファからデータを 取 得 します。 取 得 するデータはサンプリングバッファ 内 の 101 件 目から 256 件 分 のサンプリングデータです。 実 際 に 取 得 したデータ 件 数 が ulSmplNum に 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.89


<strong>GPC</strong>-<strong>3100</strong> Help for Windows20. AdClearSamplingData【 機 能 】サンプリングバッファ 内 のサンプリングデータをクリアします。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdClearSamplingData (IntPtr hDeviceHandle);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdClearSamplingData (uint hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdClearSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdClearSamplingData Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer)As Integer●Delphi 8(x86 専 用 )class function AdClearSamplingData (hDeviceHandle: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdClearSamplingData 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.90


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdClearSamplingData ( hDeviceHandle );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdClearSamplingData (hDeviceHandle)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdClearSamplingData (hDeviceHandle);デバイスハンドル hDeviceHandle のデバイスのサンプリングバッファ 内 のサンプリングデータをクリアします。© 2000, 2014 Interface Corporation. All rights reserved.91


<strong>GPC</strong>-<strong>3100</strong> Help for Windows21. AdStartSampling【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdStartSampling (IntPtr hDeviceHandle,uint ulSyncFlag);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdStartSampling (uint hDeviceHandle,uint ulSyncFlag);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulSyncFlag As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulSyncFlag As Integer)As Integer●Delphi 8(x86 専 用 )class function AdStartSampling (hDeviceHandle: Integer;ulSyncFlag: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulSyncFlagサンプリング 処 理 を 同 期 で 行 うか 非 同 期 で 行 うかを 指 定 します。フラグ意 味© 2000, 2014 Interface Corporation. All rights reserved.92


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsFLAG_SYNCFLAG_ASYNC同 期 処 理 でサンプリングを 行 います。非 同 期 処 理 でサンプリングを 行 います。【 戻 り 値 】AdStartSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdStartSampling ( hDeviceHandle, IFCAD_ANY.FLAG_SYNC );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdStartSampling (hDeviceHandle, IFCAD_ANY.FLAG_SYNC)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdStartSampling (hDeviceHandle, FLAG_SYNC);デバイスハンドル hDeviceHandle のデバイスの 連 続 サンプリングを 同 期 処 理 として 開 始 します。© 2000, 2014 Interface Corporation. All rights reserved.93


<strong>GPC</strong>-<strong>3100</strong> Help for Windows22. AdBmStartSampling【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。指 定 したバッファに 直 接 DMA 転 送 を 行 います。(バスマスタ 方 式 のデバイスのみ 使 用 できます)【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (IntPtr hDeviceHandle,out byte pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (IntPtr hDeviceHandle,out ushort pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (IntPtr hDeviceHandle,out uint pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (IntPtr hDeviceHandle,byte[] pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (IntPtr hDeviceHandle,ushort[] pSmplData,uintulSize);© 2000, 2014 Interface Corporation. All rights reserved.94


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (IntPtr hDeviceHandle,uint[] pSmplData,uintulSize);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (uinthDeviceHandle,out byte pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (uinthDeviceHandle,out ushort pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (uinthDeviceHandle,out uint pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (uinthDeviceHandle,byte[] pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (uinthDeviceHandle,ushort[] pSmplData,uintulSize);[DllImport("FbiAd.dll")]public static extern int AdBmStartSampling (uinthDeviceHandle,© 2000, 2014 Interface Corporation. All rights reserved.95


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsuint[]uint);pSmplData,ulSize© 2000, 2014 Interface Corporation. All rights reserved.96


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Declare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Byte,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Short,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData As Integer,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Byte,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Short,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef pSmplData() As Integer,ByVal ulSize As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.97


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86 専 用 )Declare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Byte,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Short,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData As Integer,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Byte,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Short,ByVal ulSize As Integer)As IntegerDeclare Function AdBmStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef pSmplData() As Integer,ByVal ulSize As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.98


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdBmStartSampling (hDeviceHandle: Integer;var pSmplData: BYTE;ulSizeInteger): Integer; overload; static;class function AdBmStartSampling (hDeviceHandle: Integer;var pSmplData: WORD;ulSizeCardinal): Integer; overload; static;class function AdBmStartSampling (hDeviceHandle: Integer;var pSmplData: Integer;ulSizeCardinal): Integer; overload; static;class function AdBmStartSampling (hDeviceHandle: Integer;pSmplData: array of BYTE;ulSizeCardinal): Integer; overload; static;class function AdBmStartSampling (hDeviceHandle: Integer;pSmplData: array of WORD;ulSizeCardinal): Integer; overload; static;class function AdBmStartSampling (hDeviceHandle: Integer;pSmplData: array of Integer;ulSizeCardinal): Integer; overload; static;© 2000, 2014 Interface Corporation. All rights reserved.99


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。pSmplDataデバイスから 取 得 するサンプリングデータを 格 納 するためのバッファへのポインタを 指定 します。ulSizeアナログ 入 力 デバイスから 取 得 するサンプリングデータのバッファサイズを 指 定 します。【 戻 り 値 】AdGetSamplingData 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・PCI/CTP/CPZ-3525,LPC/PEX-320724 以 外 のデバイスでは 偶 数 チャンネルでのみ 使 用 できます。・PCI/CTP/CPZ-3525 の 注 意 事 項通 常 モード 使 用 時 : 偶 数 チャンネルでのみ 使 用 できます。倍 速 モード 使 用 時 : 1 チャンネルでのみ 使 用 できます。倍 速 モードを 使 用 する 場 合 には、チャンネル 1 のみを 使 用 します。実 際 のサンプリング 周 波 数 は 設 定 した 周 波 数 の 2 倍 になります。サンプリング 件 数 、ディレイ 件 数 は 偶 数 件 単 位 での 指 定 になります。設 定 できるイベント 通 知 件 数 は、2 のべき 乗 の 2 倍 の 値 になります。・ 本 関 数 は、プリトリガディレイ 機 能 はサポートしておりません。・ 本 関 数 は、ステータス 付 加 機 能 はサポートしておりません。よって、AdSetSamplingConfig/AdBmSetSamplingConfig 関 数 でディレイとしてプリトリガを 設 定 しないください。・ 本 関 数 は、ステータス 付 加 機 能 はサポートしておりません。よって、AdBmSetSamplingConfig 関 数 でステータス 付 加 を 設 定 しないください。・DMA バッファについては、サンプリング 件 数 × 繰 り 返 し 回 数 × 1 件 のデータサイズ× チャンネル 数 のバッファを 用 意 するようにしてください。もし、バッファサイズがたりない 場 合 には、オーバーランエラーが 発 生 しますのでサンプリングを 行 う 件 数 だけのバッファを 指 定 してください。・AdSetBoardConfig 関 数 にてイベントの 登 録 を 行 い 非 同 期 処 理 でサンプリングを 行 った 場 合 、指 定 したサンプリング 件 数 ×リピート 回 数 の 処 理 が 終 了 したら、サンプリング 終 了 のイベントを 発 行 します。・ 本 関 数 は 非 同 期 で 処 理 を 行 います。・サンプリング 済 件 数 、サンプリングステータスは、AdGetStatus 関 数 で 確 認 を 行 います。© 2000, 2014 Interface Corporation. All rights reserved.100


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdBmStartSampling ( hDeviceHandle, pSmplData, ulSize );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdBmStartSampling ( hDeviceHandle, pSmplData, ulSize)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD. AdBmStartSampling ( hDeviceHandle, pSmplData, ulSize );© 2000, 2014 Interface Corporation. All rights reserved.101


<strong>GPC</strong>-<strong>3100</strong> Help for Windows23. AdStartFileSampling【 機 能 】デバイスからのサンプリングデータをデータファイルに 書 き 込 みながら 連 続 サンプリングを行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdStartFileSampling (IntPtr hDeviceHandle,string pszPathName,uint ulFileFlag);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdStartFileSampling (uint hDeviceHandle,string pszPathName,uint ulFileFlag);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdStartFileSamplingLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal pszPathName As String,ByVal ulFileFlag As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdStartFileSamplingLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal pszPathName As String,ByVal ulFileFlag As Integer)As Integer●Delphi 8(x86 専 用 )class function AdStartFileSampling (hDeviceHandle: Integer;pszPathName: String;ulFileFlag: Cardinal): Integer; static;【パラメータ】hDeviceHandle© 2000, 2014 Interface Corporation. All rights reserved.102


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.103


<strong>GPC</strong>-<strong>3100</strong> Help for WindowspszPathNameデータファイルへのパスを 指 定 します。ulFileFlagデータファイルの 形 式 を 指 定 します。フラグ意 味FLAG_BIN バイナリ 形 式 でデータを 書 き 込 みます。FLAG_CSV CSV 形 式 ( 物 理 量 )でデータを 書 き 込 みます。【 戻 り 値 】AdStartFileSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdStartFileSampling ( hDeviceHandle, "DATA.CSV",IFCAD_ANY.FLAG_CSV);●Visual Basic .NET(x86、x64 共 用 )Dim szPathName As StringpszFname = "DATA.CSV" & Chr(0)nRet = IFCAD_ANY.AdStartFileSampling (hDeviceHandle, szPathName ,IFCAD_ANY.FLAG_CSV)●Delphi 8varszPathName : array[0..15] of Char;StrCopy(pszPathName, 'DATA.CSV');nRet := IFCAD.AdStartFileSampling (hDeviceHandle, @szPathName , FLAG_CSV);デバイスハンドル hDeviceHandle のデバイスからのサンプリングデータを、データファイル'DATA.CSV'に CSV 形 式 で 書 き 込 みながら 連 続 サンプリングを 行 います。© 2000, 2014 Interface Corporation. All rights reserved.104


<strong>GPC</strong>-<strong>3100</strong> Help for Windows24. AdBmStartFileSampling【 機 能 】デバイスからのサンプリングデータをデータファイルに 書 き 込 みながら 連 続 サンプリングを行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdBmStartFileSampling (IntPtr hDeviceHandle,string pszPathName,uint ulFileFlag);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdBmStartFileSampling (uint hDeviceHandle,string pszPathName,uint ulFileFlag);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdBmStartFileSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal pszPathName As String,ByVal ulFileFlag As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdBmStartFileSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal pszPathName As String,ByVal ulFileFlag As Integer)As Integer●Delphi 8(x86 専 用 )class function AdBmStartFileSampling (hDeviceHandle: Integer;pszPathName: String;ulFileFlag: Cardinal): Integer; static;【パラメータ】hDeviceHandle© 2000, 2014 Interface Corporation. All rights reserved.105


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.106


<strong>GPC</strong>-<strong>3100</strong> Help for WindowspszPathNameデータファイルへのパスを 指 定 します。ulFileFlagデータファイルの 形 式 を 指 定 します。フラグ意 味FLAG_BIN バイナリ 形 式 でデータを 書 き 込 みます。FLAG_CSV CSV 形 式 ( 物 理 量 )でデータを 書 き 込 みます。【 戻 り 値 】AdBmStartFileSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdBmStartFileSampling ( hDeviceHandle, "DATA.CSV",IFCAD_ANY.FLAG_CSV);●Visual Basic .NET(x86、x64 共 用 )Dim szPathName As StringpszFname = "DATA.CSV" & Chr(0)nRet = IFCAD_ANY.AdBmStartFileSampling (hDeviceHandle, szPathName ,IFCAD_ANY.FLAG_CSV)●Delphi 8VarszPathName : array[0..15] of Char;StrCopy(pszPathName, 'DATA.CSV');nRet := IFCAD.AdBmStartFileSampling (hDeviceHandle, @szPathName , FLAG_CSV);デバイスハンドル hDeviceHandle のデバイスからのサンプリングデータを、データファイル'DATA.CSV'に CSV 形 式 で 書 き 込 みながら 連 続 サンプリングを 行 います。© 2000, 2014 Interface Corporation. All rights reserved.107


<strong>GPC</strong>-<strong>3100</strong> Help for Windows25. AdSyncSampling【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSyncSampling (IntPtr hDeviceHandle,uint ulMode);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSyncSampling (uint hDeviceHandle,uint ulMode);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSyncSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulMode As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSyncSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulMode As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSyncSampling (hDeviceHandle: Integer;ulMode:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.108


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulModeマスタで 使 用 するかスレーブで 使 用 するかを 指 定 します。次 の 識 別 子 のうちいずれか 1 つを 指 定 します。フラグ意 味AD_MASTER_MODEマスタモードAD_SLAVE_MODEスレーブモードCTP/CPZ 型 式 製 品 で 複 数 枚 同 期 サンプリング 機 能 を 使 用 する 場 合 、 同 期 番 号 の 設 定 が 必 要になります。上 記 に 加 え、 下 記 識 別 子 にて 同 期 番 号 も 同 時 に 指 定 します。AD_SYNC_NUM1 : 同 期 番 号 1AD_SYNC_NUM2 : 同 期 番 号 2AD_SYNC_NUM3 : 同 期 番 号 3AD_SYNC_NUM4 : 同 期 番 号 4AD_SYNC_NUM5 : 同 期 番 号 5AD_SYNC_NUM6 : 同 期 番 号 6AD_SYNC_NUM7 : 同 期 番 号 7I/O 方 式 サンプリング 時 には、7 つの 内 から 1 つの 番 号 を 指 定 します。その 他 のサンプリング 方 式 では 2 つの 番 号 を 指 定 します。 指 定 する 同 期 番 号 は、 同 期 を 行 う 型 式 内 で 全 て 同じ 番 号 を 指 定 します。※ 複 数 型 式 をそれぞれの 型 式 毎 に 同 期 を 行 う 場 合 、 異 なる 型 式 間 で 同 じ 同 期 番 号 を 使 用 しないでください。 同 じ 番 号 を 使 用 した 場 合 、 故 障 の 原 因 となります。設 定 例 )I/O 方 式 サンプリングで、 同 期 番 号 1 を 使 用 してマスタモードに 設 定 する 場 合 。ulMode = AD_MASTER_MODE + AD_SYNC_NUM1バスマスタ 方 式 サンプリングで、 同 期 番 号 2 と 3 を 使 用 してスレーブモードに 設 定 する 場合 。ulMode = AD_SLAVE_MODE+ AD_SYNC_NUM2 + AD_SYNC_NUM3サンプリング 処 理 を 同 期 で 行 うか 非 同 期 で 行 うかを 指 定 します。【 戻 り 値 】AdSyncSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 対 象 製 品 】対 象 製 品 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.109


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSyncSampling ( hDeviceHandle2,IFCAD_ANY.AD_SLAVE_MODE);nRet = IFCAD_ANY.AdSyncSampling ( hDeviceHandle1,IFCAD_ANY.AD_MASTER_MODE);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSyncSampling (hDeviceHandle2,IFCAD_ANY.AD_SLAVE_MODE)nRet = IFCAD_ANY.AdSyncSampling (hDeviceHandle1,IFCAD_ANY.AD_MASTER_MODE)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdSyncSampling (hDeviceHandle2, AD_SLAVE_MODE);nRet := IFCAD.AdSyncSampling (hDeviceHandle1, AD_MASTER_MODE);デバイスハンドル hDeviceHandle1 のデバイスをマスタに、デバイスハンドル hDeviceHandle2のデバイスをスレーブに 設 定 して 複 数 枚 同 期 サンプリングを 実 行 します。© 2000, 2014 Interface Corporation. All rights reserved.110


<strong>GPC</strong>-<strong>3100</strong> Help for Windows26. AdLvStartSampling【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvStartSampling (IntPtr hDeviceHandle,uint ulChNo);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvStartSampling (uint hDeviceHandle,uint ulChNo);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvStartSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer)As Integer●Delphi 8(x86 専 用 )class function AdLvStartSampling (hDeviceHandle: Integer;ulChNo:Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChNoサンプリングを 行 うチャンネル 番 号 を 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.111


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdLvStartSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3179, CTP-3179, CPZ-3179 でのみ 使 用 可 能 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvStartSampling(hDeviceHandle, 1);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvStartSampling(hDeviceHandle, 1)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdLvStartSampling (hDeviceHandle, 1);デバイスハンドル hDeviceHandle のデバイスのチャンネル 1 で 連 続 サンプリングを 開 始 します。© 2000, 2014 Interface Corporation. All rights reserved.112


<strong>GPC</strong>-<strong>3100</strong> Help for Windows27. AdStopSampling【 機 能 】AdStartSampling 関 数 を 非 同 期 処 理 でスタートさせたデバイスの 連 続 サンプリングを 停 止 させます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdStopSampling (IntPtr hDeviceHandle);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdStopSampling (uint hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdStopSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdStopSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer)As Integer●Delphi 8(x86 専 用 )class function AdStopSampling (hDeviceHandle: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdStopSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.113


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdStopSampling ( hDeviceHandle );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdStopSampling (hDeviceHandle)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdStopSampling (hDeviceHandle);デバイスハンドル hDeviceHandle のデバイスに 対 して、 即 サンプリングの 停 止 を 行 います。© 2000, 2014 Interface Corporation. All rights reserved.114


<strong>GPC</strong>-<strong>3100</strong> Help for Windows28. AdLvStopSampling【 機 能 】AdLvStartSampling 関 数 でスタートさせたデバイスの 連 続 サンプリングを 停 止 させます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvStopSampling (IntPtr hDeviceHandle,uint ulChNo);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvStopSampling (uint hDeviceHandle,uint ulChNo);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvStopSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvStopSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer)As Integer●Delphi 8(x86 専 用 )class function AdLvStopSampling (hDeviceHandle: Integer;ulChNo:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChNoサンプリングを 停 止 するチャンネル 番 号 を 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.115


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdLvStopSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvStopSampling ( hDeviceHandle, 1);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdLvStopSampling (hDeviceHandle, 1)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdLvStopSampling (hDeviceHandle, 1);デバイスハンドル hDeviceHandle のデバイスのチャンネル 1 で 連 続 サンプリングを 開 始 します。© 2000, 2014 Interface Corporation. All rights reserved.116


<strong>GPC</strong>-<strong>3100</strong> Help for Windows29. AdTriggerSampling【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdTriggerSampling (IntPtr HDeviceHandle,uint ulChNo,uint ulRange,uint ulSingleDiff,uint ulTriggerMode,uint ulTrigEdge,uint ulSmplNum);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdTriggerSampling (uint HDeviceHandle,uint ulChNo,uint ulRange,uint ulSingleDiff,uint ulTriggerMode,uint ulTrigEdge,uint ulSmplNum);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdTriggerSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByVal ulRange As Integer,ByVal ulSingleDiff As Integer,ByVal ulTriggerMode As Integer,ByVal ulTrigEdge As Integer,ByVal ulSmplNum As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.117


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86 専 用 )Declare Function AdTriggerSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByVal ulRange As Integer,ByVal ulSingleDiff As Integer,ByVal ulTriggerMode As Integer,ByVal ulTrigEdge As Integer,ByVal ulSmplNum As Integer)As Integer●Delphi 8(x86 専 用 )class function AdTriggerSampling (hDeviceHandle: Integer;ulChNo:Integer;ulRange:Integer;ulSingleDiff: Integer;ulTriggerMode: Integer;ulTrigEdge: Integer;ulSmplNum: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChNoアナログ 入 力 を 行 うチャンネルを 指 定 します。1 つのチャンネルのみ 指 定 できます。ulRangeアナログ 入 力 を 行 うチャンネルのレンジを 指 定 します。ulSingleDiffシングルエンド 入 力 / 差 動 入 力 を 指 定 します。ulTriggerModeトリガを 指 定 します。ulTrigEdge外 部 トリガの 極 性 を 指 定 します。ulSmplNumサンプリングを 行 う 件 数 を 1~1G 件 の 範 囲 で 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.118


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdTriggerSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdTriggerSampling ( hDeviceHandle,1,IFCAD_ANY.AD_5V,IFCAD_ANY.AD_INPUT_SINGLE,IFCAD_ANY.AD_EXTTRG,IFCAD_ANY.AD_DOWN_EDGE,1024);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdTriggerSampling (hDeviceHandle,1,IFCAD_ANY.AD_5V,IFCAD_ANY.AD_INPUT_SINGLE,IFCAD_ANY.AD_EXTTRG,IFCAD_ANY.AD_DOWN_EDGE,1024)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdTriggerSampling (hDeviceHandle,1,AD_5V,AD_INPUT_SINGLE,AD_EXTTRG,AD_DOWN_EDGE,1024);デバイスハンドル hDeviceHandle のデバイスのチャンネル 1、バイポーラ±5V、シングルエンド 入 力 、EXTRG IN の 立 ち 下 がりエッジでトリガサンプリングを 1024 件 行 います。© 2000, 2014 Interface Corporation. All rights reserved.119


<strong>GPC</strong>-<strong>3100</strong> Help for Windows30. AdMemTriggerSampling【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMemTriggerSampling (IntPtrhDeviceHandle,uintulChCount,ref ADSMPLCHREQ lpSmplChReq,uintulSmplNum,uintulRepeatCount,uintulTrigEdge,floatfSmplFreq,uintulEClkEdge,uintulFastMode);[DllImport("FbiAd.dll")]public static extern int AdMemTriggerSampling (IntPtrHDeviceHandle,uintulChCount,ADSMPLCHREQ[] lpSmplChReq,uintulSmplNum,uintulRepeatCount,uintulTrigEdge,floatfSmplFreq,uintulEClkEdge,uintulFastMode);●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMemTriggerSampling (uintHDeviceHandle,uintulChCount,ref ADSMPLCHREQ lpSmplChReq,uintulSmplNum,uintulRepeatCount,uintulTrigEdge,floatfSmplFreq,uintulEClkEdge,uintulFastMode);© 2000, 2014 Interface Corporation. All rights reserved.120


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdMemTriggerSampling (uintHDeviceHandle,uintulChCount,ADSMPLCHREQ[] lpSmplChReq,uintulSmplNum,uintulRepeatCount,uintulTrigEdge,floatfSmplFreq,uintulEClkEdge,uintulFastMode);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMemTriggerSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChCount As Integer,ByVal lpSmplChReq As Integer,ByVal ulSmplNum As Integer,ByVal ulRepeatCount As Integer,ByVal ulTrigEdge As Integer,ByVal fSmplFreq As Single,ByVal ulEClkEdge As Integer,ByVal ulFastMode As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMemTriggerSampling Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChCount As Integer,ByVal lpSmplChReq As Integer,ByVal ulSmplNum As Integer,ByVal ulRepeatCount As Integer,ByVal ulTrigEdge As Integer,ByVal fSmplFreq As Single,ByVal ulEClkEdge As Integer,ByVal ulFastMode As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.121


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdMemTriggerSampling (hDeviceHandle: Integer;ulChCount: Integer;lpSmplChReq: Integer;ulSmplNum: Integer;UlRepeatCount: Integer;ulTrigEdge: Integer;FSmplFreq: Single;ulEClkEdge: Integer;ulFastMode: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChCountサンプリングを 行 うチャンネルの 数 を 1~ 製 品 の 提 供 する 最 大 チャンネル 数 の 範 囲 で 指 定します。サンプリングするチャンネルは ADSMPLCHREQ 構 造 体 の nChNo メンバで 指 定 します。lpSmplChReqサンプリングを 行 うチャンネル 番 号 、レンジを 指 定 するための 構 造 体 配 列 (ADSMPLCHREQ構 造 体 )へのポインタを 指 定 します。チャンネル 番 号 はチャンネル 1 からの 連 番 で 指 定 します。ulSmplNum1 回 のサンプリング 件 数 を 指 定 します。ulRepeatCount指 定 件 数 のサンプリングの 繰 り 返 し 回 数 を 指 定 します。繰 り 返 し 回 数 は 1 ~{(1 回 のサンプリング 件 数 )×( 繰 り 返 し 回 数 )≦( 最 大 設 定 可 能サンプリング 件 数 )}になる 回 数 のみ 指 定 できます。ulTrigEdge外 部 トリガの 極 性 を 指 定 します。外 部 トリガ 極 性 の 指 定 は、 識 別 子 のうちいずれか 1 つを 指 定 します。識 別 子内 容AD_DOWN_EDGE 立 ち 下 がりエッジAD_UP_EDGE立 ち 上 がりエッジ© 2000, 2014 Interface Corporation. All rights reserved.122


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsfSmplFreqサンプリング 周 波 数 を 指 定 します。メモリ 方 式 製 品 では 以 下 の 周 波 数 のみ 指 定 できます。20,000,000Hz (PCI-3161 のみ 指 定 可 能 )16,000,000Hz (PCI-3161 のみ 指 定 可 能 )10,000,000Hz 8,000,000Hz5,000,000Hz 4,000,000Hz2,500,000Hz 2,000,000Hz1,250,000Hz 1,000,000Hz625,000Hz 500,000Hz312,500Hz 250,000Hz156,250Hz 125,000Hz78,125Hz 62,500Hz0.0Hz ( 外 部 クロック 使 用 時 )ulEClkEdge外 部 クロック 使 用 時 の 極 性 を 指 定 します。外 部 クロック 極 性 の 指 定 は、 識 別 子 のうちいずれか 1 つを 指 定 します。識 別 子内 容AD_DOWN_EDGE 立 ち 下 がりエッジAD_UP_EDGE立 ち 上 がりエッジulFastMode倍 速 モードの 指 定 をします。倍 速 モードはメモリ 方 式 製 品 のみ 指 定 できます。メモリ 方 式 以 外 の 製 品 では 通 常 モードを 指 定 してください。倍 速 モードの 指 定 は、 識 別 子 のうちいずれか 1 つを 指 定 します。識 別 子内 容AD_NORMAL_MODE通 常 モードで 使 用 するAD_FAST_MODE倍 速 モードで 使 用 する【 戻 り 値 】AdMemTriggerSampling 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 対 象 製 品 】対 象 製 品 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.123


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )IFCAD_ANY.ADSMPLCHREQ SmplChReq[2];SmplChReq[0].ulChNo = 1;SmplChReq[0].ulRange = IFCAD_ANY.AD_5V;SmplChReq[1].ulChNo = 2;SmplChReq[1].ulRange = IFCAD_ANY.AD_5V;nRet = IFCAD_ANY.AdMemTriggerSampling( hDeviceHandle,2,SmplChReq,1024,5,IFCAD_ANY.AD_DOWN_EDGE,625000,IFCAD_ANY.AD_DOWN_EDGE,IFCAD_ANY.AD_NORMAL_MODE );●Visual Basic .NET(x86、x64 共 用 )Dim SmplChReq(1) As IFCAD_ANY.ADSMPLCHREQSmplChReq(0).ulChNo = 1SmplChReq(0).ulRange = IFCAD_ANY.AD_5VSmplChReq(1).ulChNo = 2SmplChReq(1).ulRange = IFCAD_ANY.AD_5VnRet = IFCAD_ANY.AdMemTriggerSampling( hDeviceHandle,2,SmplChReq(0),1024,5,IFCAD_ANY.AD_DOWN_EDGE,625000,IFCAD_ANY.AD_DOWN_EDGE,IFCAD_ANY.AD_NORMAL_MODE )●Delphi 8nRet := IFCAD.AdMemTriggerSampling (hDeviceHandle,1, AD_5V,AD_INPUT_SINGLE,AD_EXTTRG,AD_DOWN_EDGE,1024);デバイスハンドル hDeviceHandle のデバイスのチャンネル 1、バイポーラ±5V、シングルエンド 入 力 、EXTRG IN の 立 ち 下 がりエッジでトリガサンプリングを 1024 件 行 います。© 2000, 2014 Interface Corporation. All rights reserved.124


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.125


<strong>GPC</strong>-<strong>3100</strong> Help for Windows31. AdGetStatus【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetStatus (IntPtr hDeviceHandle,out uint ulAdSmplStatus,out uint ulAdSmplCount,out uint ulAdAvailCount);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetStatus (uint hDeviceHandle,out uint ulAdSmplStatus,out uint ulAdSmplCount,out uint ulAdAvailCount);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetStatus Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef ulAdSmplStatus As Integer,ByRef ulAdSmplCount As Integer,ByRef ulAdAvailCount As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetStatus Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef ulAdSmplStatus As Integer,ByRef ulAdSmplCount As Integer,ByRef ulAdAvailCount As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetStatus (hDeviceHandle: Integer;var ulAdSmplStatus: Cardinal;var ulAdSmplCount: Cardinal;var ulAdAvailCount: Cardinal): Integer; static;© 2000, 2014 Interface Corporation. All rights reserved.126


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.127


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulAdSmplStatusAD サンプリング 状 態 を 格 納 する 変 数 へのポインタを 指 定 します。サンプリング 状 態 は 以 下 の 識 別 子 のいずれかが 格 納 されます。識 別 子状 態AD_STATUS_STOP_SAMPLINGサンプリングは 停 止 しています。AD_STATUS_WAIT_TRIGGERサンプリングはトリガ 待 ち 状 態 です。AD_STATUS_NOW_SAMPLINGサンプリング 動 作 中 です。ulAdSmplCountサンプリング 済 件 数 を 格 納 する 変 数 へのポインタを 指 定 します。アナログ 入 力 サンプリングのサンプリング 済 み 件 数 を 格 納 します。ulAdAvailCountサンプリング 残 件 数 を 格 納 する 変 数 へのポインタ 指 定 します。アナログ 入 力 サンプリングのサンプリングデータの 残 件 数 を 格 納 します。【 戻 り 値 】AdGetStatus 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )uint ulAdSmplStatus;uint ulAdSmplCount;uint ulAdAvailCount;nRet = IFCAD_ANY.AdGetStatus ( hDeviceHandle,&ulAdSmplStatus,&ulAdSmplCount,&ulAdAvailCount);●Visual Basic .NET(x86、x64 共 用 )Dim ulAdSmplStatus As LongDim ulAdSmplCount As LongDim ulAdAvailCount As LongnRet = IFCAD_ANY.AdGetStatus ( hDeviceHandle,ulAdSmplStatus,ulAdSmplCount,ulAdAvailCount)© 2000, 2014 Interface Corporation. All rights reserved.128


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8varulAdSmplStatus: Cardinal;ulAdSmplCount: Cardinal;ulAdAvailCount: Cardinal;nRet := IFCAD.AdGetStatus (hDeviceHandle,ulAdSmplStatus,ulAdSmplCount,ulAdAvailCount);デバイスハンドル hDeviceHandle のデバイスに 対 して、 現 在 のサンプリング 状 態 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.129


<strong>GPC</strong>-<strong>3100</strong> Help for Windows32. AdLvGetStatus【 機 能 】デバイスの 連 続 サンプリングをスタートさせます。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvGetStatus (IntPtr hDeviceHandle,uint ulChNo,out uint ulAdSmplStatus,out uint ulAdSmplCount,out uint ulAdAvailCount);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvGetStatus (uint hDeviceHandle,uint ulChNo,out uint ulAdSmplStatus,out uint ulAdSmplCount,out uint ulAdAvailCount);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvGetStatus Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef ulAdSmplStatus As Integer,ByRef ulAdSmplCount As Integer,ByRef ulAdAvailCount As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvGetStatus Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef ulAdSmplStatus As Integer,ByRef ulAdSmplCount As Integer,ByRef ulAdAvailCount As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.130


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8(x86 専 用 )class function AdLvGetStatus (hDeviceHandle: Integer;ulChNo:Cardinal;var ulAdSmplStatus: Cardinal;var ulAdSmplCount: Cardinal;var ulAdAvailCount: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChNoサンプリング 状 態 を 確 認 するチャンネル 番 号 を 指 定 して 下 さい。ulAdSmplStatusAD サンプリング 状 態 を 格 納 する 変 数 へのポインタを 指 定 します。サンプリング 状 態 は 以 下 の 識 別 子 のいずれかが 格 納 されます。識 別 子状 態AD_STATUS_STOP_SAMPLINGサンプリングは 停 止 しています。AD_STATUS_WAIT_TRIGGERサンプリングはトリガ 待 ち 状 態 です。AD_STATUS_NOW_SAMPLINGサンプリング 動 作 中 です。ulAdSmplCountサンプリング 済 件 数 を 格 納 する 変 数 へのポインタを 指 定 します。アナログ 入 力 サンプリングのサンプリング 済 み 件 数 を 格 納 します。ulAdAvailCountサンプリング 残 件 数 を 格 納 する 変 数 へのポインタ 指 定 します。アナログ 入 力 サンプリングのサンプリングデータの 残 件 数 を 格 納 します。【 戻 り 値 】AdLvGetStatus 関 数 は 正 常 に 終 了 するとAD_ERROR_SUCCESSを 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3179, CTP-3179, CTP-3179 でのみ 使 用 可 能 です。© 2000, 2014 Interface Corporation. All rights reserved.131


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )uint ulAdSmplStatus;uint ulAdSmplCount;uint ulAdAvailCount;nRet = IFCAD_ANY.AdLvGetStatus ( hDeviceHandle,1,&ulAdSmplStatus,&ulAdSmplCount,&ulAdAvailCount);●Visual Basic .NET(x86、x64 共 用 )Dim ulAdSmplStatus As LongDim ulAdSmplCount As LongDim ulAdAvailCount As LongnRet = IFCAD_ANY.AdLvGetStatus ( hDeviceHandle,1,ulAdSmplStatus,ulAdSmplCount,ulAdAvailCount)●Delphi 8varulAdSmplStatus: Cardinal;ulAdSmplCount: Cardinal;ulAdAvailCount: Cardinal;nRet := IFCAD.AdLvGetStatus (hDeviceHandle,1,ulAdSmplStatus,ulAdSmplCount,ulAdAvailCount);デバイスハンドル hDeviceHandle のデバイスに 対 して、 現 在 のサンプリング 状 態 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.132


<strong>GPC</strong>-<strong>3100</strong> Help for Windows33. AdInputAD【 機 能 】デバイスから 1 件 のアナログ 入 力 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdInputAD (IntPtrhDeviceHandle,uintulCh,uintulSingleDiff,ref ADSMPLCHREQ lpAdSmplChReq,out bytelpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (IntPtrhDeviceHandle,uintulCh,uintulSingleDiff,ref ADSMPLCHREQ lpAdSmplChReq,out ushortlpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (IntPtrhDeviceHandle,uintulCh,uintulSingleDiff,ref ADSMPLCHREQ lpAdSmplChReq,out uintlpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (IntPtrhDeviceHandle,uintulCh,uintulSingleDiff,ADSMPLCHREQ[] lpAdSmplChReq,byte[]lpData);© 2000, 2014 Interface Corporation. All rights reserved.133


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdInputAD (IntPtrhDeviceHandle,uintulCh,uintulSingleDiff,ADSMPLCHREQ[] lpAdSmplChReq,ushort[]lpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (IntPtrhDeviceHandle,uintulCh,uintulSingleDiff,ADSMPLCHREQ[] lpAdSmplChReq,uint[]lpData);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdInputAD (uinthDeviceHandle,uintulCh,uintulSingleDiff,ref ADSMPLCHREQ lpAdSmplChReq,out bytelpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (uinthDeviceHandle,uintulCh,uintulSingleDiff,ref ADSMPLCHREQ lpAdSmplChReq,out ushortlpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (uinthDeviceHandle,uintulCh,uintulSingleDiff,ref ADSMPLCHREQ lpAdSmplChReq,out uintlpData);© 2000, 2014 Interface Corporation. All rights reserved.134


<strong>GPC</strong>-<strong>3100</strong> Help for Windows[DllImport("FbiAd.dll")]public static extern int AdInputAD (uinthDeviceHandle,uintulCh,uintulSingleDiff,ADSMPLCHREQ[] lpAdSmplChReq,byte[]lpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (uinthDeviceHandle,uintulCh,uintulSingleDiff,ADSMPLCHREQ[] lpAdSmplChReq,ushort[]lpData);[DllImport("FbiAd.dll")]public static extern int AdInputAD (uinthDeviceHandle,uintulCh,uintulSingleDiff,ADSMPLCHREQ[] lpAdSmplChReq,uint[]lpData);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData As Byte)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData As Short)As Integer© 2000, 2014 Interface Corporation. All rights reserved.135


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData As Integer)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData() As Byte)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData() As Short)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData() As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData As Byte)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,© 2000, 2014 Interface Corporation. All rights reserved.136


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsByRef lpData As Short)As Integer© 2000, 2014 Interface Corporation. All rights reserved.137


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData As Integer)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData() As Byte)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData() As Short)As IntegerDeclare Function AdInputAD Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulCh As Integer,ByVal ulSingleDiff As Integer,ByRef lpAdSmplChReq As ADSMPLCHREQ,ByRef lpData() As Integer)As Integer●Delphi 8(x86 専 用 )class function AdInputAD (hDeviceHandle: Integer;ulCh:Cardinal;ulSingleDiff: Integer;var lpAdSmplChReq: ADSMPLCHREQ;var lpData:BYTE): Integer; overload; static;class function AdInputAD (hDeviceHandle: Integer;ulCh:Cardinal;ulSingleDiff: Integer;var lpAdSmplChReq: ADSMPLCHREQ;© 2000, 2014 Interface Corporation. All rights reserved.138


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsvar lpData:WORD): Integer; overload; static;© 2000, 2014 Interface Corporation. All rights reserved.139


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsclass function AdInputAD (hDeviceHandle: Integer;ulCh:Cardinal;ulSingleDiff: Integer;var lpAdSmplChReq: ADSMPLCHREQ;var lpData:Integer): Integer; overload; static;class function AdInputAD (hDeviceHandle: Integer;ulCh:Cardinal;ulSingleDiff: Integer;var lpAdSmplChReq: ADSMPLCHREQ;lpData:array of BYTE): Integer; overload; static;class function AdInputAD (hDeviceHandle: Integer;ulCh:Cardinal;ulSingleDiff: Integer;var lpAdSmplChReq: ADSMPLCHREQ;lpData:array of WORD): Integer; overload; static;class function AdInputAD (hDeviceHandle: Integer;ulCh:Integer;ulSingleDiff: Integer;var lpAdSmplChReq: ADSMPLCHREQ;lpData:array of Integer): Integer; overload; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChアナログ 入 力 を 行 うチャンネル 数 を 指 定 します。設 定 可 能 範 囲 は 1~その 製 品 のチャンネル 数 です。必 ず 1 以 上 の 値 を 指 定 してください。ulSingleDiffシングルエンド 入 力 / 差 動 入 力 を 指 定 します。識 別 子意 味AD_INPUT_SINGLE シングルエンド 入 力AD_INPUT_DIFF 差 動 入 力© 2000, 2014 Interface Corporation. All rights reserved.140


<strong>GPC</strong>-<strong>3100</strong> Help for WindowslpAdSmplChReqアナログ 入 力 を 行 うチャンネル 番 号 、レンジを 指 定 するための 構 造 体 配 列 (ADSMPLCHREQ構 造 体 )へのポインタを 指 定 します。lpDataアナログ 入 力 したデータを 格 納 する 位 置 へのポインタを 指 定 します。lpData が 指 す 位 置 にアナログ 入 力 データを 格 納 します。【 戻 り 値 】AdInputAD 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )WORD pData[4];IFCAD_ANY.ADSMPLCHREQ SmplChReq[4];SmplChReq[0].ulChNo = 1;SmplChReq[0].ulRange = IFCAD_ANY.AD_5V;SmplChReq[1].ulChNo = 3;SmplChReq[1].ulRange = IFCAD_ANY.AD_5V;SmplChReq[2].ulChNo = 5;SmplChReq[2].ulRange = IFCAD_ANY.AD_5V;SmplChReq[3].ulChNo = 7;SmplChReq[3].ulRange = IFCAD_ANY.AD_5V;nRet = IFCAD_ANY.AdInputAD ( hDeviceHandle, 4,IFCAD_ANY.AD_INPUT_SINGLE,&SmplChReq[0], pData);●Visual Basic .NET(x86、x64 共 用 )Dim Data(3) As IntegerDim SmplChReq(3) As IFCAD_ANY.ADSMPLCHREQSmplChReq(0).ulChNo = 1SmplChReq(0).ulRange = IFCAD_ANY.AD_5VSmplChReq(1).ulChNo = 3SmplChReq(1).ulRange = IFCAD_ANY.AD_5VSmplChReq(2).ulChNo = 5SmplChReq(2).ulRange = IFCAD_ANY.AD_5VSmplChReq(3).ulChNo = 7SmplChReq(3).ulRange = IFCAD_ANY.AD_5VnRet = IFCAD_ANY.AdInputAD ( hDeviceHandle, 4,IFCAD_ANY.AD_INPUT_SINGLE,SmplChReq(0), Data(0))© 2000, 2014 Interface Corporation. All rights reserved.141


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.142


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8varSmplChReq: array[0..3] of ADSMPLCHREQ;pData: Pointer;pData := AllocMem(SizeOf(Word) * 4 );SmplChReq[0].ulChNo := 1;SmplChReq[0].ulRange := AD_5V;SmplChReq[1].ulChNo := 3;SmplChReq[1].ulRange := AD_5V;SmplChReq[2].ulChNo := 5;SmplChReq[2].ulRange := AD_5V;SmplChReq[3].ulChNo := 7;SmplChReq[3].ulRange := AD_5V;nRet := IFCAD.AdInputAD (hDeviceHandle, 4, AD_INPUT_SINGLE, SmplChReq[0], pData);デバイスハンドル hDeviceHandle のデバイス(12bit)のチャンネル 1,3,5,7 に 対 して、アナログ 入 力 を 1 回 実 行 します。© 2000, 2014 Interface Corporation. All rights reserved.143


<strong>GPC</strong>-<strong>3100</strong> Help for Windows34. AdSetRangeEvent【 機 能 】デバイスのフルスケール 検 出 イベント 条 件 、 過 電 圧 入 力 時 自 動 レンジ 切 換 イベントの 設 定 を 行います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetRangeEvent (IntPtr HDeviceHandle,uint dwEventMask,uint dwStopMode);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetRangeEvent (uint HDeviceHandle,uint dwEventMask,uint dwStopMode);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetRangeEvent Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal dwEventMask As Integer,ByVal dwStopMode As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSetRangeEvent Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal dwEventMask As Integer,ByVal dwStopMode As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSetRangeEvent (hDeviceHandle: Integer;dwEventMask:Integer;dwStopMode:Integer): Integer; static;【パラメータ】hDeviceHandle© 2000, 2014 Interface Corporation. All rights reserved.144


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.145


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsdwEventMaskフルスケール 検 出 、 過 電 圧 入 力 時 自 動 レンジ 切 換 検 出 時 のイベント 発 生 条 件 を 指 定 します。bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0PM2 PM1 0 0 0 OV PFE NFEbit6~7 過 電 圧 保 護 入 力 時 自 動 レンジ 切 り 換 え 設 定0: 無 効1: 自 動 レンジ 切 り 換 え(±50V レンジ)2: 内 部 GND 接 続bit3~bit5 予 約bit2 過 電 圧 入 力 時 自 動 レンジ 切 換 検 出0:イベントを 発 生 させない1:イベントを 発 生 させるbit1 ポジティブフルスケール 検 出0:イベントを 発 生 させない1:イベントを 発 生 させるbit0 ネガティブフルスケール 検 出0:イベントを 発 生 させない1:イベントを 発 生 させるdwStopModeフルスケール 検 出 、 過 電 圧 入 力 時 自 動 レンジ 切 換 検 出 時 のサンプリング 停 止 条 件 を 指 定 します。bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0PM2 PM1 0 0 0 OV PFS NFSbit31~3 予 約bit2 過 電 圧 入 力 時 自 動 レンジ 切 換 検 出0:サンプリングを 停 止 しない1:サンプリングを 停 止 するbit1 ポジティブフルスケール 検 出0:サンプリングを 停 止 しない1:サンプリングを 停 止 するbit0 ネガティブフルスケール 検 出0:サンプリングを 停 止 しない1:サンプリングを 停 止 する【 戻 り 値 】AdSetRangeEvent 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 対 象 製 品 】対 象 製 品 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.146


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetRangeEvent ( hDeviceHandle, 0x0001, 0x0002);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetRangeEvent ( hDeviceHandle, &H0001, &H0002)●Delphi 8VarnRet := IFCAD.AdSetRangeEvent (hDeviceHandle, $0001, $0002);デバイスハンドル hDeviceHandle のデバイスのフルスケール 検 出 イベント 条 件 を 設 定 します。© 2000, 2014 Interface Corporation. All rights reserved.147


<strong>GPC</strong>-<strong>3100</strong> Help for Windows35. AdResetRangeEvent【 機 能 】フルスケール 検 出 イベントをリセットします。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdResetRangeEvent (IntPtr hDeviceHandle);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdResetRangeEvent (uint hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdResetRangeEvent Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdResetRangeEvent Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer)As Integer●Delphi 8(x86 専 用 )class function AdResetRangeEvent (hDeviceHandle: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdResetRangeEvent 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 対 象 製 品 】対 象 製 品 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.148


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdResetRangeEvent ( hDeviceHandle );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdResetRangeEvent (hDeviceHandle)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdResetRangeEvent (hDeviceHandle);デバイスハンドル hDeviceHandle のデバイスのフルスケール 検 出 イベントをリセットします。© 2000, 2014 Interface Corporation. All rights reserved.149


<strong>GPC</strong>-<strong>3100</strong> Help for Windows36. AdGetRangeEventStatus【 機 能 】デバイスのフルスケール 検 出 イベントのステータスを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetRangeEventStatus (IntPtr hDeviceHandle,uint[] ulEventChNo,uint[] ulEventStatus);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetRangeEventStatus (uint hDeviceHandle,uint[] ulEventChNo,uint[] ulEventStatus);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetRangeEventStatus Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef ulEventChNo As Integer,ByRef ulEventStatus As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetRangeEventStatus Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef ulEventChNo As Integer,ByRef ulEventStatus As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetRangeEventStatus (hDeviceHandle:Integer;var ulEventChNo: Cardinal;var ulEventStatus: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.150


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulEventChNoフルスケールが 検 出 されたチャンネルを 格 納 する 配 列 へのポインタを 指 定 します。ulEventStatus検 出 された 状 態 を 格 納 する 配 列 へのポインタを 指 定 します。以 下 の 識 別 子 のいずれかが 格 納 されます。識 別 子状 態AD_STATUS_POSITIVE_FULL_SCALEポジティブフルスケールが 検 出 されています。AD_STATUS_NEGATIVE_FULL_SCALEネガティブフルスケールが 検 出 されています。【 戻 り 値 】AdGetRangeEventStatus 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetRangeEventStatus ( hDeviceHandle,ulEventChNo,ulEventStatus );●Visual Basic .NETnRet = IFCAD_ANY.AdGetRangeEventStatus (hDeviceHandle,ulEventChNo(0),ulEventStatus(0))●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdGetRangeEventStatus(hDeviceHandle,@ulEventChNo[0],@ulEventStatus[0]);デバイスハンドル hDeviceHandle のデバイスの 外 部 出 力 制 御 設 定 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.151


<strong>GPC</strong>-<strong>3100</strong> Help for Windows37. AdGetOverRangeChStatus【 機 能 】デバイスの 過 電 圧 入 力 時 自 動 レンジ 切 換 イベントのステータスを 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetOverRangeChStatus (IntPtr hDeviceHandle,out uint ulChStatus);[DllImport("FbiAd.dll")]public static extern int AdGetOverRangeChStatus (IntPtr hDeviceHandle,uint[] ulChStatus);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetOverRangeChStatus (uint hDeviceHandle,out uint ulChStatus);[DllImport("FbiAd.dll")]public static extern int AdGetOverRangeChStatus (uint hDeviceHandle,uint[] ulChStatus);●Visual Basic .NET(x86、x64 共 用 )Declare Function Lib "fbiad.dll" AdGetOverRangeChStatus (ByVal hDeviceHandle As IntPtr,ByRef ulChStatus As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function Lib "fbiad.dll" AdGetOverRangeChStatus (ByVal hDeviceHandle As Integer,ByRef ulChStatus As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetOverRangeChStatus (© 2000, 2014 Interface Corporation. All rights reserved.152


<strong>GPC</strong>-<strong>3100</strong> Help for WindowshDeviceHandle:var ulChStatus:): Integer; static;Integer;Cardinal【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChStatus各 チャンネルのレンジ 状 態 を 格 納 する 配 列 へのポインタを 指 定 します。以 下 の 識 別 子 のいずれかが 格 納 されます。識 別 子状 態AD_STATUS_OVPM_NORMAL設 定 したレンジの 状 態AD_STATUS_OVPM_HIGH_RANGE自 動 レンジ 切 り 換 え(±50V)もしくは 内 部GND 接 続 の 状 態【 戻 り 値 】AdGetOverRangeChStatus 関 数 は 正 常 に 終 了 するとAD_ERROR_SUCCESSを 返 します。それ 以 外 の 場合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )uint ulEventStatus[16];nRet = IFCAD_ANY.AdGetOverRangeChStatus ( hDeviceHandle, ulEventStatus );●Visual Basic .NET(x86、x64 共 用 )Dim ulEventStatus(0 to 15) As LongnRet = IFCAD_ANY.AdGetOverRangeChStatus (hDeviceHandle, ulEventStatus(0))●Delphi 8hDeviceHandle: Integer;ulEventStatus : array[0..15] of Cardinal;nRet := IFCAD.AdGetOverRangeChStatus (hDeviceHandle, @ulEventStatus[0] );デバイスハンドル hDeviceHandle のデバイスに 対 して、 現 在 のフルスケール 検 出 イベントのステータスを 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.153


<strong>GPC</strong>-<strong>3100</strong> Help for Windows38. AdResetOverRangeCh【 機 能 】デバイスの 過 電 圧 入 力 時 自 動 レンジ 切 換 イベントのステータスをリセットします。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdResetOverRangeCh (IntPtr hDeviceHandle);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdResetOverRangeCh (uint hDeviceHandle);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdResetOverRangeChLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdResetOverRangeChLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer)As Integer●Delphi 8(x86 専 用 )class function AdResetOverRangeCh (hDeviceHandle: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdResetOverRangeCh 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.154


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdResetOverRangeCh ( hDeviceHandle );●Visual Basic .NETnRet = IFCAD_ANY.AdResetOverRangeCh (hDeviceHandle)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdResetOverRangeCh (hDeviceHandle);デバイスハンドル hDeviceHandle のデバイスの 過 電 圧 入 力 時 自 動 レンジ 切 換 イベントのステータスをリセットします。© 2000, 2014 Interface Corporation. All rights reserved.155


<strong>GPC</strong>-<strong>3100</strong> Help for Windows39. AdLvCalibration【 機 能 】デバイスのオートキャリブレーション( 較 正 )を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdLvCalibration (IntPtr HDeviceHandle,uint ulChNo,uint ulCalibration);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdLvCalibration (uint HDeviceHandle,uint ulChNo,uint ulCalibration);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdLvCalibration Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByVal ulCalibration As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdLvCalibration Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByVal ulCalibration As Integer)As Integer●Delphi 8(x86 専 用 )class function AdLvCalibration (hDeviceHandle: Integer;ulChNo:Integer;ulCalibration: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.156


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulChNo較 正 を 行 うチャンネルを 指 定 します。 指 定 できるチャンネルは 一 つのみです。ulCalibrationデバイスの 較 正 方 法 を 指 定 します。識 別 子AD_SELF_CALIBRATIONAD_ZEROSCALE_CALIBRATIONAD_FULLSCALE_CALIBRATION意 味AD コンバータ 内 で 自 己 較 正 を 行 います。外 部 より 0V を 入 力 して 較 正 を 行 います。(システム 較 正 )外 部 より 指 定 したレンジのフルスケール 電 圧 を 入力 して 較 正 を 行 います。(システム 較 正 )【 戻 り 値 】AdLvCalibration 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3179, CTP-3179, CPZ-3179 でのみ 使 用 可 能 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )自 己 較 正 の 場 合nRet = IFCAD_ANY.AdLvCalibration( hDeviceHandle, 1,IFCAD_ANY.AD_SELF_CALIBRATION );システム 較 正 の 場 合0V を 入 力 してから 実 行nRet = IFCAD_ANY.AdLvCalibration( hDeviceHandle, 1,IFCAD_ANY.AD_ZEROSCALE_CALIBRATION);フルスケール 電 圧 を 入 力 してから 実 行nRet = IFCAD_ANY.AdLvCalibration( hDeviceHandle, 1,IFCAD_ANY.AD_FULLSCALE_CALIBRATION);●Visual Basic .NET(x86、x64 共 用 )自 己 較 正 の 場 合nRet = IFCAD_ANY.AdLvCalibration( hDeviceHandle, 1,IFCAD_ANY.AD_SELF_CALIBRATION )システム 較 正 の 場 合0V を 入 力 してから 実 行nRet = IFCAD_ANY.AdLvCalibration( hDeviceHandle, 1,IFCAD_ANY.AD_ZEROSCALE_CALIBRATION)フルスケール 電 圧 を 入 力 してから 実 行© 2000, 2014 Interface Corporation. All rights reserved.157


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsnRet = IFCAD_ANY.AdLvCalibration( hDeviceHandle, 1,IFCAD_ANY.AD_FULLSCALE_CALIBRATION)© 2000, 2014 Interface Corporation. All rights reserved.158


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8hDeviceHandle: Integer;自 己 較 正 の 場 合nRet := IFCAD.AdLvCalibration( hDeviceHandle, 1, AD_SELF_CALIBRATION );システム 較 正 の 場 合0V を 入 力 してから 実 行nRet := IFCAD.AdLvCalibration( hDeviceHandle, 1, AD_ZEROSCALE_CALIBRATION);フルスケール 電 圧 を 入 力 してから 実 行nRet := IFCAD.AdLvCalibration( hDeviceHandle, 1, AD_FULLSCALE_CALIBRATION);デバイスハンドル hDeviceHandle のデバイスのチャンネル 1 の 較 正 を 行 います。© 2000, 2014 Interface Corporation. All rights reserved.159


<strong>GPC</strong>-<strong>3100</strong> Help for Windows40. AdMeasureTemperature【 機 能 】デバイスの 内 部 コネクタ 付 近 の 温 度 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMeasureTemperature (IntPtr hDeviceHandle,out float fTemperature);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdMeasureTemperature (uint hDeviceHandle,out float fTemperature);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMeasureTemperature Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef fTemperature As Single)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMeasureTemperature Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef fTemperature As Single)As Integer●Delphi 8(x86 専 用 )class function AdMeasureTemperature (hDeviceHandle:Integer;var fTemperature: As Single): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。fTemperature温 度 (℃)を 格 納 する 変 数 へのポインタを 指 定 します。【 戻 り 値 】© 2000, 2014 Interface Corporation. All rights reserved.160


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAdMeasureTemperature 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3179, CTP-3179, CPZ-3179 でのみ 使 用 可 能 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdMeasureTemperature ( hDeviceHadle, &fTemperature );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdMeasureTemperature ( hDeviceHadle, fTemperature )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdMeasureTemperature ( hDeviceHadle, fTemperature );デバイスハンドル hDeviceHandle のデバイスの 現 在 の 内 部 コネクタ 付 近 の 温 度 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.161


<strong>GPC</strong>-<strong>3100</strong> Help for Windows41. AdSetInterval【 機 能 】デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetInterval (IntPtr hDeviceHandle,uint ulInterval);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetInterval (uint hDeviceHandle,uint ulInterval);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetInterval Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulInterval As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSetInterval Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulInterval As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSetInterval (hDeviceHandle: Integer;ulInterval: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulIntervalインターバルタイマの 周 期 を 指 定 します。設 定 範 囲 は 1[µs]~16[s](16777215[µs])(0001h~FFFFFFh)となります。(1µs 単 位 )周 期 に 0 を 指 定 した 場 合 には、インターバルタイマが 停 止 します。© 2000, 2014 Interface Corporation. All rights reserved.162


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdSetInterval 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3525, CPZ-3525 でのみ 使 用 可 能 です。・ 本 関 数 で 指 定 したインターバルタイマの 周 期 は、サンプリング 開 始 条 件 でインターバルタイマを 選 択 したときに 使 用 されます。・ 指 定 した 周 期 毎 に、サンプリングが 開 始 されます。・ 開 始 条 件 にした 場 合 は、AdStartSampling 関 数 を 実 行 してから 指 定 した 周 期 後 にサンプリングを 開 始 します。・ 終 了 条 件 にした 場 合 は、AdStartSampling 関 数 を 実 行 してから 指 定 した 周 期 後 にサンプリングを 終 了 させます。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetInterval ( hDeviceHandle, 1000);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetInterval (hDeviceHandle, 1000)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdSetInterval (hDeviceHandle, 1000);デバイスハンドル hDeviceHandle のデバイスのインターバルタイマを 1ms に 設 定 します© 2000, 2014 Interface Corporation. All rights reserved.163


<strong>GPC</strong>-<strong>3100</strong> Help for Windows42. AdGetInterval【 機 能 】デバイスの 現 在 設 定 されているインターバルタイマ 周 期 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetInterval (IntPtr hDeviceHandle,out uint ulInterval);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetInterval (uint hDeviceHandle,out uint ulInterval);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetInterval Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef ulInterval As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetInterval Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef ulInterval As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetInterval (hDeviceHandle:Integer;var ulInterval: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulIntervalインターバルタイマの 周 期 を 取 得 する 変 数 へのポインタを 指 定 します。設 定 範 囲 は 1[µs]~16[s](16777215[µs])(0001h~FFFFFFh)となります。(1µs 単 位 )周 期 が 0 場 合 には、インターバルタイマが 停 止 していることを 表 します。© 2000, 2014 Interface Corporation. All rights reserved.164


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdGetInterval 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3525, CPZ-3525 でのみ 使 用 可 能 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetInterval ( hDeviceHandle, &ulInterval);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetInterval (hDeviceHandle, ulInterval)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdGetInterval (hDeviceHandle, ulInterval);デバイスハンドル hDeviceHandle のデバイスからインターバルタイマ 設 定 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.165


<strong>GPC</strong>-<strong>3100</strong> Help for Windows43. AdSetFunction【 機 能 】デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetFunction (IntPtr hDeviceHandle,uint ulChNo,uint ulFunction);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetFunction (uint hDeviceHandle,uint ulChNo,uint ulFunction);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetFunction Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByVal ulFunction As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSetFunction Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByVal ulFunction As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSetFunction (hDeviceHandle: Integer;ulChNo:Cardinal;ulFunction: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.166


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulChNo機 能 設 定 を 行 うコネクタ 番 号 を 指 定 します。 指 定 の 範 囲 は 以 下 の 通 りです。PCI-3525,CPZ-3525 の 場 合3 または 4 を 指 定 します。CPZ-360810 の 場 合識 別 子AD_DIN_DOUT1AD_DIN_DOUT2AD_DIN_DOUT3AD_DIN_DOUT4AD_DIN_DOUT5LPC/PEX-320724 の 場 合識 別 子AD_EX_DIO1PCI-361812 の 場 合識 別 子AD_EX_DIO1AD_EX_DIO2AD_EX_DIO3AD_EX_DIO4AD_EX_DIO5AD_EX_DIO6AD_EX_DIO7AD_EX_DIO8説 明CN4CN5CN6 10pinCN6 11pinCN6 12pin説 明CN3説 明19pin20pin21pin22pin43pin44pin45pin46pinulFunctionulChNo で 指 定 したコネクタの 機 能 を 指 定 します。設 定 機 能 は、 下 記 の 識 別 子 で 指 定 されます。PCI-3525,CPZ-3525 の 場 合識 別 子AD_CN_FREEAD_CN_EXTRG_INAD_CN_EXTRG_OUTAD_CN_EXINT_INAD_CN_EXCLK_OUTAD_CN_EXINT_INAD_CN_ATRG_OUTAD_CN_DIAD_CN_DOAD_CN_EXSMP1_OUT説 明コネクタ 未 使 用外 部 トリガ 入 力外 部 トリガ 出 力外 部 クロック 入 力外 部 クロック 出 力外 部 割 り 込 み 入 力アナログトリガ 出 力汎 用 デジタル 入 力汎 用 デジタル 出 力外 部 サンプリング 状 態 1 出 力© 2000, 2014 Interface Corporation. All rights reserved.167


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_CN_EXSMP2_OUT 外 部 サンプリング 状 態 2 出 力AD_CN_OPEN オープン 状 態 (CN4 のみ 有 効 )CPZ-360810 の 場 合識 別 子AD_CN_FREEAD_CN_EXTRG_INAD_CN_EXTRG_OUTAD_CN_EXINT_INAD_CN_EXCLK_OUTAD_CN_EXINT_INAD_CN_ATRG_OUTLPC/PEX-320724 の 場 合識 別 子AD_CN_FREEAD_CN_EXTRG_INAD_CN_EXCLK_INPCI-361812 の 場 合識 別 子AD_CN_FREEAD_CN_DIOAD_CN_CONTROL説 明コネクタ 未 使 用外 部 トリガ 入 力外 部 トリガ 出 力外 部 クロック 入 力外 部 クロック 出 力外 部 割 り 込 み 入 力アナログトリガ 出 力説 明コネクタ 未 使 用外 部 トリガ 入 力外 部 クロック 入 力説 明コネクタ 未 使 用汎 用 入 出 力制 御 信 号【 戻 り 値 】AdSetFunction 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3525, CTP/CPZ-3525, CTP/CPZ-360810, LPC/PEX-320724, PCI-361812 でのみ使 用 可 能 です。© 2000, 2014 Interface Corporation. All rights reserved.168


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsPCI-3525, CPZ-3525 の 場 合・ 汎 用 入 出 力 の 状 態 は 以 下 のようになります。CN3 で AD_CN_DI(AD_CN_DO)を 設 定 した 場 合 は IN1(OUT1)となります。CN4 で AD_CN_DI(AD_CN_DO)を 設 定 した 場 合 は IN2(OUT2)となります。・CN3 と CN4 では、 両 方 同 じデジタル 信 号 に 設 定 することはできません。・デフォルトでは 未 使 用 (AD_CN_FREE)の 状 態 になります。・DA 側 のドライバ(<strong>GPC</strong>-3300)で、コネクタ 設 定 を DA_CN_FREE 以 外 にしている 場 合 には、AD_ERROR_USED_DA が 戻 り 値 として 返 されます。・ 外 部 サンプリング 状 態 1 出 力 は、スタートトリガ 発 行 からストップトリガ 検 出 までの 状 態 を出 力 します。繰 り 返 し 回 数 設 定 時 以 下 のようになります。ソフトスタートソフトストップアナログトリガ or 外 部 トリガサンプリングクロックサンプリング 回 数1 2 N 1 2 Nサンプリング 中外 部 サンプリング 状 態 1 出 力・ 外 部 サンプリング 状 態 2 出 力 は、 繰 り 返 し 回 数 設 定 時 、スタートトリガ 発 行 から 繰 り 替 えし回 数 終 了 時 までの 状 態 を 出 力 します。繰 り 返 し 回 数 設 定 時 以 下 のようになります。ソフトスタートソフトストップアナログトリガ or 外 部 トリガサンプリングクロックサンプリング 回 数1 2 N 1 2 Nサンプリング 中外 部 サンプリング 状 態 2 出 力CTP/CPZ-360810, LPC/PEX-320724, PCI-361812 の 場 合・デフォルトでは 未 使 用 (AD_CN_FREE)の 状 態 になります。© 2000, 2014 Interface Corporation. All rights reserved.169


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetFunction ( hDeviceHandle, 3,IFCAD_ANY.AD_CN_EXTRG_IN);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetFunction (hDeviceHandle, 3,IFCAD_ANY.AD_CN_EXTRG_IN)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdSetFunction (hDeviceHandle, 3, AD_CN_EXTRG_IN);デバイスハンドル hDeviceHandle のデバイスに 対 して、CN3 を EXTRG IN に 設 定 します。© 2000, 2014 Interface Corporation. All rights reserved.170


<strong>GPC</strong>-<strong>3100</strong> Help for Windows44. AdGetFunction【 機 能 】外 部 制 御 信 号 の 機 能 設 定 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetFunction (IntPtr hDeviceHandle,uint ulChNo,out uint ulInterval);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetFunction (uint hDeviceHandle,uint ulChNo,out uint ulInterval);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetFunction Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChNo As Integer,ByRef ulInterval As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetFunction Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChNo As Integer,ByRef ulInterval As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetFunction (hDeviceHandle: Integer;ulChNo:Cardinal;var ulInterval: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.171


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulChNo機 能 設 定 を 取 得 するコネクタ 番 号 を 指 定 します。 指 定 の 範 囲 は 以 下 の 通 りです。PCI-3525,CPZ-3525 の 場 合3 または 4 を 指 定 します。CPZ-360810 の 場 合識 別 子AD_DIN_DOUT1AD_DIN_DOUT2AD_DIN_DOUT3AD_DIN_DOUT4AD_DIN_DOUT5LPC/PEX-320724 の 場 合識 別 子AD_EX_DIO1PCI-361812 の 場 合識 別 子AD_EX_DIO1AD_EX_DIO2AD_EX_DIO3AD_EX_DIO4AD_EX_DIO5AD_EX_DIO6AD_EX_DIO7AD_EX_DIO8説 明CN4CN5CN6 10pinCN6 11pinCN6 12pin説 明CN3説 明19pin20pin21pin22pin43pin44pin45pin46pinulFunctionunCnNo で 指 定 したコネクタの 機 能 を 取 得 する 変 数 へのポインタを 指 定 します。設 定 機 能 は、 下 記 の 識 別 子 で 指 定 されます。PCI-3525,CPZ-3525 の 場 合識 別 子AD_CN_FREEAD_CN_EXTRG_INAD_CN_EXTRG_OUTAD_CN_EXINT_INAD_CN_EXCLK_OUTAD_CN_EXINT_INAD_CN_ATRG_OUTAD_CN_DIAD_CN_DOAD_CN_EXSMP1_OUTAD_CN_EXSMP2_OUT説 明コネクタ 未 使 用外 部 トリガ 入 力外 部 トリガ 出 力外 部 クロック 入 力外 部 クロック 出 力外 部 割 り 込 み 入 力アナログトリガ 出 力汎 用 デジタル 入 力汎 用 デジタル 出 力外 部 サンプリング 状 態 1 出 力外 部 サンプリング 状 態 2 出 力© 2000, 2014 Interface Corporation. All rights reserved.172


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_CN_OPEN オープン 状 態 (CN4 のみ 有 効 )CPZ-360810 の 場 合識 別 子AD_CN_FREEAD_CN_EXTRG_INAD_CN_EXTRG_OUTAD_CN_EXINT_INAD_CN_EXCLK_OUTAD_CN_EXINT_INAD_CN_ATRG_OUTLPC/PEX-320724 の 場 合識 別 子AD_CN_FREEAD_CN_EXTRG_INAD_CN_EXCLK_INPCI-361812 の 場 合識 別 子AD_CN_FREEAD_CN_DIOAD_CN_CONTROL説 明コネクタ 未 使 用外 部 トリガ 入 力外 部 トリガ 出 力外 部 クロック 入 力外 部 クロック 出 力外 部 割 り 込 み 入 力アナログトリガ 出 力説 明コネクタ 未 使 用外 部 トリガ 入 力外 部 クロック 入 力説 明コネクタ 未 使 用汎 用 入 出 力制 御 信 号【 戻 り 値 】AdGetFunction 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-3525, CTP/CPZ-3525, CTP/CPZ-360810, LPC/PEX-320724, PCI-361812 でのみ使 用 可 能 です。・AdSetFunstion 関 数 で 機 能 設 定 を 行 う 前 に、 本 関 数 を 実 行 した 場 合 にはデフォルト 値 を 取 得します。・PCI-3525, CPZ-3525 の 場 合・CN3 のデフォルトは 未 使 用 (AD_CN_FREE)の 状 態 になります。・CN3 で DA 側 でコネクタ 設 定 を DA_CN_FREE 以 外 にしている 場 合 には、 設 定 を 取 得 することはできず、 戻 り 値 にエラーが 返 されます。・CN4 のデフォルトはオープン(AD_CN_OPEN)の 状 態 になります。・CN4 で DA 側 で 出 力 中 の 場 合 には、 設 定 を 取 得 することはできず、 戻 り 値 にエラーが 返 されます。CTP/CPZ-360810, LPC/PEX-320724, PCI-361812 の 場 合・デフォルトは 未 使 用 (AD_CN_FREE)の 状 態 になります。© 2000, 2014 Interface Corporation. All rights reserved.173


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetFunction ( hDeviceHandle, 3, &ulFunction );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdGetFunction ( hDeviceHandle, 3, ulFunction )●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdGetFunction ( hDeviceHandle, 3, uFunction );デバイスハンドル hDeviceHandle のデバイスに 対 して、CN3 の 設 定 値 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.174


<strong>GPC</strong>-<strong>3100</strong> Help for Windows45. AdSetOutMode【 機 能 】デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetOutMode (IntPtr HDeviceHandle,uint ulExTrgMode,uint ulExClkMode);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetOutMode (uint HDeviceHandle,uint ulExTrgMode,uint ulExClkMode);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetOutMode Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulExTrgMode As Integer,ByVal ulExClkMode As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSetOutMode Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulExTrgMode As Integer,ByVal ulExClkMode As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSetOutMode (hDeviceHandle: Integer;ulExTrgMode: Cardinal;ulExClkMode: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.175


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulExTrgMode外 部 トリガ 出 力 条 件 を 外 部 トリガ 出 力 条 件 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。外 部 トリガ 出 力 は、 下 記 の 識 別 子 で 指 定 されます。識 別 子意 味AD_DISABLE 外 部 トリガ 出 力 なし(デフォルト)AD_TRIG_MODE トリガタイミングAD_BUSY_MODE サンプリングステータスAD_POST_MODE ポストトリガタイミングulExClkMode外 部 クロック 出 力 条 件 を 外 部 クロック 出 力 条 件 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。外 部 クロック 出 力 は、 下 記 の 識 別 子 で 指 定 されます。識 別 子意 味AD_DISABLE 外 部 クロック 出 力 なし(デフォルト)AD_ENABLE 外 部 クロック 出 力 有 効【 戻 り 値 】AdSetOutMode 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は CSI-320110, CBI-320110, CBI-320110TK, CBI-320110TL, CSI-360112, CBI-360112,CBI-360112TR, CBI-360112TK, CBI-360112TL, CSI-360116, CBI-360116, CBI-360116TR,CBI-360116TK, CBI-360116TL, LPC-320910, LPC-321116, LPC-321216, LPC-361116,LPC-361216, PEX-320910, PEX-321116, PEX-321216, PEX-361116, PEX-361216, CPZ-360810でのみ 使 用 できます。・ 外 部 トリガ 出 力 は 以 下 の 動 作 になります。ソフトスタートトリガトリガタイミング(AD_TRIG_MODE)パルス 幅 200nsサンプリングステータス(AD_BUSY_MODE)ポストトリガタイミング(AD_POST_MODE)© 2000, 2014 Interface Corporation. All rights reserved.176


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.177


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・ 外 部 クロック 出 力 の 動 作 は 以 下 のようになります(サンプリングクロックが 内 部 クロックの 場 合 )内 部 クロック 設 定 80h 以 下200ns Low パルス内 部 クロック 設 定 7Fh 以 上そのまま 出 力(サンプリングクロックが 外 部 クロックの 場 合 )外 部 クロック 入 力外 部 クロック 出 力200ns Low パルス【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetOutMode(hDeviceHandle, AD_TRIG_MODE,IFCAD_ANY.AD_ENABLE);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetOutMode(hDeviceHandle, AD_TRIG_MODE,IFCAD_ANY.AD_ENABLE)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdSetOutMode (hDeviceHandle, AD_TRIG_MODE, AD_ENABLE);デバイスハンドル hDeviceHandle のデバイスの 外 部 出 力 信 号 を 以 下 の 設 定 に 行 います。外 部 トリガ 出 力 :トリガタイミング外 部 クロック 出 力 : 有 効© 2000, 2014 Interface Corporation. All rights reserved.178


<strong>GPC</strong>-<strong>3100</strong> Help for Windows46. AdGetOutMode【 機 能 】デバイスの 外 部 出 力 信 号 制 御 設 定 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetOutMode (IntPtr HDeviceHandle,out uint ulExTrgMode,out uint ulExClkMode);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetOutMode (uint HDeviceHandle,out uint ulExTrgMode,out uint ulExClkMode);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetOutMode Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef ulExTrgMode As Integer,ByRef ulExClkMode As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetOutMode Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef ulExTrgMode As Integer,ByRef ulExClkMode As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetOutMode (hDeviceHandle:Integer;var ulExTrgMode: Cardinal;var ulExClkMode: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.179


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulExTrgMode外 部 トリガ 出 力 条 件 を 外 部 トリガ 出 力 条 件 を 取 得 する 変 数 へのポインタを 指 定 しますulExClkMode外 部 クロック 出 力 条 件 を 外 部 クロック 出 力 条 件 を 取 得 する 変 数 へのポインタを 指 定 します【 戻 り 値 】AdGetOutMode 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は CSI-320110, CBI-320110, CBI-320110TK, CBI-320110TL, CSI-360112, CBI-360112,CBI-360112TR, CBI-360112TK, CBI-360112TL, CSI-360116, CBI-360116, CBI-360116TR,CBI-360116TK, CBI-360116TL, LPC-320910, LPC-321116, LPC-321216, LPC-361116,LPC-361216, PEX-320910, PEX-321116, PEX-321216, PEX-361116, PEX-361216, CPZ-360810でのみ 使 用 できます。【 使 用 例 】●Visual C# .NETnRet = IFCAD_ANY.AdGetOutMode(hDeviceHandle, &ulExTrgMode, &ulExClkMode);●Visual Basic .NETnRet = IFCAD_ANY.AdGetOutMode(hDeviceHandle, ulExTrgMode, ulExClkMode)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdGetOutMode (hDeviceHandle, ulExTrgMode, ulExClkMode);デバイスハンドル hDeviceHandle のデバイスの 外 部 出 力 制 御 設 定 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.180


<strong>GPC</strong>-<strong>3100</strong> Help for Windows47. AdSetFilter【 機 能 】アナログ 入 力 デバイスのデジタルフィルターの 設 定 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdSetFilter (IntPtr hDeviceHandle,uint ulFilter);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdSetFilter (uint hDeviceHandle,uint ulFilter);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdSetFilterLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulFilter As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdSetFilterLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulFilter As Integer)As Integer●Delphi 8(x86 専 用 )class function AdSetFilter (hDeviceHandle: Integer;ulFilter: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.181


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulFilterデジタルフィルター 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。デジタルフィルターは、 下 記 の 識 別 子 で 指 定 されます。識 別 子説 明AD_DF_8オーバーサンプリングレート:8AD_DF_16オーバーサンプリングレート:16AD_DF_32オーバーサンプリングレート:32AD_DF_64オーバーサンプリングレート:64AD_DF_128オーバーサンプリングレート:128AD_DF_256オーバーサンプリングレート:256【 戻 り 値 】AdSetFilter 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 はサンプリング 中 に 実 行 することはできません。・オーバーサンプリングレートの 詳 細 な 説 明 については、 製 品 のマニュアルを 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetFilter ( hDeviceHandle, IFCAD_ANY.AD_DF_256);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdSetFilter (hDeviceHandle, IFCAD_ANY.AD_DF_256)●Delphi 8HDeviceHandle: Integer;nRet := IFCAD.AdSetFilter (hDeviceHandle, AD_DF_256);デバイスハンドル hDeviceHandle のデバイスに 対 して、AD_DF_256 に 設 定 します。© 2000, 2014 Interface Corporation. All rights reserved.182


<strong>GPC</strong>-<strong>3100</strong> Help for Windows48. AdGetFilter【 機 能 】アナログ 入 力 デバイスのデジタルフィルター 設 定 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdGetFilter (IntPtr hDeviceHandle,out uint ulFilter);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdGetFilter (uint hDeviceHandle,out uint ulFilter);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdGetFilterLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef ulFilter As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdGetFilterLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef ulFilter As Integer)As Integer●Delphi 8(x86 専 用 )class function AdGetFilter (hDeviceHandle: Integer;var ulFilter: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.183


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulFilterunCnNo で 指 定 したコネクタの 機 能 を 取 得 する 変 数 へのポインタを 指 定 します。設 定 機 能 は、 下 記 の 識 別 子 で 指 定 されます。識 別 子説 明AD_DF_8オーバーサンプリングレート:8AD_DF_16オーバーサンプリングレート:16AD_DF_32オーバーサンプリングレート:32AD_DF_64オーバーサンプリングレート:64AD_DF_128オーバーサンプリングレート:128AD_DF_256オーバーサンプリングレート:256【 戻 り 値 】AdGetFilter 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は LPC-320724, PEX-320724 でのみ 使 用 可 能 です。・ デフォルトはオーバーサンプリングレート:8(AD_DF_8)になります。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY. AdGetFilter(hDeviceHandle, &ulFilter);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY. AdGetFilter(hDeviceHandle, ulFilter)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD. AdGetFilter ( hDeviceHandle, ulFilter);デバイスハンドル hDeviceHandle のデバイスに 対 して、オーバーサンプリングレートの 設 定 値を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.184


<strong>GPC</strong>-<strong>3100</strong> Help for Windows49. AdMemSetDiPattern【 機 能 】デバイスの DI パターン 一 致 条 件 を 設 定 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMemSetDiPattern (IntPtr HDeviceHandle,uint ulCh,uint bPatternTrug);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdMemSetDiPattern (uint HDeviceHandle,uint ulCh,uint bPatternTrug);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMemSetDiPattern Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulEventChNo As Integer,ByRef bPatternTrug As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMemSetDiPattern Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulEventChNo As Integer,ByRef bPatternTrug As Integer)As Integer●Delphi 8(x86 専 用 )class function AdMemSetDiPattern (hDeviceHandle: Integer;ulCh:Cardinal;var bPatternTrug: Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.185


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulChDI パターンを 行 うチャンネル 数 を 指 定 します。設 定 可 能 範 囲 は 1~8 です。必 ず 1 以 上 の 値 を 指 定 してください。ulPatternTrigDI パターン 一 致 トリガ 設 定 時 の 条 件 設 定 変 数 へのポインタを 指 定 します。ulPattern[0]: DI1ulPattern[1]: DI2ulPattern[2]: DI3ulPattern[3]: DI4ulPattern[4]: DI5ulPattern[5]: DI6ulPattern[6]: DI7ulPattern[7]: DI8識 別 子AD_DISABLEAD_LOW_LEVELAD_HIGH_LEVELAD_DOWN_EDGEAD_UP_EDGE意 味設 定 なし(デフォルト)入 力 信 号 の 状 態 が”0”(Low レベル)入 力 信 号 の 状 態 が”1”(High レベル)立 ち 下 がりエッジ立 ち 上 がりエッジ【 戻 り 値 】AdMemSetDiPattern 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 はサンプリング 中 に 実 行 することはできません。・ 本 関 数 は、AdMemSetSamplingConfig 関 数 のサンプリング 終 了 条 件 を DI パターン 一 致(AD_STOP_DI_EQ)に 設 定 した 場 合 に 有 効 です。・ 汎 用 出 力 と 同 時 に 使 用 することはできません。【 対 象 製 品 】本 関 数 は CSI-320110, CBI-320110, CBI-320110TK, CBI-320110TL,LPC-320910, PEX-320910,CPZ-360810 でのみ 使 用 できます。© 2000, 2014 Interface Corporation. All rights reserved.186


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )uint ulPatternTrig[2];ulPatternTrig[0] = IFCAD_ANY.AD_LOW_LEVEL; // DI1ulPatternTrig[1] = IFCAD_ANY.AD_UP_EDGE; // DI2nRet = IFCAD_ANY.AdMemSetDiPattern( hDeviceHandle, 2, &ulPatternTrig[0] );●Visual Basic .NET(x86、x64 共 用 )Dim ulPatternTrig(1) As IntegerulPatternTrig[0] := IFCAD_ANY.AD_LOW_LEVEL; ' DI1ulPatternTrig[1] := IFCAD_ANY.AD_UP_EDGE; ' DI2nRet = IFCAD_ANY.AdMemSetDiPattern( hDeviceHandle, 2, ulPatternTrig(0) )●Delphi 8hDeviceHandle: Integer;ulPatternTrig: array[0..1] of Cardinal;ulPatternTrig[0] := AD_LOW_LEVEL; // DI1ulPatternTrig[1] := AD_UP_EDGE; // DI2nRet := IFCAD.AdMemSetDiPattern( hDeviceHandle, 2, ulPatternTrig(0) );デバイスハンドル hDeviceHandle のデバイスの DI パターン 一 致 条 件 を 指 定 します。DI1:Low レベルDI2: 立 ち 上 がりエッジ© 2000, 2014 Interface Corporation. All rights reserved.187


<strong>GPC</strong>-<strong>3100</strong> Help for Windows50. AdMemGetDiPattern【 機 能 】デバイスの DI パターン 一 致 条 件 を 設 定 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMemGetDiPattern (IntPtr hDeviceHandle,out uint bPatternTrug);[DllImport("FbiAd.dll")]public static extern int AdMemGetDiPattern (IntPtr hDeviceHandle,uint[] bPatternTrug);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdMemGetDiPattern (uint hDeviceHandle,out uint bPatternTrug);[DllImport("FbiAd.dll")]public static extern int AdMemGetDiPattern (uint hDeviceHandle,uint[] bPatternTrug);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMemGetDiPatternLib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef bPatternTrug As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMemGetDiPatternLib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef bPatternTrug As Integer)As Integer●Delphi 8(x86 専 用 )class function AdMemGetDiPattern (© 2000, 2014 Interface Corporation. All rights reserved.188


<strong>GPC</strong>-<strong>3100</strong> Help for WindowshDeviceHandle:var bPatternTrug:): Integer; static;Cardinal;Cardinal【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulPatternTrigDI パターン 一 致 トリガ 設 定 時 の 条 件 設 定 を 取 得 する 変 数 へのポインタを 指 定 します。識 別 子意 味AD_DISABLE設 定 なし(デフォルト)AD_LOW_LEVEL入 力 信 号 の 状 態 が”0”(Low レベル)AD_HIGH_LEVEL入 力 信 号 の 状 態 が”1”(High レベル)AD_DOWN _EDGE立 ち 下 がりエッジAD_UP_EDGE立 ち 上 がりエッジ【 戻 り 値 】AdMemGetDiPattern 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 はサンプリング 中 に 実 行 することはできません。・ 本 関 数 は 、 AdMemSetSamplingConfig 関 数 の サ ン プ リ ン グ 終 了 条 件 を DI パ タ ン 一 致(AD_STOP_DI_EQ)に 設 定 した 場 合 に 有 効 です。・ 最 大 DI チャンネル 数 分 の 配 列 を 用 意 してください。【 対 象 製 品 】本 関 数 は CSI-320110, CBI-320110, CBI-320110TK, CBI-320110TL, LPC-320910, PEX-320910,CPZ-360810 でのみ 使 用 できます。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )Integer ulPatternTrig[8];nRet = IFCAD_ANY.AdMemGetDiPattern( hDeviceHandle ulPatternTrig );●Visual Basic .NET(x86、x64 共 用 )Dim ulPatternTrig(7) As IntegernRet = IFCAD_ANY.AdMemGetDiPattern( hDeviceHandle, ulPatternTrig(0) )●Delphi 8© 2000, 2014 Interface Corporation. All rights reserved.189


<strong>GPC</strong>-<strong>3100</strong> Help for WindowshDeviceHandle: Integer;ulPatternTrig: array[0..7] of Cardinal;nRet := IFCAD.AdMemGetDiPattern( hDeviceHandle, @ulPatternTrig[0] );デバイスハンドル hDeviceHandle のデバイスの DI パタン 一 致 条 件 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.190


<strong>GPC</strong>-<strong>3100</strong> Help for Windows51. AdInputDI【 機 能 】デバイスの 外 部 出 力 信 号 制 御 設 定 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdInputDI (IntPtr hDeviceHandle,out uint dwData);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdInputDI (uint hDeviceHandle,out uint dwData);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdInputDI Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef dwData As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdInputDI Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef dwData As Integer)As Integer●Delphi 8(x86 専 用 )class function AdInputDI (hDeviceHandle: Integer;var dwData: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。dwData入 力 したデジタルデータを 返 す 位 置 を 指 すポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.191


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdInputDI 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdInputDI( hDeviceHandle, &dwData);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdInputDI(hDeviceHandle, dwData)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdInputDI (hDeviceHandle, dwData );デバイスハンドル hDeviceHandle のデバイスから 汎 用 入 力 端 子 の 状 態 を 読 み 出 します。© 2000, 2014 Interface Corporation. All rights reserved.192


<strong>GPC</strong>-<strong>3100</strong> Help for Windows52. AdOutputDO【 機 能 】デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdOutputDO (IntPtr hDeviceHandle,uint dwData);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdOutputDO (uint hDeviceHandle,uint dwData);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdOutputDO Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal dwData As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdOutputDO Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal dwData As Integer)As Integer●Delphi 8(x86 専 用 )class function AdOutputDO (hDeviceHandle: Integer;dwData:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。【 戻 り 値 】AdOutputDO 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。© 2000, 2014 Interface Corporation. All rights reserved.193


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdOutputDO(hDeviceHandle, 0x03);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdOutputDO(hDeviceHandle, &H03)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD.AdOutputDO (hDeviceHandle, $03);デバイスハンドル hDeviceHandle のデバイスから 汎 用 出 力 端 子 に 対 して 03h のデータを 出 力 します。© 2000, 2014 Interface Corporation. All rights reserved.194


<strong>GPC</strong>-<strong>3100</strong> Help for Windows53. AdDataConv【 機 能 】アナログデータの 形 式 を 変 換 します。形 式 の 変 換 とともにデータに 対 し 平 均 処 理 やスムージング 処 理 を 行 うことができます。また、ユーザー 関 数 の 指 定 により、 任 意 のデータ 変 換 式 を 設 定 することも 可 能 です。(Visual Basic Ver. 4.0 では 使 用 できません)【 書 式 】●Visual C# .NET(x86 専 用 )[DllImport("FbiAdDC.dll")]public static extern int AdDataConv (uintuSrcFormCode,ref bytepSrcData,uintuSrcSmplDataNum,ref ADSMPLREQ SrcSmplReq,uintuDestFormCode,out bytepDestData,out uintuDestSmplDataNum,ref ADSMPLREQ DestSmplReq,uintuEffect,uintuCount,LPCONVPROClpfnConv);上 記 以 外 にも 以 下 のパラメータは 次 のようなデータ 型 を 設 定 することができます。pSrcDataref ushort pSrcData;ref uint pSrcData;ref float pSrcData;byte[]pSrcData;ushort[] pSrcData;uint[]pSrcData;float[] pSrcData;pDestDataout ushortout uintout floatbyte[]ushort[]uint[]float[]pDestData;pDestData;pDestData;pDestData;pDestData;pDestData;pDestData;© 2000, 2014 Interface Corporation. All rights reserved.195


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NETDeclare Function AdDataConv Lib "FbiAdDC.DLL"(ByVal uSrcFormCode As Integer,ByVal pSrcData As Byte,ByVal uSrcSmplDataNum As Integer,ByVal SrcSmplReq As ADSMPLREQ,ByVal uDestFormCode As Integer,ByVal pDestData As Byte,ByVal uDestSmplDataNum As Integer,ByVal DestSmplReq As ADSMPLREQ,ByVal uEffect As Integer,ByVal uCount As Integer,ByVal lpfnConv As LPCONVPROC)As Integer上 記 以 外 にも 以 下 のパラメータは 次 のようなデータ 型 を 設 定 することができます。pSrcDataByRef pSrcData As ShortByRef pSrcData As IntegerByRef pSrcData As SingleByVal pSrcData() As ByteByVal pSrcData() As ShortByVal pSrcData() As IntegerByVal pSrcData() As SinglepDestDataByRef pDestData As ShortByRef pDestData As IntegerByRef pDestData As SingleByVal pDestData() As ByteByVal pDestData() As ShortByVal pDestData() As IntegerByVal pDestData() As Single© 2000, 2014 Interface Corporation. All rights reserved.196


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8class function AdDataConv (uSrcFormCode: Integer;var pSrcData: BYTE;uSrcSmplDataNum: Integer;var SrcSmplReq: ADSMPLREQ;uDestFormCode: Integer;var pDestData: Byte;uDestSmplDataNum: Integer;var DestSmplReq: ADSMPLREQ;uEffect:Integer;uCount:Integer;lpfnConv:LPCONVPROC): Integer; overload; static;上 記 以 外 にも 以 下 のパラメータは 次 のようなデータ 型 を 設 定 することができます。pSrcDatavar pSrcData: WORDvar pSrcData: Integervar pSrcData: SinglepSrcData: array of BytepSrcData: array of WordpSrcData: array of IntegerpSrcData: array of SinglepDestDatavar pDestData: WORDtvar pDestData: Integervar pDestData: SinglepDestData: array of BytepDestData: array of WordpDestData: array of IntegerpDestData: array of Single【パラメータ】uSrcFormCodepSrcData が 指 すデータ 領 域 に 格 納 されているデータ 形 式 をデータ 指 定 識 別 子 にて 指 定 します。 識 別 子 データ 形 式AD_DATA_PHYSICAL 物 理 量 ( 電 圧 [V] , 電 流 [mA])AD_DATA_BIN8 8bit バイナリAD_DATA_BIN10 10bit バイナリAD_DATA_BIN12 12bit バイナリAD_DATA_BIN16 16bit バイナリAD_DATA_BIN24 24bit バイナリバイナリデータとは、デバイスに 対 して 直 接 入 出 力 できる 形 式 のデータを 指 します。© 2000, 2014 Interface Corporation. All rights reserved.197


<strong>GPC</strong>-<strong>3100</strong> Help for WindowspSrcData変 換 元 データへのポインタを 指 定 します。© 2000, 2014 Interface Corporation. All rights reserved.198


<strong>GPC</strong>-<strong>3100</strong> Help for WindowspSrcSmplReq変 換 元 データのサンプリング 形 式 が 格 納 されている 構 造 体 (ADSMPLREQ 構 造 体 )へのポインタを 指 定 します。uSrcSmplDataNum変 換 元 データ 件 数 を 指 定 します。uDestFormCodepDestData が 指 すデータ 領 域 に 格 納 されているデータ 形 式 をデータ 指 定 識 別 子 にて 指 定 します。識 別 子 データ 形 式AD_DATA_PHYSICAL 物 理 量 ( 電 圧 [V] , 電 流 [mA])AD_DATA_BIN8 8bit バイナリAD_DATA_BIN10 10bit バイナリAD_DATA_BIN12 12bit バイナリAD_DATA_BIN16 16bit バイナリAD_DATA_BIN24 24bit バイナリバイナリデータとは、デバイスに 対 して 直 接 入 出 力 できる 形 式 のデータを 指 します。pDestData変 換 後 データへのポインタを 指 定 します。puDestSmplDataNum変 換 後 データ 件 数 へのポインタを 指 定 します。pDestSmplReq変 換 後 データのサンプリング 形 式 を 格 納 するための 構 造 体 (ADSMPLREQ 構 造 体 )へのポインタを 指 定 します。uEffectデータ 変 換 指 定データ 変 換 の 際 に 平 均 、スムージング 処 理 を 行 うかどうかを 以 下 のデータ 変 換 識 別 子 にて指 定 します。0 を 指 定 すると 平 均 、スムージング 処 理 は 行 われません。 0 : 平 均 、スムージングを 行 いません。AD_CONV_SMOOTH :データに 対 し、スムージングによる 変 換 を 行 います。AD_CONV_AVERAGE1 :データに 対 し、 単 純 平 均 による 変 換 を 行 います。AD_CONV_AVERAGE2 :データに 対 し、 移 動 平 均 による 変 換 を 行 います。uCount平 均 、スムージングのデータ 件 数uEffect に 0 が 指 定 されている 場 合 、dwCount は 無 効 です。© 2000, 2014 Interface Corporation. All rights reserved.199


<strong>GPC</strong>-<strong>3100</strong> Help for WindowslpfnConvユーザー 関 数 へのポインタ一 通 りのデータ 変 換 を 終 えた 後 、ユーザー 関 数 により 任 意 の 計 算 を 行 ってデータに 変 換 を加 えることができます。 lpfnConv には 変 換 を 行 うための 関 数 へのポインタを 指 定 します。(fnConv 関 数 参 照 )ユーザー 関 数 によるデータ 変 換 を 行 わない 場 合 は、lpfnConv に NULL(Visual Basic .NETでは 0)を 指 定 してください。【 戻 り 値 】AdDataConv 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 はAD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、 戻 り 値 一 覧 を 参 照 してください。【 備 考 】スムージングを 行 った 場 合 、pSrcData と pDestData はデータ 件 数 だけでなく、アナログ 出 力 更新 条 件 にも 変 化 が 起 こります。 例 えば、1kHz で 1000 件 のデータを 持 っていた 場 合 、これを 10件 で 平 均 した 場 合 、アナログ 出 力 データ 更 新 レートは 100Hz、データは 100 件 になります。スムージングを 行 った 場 合 はその 逆 のことが 起 こります。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdDataConv(IFCAD_ANY.AD_DATA_BIN12,pSrcBuffer,uSrcSmplDataNum,pSrcSmplReq,IFCAD_ANY.AD_DATA_BIN16,pDestBuffer,puDestSmplDataNum, pDestSmplReq, 0, 0, NULL);●Visual Basic .NET(x86、x64 共 用 )nRet= IFCAD_ANY.AdDataConv(IFCAD_ANY.AD_DATA_BIN12,SrcBuffer,SrcSmplDataNum,SrcSmplReq,IFCAD_ANY.AD_DATA_BIN16,DestBuffer,DestSmplDataNum, DestSmplReq, 0, 0, 0)●Delphi 8hDeviceHandle: Integer;nRet:=IFCAD.AdDataConv(AD_DATA_BIN12, SrcBuffer, uSrcSmplDataNum, SrcSmplReq,AD_DATA_BIN16,DestBuffer,DestSmplDataNum,DestSmplReq,0, 0, NIL);サンプリングデータの 変 換 を 行 います。© 2000, 2014 Interface Corporation. All rights reserved.200


<strong>GPC</strong>-<strong>3100</strong> Help for Windows変 換 条 件 は 以 下 の 通 りです。・ 変 換 元 データ 形 式 :12bit バイナリデータ・ 変 換 元 データサンプリング 条 件 :SrcSmplReq 構 造 体 にて 指 定・ 変 換 後 データ 形 式 :16bit バイナリデータ・ 変 換 後 データサンプリング 条 件 :DestSmplReq 構 造 体 に 格 納・スムージング : 無 し・ユーザ 関 数 : 無 し© 2000, 2014 Interface Corporation. All rights reserved.201


<strong>GPC</strong>-<strong>3100</strong> Help for Windows54. AdReadFile【 機 能 】デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。【 書 式 】●Visual C# .NET[DllImport("FbiAdDC.dll")]public static extern int AdReadFile (String szPathName,out byte pSmplData,uint uFormCode);上 記 以 外 にも 以 下 のパラメータは 次 のようなデータ 型 を 設 定 することができます。pSmplDataout ushort pSmplData;out uint pSmplData;out floag pSmplData;byte[]pSmplData;ushort[] pSmplData;uint[]pSmplData;float[] pSmplData;●Visual Basic .NETDeclare Function AdReadFile Lib "FbiAdDC.DLL"(ByVal szPathName, As String,ByRef pSmplData, As Byte,ByVal uFormCode As Integer)As Integer上 記 以 外 にも 以 下 のパラメータは 次 のようなデータ 型 を 設 定 することができます。pSmplDataByRef pSmplData As ShortByRef pSmplData As IntegerByRef pSmplData As SingleByVal pSmplData() As ByteByVal pSmplData() As ShortByVal pSmplData() As IntegerByVal pSmplData() As Single© 2000, 2014 Interface Corporation. All rights reserved.202


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8class function AdReadFile (pszPathName:String;var pSmplData: Integer;uFormCode:Cardinal): Integer; overload; static;上 記 以 外 にも 以 下 のパラメータは 次 のようなデータ 型 を 設 定 することができます。pSmplDatavar pSmplData: WORDvar pSmplData: Integervar pSmplData: SinglepSmplData: array of BytepSmplData: array of WordpSmplData: array of IntegerpSmplData: array of Single【パラメータ】pszPathNameサンプリングデータが 格 納 されているデータファイルへのパスを 指 定 します。pSmplDataファイルから 読 み 込 んだサンプリングデータを 格 納 するバッファへのポインタを 指 定 します。データ 形 式用 意 するバッファのサイズ物 理 量ファイル 上 のデータ 件 数 ×16bit( 物 理 量 形 式 のデータは float型 として 扱 われます)バイナリ(8~24bit) 読 み 込 みを 行 うファイルサイズulFormCodeファイルに 保 存 されているサンプリングデータの 形 式 を 指 定 します。AD_DATA_PHYSICAL : 物 理 量 ( 電 圧 [V], 電 流 [mA])(ファイルは CSV 形 式 )AD_DATA_BIN8 :8bit バイナリ(ファイルはバイナリ 形 式 )AD_DATA_BIN12 :12bit バイナリ(ファイルはバイナリ 形 式 )AD_DATA_BIN16 :16bit バイナリ(ファイルはバイナリ 形 式 )AD_DATA_BIN24 :24bit バイナリ(ファイルはバイナリ 形 式 )【 戻 り 値 】AdReadFile 関 数 は 処 理 が 正 常 終 了 すると AD_ERROR_SUCCESS を 返 します。 正 常 に 処 理 が 終 了 しなかった 場 合 AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された場 合 については、 戻 り 値 一 覧 を 参 照 してください。【 備 考 】ファイルに 保 存 されているデータ 形 式 のままバッファに 読 み 込 まれます。データが 物 理 量 の 場 合 はバッファに 読 み 込 まれるときにカンマは 削 除 されます。© 2000, 2014 Interface Corporation. All rights reserved.203


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )String pszPathName = "DATA.CSV";nRet = IFCAD_ANY.AdReadFile(pszPathName, pSmplData,IFCAD_ANY.AD_DATA_PHYSICAL );●Visual Basic .NET(x86、x64 共 用 )Dim pszPathName As StringpszPathName = "DATA.CSV" & Chr(0)nRet = IFCAD_ANY.AdReadFile( pszPathName, pSmplData,IFCAD_ANY.AD_DATA_PHYSICAL )●Delphi 8varpszPathName: array[0..15] of Byte;StrCopy(pszPathName, 'DATA.CSV');nRet := AdReadFile( pszPathName, pSmplData, AD_DATA_PHYSICAL );CSV 形 式 のデータファイル(DATA.CSV)から 物 理 量 のデータをバッファ(pSmplData)に 読 み込 みます。© 2000, 2014 Interface Corporation. All rights reserved.204


<strong>GPC</strong>-<strong>3100</strong> Help for Windows55. fnConv【 機 能 】AdDataConv 関 数 で 使 用 するコールバック 関 数 です。AdDataConv 関 数 の lpfnConv に fnConv 関数 へのポインタを 設 定 することにより、データ 変 換 時 に fnConv 関 数 を 呼 び 出 すことができます。fnConv 関 数 は、データ 1 点 毎 に 呼 び 出 されます。【 書 式 】●Visual C# .NETCONVPROC fnConv (short wCh,uint dwCount,IntPtr lpData);●Visual Basic .NETSub fnConv (ByVal wCh As Short,ByVal dwCount As Integer,ByVal lpData As IntPtr)As Integer●Delphi 8procedure fnConv (wCh:dwCount:lpData:): Integer; static;Integer;Integer;IntPtr【パラメータ】nChnCh には、lpData が 指 すデータのチャンネル 番 号 が 渡 されます。dwCountdwCount には、lpData が 指 すデータが、データの 先 頭 から 何 件 目 にあたるかが 渡 されます。lpDatalpData には、AdDataConv 関 数 により 変 換 されたデータが 格 納 されているデータへのポインタが 渡 されます。fnConv 関 数 は、データ 1 つ 毎 に 呼 び 出 されます。lpData が 指 す 位 置のデータを 変 換 後 のデータ 形 式 の 型 で 読 み 出 し、 計 算 を 行 った 後 lpData が 指 す 位 置 へ 変換 後 データ 形 式 の 型 と 同 じ 型 で 書 き 込 んでください。【 戻 り 値 】fnConv 関 数 は、 値 を 返 しません。© 2000, 2014 Interface Corporation. All rights reserved.205


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )public void fnConv(short wCh, uint dwCount, IntPtr lpData){//ここにコールバック 発 生 時 に 処 理 するコードを 記 述 します}//メインルーチンIFCAD_ANY.LPCONVPROC lpcallback;・・lpcallback = new IFCAD_ANY.LPADCALLBACK(fnConv);・nRet = IFCAD_ANY.AdDataConv( IFCAD_ANY.AD_DATA_BIN12,pSrcBuffer,uSrcSmplDataNum,pSrcSmplReq,IFCAD_ANY.AD_DATA_BIN16,pDestBuffer,puDestSmplDataNum,pDestSmplReq, 0, 0, lpcallback);●Visual Basic .NET(x86、x64 共 用 )Public Sub fnConv (ByVal dwuser As Integer)‘ここにコールバック 発 生 時 に 処 理 するコードを 記 述 しますEnd Sub‘メインルーチンDim lpcallback As IFCAD_ANY.LPCONVPROC・・lpcallback = AddressOf fnConv・nRet= IFCAD_ANY.AdDataConv(IFCAD_ANY.AD_DATA_BIN12,SrcBuffer,SrcSmplDataNum,SrcSmplReq,IFCAD_ANY.AD_DATA_BIN16,DestBuffer,DestSmplDataNum,DestSmplReq,0, 0, lpcallback)© 2000, 2014 Interface Corporation. All rights reserved.206


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8varprocedure fnConv(dwUser: Cardinal); forwad;// ガーベージコレクトによってデリゲートが 破 棄 されないようにデリゲートを// グローバル 変 数 に 代 入 し、その 変 数 をアンマネージ 関 数 へ 渡 します。constlpcallback: LPCONVPROC = @fnConv;//コールバック 関 数procedure fnConv (dwUser: Cardinal)begin//ここに 割 り 込 み 発 生 時 に 処 理 するコードを 記 述 します。end;// メインルーチン:nRet:=IFCAD.AdDataConv(DA_DATA_BIN12,SrcBuffer,SrcSmplDataNum,SrcSmplReq,DA_DATA_BIN16,DestBuffer,DestSmplDataNum,DestSmplReq,0, 0, lpcallback)© 2000, 2014 Interface Corporation. All rights reserved.207


<strong>GPC</strong>-<strong>3100</strong> Help for Windows56. CallBackProc【 機 能 】サンプリング 終 了 時 に 呼 び 出 されるコールバック 関 数 です。AdSetBoardConfig 関 数 のパラメータの lpEventProc に CallBackProc 関 数 へのポインタを 設 定 することにより、サンプリング終 了 時 に CallBackProc 関 数 を 呼 び 出 すことができます。【 書 式 】●Visual C# .NETpublic void CallBackProc (uint dwUser);●Visual Basic .NETpublic Sub CallBackProc (ByVal dwUser As Integer)As Integer●Delphi 8procedure CallBackProc (dwUser:Cardinal;): Integer; static;【パラメータ】dwUserAdSetBoardConfig 関 数 のパラメータ dwUser で 指 定 したデータが 渡 されます。【 戻 り 値 】CallBackProc 関 数 は、 値 を 返 しません。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )public void CallBackProc(uint dwUser){//ここにコールバック 発 生 時 に 処 理 するコードを 記 述 します}//メインルーチンIFCAD_ANY.LPADCALLBACK lpcallback;::lpcallback = new IFCAD_ANY.LPADCALLBACK(CallBackProc);nRet = IFCAD_ANY.AdSetBoardConfig( hDeviceHandle , 0 , lpcallback , 0 );://サンプリング 開 始nRet = IFCAD_ANY.AdStartSampling(hDeviceHandle, IFCAD_ANY.FLAG_ASYNC);© 2000, 2014 Interface Corporation. All rights reserved.208


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.209


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Public Sub CallBackProc(ByVal dwuser As Integer)‘ここにコールバック 発 生 時 に 処 理 するコードを 記 述 しますEnd Sub‘メインルーチンDim lpcallback As IFCAD_ANY.LPADCALLBACK::lpcallback = AddressOf CallBackProcnRet = IFCAD_ANY.AdSetBoardConfig(hDeviceHandle, 0, lpcallback, 0):‘サンプリング 開 始nRet = IFCAD_ANY.AdStartSampling(hDeviceHandle, IFCAD_ANY.FLAG_ASYNC)●Delphi 8varprocedure CallBackProc(dwUser: Cardinal); forwad;// ガーベージコレクトによってデリゲートが 破 棄 されないようにデリゲートを// グローバル 変 数 に 代 入 し、その 変 数 をアンマネージ 関 数 へ 渡 します。constlpcallback: LPADCALLBACK = @CallBackProc;//コールバック 関 数procedure CallBackProc(dwUser: Cardinal)begin//ここに 割 り 込 み 発 生 時 に 処 理 するコードを 記 述 します。end;// メインルーチン:nRet := IFCAD.AdSetBoardConfig(hDeviceHandle, 0, lpcallback, 0)://サンプリング 開 始nRet := IFCAD.AdStartSampling(hDeviceHandle, IFCAD.FLAG_ASYNC)© 2000, 2014 Interface Corporation. All rights reserved.210


<strong>GPC</strong>-<strong>3100</strong> Help for Windows57. AdCommonGetPciDeviceInfo【 機 能 】デバイスの 外 部 出 力 信 号 制 御 設 定 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdCommonGetPciDeviceInfo (IntPtr hDeviceHandle,out uint dwDeviceID,out uint dwVendorID,out uint dwClassCode,out uint dwRevisionID,out uint dwBaseAddress0,out uint dwBaseAddress1,out uint dwBaseAddress2,out uint dwBaseAddress3,out uint dwBaseAddress4,out uint dwBaseAddress5,out uint dwSubSystemID,out uint dwSubSystemVendorID,out uint dwInterruptLine,out uint dwBoardID);●Visual C# .NET(x86 用 )[DllImport("FbiAd.dll")]public static extern int AdCommonGetPciDeviceInfo (uinthDeviceHandle,out uint dwDeviceID,out uint dwVendorID,out uint dwClassCode,out uint dwRevisionID,out uint dwBaseAddress0,out uint dwBaseAddress1,out uint dwBaseAddress2,out uint dwBaseAddress3,out uint dwBaseAddress4,out uint dwBaseAddress5,out uint dwSubSystemID,out uint dwSubSystemVendorID,out uint dwInterruptLine,out uint dwBoardID);© 2000, 2014 Interface Corporation. All rights reserved.211


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Visual Basic .NET(x86、x64 共 用 )Declare Function AdCommonGetPciDeviceInfo Lib "FbiAd.DLL"(ByVal hDeviceHandle, As IntPtr,ByRef dwDeviceID, As Integer,ByRef dwVendorID, As Integer,ByRef dwClassCode, As Integer,ByRef dwRevisionID, As Integer,ByRef dwBaseAddress0, As Integer,ByRef dwBaseAddress1, As Integer,ByRef dwBaseAddress2, As Integer,ByRef dwBaseAddress3, As Integer,ByRef dwBaseAddress4, As Integer,ByRef dwBaseAddress5, As Integer,ByRef dwSubSystemID, As Integer,ByRef dwSubSystemVendorID, As Integer,ByRef dwInterruptLine, As Integer,ByRef dwBoardID As Integer)As Integer●Visual Basic .NET(x86 用 )Declare Function AdCommonGetPciDeviceInfo Lib "FbiAd.DLL"(ByVal hDeviceHandle, As Integer,ByRef dwDeviceID, As Integer,ByRef dwVendorID, As Integer,ByRef dwClassCode, As Integer,ByRef dwRevisionID, As Integer,ByRef dwBaseAddress0, As Integer,ByRef dwBaseAddress1, As Integer,ByRef dwBaseAddress2, As Integer,ByRef dwBaseAddress3, As Integer,ByRef dwBaseAddress4, As Integer,ByRef dwBaseAddress5, As Integer,ByRef dwSubSystemID, As Integer,ByRef dwSubSystemVendorID, As Integer,ByRef dwInterruptLine, As Integer,ByRef dwBoardID As Integer)As Integer© 2000, 2014 Interface Corporation. All rights reserved.212


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8class function AdCommonGetPciDeviceInfo (hDeviceHandle:Integer;var dwDeviceID:Cardinal;var dwVendorID:Cardinal;var dwClassCode:Cardinal;var dwRevisionID:Cardinal;var dwBaseAddress0: Cardinal;var dwBaseAddress1: Cardinal;var dwBaseAddress2: Cardinal;var dwBaseAddress3: Cardinal;var dwBaseAddress4: Cardinal;var dwBaseAddress5: Cardinal;var dwSubSystemID:Cardinal;var dwSubSystemVendorID: Cardinal;var dwInterruptLine, Cardinal;var dwBoardID:Cardinal): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。dwDeviceIDデバイス ID データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスを 区 別 するための ID です。弊 社 PCI、CompactPCI バス 及 び CardBus 用 デバイスは、 製 品 型 式 の 数 字 部 分 4 桁 が 適 用 されます。PCI-3133 ならば 3133(16 進 数 では 0C3Dh)、CTP-3174 ならば 3174(16 進 数 では0C66h)です。PCI 製 品 、CompactPCI 製 品 や CardBus カードを 判 別 する 必 要 がある 場 合 、pdwSubsystemIDを 参 照 して 下 さい。※デバイス ID から、 下 記 割 込 みラインまでのデータは、PCI Rev2.1 で 規 定 される PCI バス 用 デバイスが 持 つデータです。 製 品 ID は 弊 社 の 製 品 上 に 実 装 される RSW1 の 値 であり、PCI バス 用 デバイスが 標 準 で 実 装 するデータではありません。dwVendorIDベンダ ID データを 格 納 する 変 数 へのポインタを 指 定 してください。弊 社 のベンダ ID は、1147h(16 進 数 )です。dwClassCodeクラスコードデータを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスのクラスコードが 格 納 されます。PCI Rev2.1 で 規 定 されている 値 が 格 納 されます。dwRevisionIDリビジョン ID データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスのリビジョン ID が 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.213


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsdwBaseAddress0リソース 0 データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 占 有 する I/O または、メモリ 領 域 が 格 納 されます。dwBaseAddress1リソース 1 データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 占 有 する I/O または、メモリ 領 域 が 格 納 されます。dwBaseAddress2リソース 2 データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 占 有 する I/O または、メモリ 領 域 が 格 納 されます。dwBaseAddress3リソース 3 データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 占 有 する I/O または、メモリ 領 域 が 格 納 されます。dwBaseAddress4リソース 4 データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 占 有 する I/O または、メモリ 領 域 が 格 納 されます。dwBaseAddress5リソース 5 データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 占 有 する I/O または、メモリ 領 域 が 格 納 されます。dwSubsystemIDサブシステム ID データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスのサブシステム ID が 格 納 されます。※PCI 製 品 、CompactPCI 製 品 か CardBus カードを 判 別 したい 場 合 、この 値 の bit8~11 で判 別 できます。0h PCIBit.8~11 1h CompactPCI2h CardBusdwSubsystemVendorIDサブシステムベンダ ID データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスのサブシステム ID が 格 納 されます。dwInterruptLine割 込 みラインデータを 格 納 する 変 数 へのポインタを 指 定 してください。デバイスが 使 用 する 割 込 みレベルが 格 納 されます。dwBoardIDボード ID データを 格 納 する 変 数 へのポインタを 指 定 してください。デバイス 上 に 実 装 されている RSW1 の 値 が 格 納 されます。© 2000, 2014 Interface Corporation. All rights reserved.214


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdCommonGetPciDeviceInfo 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合については、 戻 り 値 一 覧 を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )uint dwDeviceID, dwVenderID, dwClassCode, dwRevisionID,dwBaseAddress0, dwBaseAddress1, dwBaseAddress2,dwBaseAddress3, dwBaseAddress4, dwBaseAddress5,dwSubsystemID, dwSubsystemVenderID,dwInterruptLine, dwBoardID;nRet = IFCAD_ANY.AdCommonGetPciDeviceInfo(hDevice, out dwDeviceID, out dwVenderID,out dwClassCode, out dwRevisionID, out dwBaseAddress0,out dwBaseAddress1, out dwBaseAddress2, out dwBaseAddress3,out dwBaseAddress4, out dwBaseAddress5, out dwSubsystemID,out dwSubsystemVenderID, out dwInterruptLine, out dwBoardID);●Visual Basic .NET(x86、x64 共 用 )Dim dwDeviceID , dwVenderID, dwClassCode, dwRevisionID,dwBaseAddress0, dwBaseAddress1, dwBaseAddress2,dwBaseAddress3, dwBaseAddress4, dwBaseAddress5,dwSubsystemID, dwSubsystemVenderID,dwInterruptLine, dwBoardID As IntegernRet = IFCAD_ANY.AdCommonGetPciDeviceInfo(hDeviceHandle,dwDeviceID,dwVendorID,dwClassCode,dwRevisionID,dwBaseAddress0,dwBaseAddress1,dwBaseAddress2,dwBaseAddress3,dwBaseAddress4,dwBaseAddress5,dwSubsystemID,dwSubsystemVendorID,dwInterruptLine,dwBoardID)© 2000, 2014 Interface Corporation. All rights reserved.215


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●Delphi 8vardwDeviceID : Cardinal;dwVendorID : Cardinal;dwClassCode : Cardinal;dwRevisionID : Cardinal;dwBaseAddress0 : Cardinal;dwBaseAddress1 : Cardinal;dwBaseAddress2 : Cardinal;dwBaseAddress3 : Cardinal;dwBaseAddress4 : Cardinal;dwBaseAddress5 : Cardinal;dwSubsystemID : Cardinal;dwSubsystemVendorID : Cardinal;dwInterruptLine : Cardinal;dwBoardID : Cardinal;nRet := AdCommonGetPciDeviceInfo(hDeviceHandle,dwDeviceID,dwVendorID,dwClassCode,dwRevisionID,dwBaseAddress0,dwBaseAddress1,dwBaseAddress2,dwBaseAddress3,dwBaseAddress4,dwBaseAddress5,dwSubsystemID,dwSubsystemVendorID,dwInterruptLine,dwBoardID);デバイスハンドル hDeviceHandle のデバイスの、リソース 情 報 を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.216


<strong>GPC</strong>-<strong>3100</strong> Help for Windows58. AdOutputSync【 機 能 】アナログ 入 力 デバイスの 内 部 同 期 制 御 を 設 定 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdOutputSync (IntPtr hDeviceHandle,uint Lineuint TrgMode);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdOutputSync (uint hDeviceHandle,uint Lineuint TrgMode);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdOutputSync Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal Line As IntegerByVal TrgMode As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdOutputSync Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal Line As IntegerByVal TrgMode As Integer)As Integer●Delphi 8(x86 専 用 )class function AdOutputSync (hDeviceHandle: Integer;Line:IntegerTrgMode:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.217


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsLine内 部 同 期 出 力 を 行 う 信 号 を 指 定 します。指 定 可 能 な 識 別 子 は 下 記 のものから 選 択 します。識 別 子 値 内 容AD_SYNC_NUM_1 0100h 内 部 同 期 ライン 1AD_SYNC_NUM_2 0200h 内 部 同 期 ライン 2TrgMode内 部 同 期 トリガ 出 力 条 件 を 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。内 部 同 期 トリガ 出 力 は、 下 記 の 識 別 子 で 指 定 されます。識 別 子 値 説 明AD_DISABLE 80000000h 同 期 出 力 なし(デフォルト)AD_ATRIG_MODE 8 アナログトリガ【 戻 り 値 】AdOutputSync 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】・ 本 関 数 は PCI-321516 でのみ 使 用 可 能 です。・アナログトリガ 指 定 時 のアナログトリガ 条 件 については、AdBmSetSamplingConfig 関 数 でメンバの ulATrgMode で 発 生 条 件 を 指 定 します。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdOutputSync(hDeviceHandle, IFCAD_ANY.AD_SYNC_NUM_1,IFCAD_ANY.AD_ATRIG_MODE);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdOutputSync(hDeviceHandle, IFCAD_ANY.AD_SYNC_NUM_1,IFCAD_ANY AD_ATRIG_MODE)●Delphi 8HDeviceHandle: Integer;nRet := IFCAD.AdOutputSync(hDeviceHandle, IFCAD.AD_SYNC_NUM_1,IFCAD.AD_ATRIG_MODE);デバイスハンドル hDeviceHandle のデバイスの 内 部 同 期 トリガ 1 からアナログトリガ 出 力 を 行います。© 2000, 2014 Interface Corporation. All rights reserved.218


<strong>GPC</strong>-<strong>3100</strong> Help for Windows59. AdCalibration【 機 能 】デバイスの 外 部 出 力 信 号 の 制 御 を 行 います。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdCalibration (IntPtr hDeviceHandle,uint ulChanneluint ulRangeuint ulSingleDiff);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdCalibration (uint hDeviceHandle,uint ulChanneluint ulRangeuint ulSingleDiff);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdCalibration Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulChannel As IntegerByVal ulRange As IntegerByVal ulSingleDiff As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdCalibration Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulChannel As IntegerByVal ulRange As IntegerByVal ulSingleDiff As Integer)As Integer●Delphi 8(x86 専 用 )class function AdCalibration (hDeviceHandle: Integer;ulChannel: IntegerulRange:IntegerulSingleDiff: Integer): Integer; static;© 2000, 2014 Interface Corporation. All rights reserved.219


<strong>GPC</strong>-<strong>3100</strong> Help for Windows© 2000, 2014 Interface Corporation. All rights reserved.220


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulChannel調 整 を 行 うチャンネルを 指 定 します。ulRange調 整 を 行 うレンジを 指 定 します。指 定 可 能 な 識 別 子 は 下 記 のものから 選 択 します。識 別 子 値 説 明AD_0_1V 00000001h 電 圧 ユニポーラ 0~1VAD_0_2P5V 00000002h 電 圧 ユニポーラ 0~2.5VAD_0_5V 00000004h 電 圧 ユニポーラ 0~5VAD_0_10V 00000008h 電 圧 ユニポーラ 0~10VAD_1_5V 00000010h 電 圧 ユニポーラ 1~5VAD_0_2V 00000020h 電 圧 ユニポーラ 0~2VAD_0_0P125V 00000040h 電 圧 ユニポーラ 0~0.125VAD_0_1P25V 00000080h 電 圧 ユニポーラ 0~1.25VAD_0_0P625V 00000100h 電 圧 ユニポーラ 0~0.625VAD_0_0P156V 00000200h 電 圧 ユニポーラ 0~0.156VAD_0_20mA 00001000h 電 流 ユニポーラ 0~20mAAD_4_20mA 00002000h 電 流 ユニポーラ 4~20mAAD_20mA 00004000h 電 流 バイポーラ ±20mAAD_1V 00010000h 電 圧 バイポーラ ±1VAD_2P5V 00020000h 電 圧 バイポーラ ±2.5VAD_5V 00040000h 電 圧 バイポーラ ±5VAD_10V 00080000h 電 圧 バイポーラ ±10VAD_20V 00100000h 電 圧 バイポーラ ±20VAD_50V 00200000h 電 圧 バイポーラ ±50VAD_0P125V 00400000h 電 圧 バイポーラ ±0.125VAD_1P25V 00800000h 電 圧 バイポーラ ±1.25VAD_0P625V 01000000h 電 圧 バイポーラ ±0.625VAD_0P156V 02000000h 電 圧 バイポーラ ±0.156VAD_1P25V_AC 04000000h 電 圧 バイポーラ ±1.25V(AC カップリング 機 能 搭 載 )AD_0P625V_AC 08000000h 電 圧 バイポーラ ±0.625V(AC カップリング 機 能 搭 載 )AD_0P156V_AC 10000000h 電 圧 バイポーラ ±0.156V(AC カップリング 機 能 搭 載 )AD_GND 80000000h 内 部 GND 接 続© 2000, 2014 Interface Corporation. All rights reserved.221


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulSingleDiff入 力 仕 様 (シングルエンドまたは 差 動 )を 指 定 します。下 記 識 別 子 を 指 定 します。識 別 子 値 内 容AD_INPUT_SINGLE 1 シングルエンド 入 力AD_INPUT_DIFF 2 差 動 入 力【 戻 り 値 】AdCalibration 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】型 式 における 指 定 可 能 な 値 の 一 覧 を 示 します。型 式 ulChannel ulRange ulSingleDiffPCI-321516 1 AD_10V AD_INPUT_SINGLE【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdCalibration (hDeviceHandle, 1, IFCAD_ANY.AD_10V,IFCAD_ANY.AD_INPUT_SINGLE);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdCalibration (hDeviceHandle, 1, IFCAD_ANY.AD_10V,IFCAD_ANY.AD_INPUT_SINGLE)●Delphi 8HDeviceHandle: Integer;nRet := IFCAD.AdCalibration (hDeviceHandle, 1, IFCAD.AD_10V,IFCAD.AD_INPUT_SINGLE);デバイスハンドル hDeviceHandle のデバイスチャンネル 1 の±10V レンジ、シングルエンド 入力 のオートキャリブレーションを 行 います。© 2000, 2014 Interface Corporation. All rights reserved.222


<strong>GPC</strong>-<strong>3100</strong> Help for Windows60. AdAdjustVR【 機 能 】アナログ 入 力 デバイスの 電 子 ボリュームの 制 御 を 行 います。電 子 ボリュームがサポートされないデバイスがあります。 電 子 ボリュームをサポートしていないデバイスを 指 定 した 場 合 、AD_ERROR_NOT_SUPPORTED が 返 ります。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdAdjustVR(IntPtr hDeviceHandle,uint ulAdjustCh,uint ulSingleDiff,uint uSelVolume,uint ulControl,uint ulTap);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdAdjustVR (uint hDeviceHandle,uint ulAdjustCh,uint ulSingleDiff,uint uSelVolume,uint ulControl,uint ulTap);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdAdjustVR Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulAdjustCh As Integer,ByVal ulSingleDiff As Integer,ByVal ulSelVolume As Integer,ByVal ulControl As Integer,ByVal ulTap As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdAdjustVR Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulAdjustCh As Integer,ByVal ulSingleDiff As Integer,ByVal ulSelVolume As Integer,ByVal ulControl As Integer,© 2000, 2014 Interface Corporation. All rights reserved.223


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsByVal ulTap As Integer)As Integer●Delphi 8(x86 専 用 )class function AdAdjustVR (hDeviceHandle: Integer;ulAdjustCh: Integer;ulSingleDiff: Integer;ulSelVolume: Integer;ulControl: Integer;ulTap:Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulAdjustCh調 整 を 行 うチャンネル 番 号 を 指 定 してください。マルチプレクサ 方 式 のデバイスでは 常 に 1 を 指 定 してください。ulSingleDiff入 力 仕 様 を 選 択 します。識 別 子 値 説 明AD_INPUT_SINGLE 1 シングルエンド 入 力AD_INPUT_DIFF 2 差 動 入 力ulSelVolume調 整 を 行 う 電 子 ボリュームを 選 択 します。識 別 子 値 説 明AD_ADJUST_BIOFFSET 1 バイポーラオフセット 調 整AD_ADJUST_UNIOFFSET 2 ユニポーラオフセット 調 整AD_ADJUST_BIGAIN 3 バイポーラゲイン 調 整AD_ADJUST_UNIGAIN 4 ユニポーラゲイン 調 整ulControl調 整 操 作 を 指 定 します識 別 子 値 説 明AD_ADJUST_UP 1 アップAD_ADJUST_DOWN 2 ダウンAD_ADJUST_STORE 3 ストアAD_ADJUST_STANDBY 4 スタンバイAD_ADJUST_NOT_STORE 5 ストアしない© 2000, 2014 Interface Corporation. All rights reserved.224


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulTapアップ/ダウンを 行 う 回 数 を 指 定 します。(1~100)【 戻 り 値 】AdAdjustVR 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】電 子 ボリュームは AD 調 整 プログラム(AdAdjust.exe)で 調 整 しますので、 本 API を 使 用 する 必要 はありません。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdAdjustVR(hDeviceHandle,1,IFCAD_ANY. AD_INPUT_SINGLE,IFCAD_ANY.AD_ADJUST_BIOFFSET,IFCAD_ANY. AD_ADJUST_DOWN,1);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY. AdAdjustVR(hDeviceHandle, _1, _IFCAD_ANY. AD_INPUT_SINGLE,_IFCAD_ANY.AD_ADJUST_BIOFFSET,_IFCAD_ANY. AD_ADJUST_DOWN,_1_)●Delphi 8HDeviceHandle: Integer;nRet := IFCAD. AdAdjustVR(hDeviceHandle,1,IFCAD_ANY. AD_INPUT_SINGLE,IFCAD_ANY.AD_ADJUST_BIOFFSET,IFCAD_ANY. AD_ADJUST_DOWN,1);デバイスハンドル hDeviceHandle のアナログ 入 力 デバイスに 対 してバイポーラオフセット 調整 を 行 います。© 2000, 2014 Interface Corporation. All rights reserved.225


<strong>GPC</strong>-<strong>3100</strong> Help for Windows61. AdReadAdjustVR【 機 能 】アナログ 入 力 デバイスの 電 子 ボリュームの 値 をロードします。本 機 能 がサポートしていないデバイスを 指 定 した 場 合 、AD_ERROR_NOT_SUPPORTED が 返 ります。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdReadAdjustVR(IntPtr hDeviceHandle,uint ulAdjustCh);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdReadAdjustVR (uint hDeviceHandle,uint ulAdjustCh);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdReadAdjustVR Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulAdjustCh As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdReadAdjustVR Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulAdjustCh As Integer)As Integer●Delphi 8(x86 専 用 )class function AdReadAdjustVR (hDeviceHandle: Integer;ulAdjustCh: Integer): Integer; static;【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulAdjustCh調 整 を 行 うチャンネル 番 号 を 指 定 してください。マルチプレクサ 方 式 のデバイスでは 常 に 1 を 指 定 してください。© 2000, 2014 Interface Corporation. All rights reserved.226


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【 戻 り 値 】AdReadAdjustVR 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 備 考 】AD 調 整 プログラム(AdAdjust.exe)において 調 整 を 行 い「CANCEL」ボタンをクリックされた 場合 に EEPROM に 書 き 込 まれている 調 整 値 がロードされます。対 象 製 品 型 式 、 対 応 製 品 型 式 における 設 定 関 連 の 対 応 表 についは、Help.htm を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdReadAdjustVR (hDeviceHandle, 1 );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdReadAdjustVR (hDeviceHandle, 1)●Delphi 8HDeviceHandle: Integer;nRet := IFCAD.AdReadAdjustVR (hDeviceHandle, 1 );デバイスハンドル hDeviceHandle のアナログ 入 力 デバイスに 対 してチャンネル 1 の 調 整 値 をロードします。© 2000, 2014 Interface Corporation. All rights reserved.227


<strong>GPC</strong>-<strong>3100</strong> Help for Windows62. AdReadAdjustVREx【 機 能 】アナログ 入 力 デバイスの 電 子 ボリュームの 値 をロードします。ロードする 電 子 ボリュームは、ユーザ 設 定 値 か、 出 荷 時 設 定 値 を 選 択 できます。本 機 能 がサポートしていないデバイスを 指 定 した 場 合 、AD_ERROR_NOT_SUPPORTED が 返 ります。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdReadAdjustVREx(IntPtr hDeviceHandle,uint ulAdjustCh,uint ulControl);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdReadAdjustVREx(uint hDeviceHandle,uint ulAdjustCh,uint ulControl);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdReadAdjustVREx Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByVal ulAdjustCh As Integer,ByVal ulControl As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdAdjustVREx Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByVal ulAdjustCh As Integer,ByVal ulControl As Integer)As Integer●Delphi 8(x86 専 用 )class function AdReadAdjustVREx (hDeviceHandle: Integer;ulAdjustCh: Integer;ulControl: Integer): Integer; static;© 2000, 2014 Interface Corporation. All rights reserved.228


<strong>GPC</strong>-<strong>3100</strong> Help for Windows【パラメータ】hDeviceHandleAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。ulAdjustChチャンネル 番 号 を 指 定 してください。マルチプレクサ 方 式 のデバイスでは 常 に 1 を 指 定 してください。ulControl調 整 操 作 を 指 定 します識 別 子 値 説 明AD_ADJUST_READ_FACTORY 1 出 荷 時 設 定 値AD_ADJUST_READ_USER 2 AD 調 整 プログラム(AdAdjust.exe)で設 定 した 値【 戻 り 値 】AdReadAdjustVREx 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 対 象 製 品 】本 関 数 は、PCI-362616, PCI-361516 でのみ 使 用 可 能 です。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdReadAdjustVREx (hDeviceHandle, 1,IFCAD_ANY. AD_ADJUST_READ_FACTORY );●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdReadAdjustVREx (hDeviceHandle, 1, _IFCAD_ANY. AD_ADJUST_READ_FACTORY )●Delphi 8HDeviceHandle: Integer;nRet := IFCAD_ANY.AdReadAdjustVREx (hDeviceHandle, 1,IFCAD_ANY. AD_ADJUST_READ_FACTORY);デバイスハンドル hDeviceHandle のアナログ 入 力 デバイスに 対 してチャンネル 1 の 調 整 値 をロードします。© 2000, 2014 Interface Corporation. All rights reserved.229


<strong>GPC</strong>-<strong>3100</strong> Help for Windows63. AdMeasureTemperatureEx【 機 能 】PCI-362616 専 用 です。アナログ 入 力 デバイスの 内 部 コネクタ 付 近 の 温 度 を 取 得 します。取 得 した 温 度 を EEPROM へ 保 存 、もしくは 保 存 した 温 度 を 取 得 します。【 書 式 】●Visual C# .NET(x86、x64 共 用 )[DllImport("FbiAd.dll")]public static extern int AdMeasureTemperatureEx (IntPtr hDeviceHandle,out float fTemperature,uint ulControl);●Visual C# .NET(x86 専 用 )[DllImport("FbiAd.dll")]public static extern int AdMeasureTemperatureEx (uint hDeviceHandle,out float fTemperature,uint ulControl);●Visual Basic .NET(x86、x64 共 用 )Declare Function AdMeasureTemperatureEx Lib "FbiAd.DLL"(ByVal hDeviceHandle As IntPtr,ByRef fTemperature As Single,ByVal ulControl As Integer)As Integer●Visual Basic .NET(x86 専 用 )Declare Function AdMeasureTemperatureEx Lib "FbiAd.DLL"(ByVal hDeviceHandle As Integer,ByRef fTemperature As Single,ByVal ulControl As Integer)As Integer●Delphi 8(x86 専 用 )class function AdMeasureTemperatureEx (hDeviceHandle:Integer;var fTemperature: As Single;ulControl:Integer): Integer; static;【パラメータ】hDeviceHandle© 2000, 2014 Interface Corporation. All rights reserved.230


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAdOpen 関 数 で 取 得 したデバイスハンドルを 指 定 してください。fTemperature温 度 (℃)を 格 納 する 変 数 へのポインタを 指 定 します。ulControl測 定 操 作 を 指 定 します。識 別 子 値 説 明AD_GET_CURRENT_TEMPERATUR 1 現 在 の 温 度 を 測 定 します。EAD_LOAD_TEMPERATURE 2 EEPROM に 保 存 しているユーザ 環 境 温 度を 取 得 します。AD_LOAD_FACTORY_SETTING_TEMPERATURE3 EEPROM に 保 存 している 出 荷 時 温 度 を 取得 します。AD_SAVE_TEMPERATURE_USER 4 現 在 の 温 度 を EEPROM へ 保 存 します。 保存 した 温 度 は fTemperature で 指 定 した変 数 に 格 納 されます。【 戻 り 値 】AdMeasureTemperatureEx 関 数 は 正 常 に 終 了 すると AD_ERROR_SUCCESS を 返 します。それ 以 外 の 場 合 は AD_ERROR_SUCCESS 以 外 の 値 を 返 します。AD_ERROR_SUCCESS 以 外 の 値 が 返 された 場 合 については、『 戻 り 値 一 覧 』を 参 照 してください。【 使 用 例 】●Visual C# .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdMeasureTemperatureEx ( hDeviceHadle,&fTemperature,IFCAD_ANY.AD_GET_CURRENT_TEMPERATURE);●Visual Basic .NET(x86、x64 共 用 )nRet = IFCAD_ANY.AdMeasureTemperature ( hDeviceHadle, _fTemperature, _IFCAD_ANY.AD_GET_CURRENT_TEMPERATURE _)●Delphi 8hDeviceHandle: Integer;nRet := IFCAD_ANY.AdMeasureTemperature ( hDeviceHadle,fTemperature,IFCAD_ANY.AD_GET_CURRENT_TEMPERATURE);© 2000, 2014 Interface Corporation. All rights reserved.231


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsデバイスハンドル hDeviceHandle のアナログ 入 力 デバイスの 現 在 の 内 部 コネクタ 付 近 の 温 度を 取 得 します。© 2000, 2014 Interface Corporation. All rights reserved.232


<strong>GPC</strong>-<strong>3100</strong> Help for Windows2.3. 構 造 体 定 義●ADSMPLREQ 構 造 体サンプリング 条 件 設 定 関 数 (AdSetSamplingConfig 関 数 )、データ 変 換 関 数 (AdDataConv 関 数 )で 指 定 するサンプリング 時 の 条 件 を 設 定 する 構 造 体 です。・Visual C# .NET[StructLayout(LayoutKind.Sequential)]public struct ADSMPLREQ{public uint ulChCount;[MarshalAs(UnmanagedType.ByValArray, SizeConst=512)]public uint[] ulChNoRange;public uint ulSamplingMode;public uint ulSingleDiff;public uint ulSmplNum;public uint ulSmplEventNum;public float fSmplFreq;public uint ulTrigPoint;public uint ulTrigMode;public int lTrigDelay;public uint ulTrigCh;public float fTrigLevel1;public float fTrigLevel2;public uint ulEClkEdge;public uint ulATrgPulse;public uint ulTrigEdge;public uint ulTrigDI;public uint ulFastMode;public void InitializeArray(){ulChNoRange = new uint [512];}public void SetChNo(uint ulIndex , uint ulNumber){ulChNoRange[ulIndex * 2] = ulNumber;}public uint GetChNo(uint ulIndex){return(ulChNoRange[ulIndex * 2]);}public void SetChRange(uint ulIndex, uint ulRange){© 2000, 2014 Interface Corporation. All rights reserved.233


<strong>GPC</strong>-<strong>3100</strong> Help for Windows}ulChNoRange[(ulIndex * 2) + 1] = ulRange;}public uint GetChRange(uint ulIndex){return(ulChNoRange[(ulIndex * 2) + 1]);}・Visual Basic .NET _Structure ADSMPLREQDim ulChCount As Integer _Dim ulChNoRange() As IntegerDim ulSamplingMode As IntegerDim ulSingleDiff As IntegerDim ulSmplNum As IntegerDim ulSmplEventNum As IntegerDim fSmplFreq As SingleDim ulTrigPoint As IntegerDim ulTrigMode As IntegerDim lTrigDelay As IntegerDim ulTrigCh As IntegerDim fTrigLevel1 As SingleDim fTrigLevel2 As SingleDim ulEClkEdge As IntegerDim ulATrgPulse As IntegerDim ulTrigEdge As IntegerDim ulTrigDI As IntegerDim ulFastMode As IntegerPublic Sub New(ByVal Dummy As Integer)ReDim ulChNoRange(511)End SubPublic Sub SetChNo(ByVal ulIndex As Integer, ByVal ulNumber As Integer)ulChNoRange(ulIndex * 2) = ulNumberEnd SubPublic Function GetChNo(ByVal ulIndex As Integer)GetChNo = ulChNoRange(ulIndex * 2)End FunctionPublic Sub SetChRange(ByVal ulIndex As Integer, ByVal ulRange As Integer)ulChNoRange((ulIndex * 2) + 1) = ulRangeEnd SubPublic Function GetChRange(ByVal ulIndex As Integer)GetChRange = ulChNoRange((ulIndex * 2) + 1)End FunctionEnd Structure© 2000, 2014 Interface Corporation. All rights reserved.234


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・Delphi 8 for the Microsoft .NET Frameworktype[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]ADSMPLREQ = recordulChCount : Cardinal;[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]ulChNoRange : array of Integer;ulSamplingMode : Cardinal;ulSingleDiff : Cardinal;ulSmplNum : Cardinal;ulSmplEventNum : Cardinal;fSmplFreq : Single;ulTrigPoint : Cardinal;ulTrigMode : Cardinal;lTrigDelay : Integer;ulTrigCh : Cardinal;fTrigLevel1 : Single;fTrigLevel2 : Single;ulEClkEdge : Cardinal;ulATrgPulse : Cardinal;ulTrigEdge : Cardinal;ulTrigDI : Cardinal;ulFastMode : Cardinal;public constructor Create(var ulChNoRange : array of Integer);public procedure SetChNo( ulIndex: Integer; ulNumber: Integer);public function GetChNo( ulIndex: Integer): Integer;public procedure SetChRange( ulIndex: Integer; ulRange: Integer);public function GetChRange( ulIndex: Integer): Integer;end;メンバulChCountulChNoRange説 明サンプリングを 行 うチャンネルの 数 を 1 からデバイスが 提 供 する 最 大チャンネル 数 の 範 囲 で 指 定 します。サンプリングを 行 うチャンネル 番 号 は ulChNoRange で 指 定 します。・デフォルト:1各 チャンネル 毎 のサンプリング 条 件 を 設 定 です。この 変 数 にアクセスするには 以 下 のメソッドを 利 用 します。メソッド内 容SetChNo入 力 チャンネルを 設 定 しますGetChNo入 力 チャンネル 設 定 を 取 得 しますSetChRange 入 力 チャンネルのレンジを 設 定 しますGetChRange 入 力 チャンネルのレンジを 設 定 を 取 得 します© 2000, 2014 Interface Corporation. All rights reserved.235


<strong>GPC</strong>-<strong>3100</strong> Help for Windows例 ) 入 力 チャンネル 1,2 をそれぞれ±5V、±10V レンジに 設 定ADSMPLREQ config・・config.SetChNo(0, 1)config.SetChNo(1, 2)config.SetChRange(0, AD_5V)config.SetChRange(1, AD_10V)・ulSamplingModeulSingleDiffulSmplNumulSmplEventNumfSmplFreqサンプリング 方 式 を 指 定 します。ulSamplingMode は、サンプリング 指 定 識 別 子 のいずれかを 指 定 します。識 別 子 値 意 味AD_IO_SAMPLING 1 I/O 方 式AD_FIFO_SAMPLING 2 FIFO 方 式AD_MEM_SAMPLING 4 メモリ 方 式AD_BM_SAMPLING 8 バスマスタ 方 式・デフォルト: 使 用 する 製 品 により 異 なります。(デフォルト 値 はデバイスオープン 直 後 に AdGetSamplingConfig 関 数 を 実 行 することにより取 得 できます。)入 力 仕 様 を 指 定 します。識 別 子 値 意 味AD_INPUT_SINGLE 1 シングルエンド 入 力AD_INPUT_DIFF 2 差 動 入 力・デフォルト: 使 用 する 製 品 により 異 なります。(デフォルトはデバイスオープン 直 後 に AdGetSamplingConfig 関 数 を 実 行 することにより 取得 できます。)サンプリングするデータの 個 数 を 1~1,073,741,824 の 範 囲 で 指 定 します。・デフォルト:1024通 知 サンプリング 件 数 を 指 定 します。サンプリング 済 み 件 数 が 本 メンバで 指 定 した 件 数 に 達 するたびにイベントが 通 知 されます。・デフォルト:0※FIFO 方 式 、メモリ 方 式 、バスマスタ 方 式 では 設 定 できる 値 に 制 限 があります。サンプリング 周 波 数 を 0.01f から 製 品 が 提 供 する 最 大 サンプリング 周波 数 の 範 囲 で、Hz を 単 位 として 設 定 します。外 部 クロックを 使 用 する 場 合 は、0.0f を 指 定 してください。※メモリ 方 式 については、 外 部 クロック(fSmplFreq=0.0f)を 指 定 した 場合 CN4 のせって 意 は「EXCLK IN」となり、 内 部 クロック(fSmplFreq=0.0f© 2000, 2014 Interface Corporation. All rights reserved.236


<strong>GPC</strong>-<strong>3100</strong> Help for Windows以 外 )を 使 用 する 場 合 には CN4 の 設 定 は「EXCLK OUT」となります。ただし、 内 部 クロックを 使 用 する 場 合 で、 外 部 クロックの 極 性 を 外 部 トリガ 入 力 (ulClkEdge=AD_EXCLK_IN)にした 場 合 には、CN4 は「EXCLK IN」になります。・デフォルト: 使 用 する 製 品 により 異 なります。(デフォルト 値 はデバイスオープン 直 後 に AdGetSamplingConfig 関 数 を 実 行 することにより取 得 できます。)ulTrigPointulTrigModeトリガポイントを 指 定 します。ulTrigPoint は、トリガポイント 指 定 識 別 子 のいずれか 1 つを 指 定 します。識 別 子 値 意 味AD_TRIG_START 1 スタートトリガ(デフォルト)AD_TRIG_STOP 2 ストップトリガAD_TRIG_START_STOP 3 スタートストップトリガトリガを 指 定 します。ulTrigMode は、トリガ 指 定 識 別 子 のいずれか 1 つを 指 定 します。識 別 子 値 意 味AD_FREERUN 1 トリガなし(デフォルト)AD_EXTTRG 2 外 部 トリガAD_EXTTRG_DI 3 外 部 +DI トリガAD_LEVEL_P 4 レベルトリガプラスAD_LEVEL_M 5 レベルトリガマイナスAD_LEVEL_D 6 レベルトリガデュアルAD_INRANGE 7 レベルトリガインレンジAD_OUTRANGE 8 レベルトリガアウトレンジAD_ETERNITY 9 無 限 サンプリング(※1)以 下 は FIFO 方 式 ,バスマスタ 方 式 でスタートストップトリガを 使 用 する 場 合 にのみ 指 定 可 能 です。(※2)スタートトリガ識 別 子 値 意 味AD_START_P1 0x00000010 レベル1 立 ち 上 がりAD_START_M1 0x00000020 レベル1 立 ち 下 がりAD_START_D1 0x00000040 レベル1 立 ち 上 がりまたは立 ち 下 がりAD_START_P2 0x00000080 レベル2 立 ち 上 がりAD_START_M2 0x00000100 レベル2 立 ち 下 がりAD_START_D2 0x00000200 レベル2 立 ち 上 がりまたは立 ち 下 がりストップトリガ識 別 子 値 意 味AD_STOP_P1 0x00000400 レベル1 立 ち 上 がりAD_STOP_M1 0x00000800 レベル1 立 ち 下 がり© 2000, 2014 Interface Corporation. All rights reserved.237


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_STOP_D1 0x00001000 レベル1 立 ち 上 がりまたは立 ち 下 がりAD_STOP_P2 0x00002000 レベル2 立 ち 上 がりAD_STOP_M2 0x00004000 レベル2 立 ち 下 がりAD_STOP_D2 0x00008000 レベル2 立 ち 上 がりまたは立 ち 下 がりフィルタ(PCI-3153,3155 方 式 のみ)識 別 子 値 意 味AD_ANALOG_FILTER 0x00010000 アナログトリガフィルタを 使 用 する(※3)メモリ 方 式 については、 外 部 トリガ(ulTrigMode=AD_EXTTRG)を 指 定 した 場 合 CN3 の 設 定 は「EXTRG IN」となります。トリガなし(ulTrigMode=AD_FREERUN)もしくは 無 限 サンプリング(ulTrigMode=AD_ETERNITY)の 場 合 には CN3 の 設 定 は「EXTRG OUT」となります。ただし、トリガなし(ulTrigMode=AD_FREERUN)もしくは 無 限 サンプリング(ulTrigMode=AD_ETERNITY)で、 外 部 トリガの 極 性 を 外 部 トリガ 入力 (ulETrgEdge=AD_EXTRG_IN)とした 場 合 には、CN3 は「EXTRG IN」になります。lTrigDelayulTrigChfTrigLevel1fTrigLevel2トリガディレイをサンプルの 個 数 を 単 位 として 指 定 します。ulTrigMode でトリガが 設 定 されている 場 合 に 有 効 です。lTrigDelay に 設 定 する 値 は 次 のようになります。プリトリガディレイ -1 ~ -1073741824ポストトリガディレイ 1 ~ 1073741824デフォルト:0トリガ 判 定 を 行 うチャンネル 番 号 を 指 定 します。ulTrigMode に、レベルトリガが 指 定 されている 場 合 に 有 効 です。ulTrigCh に 設 定 されるチャンネルは、'ADSMPLCHREQ' 構 造 体 で 指 定 されていなければなりません。・デフォルト:1トリガレベル 1,2 を 指 定 します。ulTrigMode にレベルトリガが 指 定 されているときに 有 効 です。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位 として 指 定 します。また、fTrigLevel1,fTrigLevel2 の 値 は、'ADSMPLCHREQ' 構 造 体 で 指 定したレンジの 範 囲 内 でなければなりません。fTrigLevel1 と fTrigLevel2 の 関 係 は 次 のようになります。・デフォルト:0.0[V]レベルトリガ TrigLevel1 TrigLevel2プラス/マイナス/デュアル トリガとするレベ 無 効ルアウトレンジトリガトリガ 範 囲 の 下 限レベルトリガ 範 囲 の 上 限レベル© 2000, 2014 Interface Corporation. All rights reserved.238


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsインレンジトリガスタートストップトリガでレベルトリガを 使 用 する 場合 (FIFO 方 式 、バスマスタ 方式 のみ)トリガ 範 囲 の 下 限レベルトリガとするレベルトリガ 範 囲 の 上 限レベルトリガとするレベルulEClkEdgeulATrgPulseulTrigEdgeulTrigDI外 部 クロック 入 力 のエッジ 極 性 を 極 性 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。fSmplFreq に 0.0f( 外 部 クロック)が 指 定 されている 場 合 に 有 効 です。極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジまた、メモリ 方 式 製 品 では 次 の 識 別 子 を 指 定 することにより、CN4 を「EXCLK IN」に 切 り 替 えることができます。識 別 子 値 意 味AD_EXCLK_IN 4 外 部 クロック 入 力アナログトリガ 出 力 のパルス 極 性 をパルス 極 性 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。アナログトリガ 出 力 機 能 がある 製 品 の 場 合 に 有効 です。パルス 極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_LOW_PULSE 1 LOW パルス(デフォルト)AD_HIGH_PULSE 2 HIGH パルス外 部 トリガの 極 性 を 極 性 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。ulTrigMode に 外 部 トリガまたは DI マスク 付 き 外 部 トリガが 指 定 されている 場 合 に 有 効 です。極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジまた、メモリ 方 式 製 品 では 次 の 識 別 子 を 指 定 することにより、CN3 を「EXTRG IN」に 切 り 替 えることができます。識 別 子 値 意 味AD_EXTRG_IN 3 外 部 トリガ 入 力汎 用 デジタル 入 力 端 子 による 外 部 トリガのマスクを 指 定 します。ulTrigDI の 16bit のうちいずれか 1bit を 1 にセットします。1 にセットされている bit に 対 応 した 汎 用 デジタル 入 力 端 子 の 状 態 がLow レベルになっている 間 、 外 部 トリガ 入 力 が 有 効 となります。1 をセットする bit の 位 置 は、 使 用 する 製 品 が 持 っている 汎 用 デジタル© 2000, 2014 Interface Corporation. All rights reserved.239


<strong>GPC</strong>-<strong>3100</strong> Help for Windows入 力 端 子 の 数 に 注 意 してください。ulTrigMode に DI マスク 付 き 外 部 トリガが 指 定 されている 場 合 に 有 効 です。ulTrigDI の 形 式 は、デジタル 入 力 データの 形 式 と 同 じ 形 式 です。「4.2 データ 形 式 」 参 照・デフォルト:1ulFastMode倍 速 モードの 指 定 をします。(メモリ 方 式 とバスマスタ 方 式 の 倍 速 モード 対 応 製 品 のみ)識 別 子 値 意 味AD_NORMAL_MODE 1 通 常 モードで 使 用 する(デフォルト)AD_FAST_MODE 2 倍 速 モードで 使 用 する※1 AD_ETERNITY( 無 限 サンプリング)に 設 定 した 場 合 には、ulSmplNum で 指 定 した 件 数 分 の 大きさのリングバッファで AdStopSampling 関 数 が 実 行 されるまで 繰 り 返 しサンプリングが行 われます。FIFO 方 式 (PCI-3153,3155)サンプリング 時 は、サンプリング 件 数 (ulSmplNum)×チャンネル 数 (ulChCount)が FIFO 容 量 (32k 件 )より 大 きくなるように、サンプリング 件 数 とチャンネル 数 を 設 定 して 下 さい。※2 FIFO 方 式 または、バスマスタ 方 式 で、サンプリング 時 のスタートストップトリガでレベルトリガを 使 用 する 時 に 以 下 のように 指 定 します。例 1 スタートトリガにレベル1 立 ち 上 がり、ストップトリガにレベル2 立 ち 下 がりを 使用 する 場 合ulTrigMode = AD_START_P1 + AD_STOP_M2;例 2 スタートトリガにレベル1 立 ち 上 がりとレベル2 立 ち 下 がり、ストップトリガにレベル1 立 ち 下 がり、アナログトリガフィルタを 使 用ulTrigMode = AD_START_P1 + AD_START_M2 + AD_STOP_M1 +AD_ANALOG_FILTER;各 識 別 子 を+ 演 算 子 で 繋 げます。 複 数 の 識 別 子 を 指 定 する 事 ができます。必 ずスタートとストップの 両 方 を 指 定 して 下 さい。※3 アナログトリガフィルタを 使 用 した 場 合 には、トリガ 発 生 までに1μs の 遅 延 が 生 じます。ご 使 用 の 環 境 でアナログトリガが 誤 動 作 するようでしたら、フィルタを 使 用 して 下 さい。1kHz 以 下 の 正 弦 波 を 入 力 する 場 合 にはフィルタの 使 用 を 推 奨 します。© 2000, 2014 Interface Corporation. All rights reserved.240


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●ADBMSMPLREQ 構 造 体サンプリング 条 件 設 定 関 数 (AdBmSetSamplingConfig 関 数 )で 指 定 するサンプリング 時 の 条 件を 設 定 する 構 造 体 です。・Visual C# .NET[StructLayout(LayoutKind.Sequential)]public struct ADBMSMPLREQ{public uint ulChCount;[MarshalAs(UnmanagedType.ByValArray, SizeConst=512)]public uint[] ulChNoRange;public uint ulSingleDiff;public uint ulSmplNum;public uint ulSmplEventNum;public uint ulSmplRepeat;public uint ulBufferMode;public float fSmplFreq;public float fScanFreq;public uint ulStartMode;public uint ulStopMode;public uint ulPreTrigDelay;public uint ulPostTrigDelay;public uint ulChNo1;public float fTrigLevel1;public float fHysteresis1;public uint ulChNo2;public float fTrigLevel2;public float fHysteresis2;public uint ulATrgMode;public uint ulATrgPulse;public uint ulStartTrigEdge;public uint ulStopTrigEdge;public uint ulTrigDI;public uint ulEClkEdge;public uint ulFastMode;public uint ulStatusMode;public uint ulErrCtrl;public void InitializeArray(){ulChNoRange = new uint [512];}public void SetChNo(uint ulIndex , uint ulNumber){ulChNoRange[ulIndex * 2] = ulNumber;© 2000, 2014 Interface Corporation. All rights reserved.241


<strong>GPC</strong>-<strong>3100</strong> Help for Windows}}public uint GetChNo(uint ulIndex){return(ulChNoRange[ulIndex * 2]);}public void SetChRange(uint ulIndex, uint ulRange){ulChNoRange[(ulIndex * 2) + 1] = ulRange;}public uint GetChRange(uint ulIndex){return(ulChNoRange[(ulIndex * 2) + 1]);}© 2000, 2014 Interface Corporation. All rights reserved.242


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・Visual Basic .NET _Structure ADBMSMPLREQDim ulChCount As Integer _Dim ulChNoRange() As IntegerDim ulSingleDiff As IntegerDim ulSmplNum As IntegerDim ulSmplEventNum As IntegerDim ulSmplRepeat As IntegerDim ulBufferMode As IntegerDim fSmplFreq As SingleDim fScanFreq As SingleDim ulStartMode As IntegerDim ulStopMode As IntegerDim ulPreTrigDelay As IntegerDim ulPostTrigDelay As IntegerDim ulChNo1 As IntegerDim fTrigLevel1 As SingleDim fHysteresis1 As SingleDim ulChNo2 As IntegerDim fTrigLevel2 As SingleDim fHysteresis2 As SingleDim ulATrgMode As IntegerDim ulATrgPulse As IntegerDim ulStartTrigEdge As IntegerDim ulStopTrigEdge As IntegerDim ulTrigDI As IntegerDim ulEClkEdge As IntegerDim ulFastMode As IntegerDim ulStatusMode As IntegerDim ulErrCtrl As IntegerPublic Sub New(ByVal Dummy As Integer)ReDim ulChNoRange(511)End SubPublic Sub SetChNo(ByVal ulIndex As Integer, ByVal ulNumber As Integer)ulChNoRange(ulIndex * 2) = ulNumberEnd SubPublic Function GetChNo(ByVal ulIndex As Integer)GetChNo = ulChNoRange(ulIndex * 2)End FunctionPublic Sub SetChRange(ByVal ulIndex As Integer, ByVal ulRange As Integer)ulChNoRange((ulIndex * 2) + 1) = ulRangeEnd Sub© 2000, 2014 Interface Corporation. All rights reserved.243


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsPublic Function GetChRange(ByVal ulIndex As Integer)GetChRange = ulChNoRange((ulIndex * 2) + 1)End FunctionEnd Structure© 2000, 2014 Interface Corporation. All rights reserved.244


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・Delphi 8 for the Microsoft .NET Frameworktype[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]ADBMSMPLREQ = recordulChCount : Cardinal;[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]ulChNoRange : array of Integer;ulSingleDiff : Cardinal;ulSmplNum : Cardinal;ulSmplEventNum : Cardinal;ulSmplRepeat : Cardinal;ulBufferMode : Cardinal;fSmplFreq : Single;fScanFreq : Single;ulStartMode : Cardinal;ulStopMode : Cardinal;ulPreTrigDelay : Cardinal;ulPostTrigDelay : Cardinal;ulChNo1 : Cardinal;fTrigLevel1 : Single;fHysteresis1 : Single;ulChNo2 : Cardinal;fTrigLevel2 : Single;fHysteresis2 : Single;ulATrgMode : Cardinal;ulATrgPulse : Cardinal;ulStartTrigEdge : Cardinal;ulStopTrigEdge : Cardinal;ulTrigDI : Cardinal;ulEClkEdge : Cardinal;ulFastMode : Cardinal;ulStatusMode : Cardinal;ulErrCtrl : Cardinal;public constructor Create(var ulChNoRange : array of Integer);public procedure SetChNo( ulIndex: Integer; ulNumber: Integer);public function GetChNo( ulIndex: Integer): Integer;public procedure SetChRange( ulIndex: Integer; ulRange: Integer);public function GetChRange( ulIndex: Integer): Integer;end;メンバulChCount説 明サンプリングを 行 うチャンネルの 数 を 1 から 製 品 が 提 供 する 最 大 チャンネル 数 の範 囲 で 指 定 します。サンプリングを 行 うチャンネル 番 号 は ulChNoRange で 指 定 します。(※4)・デフォルト:1© 2000, 2014 Interface Corporation. All rights reserved.245


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulChNoRangeulSingleDiffulSmplNumulSmplEventNumulSmplRepeat各 チャンネル 毎 のサンプリング 条 件 を 設 定 です。この 変 数 にアクセスするには 以 下のメソッドを 利 用 します。メソッド内 容SetChNo入 力 チャンネルを 設 定 しますGetChNo入 力 チャンネル 設 定 を 取 得 しますSetChRange入 力 チャンネルのレンジを 設 定 しますGetChRange入 力 チャンネルのレンジを 設 定 を 取 得 します例 ) 入 力 チャンネル 1,2 をそれぞれ±5V、±10V レンジに 設 定ADBMSMPLREQ config・・config.SetChNo(0, 1)config.SetChNo(1, 2)config.SetChRange(0, AD_5V)config.SetChRange(1, AD_10V)・入 力 仕 様 を 指 定 します。UlSingleDiff は、 入 力 仕 様 指 定 識 別 子 のいずれか1つを 指 定 します。識 別 子 値 意 味AD_INPUT_SINGLE 1 シングルエンド 入 力AD_INPUT_DIFF 2 差 動 入 力・デフォルト: 使 用 する 製 品 により 異 なります。(デフォルト 値 はデバイスオープン 直 後 に AdBmGetSamplingConfig 関 数 を 実 行 することにより 取 得 できます。)サンプリングするデータの 個 数 を 1~1,073,741,824 の 範 囲 で 指 定 します。(※5)・デフォルト:1024通 知 サンプリング 件 数 を 指 定 します。サンプリング 済 み 件 数 が 本 メンバで 指 定 した 件 数 に 達 するたびにイベントが 通 知されます。・デフォルト:0サンプリング 繰 り 返 し 回 数 を 1~65,535 の 範 囲 で 指 定 します。(※6)(※12)ulStartMode で 指 定 した 開 始 条 件 、ulStopMode で 指 ]定 した 終 了 条 件 でのサンプリングを ulSmplRepeat で 指 定 した 回 数 だけ 繰 り 返 します。バスマスタ 方 式 では、0 を 指 定 すると AdStopSampling 関 数 が 実 行 されるまで、またはサンプリングデータ 領 域 がフルになるまでサンプリングを 停 止 しません。PCI-3525(RevisionID が 4 以 降 からは 繰 り 返 し 回 数 を 設 定 できます。)LPC-321316, LPC-3211416, LPC-361316, LPC-361416PEX-321316, PEX-3211416, PEX-361316, PEX-361416CPZ-3525CSI-3133A, 3133B, 3134A, 3134B, 320212, 320312, CBI-3133A, 3133B, 3134A,3134B, 320212, 320212TR, 320212TK, 320212TL, 320312, 320312TR, 320312TK,© 2000, 2014 Interface Corporation. All rights reserved.246


<strong>GPC</strong>-<strong>3100</strong> Help for Windows320312TL では 繰 り 返 し 回 数 を 指 定 することができません。・デフォルト:1ulBufferModefSmplFreq繰 り 返 しサンプリング 時 における、ドライバ 内 のサンプリング 入 力 バッファへのサンプリングデータの 保 存 方 法 を 指 定 します。(※7)ulBufferMode は、サンプリングデータ 保 存 方 法 指 定 識 別 子 のいずれか 1 つを 指 定します。識 別 子 値 意 味AD_APPEND 1 追 加 保 存 (デフォルト)AD_OVERWRITE 2 上 書 き 保 存サンプリング 周 波 数 を 0.48f からデバイスが 提 供 する 最 大 サンプリング 周 波 数 の範 囲 で、Hz を 単 位 として 設 定 します。(※4)外 部 クロックを 使 用 する 場 合 は、0.0f を 指 定 してください。外 部 クロック 用 の 端 子 は 使 用 するデバイスにより 異 なりますので 使 用 上 の 注 意 事項 を 参 照 して 下 さい。PCI-3525, CTP/CPZ-3525外 部 クロックを 使 用 する 場 合 には、AdSetFunction 関 数 で CN3 か CN4 のどれかをEXCLK_IN 端 子 に 変 更 する 必 要 があります。LPC/PEX-320724外 部 クロックを 使 用 する 場 合 には、AdSetFunction 関 数 で CN3 を EXCLK_IN 端 子 に変 更 する 必 要 があります。PCI-321516外 部 クロックは 使 用 できません。カウンタアップダウンクロックを 使 用 する 場 合 は、-1 を 指 定 してください。(※14)内 部 同 期 ラインを 使 用 する 場 合 には、 下 記 を 指 定 してください。PCI-321516 でのみ 使 用 できます。内 容値内 部 同 期 トリガ 1 -1内 部 同 期 トリガ 2 -2・デフォルト: 使 用 するデバイスにより 異 なります。デフォルト 値 はデバイスオープン 直 後 に AdBmGetSamplingConfig 関 数 を 実 行 することにより 取 得 できます。fScanFreqチャンネル 切 り 替 え 時 のスキャンクロック 周 波 数 を 0.48f から 製 品 が 提 供 する最 大 スキャンクロック 周 波 数 の 範 囲 で、Hz を 単 位 として 設 定 します。(※4)PCI-3525,LPC-321316, LPC-3211416, LPC-361316, LPC-361416PEX-321316, PEX-3211416, PEX-361316, PEX-361416CPZ-3525, CTP-3167, CPZ-3167© 2000, 2014 Interface Corporation. All rights reserved.247


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsCSI-3133A, CSI -3133B, CSI -3134A, CSI -3134B, CSI -320212, CSI -320312,CBI-3133A, CBI-3133B, CBI-3134A, CBI-3134B, CBI-320212, CBI-320212TR,CBI-320212TK, CBI-320212TL, CBI-320312, CBI-320312TR, CBI-320312TK,CBI-320312TL では、このメンバは 無 意 味 です。・デフォルト: 使 用 する 製 品 により 異 なります。(デフォルト 値 はデバイスオープン 直 後 に AdBmGetSamplingConfig 関 数 を 実 行 することにより 取 得 できます。)ulStartModeサンプリング 開 始 条 件 (スタートトリガ)を 指 定 します。外 部 トリガ 用 の 端 子 は 使 用 する 製 品 により 異 なります。使 用 上 の 注 意 事 項 を 参 照 してください。ulStartMode は、トリガ 指 定 識 別 子 を 組 み 合 わせて 指 定 します。(※8)識 別 子 値 意 味AD_FREERUN 1 トリガなし(デフォルト)AD_EXTTRG 2 外 部 トリガAD_EXTTRG_DI 3 DI マスク 付 き 外 部 トリガAD_START_P1 0x00000010 レベル 1 立 ち 上 がりAD_START_M1 0x00000020 レベル 1 立 ち 下 がりAD_START_D1 0x00000040 レベル 1 立 ち 上 がりまたは 立 ち下 がりAD_START_P2 0x00000080 レベル 2 立 ち 上 がりAD_START_M2 0x00000100 レベル 2 立 ち 下 がりAD_START_D2 0x00000200 レベル 2 立 ち 上 がりまたは 立 ち下 がり以 下 のスタートトリガ 条 件 は PCI-3525, CPZ-3525 のみ 対 応 しています。(※13)ulStartMode メンバと ulStopMode メンバに 同 じ 条 件 を 設 定 することはできません。識 別 子 値 意 味AD_START_SIGTIMER 11 インターバルタイマAD_START_DA_START 12 DA スタート(DaStartSampling 関数 使 用 時 )AD_START_DA_STOP 13 DA ストップ(DaStartSampling 関数 使 用 時 )AD_START_DA_IO 14 DA 出 力 更 新(DaOutputDA 関 数 使用 時 )AD_START_DA_SMPLNUM 15 DA 指 定 件 数 出 力(DaStartSampling 関数 使 用 時 )© 2000, 2014 Interface Corporation. All rights reserved.248


<strong>GPC</strong>-<strong>3100</strong> Help for Windows以 下 のスタートトリガ 条 件 はPCI-320412, PCI-320416, PCI-360116, PCI-360112, PCI-360216, PCI-320416LPC-321116, LPC-321216, LPC-321316, LPC-321416, LPC-361116, LPC-361216,LPC-361316, LPC-361416PEX-321116, PEX-321216, PEX-321316, PEX-321416, PEX-361116, PEX-361216,PEX-361316, PEX-361416CTP-360116, CTP-360112, CPZ-360116, CPZ-360112CSI-320412, CSI -320416, CSI -360112, CSI -360116,CBI-320412, CBI-320412TR, CBI-320412TK, CBI-320412TL, CBI-320416,CBI-320416TR, CBI-320416TK, CBI-320416TL, CBI-360112, CBI-360112TR,CBI-360112TK, CBI-360112TL, CBI-360116, CBI-360116TR, CBI-360116TK,CBI-360116TL のみ 対 応 しています。(※11)ulStartMode メンバと ulStopMode メンバに 同 じ 条 件 を 設 定 することはできません。識 別 子 値 意 味AD_START_CNT_EQ 0x00020000 カウンタ 一 致 検 出以 下 のスタートトリガ 条 件 はLPC-321116, LPC-321216, LPC-321316, LPC-321416, LPC-361116, LPC-361216,LPC-361316, LPC-361416PEX-321116, PEX-321216, PEX-321316, PEX-321416, PEX-361116, PEX-361216,PEX-361316, PEX-361416のみ 対 応 しています。(※14)ulStartMode メンバと ulStopMode メンバに 同 じ 条 件 を 設 定 することはできません。識 別 子 値 意 味AD_START_Z_CLR 0x00400000 Z 相 入 力PCI-321516 のみ 対 応 しています。識 別 子 値 内 容AD_START_SYNC1 01000000h 内 部 同 期 トリガ 1AD_START_SYNC2 02000000h 内 部 同 期 トリガ 2ulStopModeサンプリング 終 了 条 件 (ストップトリガ)を 指 定 します。外 部 トリガ 用 の 端 子 は 使 用 する 製 品 により 異 なります。( 使 用 上 の 注 意 事 項 を参 照 して 下 さい。)ulStopMode は、トリガ 指 定 識 別 子 を 組 み 合 わせて 指 定 します。(※8)識 別 子 値 意 味AD_FREERUN 1 トリガなし(デフォルト)AD_EXTTRG 2 外 部 トリガAD_EXTTRG_DI 3 DI マスク 付 き 外 部 トリガAD_SMPLNUM 10 指 定 件 数 (※5)AD_ETERNITY 9 無 限 サンプリング(※9)AD_STOP_P1 0x00000400 レベル 1 立 ち 上 がりAD_STOP_M1 0x00000800 レベル 1 立 ち 下 がり© 2000, 2014 Interface Corporation. All rights reserved.249


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_STOP_D1レベル 1 立 ち 上 がりまたは立 ち 下 がりAD_STOP_P2 0x00001000 レベル 2 立 ち 上 がりAD_STOP_M2 0x00002000 レベル 2 立 ち 下 がりAD_STOP_D2 0x00004000 レベル 2 立 ち 上 がりまたは立 ち 下 がり以 下 のストップトリガ 条 件 は PCI-3525, CPZ-3525 のみ 対 応 しています。(※13)ulStartMode メンバと ulStopMode メンバに 同 じ 条 件 を 設 定 することはできません。識 別 子 値 意 味AD_STOP_SIGTIMER 16 インターバルタイマAD_STOP_DA_START 12 DA スタート( DaStartSampling 関 数 使用 時 )AD_STOP_DA_STOP 13 DA ストップ( DaStartSampling 関 数 使用 時 )AD_STOP_DA_10 14 DA 出 力 更 新(DaOutputDA 関 数 使 用 時 )AD_STOP_SMPLNUM 15 DA 指 定 件 数 出 力( DaStartSampling 関 数 使用 時 )以 下 のストップトリガ 条 件 は PCI-320412, PCI-320416, PCI-360116,PCI-360112, PCI-360216, PCI-320416LPC-321116, LPC-321216, LPC-321316, LPC-321416, LPC-361116, LPC-361216,LPC-361316, LPC-361416PEX-321116, PEX-321216, PEX-321316, PEX-321416, PEX-361116, PEX-361216,PEX-361316, PEX-361416CTP-360116, CTP-360112, CPZ-360116, CPZ-360112,CSI-320412, CSI -320416, CSI -360112, CSI -360116,CBI-320412, CBI-320412TR, CBI-320412TK, CBI-320412TL, CBI-320416,CBI-320416TR, CBI-320416TK, CBI-320416TL, CBI-360112, CBI-360112TR,CBI-360112TK, CBI-360112TL, CBI-360116, CBI-360116TR, CBI-360116TK,CBI-360116TL のみ 対 応 しています。(※11)ulStartMode メンバと ulStopMode メンバに 同 じ 条 件 を 設 定 することはできません。識 別 子 値 意 味AD_STOP_CNT_EQ 0x00040000 カウンタ 一 致 検 出© 2000, 2014 Interface Corporation. All rights reserved.250


<strong>GPC</strong>-<strong>3100</strong> Help for Windows以 下 のストップトリガ 条 件 はLPC-321116, LPC-321216, LPC-321316, LPC-321416, LPC-361116, LPC-361216,LPC-361316, LPC-361416PEX-321116, PEX-321216, PEX-321316, PEX-321416, PEX-361116, PEX-361216,PEX-361316, PEX-361416のみ 対 応 しています。(※14)ulStartMode メンバと ulStopMode メンバに 同 じ 条 件 を 設 定 することはできません。識 別 子 値 意 味AD_STOP_Z_CLR 0x00800000 Z 相 入 力PCI-321516 のみ 対 応 しています。識 別 子 値 内 容AD_STOP_SYNC1 04000000h 内 部 同 期 トリガ 1AD_STOP_SYNC2 08000000h 内 部 同 期 トリガ 2ulPreTrigDelayulPostTrigDelayulChNo1fTrigLevel1プリトリガディレイをサンプルの 個 数 を 単 位 として、1~1,073,741,824 の 範 囲で 指 定 します(ulStartMode で AD_FREERUN 以 外 が 設 定 されている 場 合 に 有 効 です)。(※6)0 を 指 定 すると、プリトリガディレイを 使 用 しません。・デフォルト:0ポストトリガディレイをサンプルの 個 数 を 単 位 として、1,024~262,144 の 範 囲を 1,024 件 単 位 で 指 定 します。PCI-3525, CPZ-3525 では 1~16,777,216 の 範 囲 を 1 件 単 位 で 指 定 します。LPC-321316, LPC-321416, LPC-361316, LPC-361416PEX-321316, PEX-321416, PEX-361316, PEX-361416CTP-3167, CPZ-3167CSI-3133A, 3133B, 3134A, 3134B, 320212, 320312, CBI-3133A, 3133B, 3134A,3134B, 320212, 320212TR, 320212TK, 320212TL, 320312, 320312TK, 320312TLでは 1~65,536 の 範 囲 を 1 件 単 位 で 指 定 します。(ulStopMode で AD_FREERUN 以 外 が 設 定 されている 場 合 に 有 効 です)0 を 指 定 すると、ポストトリガディレイを 使 用 しません。・デフォルト:0トリガレベル 1 のチャンネルの 番 号 を 指 定 します。・ 1 ~ その 製 品 が 提 供 する 最 大 チャンネル 番 号トリガレベル 1 を 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位として、ADSMPLCHREQ 構 造 体 で 指 定 したレンジの 範 囲 内 で 指 定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。© 2000, 2014 Interface Corporation. All rights reserved.251


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsfHysteresis1ulChNo2fTrigLevel2fHysteresis2ulATrgModeulATrgPulseトリガレベル 1 に 対 するヒステリシスを 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位として、0~[ADSMPLCHREQ 構 造 体 で 指 定 したレンジ 幅 の 半 分 ]までの 範 囲 で 指定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。トリガレベル 2 のチャンネルの 番 号 を 指 定 します。・ 1 ~ その 製 品 が 提 供 する 最 大 チャンネル 番 号トリガレベル 2 を 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位として、ADSMPLCHREQ 構 造 体 で 指 定 したレンジの 範 囲 内 で 指 定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。トリガレベル 2 に 対 するヒステリシスを 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位として、0~[ADSMPLCHREQ 構 造 体 で 指 定 したレンジ 幅 の 半 分 ]までの 範 囲 で 指定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。アナログトリガによるパルス 出 力 条 件 を 指 定 します。ulATrgMode は、パルス 出 力 指 定 識 別 子 を 組 み 合 わせて 指 定 します(AD_DISABLEは、 他 の 識 別 子 と 組 み 合 わせることはできません)。アナログトリガ 出 力 機 能 がある 製 品 の 場 合 に 有 効 です。PCI-321516 では、 内 部 同 期 トリガ 出 力 条 件 を 指 定 します。識 別 子 値 意 味AD_DISABLE 0x80000000 パルス 出 力 なし(デフォルト)AD_EDGE_P1 0x0010 レベル 1 立 ち 上 がりAD_EDGE_M1 0x0020 レベル 1 立 ち 下 がりAD_EDGE_D1 0x0040 レベル 1 立 ち 上 がりまたは 立ち 下 がりAD_EDGE_P2 0x0080 レベル 2 立 ち 上 がりAD_EDGE_M2 0x0100 レベル 2 立 ち 下 がりAD_EDGE_D2 0x0200 レベル 2 立 ち 上 がりまたは 立ち 下 がりアナログトリガ 出 力 のパルス 極 性 をパルス 極 性 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。アナログトリガ 出 力 機 能 がある 製 品 の 場 合 に 有 効 です。パルス 極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_LOW_PULSE 1 LOW パルス(デフォルト)AD_HIGH_PULSE 2 HIGH パルス© 2000, 2014 Interface Corporation. All rights reserved.252


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsulStartTrigEdgeulStopTrigEdgeulTrigDIulEClkEdgeulFastModeサンプリング 開 始 条 件 における 外 部 トリガの 極 性 を、 極 性 指 定 識 別 子 のうちいずれか 1 つで 指 定 します。(※10)ulStartMode に 外 部 トリガまたは DI マスク 付 き 外 部 トリガが 指 定 されている 場合 に 有 効 です。 極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジサンプリング 終 了 条 件 における 外 部 トリガの 極 性 を、 極 性 指 定 識 別 子 のうちいずれか 1 つで 指 定 します。(※10)ulStopMode に 外 部 トリガまたは DI マスク 付 き 外 部 トリガが 指 定 されている 場合 に 有 効 です。極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジ汎 用 デジタル 入 力 端 子 による 外 部 トリガのマスクを 指 定 します。ulTrigDI の 16bit のうちいずれか 1bit を 1 にセットします。1 にセットされている bit に 対 応 した 汎 用 デジタル 入 力 端 子 の 状 態 が Low レベルになっている 間 、 外 部 トリガ 入 力 が 有 効 となります。1 をセットする bit の 位 置 は、 使 用 する 製 品 が 持 っている 汎 用 デジタル 入 力 端子 の 数 に 注 意 してください。ulStartMode、または ulStopMode に DI マスク 付 き 外 部 トリガが 指 定 されている場 合 に 有 効 です。ulTrigDI の 形 式 は、デジタル 入 力 データの 形 式 と 同 じ 形 式 です。を 参 照 してください。・デフォルト:1外 部 クロック 入 力 のエッジ 極 性 を 極 性 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。fSmplFreq に 0.0f( 外 部 クロック)が 指 定 されている 場 合 に 有 効 です。極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジ倍 速 モードの 指 定 をします。(PCI-3525, CPZ-3525 のみ)識 別 子 値 意 味AD_NORMAL_MODE 1 通 常 モードで 使 用 する(デフォルト)AD_FAST_MODE 2 倍 速 モードで 使 用 するulStatusModeサンプリングデータへのステータスの 付 加 指 定 をします(サンプリングステータス 対 応 製 品 のみ)。識 別 子 値 意 味© 2000, 2014 Interface Corporation. All rights reserved.253


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_NO_STATUS 1 サンプリングステータスなし(デフォルト)AD_ADD_STATUS 2 サンプリングステータス 付 加ulErrCtrlサンプリングエラー 発 生 時 の 処 理 を 指 定 をします。ulErrCtrl は、エラー 処 理 指 定 識 別 子 を 組 み 合 わせて 指 定 します(AD_FREERUNは、 他 の 識 別 子 と 組 み 合 わせることはできません)。識 別 子 値 意 味AD_FREERUN 1 処 理 なし(エラーが 発 生 してもサンプリングを 継 続 :デフォルト)AD_STOP_SCER 2 サンプリングクロックエラー 発 生 により、サンプリングを 停 止 (※4)AD_STOP_ORER 4 オーバランエラー 発 生 により、サンプリングを 停 止※4 内 部 クロック 使 用 時 には、 以 下 の 条 件 で 設 定 する 必 要 があります。fSmplFreq * ulChCount


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsCPZ– 360112, CPZ-360116CSI-3133A, CSI-3133B, CSI-3134A, CSI-3134B, CSI-320212, CSI-320312, CSI-320412,CSI-320416, CSI-360112, CSI-360116 ,CBI-3133A, CBI-3133B, CBI-3134A, CBI-3134B, CBI-320212, CBI-320212TR, CBI-320212TK,CBI-320212TL, CBI-320312, CBI-320312TR, CBI-320312TK, CBI-320312TL, CBI-320412,CBI-320412TR, CBI-320412TK, CBI-320412TL, CBI-320416, CBI-320416TR, CBI-320416TK,CBI-320416TL, CBI-360112, CBI-360112TR, CBI-360112TK, CBI-360112TL, CBI-360116,CBI-360116TR, CBI-360116TK, CBI-360116TL では 1~16777216 の 範 囲 を 1 件 単 位 で 指 定 してください※6 ulSmplRepeat に 1 以 外 を 指 定 した 場 合 には、 開 始 条 件 、および 終 了 条 件 には AD_FREERUN 以外 の 識 別 子 を 指 定 してください。(LPC-321316, LPC-321416, LPC-361316, LPC-361416PEX-321316, PEX-321416, PEX-361316, PEX-361416CTP-3167, CPZ-3167,CSI-3133A, CSI-3133B, CSI-3134A, CSI-3134B, CSI-320212, CSI-320312,CBI-3133A, CBI-3133B, CBI-3134A, CBI-3134B, CBI-320212, CBI-320212TR, CBI-320212TK,CBI-320212TL, CBI-320312, CBI-320312TR, CBI-320312TK, CBI-320312TL では、0 を 指 定 することができません。)また、ulSmplRepeat に 1 以 外 を 設 定 した 場 合 には、プリトリガディレイは 使 用 できません(ulPreTirgDelay には 0 を 指 定 してください)。※7 ulBufferMode に AD_OVERWRITE を 指 定 した 場 合 には、ulStartMode で 指 定 した 開 始 条 件 成 立によるサンプリング 開 始 時 にサンプリングデータは 自 動 的 にクリアされますので、サンプリングデータは 次 回 のサンプリングが 開 始 するまでに 取 得 してください。※8 アナログトリガ 識 別 子 は、 各 識 別 子 を+ 演 算 子 で 繋 げることにより、 複 数 の 識 別 子 を 指 定 する 事 ができます(AD_FREERUN、AD_EXTTRG、AD_EXTTRG_DI、AD_SMPLNUM、AD_ETERNITYは、 他の 識 別 子 と 組 み 合 わせることはできません)。例 1. サンプリング 開 始 条 件 にレベル 1 立 ち 上 がり、レベル 2 立 ち 下 がりを 使 用 する 場 合ulStartMode = AD_START_P1 + AD_START_M2;例 2. サンプリング 終 了 条 件 にレベル 1 立 ち 下 がりとレベル 2 立 ち 下 がりを 使 用 する 場 合ulStopMode = AD_STOP_M1 + AD_STOP_M2;ulStartMode、ulStopMode ともに 外 部 トリガ、または DI マスク 付 き 外 部 トリガを 指 定 する 場合 、ulStartMode、ulStopMode には 同 じトリガ 識 別 子 を 指 定 してください(ulStartMode =ulStopMode = AD_EXTTRG、または ulStartMode = ulStopMode = AD_EXTTRG_DI)。ulStartMode、ulStopMode のいずれかに 外 部 トリガ、または DI マスク 付 き 外 部 トリガ 以 外 を指 定 する 場 合 には、ulStartMode、ulStopMode は 任 意 の 指 定 ができます。※9 AD_ETERNITY( 無 限 サンプリング)を 指 定 した 場 合 には、ulSmplNum で 指 定 した 件 数 分 の 大 きさのリングバッファで AdStopSampling 関 数 が 実 行 されるまで 繰 り 返 しサンプリングが 行 われます。また、ulStartMode には AD_FREERUN(トリガなし)を 指 定 してください。トリガは 設 定 できません。© 2000, 2014 Interface Corporation. All rights reserved.255


<strong>GPC</strong>-<strong>3100</strong> Help for Windows※10ulStartTrigEdge、ulStopTrigEdge へ 指 定 する 極 性 指 定 識 別 子 の 組 み 合 わせにより、 外 部 トリガパルスによるサンプリング 開 始 ・ 終 了 、 外 部 トリガレベルによるサンプリング 開 始 ・ 終了 が 使 用 できます(ulStartMode、ulStopMode とも、AD_EXTTRG または AD_EXTTRG_DI が 指 定されている 場 合 のみ)。・ 外 部 トリガパルスによるサンプリング 開 始 ・ 終 了ulStartTrigEdge、ulStopTrigEdge ともに 同 じ 極 性 指 定 識 別 子 (ulStartTrigEdge =ulStopTrigEdge = AD_DOWN_EDGE、または ulStartTrigEdge = ulStopTrigEdge = AD_UP_EDGE)を 指 定 した 場 合 には、 外 部 トリガパルスによるサンプリングとなります。・ 外 部 トリガレベルによるサンプリング 開 始 ・ 終 了ulStartTrigEdge、ulStopTrigEdge に 異 なる 極 性 指 定 識 別 子 (ulStartTrigEdge =AD_DOWN_EDGE、ulStopTrigEdge = AD_UP_EDGE、または ulStartTrigEdge = AD_UP_EDGE、ulStopTrigEdge = AD_DOWN_EDGE)を 指 定 した 場 合 には、 外 部 トリガレベルによるサンプリングとなります。※11 PCI-320412, PCI-320416, PCI-360116, PCI-360112, PCI-360216LPC-321316, LPC-321416, LPC-361316, LPC-361416PEX-321316, PEX-321416, PEX-361316, PEX-361416CTP-320412, CTP-320416, CTP-360116, CTP-360112, CPZ-320412, CPZ -320416, CPZ -360116,CPZ -360112CSI-320412, CSI-320416, CSI-360112, CSI-360116,CBI-320412, CBI-320412TR, CBI-320412TK, CBI-320412TL, CBI-320416, CBI-320416TR,CBI-320416TK, CBI-320416TL, CBI-360112, CBI-360112TR, CBI-360112TK, CBI-360112TL,CBI-360116, CBI-360116TR, CBI-360116TK, CBI-360116TL では、カウンタのカウンタ 値 が 指定 したカウンタ 値 と 一 致 した 場 合 にサンプリングの 開 始 / 終 了 が 行 えます。© 2000, 2014 Interface Corporation. All rights reserved.256


<strong>GPC</strong>-<strong>3100</strong> Help for Windows※13 PCI-3525, CPZ-3525,では ulStartMode( 開 始 条 件 )と ulStopMode( 終 了 条 件 )で、 製 品 に搭 載 されているアナログ 出 力 のトリガでサンプリングを 開 始 させたり 終 了 させたりすることができます。設 定 例 1: 開 始 条 件 を DA 指 定 件 数 出 力 にし 終 了 条 件 を 指 定 件 数 に 設 定 した 場 合ulStartMode= AD_START_DA_SMPLNUM ulStopMode= AD_SMPLNUMDA 出 力DA 変 換 指 定 出 力 件 数入 力 信 号DA 変 換 指 定 出 力 件 数AD 用 指 定 件 数 終 了設 定 例 2: 開 始 条 件 を DA ストップにし 終 了 条 件 を 指 定 件 数 に 設 定 した 場 合ulStartMode= AD_START_DA_STOP ulStopMode= AD_SMPLNUMDA 出 力外 部 トリガDA 用 FIFO_EMPTY入 力 信 号DA_STOPAD 用 指 定 件 数 終 了※12 PCI-3525(RevisionID が 4 以 降 からは 繰 り 返 し 回 数 を 設 定 できます。)CTP/CPZ-3167, CPZ-3525,LPC-321316, LPC-321416, LPC-361316, LPC-361416© 2000, 2014 Interface Corporation. All rights reserved.257


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsPEX-321316, PEX-321416, PEX-361316, PEX-361416CSI-3133A, CSI-3133B, CSI-3134A, CSI-3134B, CSI-320212, CSI-320312,CBI-3133A, CBI-3133B, CBI-3134A, CBI-3134B, CBI-320212, CBI-320212TR, CBI-320212TK,CBI-320212TL, CBI-320312, CBI-320312TR, CBI-320312TK, CBI-320312TL では、 繰 り 返 し 回数 を 指 定 することができません。この 製 品 では 必 ず 1 を 指 定 してください。※13 LPC-321116, LPC-321216, LPC-321316, LPC-321416, LPC-361116, LPC-361216, LPC-361316,LPC-361416PEX-321116, PEX-321216, PEX-321316, PEX-321416, PEX-361116, PEX-361216, PEX-361316,PEX-361416ではカウンタのカウントアップ/ダウンに 同 期 して AD 変 換 を 行 います。※14 LPC-321116, LPC-321216, LPC-321316, LPC-321416, LPC-361116, LPC-361216, LPC-361316,LPC-361416PEX-321116, PEX-321216, PEX-321316, PEX-321416, PEX-361116, PEX-361216, PEX-361316,PEX-361416ではカウンタの Z 相 入 力 によりサンプリングの 開 始 / 終 了 が 行 えます。© 2000, 2014 Interface Corporation. All rights reserved.258


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●ADMEMSMPLREQ 構 造 体サンプリング 条 件 設 定 関 数 (AdMemSetSamplingConfig 関 数 )で 指 定 するサンプリング 時 の 条 件 を 設定 する 構 造 体 です。・Visual C# .NET[StructLayout(LayoutKind.Sequential)]public struct ADMEMSMPLREQ{public uint ulChCount;[MarshalAs(UnmanagedType.ByValArray, SizeConst=512)]public uint[] ulChNoRange;public uint ulSingleDiff;public float fSmplFreq;public uint ulStopMode;public uint ulPreTrigDelay;public uint ulPostTrigDelay;public uint ulChNo1;public float fTrigLevel1;public float fHysteresis1;public uint ulChNo2;public float fTrigLevel2;public float fHysteresis2;public uint ulATrgMode;public uint ulATrgPulse;public uint ulStopTrigEdge;public uint ulEClkEdge;public uint ulFastMode;public uint ulStatusMode;public uint ulErrCtrl;public void InitializeArray(){ulChNoRange = new uint [512];}public void SetChNo(uint ulIndex , uint ulNumber){ulChNoRange[ulIndex * 2] = ulNumber;}public uint GetChNo(uint ulIndex){return(ulChNoRange[ulIndex * 2]);}public void SetChRange(uint ulIndex, uint ulRange){ulChNoRange[(ulIndex * 2) + 1] = ulRange;© 2000, 2014 Interface Corporation. All rights reserved.259


<strong>GPC</strong>-<strong>3100</strong> Help for Windows}}public uint GetChRange(uint ulIndex){return(ulChNoRange[(ulIndex * 2) + 1]);}・Visual Basic .NET _Structure ADMEMSMPLREQDim ulChCount As Integer _Dim ulChNoRange() As IntegerDim ulSingleDiff As IntegerDim fSmplFreq As SingleDim ulStopMode As IntegerDim ulPreTrigDelay As IntegerDim ulPostTrigDelay As IntegerDim ulChNo1 As IntegerDim fTrigLevel1 As SingleDim fHysteresis1 As SingleDim ulChNo2 As IntegerDim fTrigLevel2 As SingleDim fHysteresis2 As SingleDim ulATrgMode As IntegerDim ulATrgPulse As IntegerDim ulStopTrigEdge As IntegerDim ulEClkEdge As IntegerDim ulFastMode As IntegerDim ulStatusMode As IntegerDim ulErrCtrl As IntegerPublic Sub New(ByVal Dummy As Integer)ReDim ulChNoRange(511)End SubPublic Sub SetChNo(ByVal ulIndex As Integer, ByVal ulNumber As Integer)ulChNoRange(ulIndex * 2) = ulNumberEnd SubPublic Function GetChNo(ByVal ulIndex As Integer)GetChNo = ulChNoRange(ulIndex * 2)End FunctionPublic Sub SetChRange(ByVal ulIndex As Integer, ByVal ulRange As Integer)ulChNoRange((ulIndex * 2) + 1) = ulRangeEnd SubPublic Function GetChRange(ByVal ulIndex As Integer)GetChRange = ulChNoRange((ulIndex * 2) + 1)© 2000, 2014 Interface Corporation. All rights reserved.260


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsEnd FunctionEnd Structure© 2000, 2014 Interface Corporation. All rights reserved.261


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・Delphi 8 for the Microsoft .NET Frameworktype[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]ADMEMSMPLREQ = recordulChCount : Cardinal;[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]ulChNoRange : array of Integer;ulSingleDiff : Cardinal;fSmplFreq : Single;ulStopMode : Cardinal;ulPreTrigDelay : Cardinal;ulPostTrigDelay : Cardinal;ulChNo2 : Cardinal;fTrigLevel2 : Single;fHysteresis2 : Single;ulATrgMode : Cardinal;ulATrgPulse : Cardinal;ulStopTrigEdge : Cardinal;ulEClkEdge : Cardinal;ulFastMode : Cardinal;ulStatusMode : Cardinal;ulErrCtrl : Cardinal;public constructor Create(var ulChNoRange : array of Integer);public procedure SetChNo( ulIndex: Integer; ulNumber: Integer);public function GetChNo( ulIndex: Integer): Integer;public procedure SetChRange( ulIndex: Integer; ulRange: Integer);public function GetChRange( ulIndex: Integer): Integer;end;メンバulChCountulChNoRange説 明サンプリングを 行 うチャンネルの 数 を 1 から 製 品 が 提 供 する 最 大 チャンネル 数 の 範 囲 で 指 定 します。サンプリングを 行 うチャンネル 番 号 はulChNoRange()で 指 定 します。・デフォルト:1※CPZ-360810 でチャンネル 数 は 2 チャンネル 固 定 となります。各 チャンネル 毎 のサンプリング 条 件 を 設 定 です。この 変 数 にアクセスするには 以 下 のメソッドを 利 用 します。メソッド内 容SetChNo入 力 チャンネルを 設 定 しますGetChNo入 力 チャンネル 設 定 を 取 得 しますSetChRange入 力 チャンネルのレンジを 設 定 しますGetChRange入 力 チャンネルのレンジを 設 定 を 取 得 します© 2000, 2014 Interface Corporation. All rights reserved.262


<strong>GPC</strong>-<strong>3100</strong> Help for Windows例 ) 入 力 チャンネル 1,2 をそれぞれ±5V、±10V レンジに 設 定ADMEMSMPLREQ config・・config.SetChNo(0, 1)config.SetChNo(1, 2)config.SetChRange(0, AD_5V)config.SetChRange(1, AD_10V)・ulSingleDifffSmplFrequlStopModeulPreTrigDelay入 力 仕 様 を 指 定 します。ulSingleDiff は、 入 力 仕 様 指 定 識 別 子 のいずれか1つを 指 定 します。識 別 子 値 意 味AD_INPUT_SINGLE 1 シングルエンド 入 力AD_INPUT_DIFF 2 差 動 入 力・デフォルト: 使 用 する 製 品 毎 に 異 なります。デフォルト 値 はデバイスオープン 直 後 に AdMemGetSamplingConfig 関 数を 実 行 することにより 取 得 できます。サンプリング 周 波 数 を 製 品 が 提 供 するサンプリング 周 波 数 の 範 囲 で、Hzを 単 位 として 設 定 します。外 部 クロックを 使 用 する 場 合 は、0.0f を 指 定 してください。・デフォルト: 使 用 する 製 品 により 異 なります。(デフォルト 値 はデバイスオープン 直 後 に AdMemGetSamplingConfig 関 数 を 実 行 することにより 取 得 できます。)サンプリング 終 了 条 件 (ストップトリガ)を 指 定 します。外 部 トリガ 用 の 端 子 は 使 用 する 製 品 により 異 なります。 使 用 上 の 注 意 事項 を 参 照 して 下 さい。ulStopMode は、トリガ 指 定 識 別 子 を 組 み 合 わせて 指 定 します。識 別 子 値 意 味AD_EXTTRG 2 外 部 トリガAD_STOP_DI_EQ 0x00100000 DI パターン 一 致 (※15)AD_STOP_SOFT 0x00200000 ソフトストップ(※14)AD_STOP_P1 0x00000400 レベル 1 立 ち 上 がりAD_STOP_M1 0x00000800 レベル 1 立 ち 下 がりAD_STOP_D1 0x00001000 レベル 1 立 ち 上 がりまたは立 ち 下 がりAD_STOP_P2 0x00002000 レベル 2 立 ち 上 がりAD_STOP_M2 0x00004000 レベル 2 立 ち 下 がりAD_STOP_D2 0x00008000 レベル 2 立 ち 上 がりまたは立 ち 下 がりプリトリガディレイをサンプルの 個 数 を 単 位 として、1~1,073,741,824の 範 囲 で 指 定 します。(※16)0 を 指 定 すると、プリトリガディレイを 使 用 しません。© 2000, 2014 Interface Corporation. All rights reserved.263


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・デフォルト:0ulPostTrigDelayulChNo1fTrigLevel1fHysteresis1ulChNo2fTrigLevel2fHysteresis2ポストトリガディレイをサンプルの 個 数 を 単 位 として、1~メモリ 容 量の 範 囲 を 1 件 単 位 で 指 定 します。(※16)0 を 指 定 すると、ポストトリガディレイを 使 用 しません。・デフォルト:1024トリガレベル 1 のチャンネルの 番 号 を 指 定 します。・ 1 ~ その 製 品 が 提 供 する 最 大 チャンネル 番 号トリガレベル 1 を 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位 として、ADSMPLCHREQ 構 造 体 で 指 定 したレンジの 範 囲 内 で 指 定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。トリガレベル 1 に 対 するヒステリシスを 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位 として、0~[ADSMPLCHREQ 構 造 体 で 指 定 したレンジ 幅 の 半 分 ]までの 範 囲 で 指 定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。トリガレベル 2 のチャンネルの 番 号 を 指 定 します。・ 1 ~ その 製 品 が 提 供 する 最 大 チャンネル 番 号トリガレベル 2 を 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位 として、ADSMPLCHREQ 構 造 体 で 指 定 したレンジの 範 囲 内 で 指 定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。トリガレベル 2 に 対 するヒステリシスを 指 定 します。指 定 する 値 は、 入 力 レンジが 電 圧 であれば[V]を、 電 流 であれば[mA]を 単 位 として、0~[ADSMPLCHREQ 構 造 体 で 指 定 したレンジ 幅 の 半 分 ]までの 範 囲 で 指 定 します。・デフォルト: 使 用 する 製 品 毎 に 異 なります。ulATrgModeアナログトリガによるパルス 出 力 条 件 を 指 定 します。ulATrgMode は、パルス 出 力 指 定 識 別 子 を 組 み 合 わせて 指 定 します(AD_DISABLE は、 他 の 識 別 子 と 組 み 合 わせることはできません)。アナログトリガ 出 力 機 能 がある 製 品 の 場 合 に 有 効 です。識 別 子 値 意 味AD_DISABLE 0x80000000 パルス 出 力 なし(デフォルト)AD_EDGE_P1 0x0010 レベル 1 立 ち 上 がりAD_EDGE_M1 0x0020 レベル 1 立 ち 下 がりAD_EDGE_D1 0x0040 レベル 1 立 ち 上 がりまたは 立 ち下 がり© 2000, 2014 Interface Corporation. All rights reserved.264


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_EDGE_P2 0x0080 レベル 2 立 ち 上 がりAD_EDGE_M2 0x0100 レベル 2 立 ち 下 がりAD_EDGE_D2 0x0200 レベル 2 立 ち 上 がりまたは 立 ち下 がりulATrgPulseulStopTrigEdgeulEClkEdgeulFastModeulStatusModeアナログトリガ 出 力 のパルス 極 性 をパルス 極 性 指 定 識 別 子 のうちいずれか 1 つを 指 定 します。アナログトリガ 出 力 機 能 がある 製 品 の 場 合 に 有 効 です。パルス 極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_LOW_PULSE 1 LOW パルス(デフォルト)AD_HIGH_PULSE 2 HIGH パルスサンプリング 終 了 条 件 における 外 部 トリガの 極 性 を、 極 性 指 定 識 別 子 のうちいずれか 1 つで 指 定 します。ulStopMode に 外 部 トリガが 指 定 されている 場 合 に 有 効 です。極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジ外 部 クロック 入 力 のエッジ 極 性 を 極 性 指 定 識 別 子 のうちいずれか 1 つを指 定 します。fSmplFreq に 0.0f( 外 部 クロック)が 指 定 されている 場 合 に 有 効 です。極 性 指 定 識 別 子 は 以 下 の 通 りです。識 別 子 値 意 味AD_DOWN_EDGE 1 立 ち 下 がりエッジ(デフォルト)AD_UP_EDGE 2 立 ち 上 がりエッジ倍 速 モードの 指 定 をします。識 別 子 値 意 味AD_NORMAL_MODE 1 通 常 モードで 使 用 する(デフォルト)AD_FAST_MODE 2 倍 速 モードで 使 用 するサンプリングデータへのステータスの 付 加 指 定 をします(サンプリングステータス 対 応 製 品 のみ)。識 別 子 値 意 味AD_NO_STATUS 1 サンプリングステータスなし(デフォルト)AD_ADD_STATUS 2 サンプリングステータス 付 加 (※17)ulErrCtrlサンプリングエラー 発 生 時 の 処 理 を 指 定 をします。ulErrCtrl は、エラー 処 理 指 定 識 別 子 を 組 み 合 わせて 指 定 します。識 別 子 値 意 味© 2000, 2014 Interface Corporation. All rights reserved.265


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_FREERUN 1 処 理 なし(エラーが 発 生 してもサンプリングを 継 続 :デフォルト)AD_STOP_ORER 4 オーバランエラー 発 生 により、サンプリングを 停 止※14 ソフトトリガに 指 定 した 場 合 は、AdStartSampling 関 数 で 同 期 処 理 を 行 うことができないのでご 注 意 ください。ソフトトリガは、AdStopSampling 関 数 で 行 います。※15 DI パターン 一 致 トリガは、AdMemSetDiPattern 関 数 で 設 定 された DI パターン 条 件 と 一 致したときにストップトリガが 発 生 します。※16 プリトリガディレイ、ポストトリガディレイはストップトリガが 入 った 位 置 からの 件 数となります。プリトリガ 件 数 とポストトリガ 件 数 の 和 は、4194304 以 下 になるように 設 定 してください。ulPreTrigDelay = 0、ulPostTrigDelay = 0 という 設 定 はできません。・プリトリガあり-ポストトリガなしトリガ 発 生| | プリトリガ 件 数 ||||| | |開 始 コマンドサンプリング 終 了・プリトリガなし-ポストトリガありトリガ 発 生| | ポストトリガ 件 数 ||||| | |開 始 コマンドサンプリング 終 了・プリトリガあり-ポストトリガありトリガ 発 生| | プリトリガ 件 数 | ポストトリガ 件 数 |||||| | | |開 始 コマンドサンプリング 終 了※17オーバーランエラーが 発 生 した 時 点 でのデータを 取 得 することができません。サンプリングステータス 付 きに 設 定 いた 場 合 は、 下 記 のようなデータフォーマットになります。CH1 の 場 合bit15 bit14 bit13 bit12 bit11 bit10 bit9 ~ bit00 0 DI4 DI3 DI2 DI1 10bit のアナログデータ© 2000, 2014 Interface Corporation. All rights reserved.266


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsCH2 の 場 合bit15 bit14 bit13 bit12 bit11 bit10 bit9 ~ bit0TRG Over DI8 DI7 DI6 DI5 10bit のアナログデータTRG ステータス 0:プリサンプリング 中1:ポストサンプリング 中Over ステータス 0:オーバーラン 未 発 生1:オーバーラン 発 生© 2000, 2014 Interface Corporation. All rights reserved.267


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●ADSMPLCHREQ 構 造 体各 チャンネル 毎 のサンプリング 条 件 を 設 定 する 構 造 体 です。ADSMPLREQ 構 造 体 のメンバ、ADBMSMPLREQ 構 造 体 のメンバ、AdInputAD 関 数 で 使 用 されます。・Visual C# .NET[StructLayout(LayoutKind.Sequential)]public struct ADSMPLCHREQ{public uint ulChNo;public uint ulRange;}・Visual Basic .NET _Structure ADSMPLCHREQDim ulChNo As IntegerDim ulRange As IntegerEnd Structure・Delphi 8 for the Microsoft .NET Frameworktype[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]ADSMPLCHREQ = recordulChNo : Cardinal;ulRange : Cardinal;end;メンバulChNoulRange説 明サンプリングを 行 うチャンネルの 番 号 を 指 定 します。指 定 の 範 囲 は 以 下 の 通 りです。・ 1 ~ その 製 品 が 提 供 する 最 大 チャンネル 番 号ulChNo で 指 定 したチャンネルのレンジを 指 定 します。レンジの 指 定 は、レンジ 識 別 子 のうちいずれか 1 つを 指 定 します。識 別 子 値 内 容AD_0_1V 0x00000001 電 圧 ユニポーラ 0~1VAD_0_2P5V 0x00000002 電 圧 ユニポーラ 0~2.5VAD_0_5V 0x00000004 電 圧 ユニポーラ 0~5VAD_0_10V 0x00000008 電 圧 ユニポーラ 0~10VAD_1_5V 0x00000010 電 圧 ユニポーラ 1~5VAD_0_2V 0x00000020 電 圧 ユニポーラ 0~2VAD_0_0P125V 0x00000040 電 圧 ユニポーラ 0~0.125VAD_0_0P156V 0x00000200 電 圧 ユニポーラ 0~0.156V© 2000, 2014 Interface Corporation. All rights reserved.268


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsAD_0_1P25V 0x00000080 電 圧 ユニポーラ 0~1.25VAD_0_0P625V 0x00000100 電 圧 ユニポーラ 0~0.625VAD_0_20mA 0x00001000 電 流 ユニポーラ 0~20mAAD_4_20mA 0x00002000 電 流 ユニポーラ 4~20mAAD_20mA 0x00004000 電 流 バイポーラ ±20mAAD_1V 0x00010000 電 圧 バイポーラ ±1VAD_2P5V 0x00020000 電 圧 バイポーラ ±2.5VAD_5V 0x00040000 電 圧 バイポーラ ±5VAD_10V 0x00080000 電 圧 バイポーラ ±10VAD_20V 0x00100000 電 圧 バイポーラ ±20VAD_50V 0x00200000 電 圧 バイポーラ ±50VAD_0P125V 0x00400000 電 圧 バイポーラ ±0.125VAD_0P156V 0x02000000 電 圧 バイポーラ ±0.156VAD_1P25V 0x00800000 電 圧 バイポーラ ±1.25VAD_0P625V 0x01000000 電 圧 バイポーラ ±0.625VAD_0P156V_AC 0x10000000 電 圧 バイポーラ ±0.156V(AC カップリング 機 能 搭 載 )AD_1P25V_AC 0x04000000 電 圧 バイポーラ ±1.25V(AC カップリング 機 能 搭 載 )AD_0P625V_AC 0x08000000 電 圧 バイポーラ ±0.625V(AC カップリング 機 能 搭 載 )AD_GND 0x80000000 内 部 GND 接 続© 2000, 2014 Interface Corporation. All rights reserved.269


<strong>GPC</strong>-<strong>3100</strong> Help for Windows●ADBOARDSPEC 構 造 体製 品 の 仕 様 を 格 納 する 構 造 体 です。AdGetDeviceInfo 関 数 で 使 用 されます。・Visual C# .NET[StructLayout(LayoutKind.Sequential)]public struct ADBOARDSPEC{public uint ulBoardType;public uint ulBoardID;public uint dwSamplingMode;public uint ulChCountS;public uint ulChCountD;public uint ulResolution;public uint dwRange;public uint ulIsolation;public uint ulDi;public uint ulDo;}・Visual Basic .NETStructure ADBOARDSPECDim ulBoardType As IntegerDim ulBoardID As IntegerDim dwSamplingMode As IntegerDim ulChCountS As IntegerDim ulChCountD As IntegerDim ulResolution As IntegerDim dwRange As IntegerDim ulIsolation As IntegerDim ulDi As IntegerDim ulDo As IntegerEnd Structure© 2000, 2014 Interface Corporation. All rights reserved.270


<strong>GPC</strong>-<strong>3100</strong> Help for Windows・Delphi 8 for the Microsoft .NET Frameworktype[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]ADBOARDSPEC = recordulBoardType : Cardinal;ulBoardID : Cardinal;dwSamplingMode : Cardinal;ulChCountS : Cardinal;ulChCountD : Cardinal;ulResolution : Cardinal;dwRange : Cardinal;ulIsolation : Cardinal;ulDi : Cardinal;ulDo : Cardinal;end;メンバulBoardTypeulBoardIDulSamplingModeulResolutionulChCountSulChCountD説 明製 品 の 型 式 番 号 を 格 納 します。例 :PCI-3135 であれば、3135 が 格 納 されます。CTP-3135 であれば 3135 が 格納 されます。製 品 の 識 別 番 号 (RSW1 の 値 )を 格 納 します。製 品 が 対 応 しているサンプリング 方 式 をビットアサインで 格 納 します。bit0I/O 方 式bit1FIFO 方 式bit2メモリ 方 式bit3バスマスタ 方 式bit4~bit31 予 約 ( 全 て 0)・0: 未 サポート、1:サポート製 品 の 分 解 能 を 格 納 します。・12bit AD 製 品 の 場 合 :12 が 格 納 されます。シングルエンド 入 力 時 の 製 品 のチャンネル 数 を 格 納 します。差 動 入 力 時 の 製 品 のチャンネル 数 を 格 納 します。ulRange製 品 が 対 応 しているレンジをビットアサインで 格 納 します。bit0電 圧 ユニポーラ 0~1Vbit1電 圧 ユニポーラ 0~2.5Vbit2電 圧 ユニポーラ 0~5Vbit3電 圧 ユニポーラ 0~10Vbit4電 圧 ユニポーラ 1~5Vbit5電 圧 ユニポーラ 0~2V© 2000, 2014 Interface Corporation. All rights reserved.271


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsbit6電 圧 ユニポーラ 0~0.125Vbit7電 圧 ユニポーラ 0~1.25Vbit8電 圧 ユニポーラ 0~0.625Vbit9電 圧 ユニポーラ 0~0.156Vbit10~bit11 予 約 ( 全 て 0)bit12電 流 ユニポーラ 0~20mAbit13電 流 ユニポーラ 4~20mAbit14~15 予 約 ( 全 て 0)bit16 電 圧 バイポーラ ±1Vbit17電 圧 バイポーラ ±2.5Vbit18 電 圧 バイポーラ ±5Vbit19 電 圧 バイポーラ ±10Vbit20 電 圧 バイポーラ ±20Vbit21 電 圧 バイポーラ ±50Vbit22電 圧 バイポーラ ±0.125Vbit23電 圧 バイポーラ ±1.25Vbit24電 圧 バイポーラ ±0.625Vbit25電 圧 バイポーラ ±0.156Vbit26 電 圧 バイポーラ ±1.25V(AC カップリング 機 能 搭 載 )bit27 電 圧 バイポーラ ±0.625V(AC カップリング 機 能 搭 載 )bit28 電 圧 バイポーラ ±0.156V(AC カップリング 機 能 搭 載 )bit29~bit30 予 約 ( 全 て 0)bit31内 部 GND 接 続ulIsolationulDiulDo製 品 の 絶 縁 / 非 絶 縁 を 以 下 の 識 別 子 で 格 納 します。識 別 子 値 意 味AD_ISOLATION 1 絶 縁AD_NOT_ISOLATION 2 非 絶 縁製 品 のデジタル 入 力 点 数 を 格 納 します。製 品 のデジタル 出 力 点 数 を 格 納 します。© 2000, 2014 Interface Corporation. All rights reserved.272


<strong>GPC</strong>-<strong>3100</strong> Help for Windows3.1. 戻 り 値 一 覧エラー 識 別 子 値 意 味 対 処 方 法AD_ERROR_SUCCESS 0 正 常 終 了AD_ERROR_NOT_DEVICE 0xC0000001 ドライバが 呼 び出 せませんAD_ERROR_NOT_OPEN 0xC0000002 ドライバがオープンできませんAD_ERROR_INVALID_HANDLE 0xC0000003 デバイスハンドルが 正 しくありませんAD_ERROR_ALREADY_OPEN 0xC0000004 既 にオープンしているデバイスですAD_ERROR_NOT_SUPPORTED 0xC0000009 製 品 がサポートしていない 関 数ですAD_ERROR_NOW_SAMPLING 0xC0001001 サンプリングを実 行 中 ですAD_ERROR_STOP_SAMPLING 0xC0001002 サンプリングは停 止 中 ですAD_ERROR_START_SAMPLING 0xC0001003 サンプリングを実 行 できませんでしたAD_ERROR_SAMPLING_TIMEOUT 0xC0001004 サンプリング 中においてタイムアウトが 発 生 しましたAD_ERROR_SAMPLING_FREQ C0001005H サンプリング 周波 数 が 正 しくありません。AD_ERROR_INVALID_PARAMETER C0001021H パラメータが 不正 です指 定 されたデバイスが 見つかりませんでした。 指定 しているデバイス 名 が存 在 するかどうかを 確 認してください。デバイスのオープン 時 に何 らかのエラーが 発 生 しました。ドライバの 内 部作 業 領 域 の 確 保 に 失 敗 したなど。不 正 なデバイスハンドルで 呼 び 出 しを 行 おうとしました。オープン 関 数 で返 されたデバイスハンドルを 使 用 してください。既 にオープンされているデバイスをオープンしようとしました。製 品 がサポートしていない 機 能 を 制 御 する 関 数 です。サンプリング 実 行 中 に 再度 サンプリングを 実 行 しようとしました。サンプリング 実 行 中 に 実行 できない 関 数 を 呼 び 出そうとしました。サンプリング 停 止 中 に 実行 できない 関 数 を 呼 び 出そうとしました。――サンプリング 周 波 数 が 正しくありません。製 品 仕 様 以 上 のサンプリング 周 波 数 が 設 定 された。引 数 の 値 が 不 正 です。引 数 の 値 が 指 定 範 囲 外 です。© 2000, 2014 Interface Corporation. All rights reserved.273


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsエラー 識 別 子 値 意 味 対 処 方 法AD_ERROR_ILLEGAL_PARAMETER C0001022H サンプリング 設定 が 正 しくありませんAD_ERROR_NULL_POINTER C0001023H NULL ポインタを指 定 しましたAD_ERROR_GET_DATA C0001024H サンプリングデータの 取 得 ができませんでしたAD_ERROR_USED_DA C0001025H DA 側 で 使 用 中 です。AD_ERROR_FILE_OPEN C0001041H ファイルのオープンに 失 敗 しましたAD_ERROR_FILE_CLOSE C0001042H ファイルのクローズに 失 敗 しましたAD_ERROR_FILE_READ C0001043H ファイルのリードに 失 敗 しましたAD_ERROR_FILE_WRITE C0001044H ファイルのライトに 失 敗 しましたAD_ERROR_INVALID_DATA_FORMAT C0001061H データ 形 式 が 無効 ですサンプリング 設 定 値 が 正しくありません。サンプリング 設 定 に 矛 盾があります。サンプリングデータ 領 域の 指 定 に NULL を 指 定 しました。データ 変 換 関 数 において、データ 変 換 元 となるデータへのポインタがNULL で 指 定 された。変 換 後 のデータを 返 すためのポインタが NULL で 指定 された。まだ、サンプリングが 行われていないのでサンプリングデータの 取 得 ができませんでした。サンプリングバッファがクリアされているのでサンプリングデータが 取 得できませんでした。DA 側 で 使 用 中 の 機 能 を 停止 してから、 関 数 を 実 行しなおしてください。ファイルのパス 名 が 存 在しません。存 在 しないドライブを 指定 しました。ファイルアクセス 時 に 何らかのエラーが 発 生 しました。データファイルに以 上 がないかご 確 認 ください。ファイルアクセス 時 に 何らかのエラーが 発 生 しました。データファイルに以 上 がないかご 確 認 ください。ファイルアクセス 時 に 何らかのエラーが 発 生 しました。データファイルに以 上 がないかご 確 認 ください。データ 形 式 をご 確 認 ください。© 2000, 2014 Interface Corporation. All rights reserved.274


<strong>GPC</strong>-<strong>3100</strong> Help for Windowsエラー 識 別 子 値 意 味 対 処 方 法AD_ERROR_INVALID_AVERAGE_OR_SMOOTHING C0001062H 平 均 またはスムージングの 指 定が 正 しくありませんAD_ERROR_INVALID_SOURCE_DATA C0001063H データ 変 換 元 として 指 定 されたデータが 正 しくありませんAD_ERROR_NOT_ALLOCATE_MEMORY C0001081H メモリが 確 保 できませんAD_ERROR_NOT_LOAD_DLL C0001082H DLL がロードできませんでしたAD_ERROR_CALL_DLL C0001083H DLL の 呼 び 出 しに 失 敗 しましたAD_ERROR_USB_TIMEOUT C0001090H USB デバイスとの 通 信 がタイムアウトしましたAD_ERROR_USBIO_FAILED C0001091H USB デバイスの実 行 に 失 敗 しました平 均 またはスムージングの 回 数 が 0 またはデータ件 数 を 超 えている。平 均 またはスムージングが 指 定 されているのにも関 わらず、 平 均 またはスムージングの 件 数 が 0 に指 定 された。データ 変 換 元 のアドレス指 定 箇 所 などに 間 違 いがないかご 確 認 ください。ドライバ 内 部 で 作 業 するためのメモリの 確 保 に 失敗 しました。DLL のロードに 失 敗 しました。DLL が 見 つかりませんでした。DLL 呼 び 出 し 時 にサポートしていない 機 能 を 制 御する 関 数 です。再 起 動 を 行 なうか、DPC-0401 の「 IfUsbDevicePowerCtl」 関 数 を 使 用 し、USBデバイスの 電 源 を OFF→ON して 下 さい。「IfUsbDevicePowerCtl」関 数 の 使 用 方 法 は、DPC-0401 の Help を 参 照してください。再 起 動 を 行 なうか、DPC-0401 の「 IfUsbDevicePowerCtl」 関 数 を 使 用 し、USBデバイスの 電 源 を OFF→ON して 下 さい。「IfUsbDevicePowerCtl」関 数 の 使 用 方 法 は、DPC-0401 の Help を 参 照してください。© 2000, 2014 Interface Corporation. All rights reserved.275


<strong>GPC</strong>-<strong>3100</strong> Help for Windows3.2. プログラム 例/* ======================================================================/* プログラム 説 明 *//* 周 波 数 1000Hz、1024 件 のサンプリング 入 力 を 行 います *//* ======================================================================*/using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using InterfaceCorpDllWrap; // 名 前 空 間 の 追 加namespace Ex01{/// /// Form1 の 概 要 の 説 明 です。/// public class Form1 : System.Windows.Forms.Form{private System.ComponentModel.Container components = null;public int nRet; // 関 数 戻 り 値public int hDeviceHandle; // デバイスハンドルpublic IFCAD_ANY.ADSMPLREQ gConfig; // サンプリング 条 件 構 造 体public Form1(){//InitializeComponent();// デバイス 名 "FBIAD1"のデバイスの 初 期 化 を 行 います。hDeviceHandle = IFCAD_ANY.AdOpen( "FBIAD1");// サンプリング 条 件 の 取 得nRet = IFCAD_ANY.AdGetSamplingConfig(hDeviceHandle, out gConfig);// サンプリング 条 件 の 設 定gConfig.ulSmplNum = 1024;gConfig.ulTrigMode = IFCAD_ANY.AD_FREERUN;gConfig.fSmplFreq = 1000.0;nRet = IFCAD_ANY.AdSetSamplingConfig(hDeviceHandle, ref gConfig);© 2000, 2014 Interface Corporation. All rights reserved.276


<strong>GPC</strong>-<strong>3100</strong> Help for Windows}// サンプリング 開 始nRet = IFCAD_ANY.AdStartSampling(hDeviceHandle, IFCAD.FLAG_SYNC);/// /// 使 用 されているリソースに 後 処 理 を 実 行 します。/// protected override void Dispose( bool disposing ){// 終 了 処 理IFCAD_ANY.AdClose( hDeviceHandle );}if( disposing ) {if (components != null) {components.Dispose();}}base.Dispose( disposing );#region Windows フォーム デザイナで 生 成 されたコードprivate void InitializeComponent(){//// Form1//this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);this.ClientSize = new System.Drawing.Size(552, 173);this.Name = "Form1";this.Text = "Form1";}#endregion}}/// /// アプリケーションのメイン エントリ ポイントです。/// [STAThread]static void Main(){Application.Run(new Form1());}© 2000, 2014 Interface Corporation. All rights reserved.277


<strong>GPC</strong>-<strong>3100</strong> Help for Windows' ======================================================================' プログラム 説 明 */' 周 波 数 1000Hz、1024 件 のサンプリング 入 力 を 行 います */' ======================================================================' 名 前 空 間 の 追 加Imports InterfaceCorpDllWrapPublic Class Form1Inherits System.Windows.Forms.Form' 変 数 定 義Public nRet As Long‘ 関 数 戻 り 値Public gConfig As IFCAD_ANY.ADSMPLREQPublic hDeviceHandle As Long 'デバイスハンドル 格 納 用 変 数 標 準 モジュール 定 義 ファイルに 定 義 します。#Region " Windows フォーム デザイナで 生 成 されたコード "Public Sub New()MyBase.New()End Sub' この 呼 び 出 しは Windows フォーム デザイナで 必 要 です。InitializeComponent()' InitializeComponent() 呼 び 出 しの 後 に 初 期 化 を 追 加 します。' Form は、コンポーネント 一 覧 に 後 処 理 を 実 行 するために dispose をオーバーライドします。Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)If disposing ThenIf Not (components Is Nothing) Thencomponents.Dispose()End IfEnd IfMyBase.Dispose(disposing)End Sub' Windows フォーム デザイナで 必 要 です。Private components As System.ComponentModel.IContainer' メモ : 以 下 のプロシージャは、Windows フォーム デザイナで 必 要 です。'Windows フォーム デザイナを 使 って 変 更 してください。' コード エディタを 使 って 変 更 しないでください。 Private Sub InitializeComponent()© 2000, 2014 Interface Corporation. All rights reserved.278


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsEnd Sub#End Region''Form1'Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)Me.ClientSize = New System.Drawing.Size(376, 237)Me.Name = "Form1"Me.Text = "Form1"Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.LoadEnd Sub'フォームのロード 時 に 初 期 化 します。Dim nRet As Integer' 戻 り 値 格 納 用 変 数' デバイス 名 "FBIAD1"のデバイスの 初 期 化 を 行 います。hDeviceHandle = IFCAD_ANY.AdOpen("FBIAD1", 0)' サンプリング 条 件 の 取 得nRet = IFCAD_ANY.AdGetSamplingConfig(hDeviceHandle, gConfig)' サンプリング 条 件 の 設 定gConfig.ulSmplNum = 1024gConfig.ulTrigMode = IFCAD_ANY.AD_FREERUNgConfig.fSmplFreq = 1000nRet = IFCAD_ANY.AdSetSamplingConfig(hDeviceHandle, gConfig)' サンプリング 開 始nRet = IFCAD_ANY.AdStartSampling(hDeviceHandle, IFCAD.FLAG_SYNC)Private Sub Form_Unload(ByVal Cancel As Integer)Dim nRet As Integer' 戻 り 値 格 納 用 変 数‘ 終 了 処 理IFCAD_ANY.AdClose(hDeviceHandle)End SubEnd Class© 2000, 2014 Interface Corporation. All rights reserved.279


<strong>GPC</strong>-<strong>3100</strong> Help for Windows// ======================================================================/* プログラム 説 明 *//* 周 波 数 1000Hz、1024 件 のサンプリング 入 力 を 行 います */// ======================================================================unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs,InterfaceCorpDllWrap; //クラスライブラリの 名 前 空 間 使 用 宣 言typeTForm1 = class(TForm)procedure FormCreate(Sender: TObject);private{ Private 宣 言 }public{ Public 宣 言 }end;varForm1: TForm1;implementation{$R *.nfm}procedure TForm1.FormCreate(Sender: TObject);varhDeviceHandle:Integer;nRet:Integer;gConfig:IFCAD.ADSMPLREQ;//プログラム 起 動 時 に 実 行 されるコードbegin// デバイス'FBIAD1'をオープンする。hDeviceHandle:=IFCAD.AdOpen('FBIAD1');// デバイス 名 "FBIAD1"のデバイスの 初 期 化 を 行 います。hDeviceHandle := IFCAD.AdOpen( "FBIAD1");// サンプリング 条 件 の 取 得nRet := IFCAD.AdGetSamplingConfig(hDeviceHandle, gConfig);// サンプリング 条 件 の 設 定gConfig.ulSmplNum := 1024;© 2000, 2014 Interface Corporation. All rights reserved.280


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsgConfig.ulTrigMode := IFCAD.AD_FREERUN;gConfig.fSmplFreq := 1000.0;nRet = IFCAD.AdSetSamplingConfig(hDeviceHandle, gConfig);// サンプリング 開 始nRet = IFCAD.AdStartSampling(hDeviceHandle, IFCAD.FLAG_SYNC);‘ 終 了 処 理nRet = IFCAD.AdClose(hDeviceHandle)end;end.© 2000, 2014 Interface Corporation. All rights reserved.281


<strong>GPC</strong>-<strong>3100</strong> Help for Windows第 3 章 サンプルプログラム.NET 各 言 語 用 に 用 意 したサンプルプログラムの 概 要 を 説 明 します。4.1. 実 行 手 順「Visual C# .NET」、「Visual Basic .NET」、「Delphi 8」 用 のサンプルプログラムを 用 意 しています。「Visul C++ .NET」については「Visual C++」のサンプルプログラムを 使 用 することができます。サンプルプログラムは「Visual Studio .NET 2003」で 作 成 しています。(「Visual Studio .NET2002」では 使 用 できませんが、“How to”として 使 用 方 法 を 公 開 しています。 弊 社 Web サイトを参 照 してください。)【 実 行 手 順 】サンプルプログラムには 実 行 形 式 のファイルが 付 属 していません。ソースコードをコンパイルして 実 行 ファイルを 生 成 してから、 動 作 させてください。・ Visual C++の 場 合Visual Studio を 起 動 し、「ファイル」メニューから「 開 く」→「プロジェクト」を 選 び、プロジェクトファイル「*.vcproj」を 開 き、ビルドしてください。・ Visual C# .NET の 場 合Visual Studio を 起 動 し、「ファイル」メニューから「 開 く」→「プロジェクト」を 選 び、プロジェクトファイル「*.csproj」を 開 き、ビルドしてください。・ Visual Basic .NET の 場 合Visual Studio を 起 動 し、「ファイル」メニューから「 開 く」→「プロジェクト」を 選 び、プロジェクトファイル「*.vbproj」を 開 き、ビルドしてください。・ Delphi 8 の 場 合Delphi を 起 動 し、「ファイル」メニューから「プロジェクトを 開 く」を 選 びプロジェクトファイル「*.dpr」を 開 き、ビルドしてください。作 成 後 、 生 成 された 実 行 ファイル*.exe を 起 動 してください。© 2000, 2014 Interface Corporation. All rights reserved.282


<strong>GPC</strong>-<strong>3100</strong> Help for Windows4.2. サンプルプログラム 一 覧各 サンプルプログラムの 概 要 は、 下 記 の 様 になります。Visual C# .NET 用サンプルプログラム 名概 要総 合 AdSmpl_Cs 11 件 サンプリングの 実 行2 連 続 サンプリングの 実 行 ( 同 期 処 理 )3 連 続 サンプリングの 実 行 ( 非 同 期 処 理 )4 複 数 枚 同 期 サンプリングの 実 行 (マスタモード)5 複 数 枚 同 期 サンプリングの 実 行 (スレーブモード)6DMA 直 接 転 送 サンプリングの 実 行7メモリ 用 サンプリングの 実 行1 件 入 力 InputAD 1 件 入 力 ( 指 定 チャンネル)を 行 うプログラム標 準 サンプリング Sampling 通 常 サンプリングWaitEvent イベントを 使 用 したサンプリングCallback コールバックを 使 用 したサンプリングExClk外 部 クロック 入 力 でサンプリングATrgアナログトリガスタートでサンプリングATrg2アナログトリガストップでサンプリングExTrg外 部 トリガ 入 力 スタート・ストップでサンプリングEternity 停 止 要 求 が 発 行 されるまで 無 限 にサンプリングSyncPci 複 数 枚 同 期 サンプリング(PCI 製 品 )SyncCpz 複 数 枚 同 期 サンプリング(CPZ 製 品 )TriggerAdTriggerSampling 関 数 を 使 用 したプログラムMemTrgAdMemTriggerSampling 関 数 を 使 用 したプログラムバスマスタ 系 BmSampling ステータス 付 きデータサンプリングサンプリング BmSamplingEx ユーザバッファの 直 接 転 送 を 行 いながらサンプリングBmExClk外 部 クロック 入 力 でサンプリングBmExTrg外 部 トリガ 入 力 スタート・ストップでサンプリングBmReTrg繰 り 返 しサンプリングメモリ 系MemSampling ソフトトリガでサンプリングサンプリング MemExClk 外 部 クロック 入 力 でサンプリングMemExTrg 外 部 トリガでサンプリング制 御 信 号 出 力 ExTrgOut 外 部 トリガ 出 力 を 出 力ExClkOut 外 部 クロック 出 力 を 出 力StatOutサンプリングステータス 出 力 を 出 力デジタル 入 出 力 Dio 汎 用 入 出 力 を 行 う© 2000, 2014 Interface Corporation. All rights reserved.283


<strong>GPC</strong>-<strong>3100</strong> Help for WindowsVisual Basic .NET 用サンプルプログラム 名概 要総 合 AdSmpl_B_NET 11 件 サンプリングの 実 行2 連 続 サンプリングの 実 行 ( 同 期 処 理 )3 連 続 サンプリングの 実 行 ( 非 同 期 処 理 )4 複 数 枚 同 期 サンプリングの 実 行 (マスタモード)5 複 数 枚 同 期 サンプリングの 実 行 (スレーブモード)6DMA 直 接 転 送 サンプリングの 実 行7メモリ 用 サンプリングの 実 行1 件 入 力 InputAD 1 件 入 力 ( 指 定 チャンネル)を 行 うプログラム標 準 サンプリング Sampling 通 常 サンプリングWaitEvent イベントを 使 用 したサンプリングCallback コールバックを 使 用 したサンプリングExClk外 部 クロック 入 力 でサンプリングATrgアナログトリガスタートでサンプリングATrg2アナログトリガストップでサンプリングExTrg外 部 トリガ 入 力 スタート・ストップでサンプリングEternity 停 止 要 求 が 発 行 されるまで 無 限 にサンプリングSyncPci 複 数 枚 同 期 サンプリング(PCI 製 品 )SyncCpz 複 数 枚 同 期 サンプリング(CPZ 製 品 )TriggerAdTriggerSampling 関 数 を 使 用 したプログラムMemTrgAdMemTriggerSampling 関 数 を 使 用 したプログラムバスマスタ 系 BmSampling ステータス 付 きデータサンプリングサンプリング BmSamplingEx ユーザバッファの 直 接 転 送 を 行 いながらサンプリングBmExClk外 部 クロック 入 力 でサンプリングBmExTrg外 部 トリガ 入 力 スタート・ストップでサンプリングBmReTrg繰 り 返 しサンプリングメモリ 系MemSampling ソフトトリガでサンプリングサンプリング MemExClk 外 部 クロック 入 力 でサンプリングMemExTrg 外 部 トリガでサンプリング制 御 信 号 出 力 ExTrgOut 外 部 トリガ 出 力 を 出 力ExClkOut 外 部 クロック 出 力 を 出 力StatOutサンプリングステータス 出 力 を 出 力デジタル 入 出 力 Dio 汎 用 入 出 力 を 行 うDelphi 8 用サンプルプログラム 名AdSmpl_D_NET概 要11 件 サンプリングの 実 行2 連 続 サンプリングの 実 行 ( 同 期 処 理 )3 連 続 サンプリングの 実 行 ( 非 同 期 処 理 )4 複 数 枚 同 期 サンプリングの 実 行 (マスタモード)5 複 数 枚 同 期 サンプリングの 実 行 (スレーブモード)© 2000, 2014 Interface Corporation. All rights reserved.284


<strong>GPC</strong>-<strong>3100</strong> Help for Windows第 4 章 重 要 な 情 報保 証 の 内 容 と 制 限弊 社 は 本 ドキュメントに 含 まれるソースプログラムの 実 行 が 中 断 しないこと、またはその 実 行 に誤 りが 無 いことを 保 証 していません。本 製 品 の 品 質 や 使 用 に 起 因 する、 性 能 に 起 因 するいかなるリスクも 使 用 者 が 負 うものとします。弊 社 はドキュメント 内 の 情 報 の 正 確 さに 万 全 を 期 しています。 万 一 、 誤 記 または 誤 植 などがあった 場 合 、 弊 社 は 予 告 無 く 改 訂 する 場 合 があります。ドキュメントまたはドキュメント 内 の 情 報 に起 因 するいかなる 損 害 に 対 しても 弊 社 は 責 任 を 負 いません。ドキュメント 内 の 図 や 表 は 説 明 のためであり、ユーザ 個 別 の 応 用 事 例 により 変 化 する 場 合 があります。著 作 権 、 知 的 所 有 権弊 社 は 本 製 品 に 含 まれるおよび 本 製 品 に 対 する 権 利 や 知 的 所 有 権 を 保 持 しています。本 製 品 はコンピュータ ソフトウェア、 映 像 / 音 声 ( 例 えば 図 、 文 章 、 写 真 など)を 含 んでいます。医 療 機 器 / 器 具 への 適 用 における 注 意弊 社 の 製 品 は 人 命 に 関 わるような 状 況 下 で 使 用 される 機 器 に 用 いられる 事 を 目 的 として 設 計 、 製造 された 物 では 有 りません。弊 社 の 製 品 は 人 体 の 検 査 などに 使 用 するに 適 する 信 頼 性 を 確 保 する 事 を 意 図 された 部 品 や 検 査 機器 と 共 に 設 計 された 物 では 有 りません。医 療 機 器 、 治 療 器 具 などの 本 製 品 の 適 用 により、 製 品 の 故 障 、ユーザ、 設 計 者 の 過 失 などにより、損 傷 / 損 害 を 引 き 起 こす 場 合 が 有 ります。複 製 の 禁 止弊 社 の 許 可 なく、 本 ドキュメントの 全 て、または 一 部 に 関 わらず、 複 製 、 改 変 などを 行 うことはできません。責 任 の 制 限弊 社 は、 弊 社 または 再 販 売 者 の 予 見 の 有 無 にかかわらず 発 生 したいかなる 特 別 損 害 、 偶 発 的 損 害 、間 接 的 な 損 害 、 重 大 な 損 害 について、 責 任 を 負 いません。本 製 品 (ハードウェア,ソフトウェア)のシステム 組 み 込 み、 使 用 、ならびに 本 製 品 から 得 られる結 果 に 関 する 一 切 のリスクについては、 本 製 品 の 使 用 者 に 帰 属 するものとします。本 製 品 に 含 まれるバグ、あるいは 本 製 品 の 供 給 ( 納 期 遅 延 )、 性 能 もしくは 使 用 に 起 因 する 付 帯 的損 害 もしくは 間 接 的 損 害 に 対 して、 弊 社 に 全 面 的 に 責 がある 場 合 でも、 弊 社 はその 製 品 に 対 する改 良 ( 正 常 に 動 作 する)、 代 品 交 換 までとし、 金 銭 面 での 賠 償 の 責 任 は 負 わないものとしますので、予 めご 了 承 ください。本 製 品 (ソフトウェアを 含 む)は、 日 本 国 内 仕 様 です。 本 製 品 を 日 本 国 外 で 使 用 された 場 合 、 弊社 は 一 切 責 任 を 負 いかねます。また、 弊 社 は 本 製 品 に 関 し、 海 外 での 保 守 サービスおよび 技 術 サポート 等 は 行 っておりません。© 2000, 2014 Interface Corporation. All rights reserved.285


<strong>GPC</strong>-<strong>3100</strong> Help for Windows商 標 / 登 録 商 標本 書 に 掲 載 されている 会 社 名 、 製 品 名 は、それぞれ 各 社 の 商 標 または 登 録 商 標 です。© 2000, 2014 Interface Corporation. All rights reserved.286

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

Saved successfully!

Ooh no, something went wrong!