ARCS6 AR6-REV.24062600
読み取り中…
検索中…
一致する文字列を見つけられません
PCI-3180.hh
[詳解]
1
6//
7// Copyright (C) 2011-2020 Yuki YOKOKURA
8// This program is free software;
9// you can redistribute it and/or modify it under the terms of the BSD License.
10// For details, see the License.txt file.
11
12#ifndef PCI_3180
13#define PCI_3180
14
15namespace ARCS {
18 class PCI3180 {
19 public:
26
27 PCI3180(unsigned int Addr, RangeMode Range);
28 PCI3180(unsigned int Addr, RangeMode Range, uint8_t EnableCh);
29 PCI3180();
30 ~PCI3180();
31
32 void ConvStart(void);
33 bool GetBusy(void);
34 void WaitBusy(void);
35 void GetVoltage(double& V1, double& V2, double& V3, double& V4);
36 void SetDigitalOutput(const uint8_t& Data);
37
38 private:
39 PCI3180(const PCI3180&) = delete;
40 const PCI3180& operator=(const PCI3180&) = delete;
41
42 const unsigned int ADDR_BASE;
43 const unsigned int ADDR_ADCDATA_LO;
44 const unsigned int ADDR_ADCDATA_HI;
45 const unsigned int ADDR_CHSET;
46 const unsigned int ADDR_BUSY;
47 const unsigned int ADDR_CONVST;
48 const unsigned int ADDR_RANGE;
49 const unsigned int ADDR_RANGE_CH;
50 const unsigned int ADDR_DIO;
51
52 double A;
53 double B;
54 uint8_t ENA;
55
56 void SelectCH(unsigned int ch);
57 uint16_t GetADCdata(void);
58 double AdcDataToVolt(uint16_t data) const;
59 void SelectRangeCH(unsigned int ch);
60 void SetInputRange(RangeMode Range);
61 void CalcVoltConv(RangeMode Range);
62 static uint16_t Combine2byte(uint8_t High, uint8_t Low);
63 };
64}
65
66#endif
67
PCI-3180入出力クラス Interface社製PCI-3180のための入出力機能を提供します。
Definition PCI-3180.hh:18
void GetVoltage(double &V1, double &V2, double &V3, double &V4)
電圧を取得する関数
Definition PCI-3180.cc:162
void ConvStart(void)
AD変換開始
Definition PCI-3180.cc:118
bool GetBusy(void)
変換待機信号の取得 true = 変換中, false = 変換終了
Definition PCI-3180.cc:124
PCI3180()
空コンストラクタ
Definition PCI-3180.cc:95
RangeMode
入力電圧レンジ定義
Definition PCI-3180.hh:21
@ RANGE_U_10V
ユニポーラ 10V入力モード
Definition PCI-3180.hh:24
@ RANGE_B_10V
バイポーラ±10V入力モード
Definition PCI-3180.hh:22
@ RANGE_B_5V
バイポーラ ±5V入力モード
Definition PCI-3180.hh:23
void SetDigitalOutput(const uint8_t &Data)
ディジタル出力ポートを設定する関数
Definition PCI-3180.cc:258
~PCI3180()
デストラクタ
Definition PCI-3180.cc:113
void WaitBusy(void)
AD変換が完了するまでポーリング待機(ブロッキング動作関数)
Definition PCI-3180.cc:136