メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TRs232cKeithley7702Module.cc

解説を見る。
00001 // =====================================================================
00002 //  $Id: TRs232cKeithley7702Module.cc,v 1.5 2004/03/07 10:30:31 goiwai Exp $
00003 //  $Name: CLDAQ-1-14-03 $
00004 //  $Log: TRs232cKeithley7702Module.cc,v $
00005 //  Revision 1.5  2004/03/07 10:30:31  goiwai
00006 //  ROOTに組みこむためのおまじないマクロを埋めこみました。
00007 //  全てにおいて完全に動作するわけではありません。
00008 //
00009 //  Revision 1.4  2003/10/06 17:02:40  goiwai
00010 //  *** empty log message ***
00011 //
00012 //  Revision 1.3  2003/07/30 16:19:11  goiwai
00013 //  ファイルにコミットログをつけることにしました.
00014 //
00015 // =====================================================================
00016 #include "TRs232cKeithley7702Module.hh"
00017 
00018 TRs232cKeithley7702Module::TRs232cKeithley7702Module( const Tstring devfile, Tint nchannel )
00019   : TRs232cModule( devfile, nchannel )
00020 {;}
00021 
00022 TRs232cKeithley7702Module::TRs232cKeithley7702Module( Tint nchannel, Tstring devfile )
00023   : TRs232cModule( nchannel, devfile )
00024 {;}
00025 
00026 TRs232cKeithley7702Module::TRs232cKeithley7702Module( const TRs232cKeithley7702Module& right )
00027   : TRs232cModule( right )
00028 {;}
00029 
00030 TRs232cKeithley7702Module::~TRs232cKeithley7702Module()
00031 {;}
00032 
00033 Tvoid TRs232cKeithley7702Module::defineClearMethod( Tint channel )
00034 {
00035   if ( channel != 0 ) {
00036     return;
00037   }
00038 
00039   //エラーキューをクリアする
00040   Write( "*CLS" );
00041   return;
00042 }
00043 
00044 Tvoid TRs232cKeithley7702Module::defineUpdateMethod( Tint channel )
00045 {
00046   if ( channel != 0 ) {
00047     return;
00048   }
00049 
00050   Clear();
00051   return;
00052 }
00053 
00054 Tvoid TRs232cKeithley7702Module::defineInitializeMethod( Tint channel )
00055 {
00056   if ( channel != 0 ) {
00057     return;
00058   }
00059 
00060   //デフォルト設定に戻す
00061   Write( ":SYST:PRES" );
00062   Write( "*RST" );
00063   Write( "*CLS" );
00064 
00065   //BEEP OFF
00066   //Write( ":SYST:BEEP OFF" );
00067 
00068   //センサの種類を定義シングルクオートでかこまねばならない
00069   //Write( ":SENS:FUNC 'RES'" );
00070 
00071   //積分速度をPLC単位で設定
00072   //Write( ":SENS:RES:NPLC 1" );
00073 
00074   //積分速度を秒単位で設定
00075   //Write( ":SENS:RES:APER 1" );
00076 
00077   //レンジ切替え
00078   //Write( "SENS:RES:RANG 120e6" );
00079 
00080   //精度選択
00081   //Write( "SENS:RES:DIG 5" );
00082 
00083   //AUTOレンジON
00084   //Write( "SENS:RES:RANG:AUTO ON" );
00085   Write( "SENS:VOLT:RANG:AUTO OFF, (@101:132)" );
00086 
00087   //データ要素指定
00088   Write( ":FORM:ELEM READ" );
00089 
00090   return;
00091 }
00092 
00093 Tvoid TRs232cKeithley7702Module::defineReadMethod( Tint channel )
00094 {
00095   Tstring strch = itostr( channel + 1, 2 );
00096   Tstring command = ":ROUT:CLOS (@1" + strch + ")";
00097   Write( command );
00098   Write( ":READ?" );
00099   return;
00100 }
00101 
00102 Tbool TRs232cKeithley7702Module::modifyData( const Tstring& accept, Tdouble& databuf ) const
00103 {
00104   databuf = strtod( accept.c_str(), 0 );
00105   return Ttrue;
00106 }
00107 
00108 #ifdef __CLDAQ_ROOT_DLL
00109     ClassImp(TRs232cKeithley7702Module)
00110 #endif


CLDAQ - a Class Library for DataAcQuisition (Version 1.14.3)
Go IWAI -- goiwai at users.sourceforge.jp