Experimental Physics and
| |||||||||||||||
|
Hi, Mark, My mail box just put this email to trash... I folllow what you said and the result is ---------------------------------------------------- what I did: in exampleApp/src/Makefile, modify ifneq ($(SNCSEQ),) # Build sncExample into exampleSupport sncExample_SNCFLAGS += +r example_DBD += sncExample.dbd # A .stt sequence program is *not* pre-processed: exampleSupport_SRCS += sncExample.stt exampleSupport_LIBS += seq pv example_LIBS += seq pv # Build sncProgram as a standalone program PROD_HOST += sncProgram sncProgram_SNCFLAGS += +m # A .st sequence program *is* pre-processed: sncProgram_SRCS += sncProgram.st sncProgram_LIBS += seq pv sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS) endif #by hy example_DBD += s7nodave.dbd example_LIB += s7nodave example_DBD += asyn.dbd example_DBD += asynRecord.dbd example_DBD += drvAsynIPPort.dbd # Finally link IOC to the EPICS Base libraries example_LIBS += $(EPICS_BASE_IOC_LIBS) include $(TOP)/configure/RULES #---------------------------------------- # ADD EXTRA GNUMAKE RULES BELOW HERE example_LIBS += asyn ------------------------------------------------------------------------------------------- than I make, it failed. /root/epics/base/configure/RULES_ARCHS:57: target 'inc.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:57: target 'build.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:57: target 'install.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:57: target 'buildInstall.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:57: target 'runtests.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:57: target 'tapfiles.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:61: target 'linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:66: target 'O.linux-x86_64' given more than once in the same rule /root/epics/base/configure/RULES_ARCHS:82: target 'clean.linux-x86_64' given more than once in the same rule make: Circular install.linux-x86_64 <- install.linux-x86_64 dependency dropped. make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \ T_A=linux-x86_64 install make[1]: Entering directory '/root/epics/mytest/exampleApp/src/O.linux-x86_64' Creating dbd file example.dbd perl -CSD /root/epics/base/bin/linux-x86_64/dbdExpand.pl -I. -I.. -I../O.Common -I../../../dbd -I/root/epics/seq/dbd -I/root/epics/base/dbd -I/root/epics/asyn4-33/dbd -I/root/epics/s7nodave/dbd -o example.dbd base.dbd xxxSupport.dbd dbSubExample.dbd exampleHello.dbd initTrace.dbd sncExample.dbd s7nodave.dbd asyn.dbd asynRecord.dbd drvAsynIPPort.dbd dbdExpand.pl: Duplicate definition of record type '' Context: recordtype(asyn) in file '/root/epics/asyn4-33/dbd/asynRecord.dbd' while reading 'asynRecord.dbd' to create 'example.dbd' dbdExpand.pl: Exiting due to errors make[1]: *** No rule to make target '../O.Common/example.dbd', needed by 'build'. Stop. make[1]: Leaving directory '/root/epics/mytest/exampleApp/src/O.linux-x86_64' /root/epics/base/configure/RULES_ARCHS:58: recipe for target 'install.linux-x86_64' failed make: *** [install.linux-x86_64] Error 2 ------------------ 黄 瀛 *****开票信息***** 名称:绵阳成威实验室工程技术有限公司 税号:915107 0455 1000 912T 注册地址:四川省绵阳市游仙区仙人路一段32号 开户银行:中国银行绵阳游仙支行 账号:1279 5046 6834 *****送货信息***** 地址:四川省绵阳市游仙区游仙镇仙童街一号,电商谷 联系人:黄瀛 电话:18784065819 ************************************************ Ying Huang Chengwei Lab&Engineering Company No1 Xiantong Street, Youxian Area, Mianyang City, Sichuan Province, China 86 0816 2967213 ------------------ Original ------------------ From: "Mark Rivers"<[email protected]>; Date: Thu, Sep 6, 2018 08:16 PM Subject: Re: asking for help on s7nodave my_DBD += s7nodave.dbd my_LIB += s7nodave Since your application is called "example" those should be example_DBD += s7nodave.dbd example_LIB += s7nodave You also need to make sure that exampleApp/src/Makefile contains example_DBD += asyn.dbd example_DBD += asynRecord.dbd It may also need example_DBD += drvAsynIPPort.dbd The above lines should be earlier in the Makefile, before this line: example_LIBS += $(EPICS_BASE_IOC_LIBS) Mark ________________________________ From: [email protected] <[email protected]> on behalf of 成威黄瀛 <[email protected]> Sent: Thursday, September 6, 2018 3:56 AM To: tech-talk Subject: asking for help on s7nodave Hi, Currently I am trying to make connection with epics and PLC, using s7nodave. I am following this guideline http://oss.aquenos.com/epics/s7nodave/docs/2.1.3/manual.html#recordreference Below is what I have done but I am stuck. 1, Install EPICS base. Version is 3.15.5 root@hy-VirtualBox:~/epics/base# ls bin db documentation include LICENSE README startup configure dbd html lib Makefile src templates 2, "makeBaseApp.pl -t example example" " makeBaseApp.pl -i -t example example" to build up mytest, the IOC application. root@hy-VirtualBox:~/epics/mytest# ls bin configure db dbd exampleApp include iocBoot lib Makefile 3, install asynDriver. Version is 4-33 Following this link, I add BPICS_BASE=/root/epics/base to asyn4-33/configure/RELEASE https://epics.anl.gov/modules/soft/asyn/ root@hy-VirtualBox:~/epics/asyn4-33# ls asyn iocBoot testApp testGpibApp bin lib testArrayRingBufferApp testGpibSerialApp configure LICENSE testAsynPortClientApp testIPServerApp db Makefile testAsynPortDriverApp testManagerApp dbd makeSupport testBroadcastApp testOutputCallbackApp documentation opi testConnectApp testOutputReadbackApp html README.md testEpicsApp testUsbtmcApp include templates testErrorsApp 4,put boost_1_67_0 in a certain folder but not compile root@hy-VirtualBox:~/epics/boost_1_67_0# ls boost boost.png index.htm libs status boost-build.jam bootstrap.bat index.html LICENSE_1_0.txt tools boostcpp.jam bootstrap.sh INSTALL more boost.css doc Jamroot rst.css 5, in s7nodave, configure/RELEASE file, add EPICS_BASE, ASYN, RELEASE_INCLUDES, and make s7nodabe # If using the sequencer, point SNCSEQ at its top directory: #SNCSEQ=$(EPICS_BASE)/../modules/soft/seq SNCSEQ=/root/epics/seq # The ASYN variable has to point to the asyn director. #ASYN=/opt/epics/modules/synApps_5_5/support/asyn-4-13 ASYN=/root/epics/asyn4-33 # If the headers of the Boost library (http://www.boost.org/) are not installed # in one of the default header locations (usually /usr/include and # /usr/local/include) the includes path has to be added to RELEASE_INCLUDES. # Only Boost headers are used, there is no need to compile the Boost library. #RELEASE_INCLUDES+=-I/my/path/to/boost_1_47_0 RELEASE_INCLUDES+=-I/root/epics/boost_1_67_0 # EPICS_BASE usually appears last so other apps can override stuff: #EPICS_BASE=/opt/epics/base-3.14.12 EPICS_BASE=/root/epics/base # Set RULES here if you want to take build rules from somewhere # other than EPICS_BASE: #RULES=/path/to/epics/support/module/rules/x-y # Allow the user to override settings locally. -include $(TOP)/configure/RELEASE.local 6, in configure/RELEASE file of my own project, add "S/NODAVE=/opt/epics/modules/s7nodave" # EPICS_BASE should appear last so earlier modules can override stuff: EPICS_BASE=/root/epics/base # Set RULES here if you want to use build rules from somewhere # other than EPICS_BASE: #RULES = $(MODULES)/build-rules # These allow developers to override the RELEASE variable settings # without having to modify the configure/RELEASE file itself. -include $(TOP)/../RELEASE.local -include $(TOP)/configure/RELEASE.local ASYN=/root/epics/asyn4-33 S/NODAVE=/root/epics/s7nodave S7NODAVE=/root/epics/s7nodave SNCSEQ=/root/epics/seq 7, add "my_DBD += s7nodave.dbd" "my_LIBS += s7nodave" to /root/epics/mytest/exampleApp/src/Makefile # Finally link IOC to the EPICS Base libraries example_LIBS += $(EPICS_BASE_IOC_LIBS) include $(TOP)/configure/RULES #---------------------------------------- # ADD EXTRA GNUMAKE RULES BELOW HERE example_LIBS += asyn #by hy my_DBD += s7nodave.dbd my_LIB += s7nodave --------------------------------------------------------- After these configure, I run st.cmd, however, IOC shell still cannot recoginze the command s7nodaveConfigureIsoTcpPort I notice the guideline mentioned that "However, you have to add asyn.dbd to the list of DBDs used by your project in order to enable these commands in the IOC shell. " But how can I add asyn.dbd to IOC shell???? by dbLoadDatabase "/root/epics/asyn4-33/dbd/asyn.dbd" ???????????????? < envPaths epicsEnvSet("IOC","iocexample") epicsEnvSet("TOP","/root/epics/mytest") epicsEnvSet("EPICS_BASE","/root/epics/base") epicsEnvSet("ASYN","/root/epics/asyn4-33") epicsEnvSet("S7NODAVE","/root/epics/s7nodave") epicsEnvSet("SNCSEQ","/root/epics/seq") cd "/root/epics/mytest" ## Register all support components dbLoadDatabase "dbd/example.dbd" ## dbLoadDatabase "/root/epics/asyn4-33/dbd/asyn.dbd" ## dbLoadDatabase "/root/epics/asyn4-33/dbd/asynRecord.dbd" ## dbLoadDatabase "/root/epics/asyn4-33/dbd/devEpivd.dbd" example_registerRecordDeviceDriver pdbbase ## Load record instances dbLoadTemplate "db/user.substitutions" dbLoadRecords "db/dbSubExample.db", "user=root" ## Set this to see messages from mySub #var mySubDebug 1 ## Run this to trace the stages of iocInit #traceIocInit cd "/root/epics/mytest/iocBoot/iocexample" iocInit Starting iocInit ############################################################################ ## EPICS R3.15.5 ## EPICS Base built Sep 2 2018 ############################################################################ iocRun: All initialization complete ## Start any sequence programs #seq sncExample, "user=root" epics> s7nodaveConfigureIsoTcpPort Command s7nodaveConfigureIsoTcpPort not found. epics> ------------------ 黄 瀛 *****?票信息***** 名称:??成威??室工程技?有限公司 税号:915107 0455 1000 912T 注册地址:四川省??市游仙区仙人路一段32号 ???行:中国?行??游仙支行 ?号:1279 5046 6834 *****送?信息***** 地址:四川省??市游仙区游仙?仙童街一号,?商谷 ?系人:黄瀛 ??:18784065819 ************************************************ Ying Huang Chengwei Lab&Engineering Company No1 Xiantong Street, Youxian Area, Mianyang City, Sichuan Province, China 86 0816 2967213
| ||||||||||||||
ANJ, 07 Sep 2018 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |