Changes between Initial Version and Version 1 of epics/streamdevice/example2


Ignore:
Timestamp:
06/05/12 22:30:42 (12 years ago)
Author:
obina
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • epics/streamdevice/example2

    v1 v1  
     1== LAN/GPIBゲートウェイ使用例 == 
     2Keithleyの例とほとんど同じなので、要点のみ 
     3 
     4LAN/GPIBの先にAgilent製の周波数カウンタ(Agilent 53181A)をGPIBアドレス22で接続した場合を例に挙げる。 
     5 
     6作業ディレクトリ作成 
     7{{{ 
     8pfrproc2:~ % mkdir /users/obina/epics/app/AG53181A 
     9pfrproc2:~ % cd /users/obina/epics/app/AG53181A 
     10pfrproc2:AG53181A % makeBaseApp.pl -t ioc AG53181A 
     11pfrproc2:AG53181A % makeBaseApp.pl -i -t ioc AG53181A 
     12The following target architectures are available in base: 
     13    linux-x86 
     14    linux-x86_64 
     15What architecture do you want to use? linux-x86_64 
     16The following applications are available: 
     17    AG53181A 
     18What application should the IOC(s) boot? 
     19The default uses the IOC's name, even if not listed above. 
     20Application name? 
     21}}} 
     22 
     23configure/RELEASE編集 
     24{{{ 
     25pfrproc2:AG53181A % vi configure/RELEASE 
     26 
     27SNCSEQ=$(EPICS_BASE)/../modules/soft/seq/2.0.11 
     28ASYN=$(EPICS_BASE)/../modules/soft/asyn/4-11 
     29STREAM=$(EPICS_BASE)/../modules/soft/stream/2-5 
     30}}} 
     31 
     32srcディレクトリでの作業 
     33{{{ 
     34pfrproc2:AG53181A % cd AG53181AApp/src 
     35registrar(drvAsynIPPortRegisterCommands) 
     36registrar(drvAsynSerialPortRegisterCommands) 
     37registrar(vxi11RegisterCommands) 
     38 
     39pfrproc2:AG53181A % vi Makefile  
     40AG53181A_DBD += aaiRecord.dbd 
     41AG53181A_DBD += aaoRecord.dbd 
     42AG53181A_DBD += asyn.dbd 
     43AG53181A_DBD += stream.dbd 
     44AG53181A_DBD += AG53181.dbd 
     45 
     46AG53181A_LIBS += asyn 
     47AG53181A_LIBS += stream 
     48}}} 
     49 
     50 
     51Dbディレクトリでの作業 
     52{{{ 
     53pfrproc2:AG53181A % cd AG53181AApp/Db/ 
     54 
     55pfrproc2:Db % vi AG53181.proto 
     56Terminator = CR LF; 
     57# 
     58getIDN { 
     59    out "*IDN?";   in "%39c"; 
     60} 
     61 
     62 
     63pfrproc2:Db % vi test.db 
     64 
     65record(stringin, "obina:idn") 
     66{ 
     67    field(DESC, "get IDN") 
     68    field(DTYP, "stream") 
     69    field(INP,  "@AG53181.proto getidn PS1 22")          <---- GPIB機器のアドレスが22の場合 
     70} 
     71 
     72pfrproc2:Db % vi Makefile 
     73DB += test.db 
     74 
     75pfrproc2:Db % cd ../ 
     76pfrproc2:AG53181A % make 
     77}}} 
     78 
     79startup script編集 
     80{{{ 
     81pfrproc2:AG53181A % cd iocBoot/iocAG53181A/ 
     82pfrproc2:iocAG53181A % vi st.cmd 
     83 
     84dbLoadRecords("db/test.db") 
     85 
     86vxi11Configure ("PS1","172.28.5.xxx",1,1000,"gpib0")   <---- LAN/GPIBゲートウェイのIPアドレス 
     87 
     88 
     89}}}