{"id":182,"date":"2021-08-12T11:59:40","date_gmt":"2021-08-12T02:59:40","guid":{"rendered":"http:\/\/octa.tagen.tohoku.ac.jp\/blog\/?p=182"},"modified":"2021-08-13T21:01:18","modified_gmt":"2021-08-13T12:01:18","slug":"we-havent-had-that-spirit-here-since","status":"publish","type":"post","link":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/?p=182","title":{"rendered":"we haven&#8217;t had that spirit here since&#8230;"},"content":{"rendered":"\n<h3>4G GPTAS \u3082\u52d5\u304d\u59cb\u3081\u307e\u3057\u305f\u3002<\/h3>\n\n\n\n<p>\u3067\u3001\u3084\u306f\u308a15\u5e74\u524d\u306e\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306b\u306f\u7121\u7406\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u8272\u3005\u3068\u8003\u3048\u305f\u306e\u3067\u3059\u304c\u3001EPICS base \u3067\u8272\u3005\u3068\u66f8\u304d\u76f4\u3059\u306e\u304c\u826f\u3044\u306e\u3067\u306f\u3068\u601d\u3044\u59cb\u3081\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u30011\u65e5\u3050\u3089\u3044\u3067\u3069\u3053\u307e\u3067\u3067\u304d\u308b\u304b\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h4>\u76ee\u6a19\uff1a\u30a2\u30de\u30be\u30f3\u3067\u58f2\u3063\u3066\u3044\u308b<a href=\"https:\/\/images-na.ssl-images-amazon.com\/images\/G\/09\/apparel\/rcxgs\/tile._CB458089087_.gif\" data-type=\"URL\" data-id=\"https:\/\/images-na.ssl-images-amazon.com\/images\/G\/09\/apparel\/rcxgs\/tile._CB458089087_.gif\">\u4e2d\u83efUSB\u6e29\u5ea6\u8a08<\/a>\uff081000\u5186\u5f37\uff09\u3092 epics \u3067\u8aad\u3080\u3002<\/h4>\n\n\n\n<p>\u3053\u306e\u6e29\u5ea6\u8a08\u306f\u3068\u3063\u3066\u3082\u5b89\u3044\u306e\u3067\u3001\u5b9f\u9a13\u5ba4\u306e\u305d\u3053\u3044\u3089\u3058\u3085\u3046\u306b\u304a\u3044\u3066\u8272\u3005\u306a\u5834\u6240\u306e\u6e29\u5ea6\u3092\u30e2\u30cb\u30bf\u30fc\u3057\u3066\u3044\u307e\u3059\u3002\u7d50\u6676\u6210\u9577\u3059\u308b\u6642\u306b\u90e8\u5c4b\u306e\u6e29\u5ea6\u5909\u5316\u306f\u5927\u6575\u306a\u306e\u3067\u3002\u4eca\u306e\u3068\u3053\u308d\u3001github \u306b\u8ee2\u304c\u3063\u3066\u3044\u305f linux \u7528\u8aad\u307f\u53d6\u308a\u30b3\u30fc\u30c9\u3068\u624b\u88fd\u306e script \u3092\u7d44\u307f\u5408\u308f\u305b\u3066 web \u4e0a\u306b\u6e29\u5ea6\u5909\u5316\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u3092epics\u3067\u8aad\u3093\u3067\u307f\u3088\u3046\u3068\u3044\u3046\u76ee\u6a19\u3067\u3059\u3002epics \u306f raspberry pi 4B \u3067\u8d70\u3089\u305b\u307e\u3059\u3002\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f USB HID \u30c7\u30d0\u30a4\u30b9\u306a\u306e\u3067\u3061\u3087\u3063\u3068\u4e00\u7b4b\u7e04\u3067\u306f\u3044\u304b\u306a\u3044\u305f\u3081\u3001\u6700\u521d\u306b\u306f\u826f\u3044\u8ab2\u984c\u304b\u3068\u601d\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h4>EPICS \u3092 Raspberry Pi 4B \u306b\u8f09\u305b\u308b<\/h4>\n\n\n\n<h5>\u30a2\u30ab\u30a6\u30f3\u30c8\u767b\u9332\u306e\u305f\u3081 ldap \u8d70\u3089\u305b\u308b\u3002\uff08\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306fNFS\u306a\u306e\u3067autofs\u3082\uff09<br>(\u3053\u308c\u306f\u3046\u3061\u306e\u7814\u7a76\u5ba4\u306e\u7279\u6b8a\u4e8b\u60c5\u3067\u3059\u3002\u3044\u3089\u306a\u3044\u4eba\u306f\u3044\u3089\u306a\u3044\u3002\uff09<\/h5>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt-get install autofs\nsudo echo &quot;\/home \/etc\/auto.home&quot; | sudo tee -a \/etc\/auto.master\nsudo echo &quot;* -fstype=nfs4,soft xxx.xxx.xxx.xxx:\/volume1\/labhome&&quot; | tee -a \/etc\/auto.home\nsudo systemctl restart  autofs\n\nsudo apt-get install libnss-ldapd\n## check and edit if necessary: \/etc\/ldap\/ldap.conf\n## \/etc\/nsswitch.conf\n## \/etc\/nslcd.conf\n## \/etc\/pam.d\/common-password\n## \/etc\/pam.d\/common-session<\/code><\/pre><\/div>\n\n\n\n<h5>EPICS \u3092\u5165\u308c\u308b<\/h5>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt-get install libreadline-dev\nsudo apt-get install libpcre3-dev\n(if necessary, install g++ and make)\ncd &quot;~\/work\/tmp\/epics&quot; (\u3053\u3053\u3092working directory \u306b\u3057\u307e\u3057\u305f\u3002\u9069\u5b9c\u5909\u3048\u3066\u304f\u3060\u3055\u3044\uff09\nwget https:\/\/epics.anl.gov\/download\/base\/base-7.0.6.tar.gz\ntar zxvf base-7.0.6.tar.gz\ncd base-7.0.6\nmake<\/code><\/pre><\/div>\n\n\n\n<p>\u6642\u9593\u304b\u304b\u308a\u307e\u3059\u3002\u3002\u300230\u5206\u3050\u3089\u3044\uff1f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>echo &quot;export EPICS_BASE=\\${PWD}\/base-7.0.6&quot; &gt; setEnvVar\necho &quot;export EPICS_HOST_ARCH=\\$(\\${EPICS_BASE}\/startup\/EpicsHostArch)&quot; &gt;&gt; setEnvVar\necho &quot;export PATH=\\${EPICS_BASE}\/bin\/\\${EPICS_HOST_ARCH}:\\${PATH}&quot; &gt;&gt; setEnvVar\nsource setEnvVar\n\nsoftIoc<\/code><\/pre><\/div>\n\n\n\n<p id=\"block-81b2ba66-cfd0-485d-afc7-48d3ab421aff\">\u52d5\u3044\u305f\uff01\u3068\u3082\u304b\u304f\u3001base \u306f\u5165\u3063\u305f\u3002getting started \u306b\u5f93\u3063\u3066 test.db \u3082\u4f5c\u3063\u3066 softIoc -d test.db \u3082\u8a66\u3057\u307e\u3057\u305f\u3002\u554f\u984c\u306a\u3057\u3002<\/p>\n\n\n\n<h5>Asyn \u3068 Stream Device \u3092\u3044\u308c\u307e\u3059\u3002<\/h5>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>(~\/work\/tmp\/epics \u3067)\nmkdir support\ncd support\ngit clone https:\/\/github.com\/epics-modules\/asyn.git\ncd asyn\/\n## edit asyn\/configure\/RELEASE\uff08\u4ee5\u4e0b\u79c1\u306eRELEASE file\u306e\u4e3b\u8981\u306a\u5909\u66f4\u70b9\uff09\nHOME=\/home\/sato\nSUPPORT=$(HOME)\/work\/tmp\/epics\/support\nEPICS_BASE=$(HOME)\/work\/tmp\/epics\/base-7.0.6\n##\n\uff08IPAC, SNCSEQ, CALC, SSCAN\u306f\u3053\u306e\u6642\u70b9\u3067\u306f comment out\uff09\nmake\n\ncd ~\/work\/tmp\/epics\/support\ngit clone https:\/\/github.com\/paulscherrerinstitute\/StreamDevice.git\ncd StreamDevice\/\n## \u540c\u69d8\u306b stream \u306e\u306a\u304b\u306e configure\/RELEASE \u3082\u7de8\u96c6\u3057\u307e\u3059\n##\nASYN=$(SUPPORT)\/asyn\nPCRE_INCLUDE=\/usr\/include\nPCRE_LIB=\/usr\/lib\n##\nrm GNUmakefile\nmake\n\uff08\u3053\u308c\u3067\u3067\u304d\u308b\u306f\u305a\u3067\u3059\uff09<\/code><\/pre><\/div>\n\n\n\n<h5>EPICS \u306b calc \u3068 drvAsynUSBHID \u3092\u5165\u308c\u308b<\/h5>\n\n\n\n<p>\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f USB HID \u30c7\u30d0\u30a4\u30b9\u306a\u306e\u3067 KEK \u3054\u8b39\u88fd\u306e drvAsynUSBHID \u3067\u8aad\u3080\u3053\u3068\u3092\u8003\u3048\u307e\u3057\u305f\u3002\u3042\u3068\u3001\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f\u30d0\u30a4\u30ca\u30ea\u3067\u5999\u306a\u30c7\u30fc\u30bf\u3092\u8fd4\u3057\u3066\u304f\u308b\u306e\u3067 calc \u3092\u5165\u308c\u3066\u3001scalcout \u3092\u4f7f\u3063\u3066\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u6e29\u5ea6\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u307e\u3057\u305f\uff08\u3053\u3053\u304c\u4e00\u756a\u3084\u3084\u3053\u3057\u304b\u3063\u305f\u3002\uff09<\/p>\n\n\n\n<p id=\"block-52e70eb5-11d1-4e43-9abf-1430b08b0acc\">calc \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5165\u308c\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>cd ~\/work\/tmp\/epics\/support\/\nwget https:\/\/github.com\/epics-modules\/calc\/archive\/R3-6-1.tar.gz\ntar zxvf R3-6-1.tar.gz\ncd calc-R3-6-1\/\n##edit configure\/RELEASE \uff08\u3044\u3064\u3082\u901a\u308a\u306a\u306e\u3067\u8a73\u7d30\u306f\u5272\u611b\u3002\u4eca\u56de\u306f SSCAN \u3068 SNCSEQ \u3092\u306f\u305a\u3057\u307e\u3057\u305f\uff09\nmake<\/code><\/pre><\/div>\n\n\n\n<p id=\"block-34c3a7d8-9d35-4e99-868c-e5c9e5595eac\">drvAsynUSBHID \u3092\u5165\u308c\u308b\uff08hidraw \u3092\u4f7f\u3044\u307e\u3059\u3002libusb \u3058\u3083\u306a\u3044\u65b9\u3067\u3059\u3002cmake \u3082\u5165\u308c\u307e\u3059\u3002\uff09<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt-get install libhidapi-hidraw0 libhidapi-dev cmake\ncd ~\/work\/tmp\/epics\/support\nwget http:\/\/cerldev.kek.jp\/trac\/EpicsUsersJP\/raw-attachment\/wiki\/epics\/bbb\/debian\/USBHID\/USB_SP4T\/drvAsynUSBHID_20170704.tar.gz\ntar zxvf drvAsynUSBHID_20170704.tar.gz\nmv drvAsynUSBHID-master-4b0e4ee13cb65512d4ccb12a82d6ab3aacb3b0e5 drvAsynUSBHID\n\uff08master-\u306e\u5f8c\u306e\u6570\u5b57\u306f\u3053\u308c\u3068\u306f\u9055\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\uff09\n## Edit configure\/RELEASE (\u4eca\u56de\u306fasyn, StreamDevice, TOP, SUPPORT\u7b49\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\uff09\n## Makefile \u3092\u4e00\u5fdc\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002\uff08\u5909\u66f4\u306a\u3057\uff09\n## \uff08\u91cd\u8981\uff09\u4e2d\u83ef\u6e29\u5ea6\u8a08\u8aad\u307f\u53d6\u308a\u306e\u305f\u3081\u3001drvAsynUSBHID \u3092\u5c11\u3057\u3044\u3058\u308a\u307e\u3059\u3002\u3044\u3058\u308a\u65b9\u306f\u5225\u306b\u66f8\u304d\u307e\u3059\u3002\nmake<\/code><\/pre><\/div>\n\n\n\n<h5>\u3055\u3066\u3001\u3088\u3046\u3084\u304f\u4e2d\u83ef\u6e29\u5ea6\u8a08\u8aad\u307f\u53d6\u308a IOC \u3092\u4f5c\u308a\u307e\u3059\uff01<\/h5>\n\n\n\n<p>\u8aad\u307f\u53d6\u308aIOC \u306e\u540d\u524d\u3092 testTEMPer \u3068\u3057\u3066 ~\/work\/tmp\/epics\/TEST \u306e\u4e2d\u306b\u4f5c\u308a\u307e\u3059\u3002<br>makeBaseApp.pl \u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>mkdir ~\/work\/tmp\/epics\/TEST\/testTEMPer\ncd ~\/work\/tmp\/epics\/TEST\/testTEMPer\nmakeBaseApp.pl -t ioc testTEMPer\nmakeBaseApp.pl -i -t ioc testTEMPer<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u3001\u51fa\u6765\u4e0a\u304c\u3063\u305f testTEMPer \u306e\u306a\u304b\u306e configure\/RELEASE \u3092\u3044\u3058\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>## \u8ffd\u52a0\/\u5909\u66f4\u3059\u308b\u5185\u5bb9\nSUPPORT=~\/work\/tmp\/epics\/support\nASYN=$(SUPPORT)\/asyn\nSTREAM=$(SUPPORT)\/StreamDevice\nDRVASYNUSBHID=$(SUPPORT)\/drvAsynUSBHID<\/code><\/pre><\/div>\n\n\n\n<p>\u7d9a\u3044\u3066 testTEMPerApp\/src\/Makefile \u3092\u3044\u3058\u308a\u307e\u3059\u3002\u8ffd\u52a0\u3059\u308b\u306e\u306f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>PROD_LDLIBS += -lhidapi-hidraw\n\ntestTEMPer_DBD += asyn.dbd\ntestTEMPer_DBD += stream.dbd\ntestTEMPer_DBD += drvAsynUSBHID.dbd\ntestTEMPer_DBD += calc.dbd\n\ntestTEMPer_LIBS += asyn\ntestTEMPer_LIBS += stream\ntestTEMPer_LIBS += drvAsynUSBHID\ntestTEMPer_LIBS += calc<\/code><\/pre><\/div>\n\n\n\n<p>\uff08\u3064\u307e\u308a asyn, stream, drvAsynUSBHID, calc \u3092\u4f7f\u3044\u307e\u3059\u3088\u3001\u3068\u66f8\u304f\u308f\u3051\u3067\u3059\u3002\uff09<br><\/p>\n\n\n\n<p>testTEMPerApp\/Db\/Makefile \u3092\u3044\u3058\u308a\u307e\u3059\u3002\u8ffd\u52a0\u3059\u308b\u306e\u306f\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>DB += testTEMPer.db<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u3001\u3064\u304f\u308a\u307e\u3059<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>cd ~\/work\/tmp\/epics\/TEST\/testTEMPer\nmake<\/code><\/pre><\/div>\n\n\n\n<p>\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8 st.cmd \u3092\u3044\u3058\u308a\u307e\u3059<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>cd ~\/work\/tmp\/epics\/TEST\/testTEMPer\/iocBoot\/ioctestTEMPer\/\n## edit st.cmd \u4fee\u6b63\/\u8ffd\u52a0\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\nepicsEnvSet(&quot;STREAM_PROTOCOL_PATH&quot;, &quot;.:${TOP}\/testTEMPerApp\/Db&quot; )\ndrvAsynUSBHIDConfigure($(dev), &quot;0x0c45&quot;, &quot;0x7401&quot;, &quot;&quot;, &quot;\/dev\/hidraw1&quot;, &quot;1&quot;)\nepicsEnvSet(&quot;dev&quot;, &quot;HID1&quot;)\ndbLoadRecordes(&quot;db\/testTEMPer.db&quot;, &quot;USER=TEST,DEV=$(dev)&quot;)\nchmod u+x st.cmd<\/code><\/pre><\/div>\n\n\n\n<h5>IOC\u672c\u4f53\u306f\u3067\u304d\u307e\u3057\u305f\u3002\u6b21\u306b\u3001testTEMPer database \u30d5\u30a1\u30a4\u30eb\u3068 protocol \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u307e\u3059\u3002<\/h5>\n\n\n\n<p>\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f \/dev\/hidraw1 (0\u3058\u3083\u306a\u3044\u3093\u3067\u3059\u3001\u3001\u3001) \u306b binary \u30670x00 0x01 0x80 0x33 0x01 0x00 0x00 0x00 0x00\u3092\u9001\u308b\u3068 binary \u3067 8byte \u8fd4\u3057\u3066\u304d\u307e\u3059\u3002\u3053\u306e\u3046\u3061(0\u304b\u3089\u6570\u3048\u3066)2,3byte\u76ee\u304c\u6e29\u5ea6\u60c5\u5831\u3067\u3059\u3002(buf[3]&amp;0xFF + buf[2]&lt;&lt;8)*125.0\/32000. \u304c\u6e29\u5ea6\u3067\u3059\u3002\u306a\u3093\u3068\u3084\u3084\u3053\u3057\u3044\u3002\uff08\u3042\u308c\u3001\u4eca\u6c17\u304c\u3064\u3044\u305f\u3051\u3069\u3001\u3053\u308c\u3001short (2byte)\u306e little endian \u3067\u8aad\u3080\u3060\u3051\u3058\u3083\u306a\u3044\u306e\uff1f\u30a2\u30db\u3060\u3063\u305f\uff1f\uff1f\uff1f\u307e\u3041\u3001\u3044\u3044\u3084\u3002\uff09<br>\u3067\u3001proto \u30d5\u30a1\u30a4\u30eb(~\/work\/tmp\/epics\/TEST\/testTEMPer\/testTEMPerApp\/Db\/testTEMPER.proto)\u306f\u4ee5\u4e0b\u306e\u69d8\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>TERMINATOR=&quot;&quot;;\nLockTimeout = 500;\nReplyTimeout = 100;\nReadTimeout = 100;\nWriteTimeout = 1000;\n\nsetsw {\n    out &quot;%r&quot;;\n}\n\ngetsw {\n    MaxInput = 8;\n    out 0x00 0x01 0x80 0x33 0x01 0x00 0x00 0x00 0x00;\n    in &quot;%8c&quot;;\n}<\/code><\/pre><\/div>\n\n\n\n<p>\u91cd\u8981\u306a\u70b9\uff1aMaxInput \u3092\u6307\u5b9a\u3057\u3066 terminator \u3092\u7121\u8996\u3055\u305b\u307e\u3059\u3002\u305d\u306e\u4e0a\u3067%8c \u3067 unsigned char \u30678byte \u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\uff08\u305d\u308c\u3067\u3082\u3001\u306a\u3093\u304bwarning \u884c\u3063\u3066\u304f\u308b\u3051\u3069\u3001\u3001\u3001\u591a\u5206stream device\u306e\u30d0\u30b0\u3002\uff09<br><br>\u6b21\u306b\u3001database file \u3067\u3059\u304c\u3001\u6b21\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>record(stringin, &quot;$(USER):testTEMPer:get&quot;) {\n    field(DTYP, &quot;stream&quot;)\n    field(FTVL, &quot;UCHAR&quot;)\n    field(SCAN, &quot;1 second&quot;)\n    field(INP, &quot;@testTEMPer.proto getsw $(DEV)&quot;)\n    field(NELM, 8)\n    field(FLNK, &quot;$(USER):testTEMPer:calctemp&quot;)\n}\nrecord(scalcout, &quot;$(USER):testTEMPer:calctemp&quot;){\n    field(INAA, &quot;$(USER):testTEMPer:get&quot;)\n    field(CALC, &quot;((BYTE(AA[2,2])&lt;&lt;8)+BYTE(AA[3,3]))*125.0\/32000.&quot;)\n    field(OUT, &quot;$(USER):testTEMPer:temperature&quot;)\n    field(FLNK, &quot;$(USER):testTEMPer:temperature&quot;)\n}\nrecord(ai, &quot;$(USER):testTEMPer:temperature&quot;){\n    field(INP, &quot;&quot;)\n    field(FLNK, &quot;&quot;)\n    field(SCAN, &quot;Passive&quot;)\n}<\/code><\/pre><\/div>\n\n\n\n<p>\u91cd\u8981\u306a\u70b9\uff1astream \u304b\u3089 UCHAR \u30678\u500b\u5206\u8aad\u307f\u307e\u3059\u3002testTEMPer.proto \u306b\u5b9a\u7fa9\u3055\u308c\u305f\u3001getsw \u3092\u4f7f\u3044\u307e\u3059\u3002$(DEV)\u306f st.cmd \u306b\u5b9a\u7fa9\u3057\u305f HID1 \u3067\u3059\u306d\u30021\u79d2\u304a\u304d\u306b\u5b9a\u671f\u7684\u306b\u8aad\u307f\u307e\u3059\u3002\uff08\u6e29\u5ea6\u306a\u3093\u3067\uff09\u3067\u3001\u305d\u306e\u8aad\u307f\u53d6\u308a\u306fstringin \uff08\u6587\u5b57\u5217\u578b\uff09\u306b\u3057\u3066 forward link (FLNK) \u3067 calctemp \u306b\u9001\u308a\u307e\u3059\u3002calctemp \u3067\u306fscalcout \u3092\u4f7f\u3063\u3066byte \u3054\u3068\u306b\u8aad\u3093\u3067(AA[2,2]\u3068\u3044\u3046\u69d8\u306b\u59cb\u307e\u308a\u3068\u7d42\u308f\u308a\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3053\u3068\u306b\u6ce8\u610f\uff09\u3001\u305d\u308c\u3092\u30b7\u30d5\u30c8\u3057\u305f\u308a\u306a\u3093\u3060\u304b\u3093\u3060\u308a\u3067\u6e29\u5ea6\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u3067\u3001\u305d\u308c\u3092 FLINK\u3067 testTEMPer:temperature \u306b\u9001\u308a\u307e\u3059\u3002\u3067\u3001ai \uff08analog input\uff09\u3067\u53d7\u3051\u307e\u3059\u3002\u3053\u306erecord\u306f\u4f55\u3082\u3057\u306a\u3044\u306e\u3067&#8221;Passive&#8221; \u306e\u4f55\u3082\u3057\u306a\u3044record\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h5>\u307e\u3060\u3042\u308a\u307e\u3059\u3002\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306e\u30c7\u30d0\u30a4\u30b9\u30d5\u30a1\u30a4\u30eb \/dev\/hidraw1 \u306e\u8aad\u307f\u53d6\u308a\u8a31\u53ef\u3092\u4e0e\u3048\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002<br>\u624b\u306f\u8272\u3005\u3068\u3042\u308a\u307e\u3059\u3002\u4eca\u56de\u306f<\/h5>\n\n\n\n<p>udev rules \u5f04\u308a\u307e\u3057\u305f<br>\/etc\/udev\/rules.d\/50-usb-temper.rules \u3092\u66f8\u304d\u307e\u3057\u305f\u3002\u5185\u5bb9\u306f\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>KERNEL==&quot;hidraw*&quot;,ATTRS{idVendor}==&quot;0c45&quot;,ATTRS{idProduct}==&quot;7401&quot;,MODE=&quot;0666&quot;<\/code><\/pre><\/div>\n\n\n\n<p>##\u672c\u5f53\u306f\u3001\/dev\/hidraw* \u3092 dialout \u306egroup \u306b\u3057\u3066\u3001user\u306e\u526f\u30b0\u30eb\u30fc\u30d7\u306bdialout \u3092\u8db3\u3059\u306e\u304c\u7dba\u9e97\u306a\u6c17\u304c\u3057\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u697d\u3057\u307e\u3057\u305f\u3002<br>\u3053\u308c\u3067\u3001\u6e29\u5ea6\u8a08\u3092\u629c\u304d\u5dee\u3057\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2>\u3053\u308c\u3067\u3001\u52d5\u304f\u306f\u305a\u3002<\/h2>\n\n\n\n<p>\u307e\u305a\u3001testTEMPer \u3092\u52d5\u304b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>cd ~\/work\/tmp\/epics\/TEST\/testTEMPer\/iocBoot\/ioctestTEMPer\/\n.\/st.cmd<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u3067EPICS IOC\u304c\u52d5\u304d\u307e\u3059\u3002<br><\/p>\n\n\n\n<p>\u4ed6\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u3044\u3066<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>cd ~\/work\/tmp\/epics\nsource setEnvVar\ncaget TEST:testTEMPer:temperature<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u6e29\u5ea6\u304c\u8aad\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>camonitor TEST:testTEMPer:temperature<\/code><\/pre><\/div>\n\n\n\n<p>\u3067\u9023\u7d9a\u30e2\u30cb\u30bf\u30fc\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2>\u3053\u3053\u307e\u3067\u304f\u308c\u3070\u3042\u3068\u306f\u7c21\u5358\u3002<\/h2>\n\n\n\n<h5>CS-Studio (Phoebus)\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/h5>\n\n\n\n<p id=\"block-68f62bb0-2188-469b-a174-7309abd8b4d2\"><a href=\"https:\/\/controlssoftware.sns.ornl.gov\/css_phoebus\/\" data-type=\"URL\" data-id=\"https:\/\/controlssoftware.sns.ornl.gov\/css_phoebus\/\">https:\/\/controlssoftware.sns.ornl.gov\/css_phoebus\/<\/a><br>MacOS\u7528\u306f Java \u3082\u5165\u3063\u3066\u3044\u3066\u7c21\u5358\u306b\u52d5\u304d\u307e\u3059\u3002\uff08\u4ed6\u306f\u8a66\u3057\u3066\u306a\u3044\u3067\u3059\u3002\uff09<br>\u3053\u306e\u30da\u30fc\u30b8\u306einstruction\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h5>CSS_Phoebus.app \u3092\u7acb\u3061\u4e0a\u3052\u3066\u3001<\/h5>\n\n\n\n<p>Applications-&gt;Display-&gt;New Display<br>\u3092\u9078\u3073\u307e\u3059\u3002\u3042\u3068\u306f\u3001\u3053\u306e\u753b\u9762\u306b\u8981\u7d20\u3092\u914d\u7f6e\u3057\u3066\u3044\u304f\u3060\u3051\u3067\u3059\u3002\u8981\u7d20\u306ePV Name \u3068\u3044\u3046\u3068\u3053\u308d\u306b\u3001TEST:testTEMPer:temperature \u3092\u5165\u308c\u308b\u3068\u52dd\u624b\u306bIOC\u306b\u7e4b\u3044\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u3063\u3066\u304d\u3066\u304f\u308c\u307e\u3059\u3002<br>Text Update<br>Meter<br>StripChart<br>\u3092\u914d\u7f6e\u3057\u305f\u4f8b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002\u8d70\u3089\u305b\u308b\u306b\u306f\u7dd1\u306e\u53f3\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3002\u4e0b\u306e\u753b\u9762\u306b\u306a\u308a\u307e\u3059\u3002<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"823\" src=\"http:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.55.41-1024x823.png\" alt=\"\" class=\"wp-image-196\" srcset=\"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.55.41-1024x823.png 1024w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.55.41-300x241.png 300w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.55.41-768x617.png 768w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.55.41-600x482.png 600w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.55.41.png 1359w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"823\" src=\"http:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.54.53-1024x823.png\" alt=\"\" class=\"wp-image-195\" srcset=\"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.54.53-1024x823.png 1024w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.54.53-300x241.png 300w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.54.53-768x617.png 768w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.54.53-600x482.png 600w, https:\/\/octa.tagen.tohoku.ac.jp\/blog\/wp-content\/uploads\/2021\/08\/Screen-Shot-2021-08-12-at-11.54.53.png 1359w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>4G GPTAS \u3082\u52d5\u304d\u59cb\u3081\u307e\u3057\u305f\u3002 \u3067\u3001\u3084\u306f\u308a15\u5e74\u524d\u306e\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306b\u306f\u7121\u7406\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u8272\u3005\u3068\u8003\u3048\u305f\u306e\u3067\u3059\u304c\u3001EPICS base \u3067\u8272\u3005\u3068\u66f8\u304d\u76f4\u3059\u306e\u304c\u826f\u3044\u306e\u3067\u306f\u3068\u601d\u3044\u59cb\u3081\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u30011\u65e5\u3050\u3089\u3044\u3067\u3069\u3053\u307e\u3067\u3067\u304d\u308b\u304b\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u76ee\u6a19\uff1a\u30a2\u30de\u30be\u30f3\u3067\u58f2\u3063\u3066\u3044\u308b\u4e2d\u83efUSB\u6e29\u5ea6\u8a08\uff081000\u5186\u5f37\uff09\u3092 epics \u3067\u8aad\u3080\u3002 \u3053\u306e\u6e29\u5ea6\u8a08\u306f\u3068\u3063\u3066\u3082\u5b89\u3044\u306e\u3067\u3001\u5b9f\u9a13\u5ba4\u306e\u305d\u3053\u3044\u3089\u3058\u3085\u3046\u306b\u304a\u3044\u3066\u8272\u3005\u306a\u5834\u6240\u306e\u6e29\u5ea6\u3092\u30e2\u30cb\u30bf\u30fc\u3057\u3066\u3044\u307e\u3059\u3002\u7d50\u6676\u6210\u9577\u3059\u308b\u6642\u306b\u90e8\u5c4b\u306e\u6e29\u5ea6\u5909\u5316\u306f\u5927\u6575\u306a\u306e\u3067\u3002\u4eca\u306e\u3068\u3053\u308d\u3001github \u306b\u8ee2\u304c\u3063\u3066\u3044\u305f linux \u7528\u8aad\u307f\u53d6\u308a\u30b3\u30fc\u30c9\u3068\u624b\u88fd\u306e script \u3092\u7d44\u307f\u5408\u308f\u305b\u3066 web \u4e0a\u306b\u6e29\u5ea6\u5909\u5316\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u3092epics\u3067\u8aad\u3093\u3067\u307f\u3088\u3046\u3068\u3044\u3046\u76ee\u6a19\u3067\u3059\u3002epics \u306f raspberry pi 4B \u3067\u8d70\u3089\u305b\u307e\u3059\u3002\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f USB HID \u30c7\u30d0\u30a4\u30b9\u306a\u306e\u3067\u3061\u3087\u3063\u3068\u4e00\u7b4b\u7e04\u3067\u306f\u3044\u304b\u306a\u3044\u305f\u3081\u3001\u6700\u521d\u306b\u306f\u826f\u3044\u8ab2\u984c\u304b\u3068\u601d\u3044\u307e\u3057\u305f\u3002 EPICS \u3092 Raspberry Pi 4B \u306b\u8f09\u305b\u308b \u30a2\u30ab\u30a6\u30f3\u30c8\u767b\u9332\u306e\u305f\u3081 ldap \u8d70\u3089\u305b\u308b\u3002\uff08\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306fNFS\u306a\u306e\u3067autofs\u3082\uff09(\u3053\u308c\u306f\u3046\u3061\u306e\u7814\u7a76\u5ba4\u306e\u7279\u6b8a\u4e8b\u60c5\u3067\u3059\u3002\u3044\u3089\u306a\u3044\u4eba\u306f\u3044\u3089\u306a\u3044\u3002\uff09 EPICS \u3092\u5165\u308c\u308b \u6642\u9593\u304b\u304b\u308a\u307e\u3059\u3002\u3002\u300230\u5206\u3050\u3089\u3044\uff1f \u52d5\u3044\u305f\uff01\u3068\u3082\u304b\u304f\u3001base \u306f\u5165\u3063\u305f\u3002getting started \u306b\u5f93\u3063\u3066 test.db \u3082\u4f5c\u3063\u3066 softIoc -d test.db \u3082\u8a66\u3057\u307e\u3057\u305f\u3002\u554f\u984c\u306a\u3057\u3002 Asyn \u3068 Stream Device \u3092\u3044\u308c\u307e\u3059\u3002 EPICS \u306b calc \u3068 drvAsynUSBHID \u3092\u5165\u308c\u308b \u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f USB HID \u30c7\u30d0\u30a4\u30b9\u306a\u306e\u3067 KEK \u3054\u8b39\u88fd\u306e drvAsynUSBHID \u3067\u8aad\u3080\u3053\u3068\u3092\u8003\u3048\u307e\u3057\u305f\u3002\u3042\u3068\u3001\u4e2d\u83ef\u6e29\u5ea6\u8a08\u306f\u30d0\u30a4\u30ca\u30ea\u3067\u5999\u306a\u30c7\u30fc\u30bf\u3092\u8fd4\u3057\u3066\u304f\u308b\u306e\u3067 calc \u3092\u5165\u308c\u3066\u3001scalcout \u3092\u4f7f\u3063\u3066\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u6e29\u5ea6\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u307e\u3057\u305f\uff08\u3053\u3053\u304c\u4e00\u756a\u3084\u3084\u3053\u3057\u304b\u3063\u305f\u3002\uff09 calc \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5165\u308c\u308b drvAsynUSBHID \u3092\u5165\u308c\u308b\uff08hidraw \u3092\u4f7f\u3044\u307e\u3059\u3002libusb \u3058\u3083\u306a\u3044\u65b9\u3067\u3059\u3002cmake \u3082\u5165\u308c\u307e\u3059\u3002\uff09 \u3055\u3066\u3001\u3088\u3046\u3084\u304f\u4e2d\u83ef\u6e29\u5ea6\u8a08\u8aad\u307f\u53d6\u308a IOC \u3092\u4f5c\u308a\u307e\u3059\uff01 \u8aad\u307f\u53d6\u308aIOC \u306e\u540d\u524d\u3092 testTEMPer \u3068\u3057\u3066 ~\/work\/tmp\/epics\/TEST \u306e\u4e2d\u306b\u4f5c\u308a\u307e\u3059\u3002makeBaseApp.pl \u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002 \u3067\u3001\u51fa\u6765\u4e0a\u304c\u3063\u305f testTEMPer \u306e\u306a\u304b\u306e configure\/RELEASE \u3092\u3044\u3058\u308a\u307e\u3059\u3002 \u7d9a\u3044\u3066 testTEMPerApp\/src\/Makefile \u3092\u3044\u3058\u308a\u307e\u3059\u3002\u8ffd\u52a0\u3059\u308b\u306e\u306f \uff08\u3064\u307e\u308a asyn, stream, drvAsynUSBHID, calc \u3092\u4f7f\u3044\u307e\u3059\u3088\u3001\u3068\u66f8\u304f\u308f\u3051\u3067\u3059\u3002\uff09 testTEMPerApp\/Db\/Makefile \u3092\u3044\u3058\u308a\u307e\u3059\u3002\u8ffd\u52a0\u3059\u308b\u306e\u306f\uff1a \u3067\u3001\u3064\u304f\u308a\u307e\u3059 \u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8 st.cmd \u3092\u3044\u3058\u308a\u307e\u3059 IOC\u672c\u4f53\u306f\u3067\u304d\u307e\u3057\u305f\u3002\u6b21\u306b\u3001testTEMPer database \u30d5\u30a1\u30a4\u30eb\u3068 protocol&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/?p=182\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/182"}],"collection":[{"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":19,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions\/208"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/199"}],"wp:attachment":[{"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/octa.tagen.tohoku.ac.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}