seq(Sequencer)配置安装笔记

安装包可在这里下载。
用户手册见这里,或者见 $SEQ/documentation。

需要
  1. EPICS base
    任意 seq 版本都可兼容 EPICS base 3.14.12.2 ~ 3.15;从 seq-2.2.6 开始, EPICS base versions up to 7.0.1 can be used.
  2. re2c
    CentOS 7 中,默认安装在了 /usr/local/bin 文件夹下,需要检查 PATH 环境变量中是否包含该路径。
配置安装
  1. 在 $SUPPORT/seq/configure/RELEASE (and perhaps also configure/CONFIG_SITE)中配置相关变量,主要是 EPICS_BASE 和 RE2C 的路径;
  2. 在 $SUPPORT/seq 文件夹下,执行 make ,编译。
测试

主要是针对 $SEQ/test 和 $SEQ/examples 进行测试。

  1. 可以运用自动化测试方法执行所有 $SEQ/test 文件夹内的测试文件:
    cd seq
    make -s runtests
    
  2. 也可以自己手动单独测试 $SEQ/test 文件夹内的测试文件。有两种方法可以运行具有关联数据库的测试:
    a) 在同一个IOC上运行状态机和数据库
    cd seq/test/validate/O.linux-x86_64
    perl evflag.t
    
    b) 将状态机和数据库作为两个独立的IOC运行(运行状态机的IOC在前台运行,运行数据库的IOC在后台运行),使用形如 *Ioc.t 的测试程序
    cd seq/test/validate/O.linux-x86_64
    perl evflagIoc.t
    
  3. 运行一个测试示例:
    cd seq/examples/demo
    ./O.linux-x86_64/demo demo.stcmd
    
    输出结果应该如下:
    ben@sarun[1]: .../examples/demo > ./O.linux-x86_64/demo demo.stcmd
    dbLoadDatabase "../../dbd/demo.dbd"
    demo_registerRecordDeviceDriver(pdbbase)
    dbLoadRecords "demo.db"
    iocInit
    Starting iocInit
    ############################################################################
    ###  EPICS IOC CORE built on Mar  3 2010
    ###  EPICS R3.14.8.2 $R3-14-8-2$ $2006/01/06 15:55:13$
    ############################################################################
    iocInit: All initialization complete
    seq &demo "debug=0"
    SEQ Version 2.1.0, compiled Fri Jul 15 12:44:09 2011
    Spawning sequencer program "demo", thread 0x8064f48: "demo"
    start -> ramp_up
    epics> light_off -> light_on
    ramp_up -> ramp_down
    light_on -> light_off
    ramp_down -> ramp_up
    light_off -> light_on
    ramp_up -> ramp_down
    ...
    
    出现“start -> ramp_up”等消息,则测试成功。
  4. 2 中的 test 测试文件也可以在嵌入式系统上运行。目前只支持vxWorks系统。为此,需要将vxWorks启动脚本指向 $SEQ/test/validate/O.linux-x86_64/st.cmd。
测试过程中出现的问题
  1. 进行test实验时,显示错误:error while loading shared libraries: libseqSoftIocSupport.so: cannot open shared object file: No such file or directory
    解决方法:在 ~/.bashrc 文件中,环境变量 LD_LIBRARY_PATH 的路径添加上seq的库

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EPICS_SUPPORT/seq/lib/linux-x86_64
    
  2. 执行 make -s runtests 命令时,输出结果如下:

    snc_test.t .. Can't locate Test/More.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at snc_test.t line 5.
    BEGIN failed--compilation aborted at snc_test.t line 5.
    snc_test.t .. Dubious, test returned 2 (wstat 512, 0x200)
    No subtests run 
    
    Test Summary Report
    -------------------
    snc_test.t (Wstat: 512 Tests: 0 Failed: 0)
      Non-zero exit status: 2
      Parse errors: No plan found in TAP output
    Files=1, Tests=0,  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
    Result: FAIL
    Failed 1/1 test programs. 0/0 subtests failed.
    array.t ................ ok     
    assign.t ............... ok   
    change.t ............... ok     
    commaOperator.t ........ ok   
    entryOpte.t ............ ok   
    evflagExt.t ............ ok   
    exitOptx.t ............. ok   
    foreignTypes.t ......... ok     
    functionInStruct.t ..... ok     
    indirectCall.t ......... ok     
    local.t ................ ok   
    opttVar.t .............. ok     
    pvSyncNoDb.t ........... ok         
    safeModeNotAssigned.t .. ok     
    safeMonitor.t .......... ok     
    sizeof.t ............... ok   
    stop.t ................. ok   
    structdef.t ............ ok     
    userfunc.t ............. Starting iocInit
    iocRun: All initialization complete
    userfunc.t ............. ok    
    userfuncEf.t ........... ok   
    void.t ................. ok   
    bittypes.t ............. Starting iocInit
    iocRun: All initialization complete
    bittypes.t ............. ok    
    evflag.t ............... Starting iocInit
    iocRun: All initialization complete
    evflag.t ............... ok    
    monitorEvflag.t ........ Starting iocInit
    iocRun: All initialization complete
    monitorEvflag.t ........ ok   
    pvAssignSubst.t ........ Starting iocInit
    iocRun: All initialization complete
    pvAssignSubst.t ........ ok   
    pvAssignStress.t ....... Starting iocInit
    iocRun: All initialization complete
    pvAssignStress.t ....... ok    
    pvGet.t ................ Starting iocInit
    iocRun: All initialization complete
    pvGet.t ................ ok    
    pvGetAsync.t ........... Starting iocInit
    iocRun: All initialization complete
    pvGetAsync.t ........... ok   
    pvGetCancel.t .......... Starting iocInit
    iocRun: All initialization complete
    pvGetCancel.t .......... ok     
    pvPutAsync.t ........... Starting iocInit
    iocRun: All initialization complete
    pvPutAsync.t ........... ok    
    pvPutAndMonitor.t ...... Starting iocInit
    iocRun: All initialization complete
    pvPutAndMonitor.t ...... ok   
    pvSyncDb.t ............. Starting iocInit
    iocRun: All initialization complete
    pvSyncDb.t ............. ok      
    reassign.t ............. Starting iocInit
    iocRun: All initialization complete
    reassign.t ............. ok    
    norace.t ............... Starting iocInit
    iocRun: All initialization complete
    norace.t ............... ok    
    bittypesIoc.t .......... **** The executable "caRepeater" couldn't be located
    **** because of errno = "No such file or directory".
    **** You may need to modify your PATH environment variable.
    **** Unable to start "CA Repeater" process.
    Starting iocInit
    iocRun: All initialization complete
    
    • 其中似乎有问题的是snc_test.t .. Can't locate Test/More.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at snc_test.t line 5. BEGIN failed--compilation aborted at snc_test.t line 5.

    • 确定有问题的是bittypesIoc.t .......... **** The executable "caRepeater" couldn't be located **** because of errno = "No such file or directory". **** You may need to modify your PATH environment variable. **** Unable to start "CA Repeater" process.,这个错误导致测试不能继续进行,一直卡在这里。
      解决过程:查看 bittypesIoc.t 文件,发现 PATH 路径是写死的,其中 CA Repeater 所在的路径 $EPICS_BASE/bin/linux-x86_64 写错了。将该行注释掉,添加一行 PATH 路径写成环境变量:

      $ENV{PATH} = $PATH
      

      再次运行 perl bittypesIoc.t 发现报错:Having no space between pattern and following word is deprecated at bittypesIoc.t line 12. Having no space between pattern and following word is deprecated at bittypesIoc.t line 15. String found where operator expected at bittypesIoc.t line 16, at end of line (Missing semicolon on previous line?) syntax error at bittypesIoc.t line 4, near "= .." Can't find string terminator '"' anywhere before EOF at bittypesIoc.t line 16.,应该是多加了命令行导致关联文件搞错命令行所在行数因而出错,所以还是应该在原 $ENV{PATH}命令行 直接修改,而不是自行添加新的命令行。
      修改完后执行 perl bittypesIoc.t 时发现测试状态一直卡在iocRun: All initialization complete,之后不再执行。
      测试所有 *Ioc.t 文件,发现均为此结果,联系到 “测试 2 b)“ 中所述,应该是状态机和数据库分别在两个IOC的情况有问题

IF ANY NEED

re2c的用户手册
re2c的下载地址

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值