One more question, as I need to connect to PLC too. Could you also give me a guideline, or where I can find related documents on how to connect to PLC? Take Simens 1200 for example.
Thanks.
------------------ 原始邮件 ------------------
发送时间: 2018年8月30日(星期四) 凌晨0:26
主题: Re: the same question to "a simple question about pyepics"
Hello Ying Huang
On 29/08/18 17:10, 成威黄瀛 wrote:
> Plus, this is just a beginning of mine and I do not connect any device on my laptop. I just try it on a Virtual Mechine and follow the easiest example hoping to get the entrance.
> Hope to get feedback. Thanks in advance.
> -------------------------------------------------------
>
> Hi,
> I am just facing the same question with that email "a simple question about pyepics".
> OS is redhat6, python is 2.7.6
> Here is what I tried:
> 1, [root@localhost linux64]# echo $PYEPICS_LIBCA
> /test/base/lib/linux-x86_64/libca.so
> 2, [root@localhost linux64]# echo $EPICS_BASE
> /test/base
> 3, [root@localhost linux64]# echo $EPICS_HOST_ARCH
> linux-x86_64
> 4, in python I am typing
> Python 2.7.6 (default, Aug 28 2018, 07:42:21)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from epics import caget
>>>> m1 = caget('root:ai2')
> cannot connect to root:ai2
> 5, PV named 'root:ai2' does exist
> iocRun: All initialization complete
> ## Start any sequence programs
> #seq sncExample, "user=root"
> epics> dbl
> root:xxxExample
> root:calcExample
> root:calcExample1
> root:calc1
> root:calcExample2
> root:calc2
> root:calcExample3
> root:calc3
> root:subExample
> root:aSubExample
> root:compressExample
> root:aiExample
> root:aiExample1
> root:ai1
> root:aiExample2
> root:ai2
> root:aiExample3
> root:ai3
>
>
>
> What can I do then?
I would try the standard epics Channel Access CA tools eg
https://epics.anl.gov/base/R3-14/12-docs/CAref.html#cagetfrom the command line
caget root:ai2
or
camonitor root:ai2
If that doesn't work, your problem is not pyepics, but CA in general.
Could be firewall or name resolution issue.
https://epics.anl.gov/base/R3-14/12-docs/CAref.html#firewallhttps://epics.anl.gov/base/R3-14/12-docs/CAref.html#EPICSEPICS_CA_ADDR_LIST=ip-addr
Cheers
Peter
>
>
>
>
> ------------------
> 黄 瀛
>
>
> *****开票信息*****
> 名称:绵阳成威实验室工程技术有限公司
> 税号: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
>
--
Peter Milne
Director of Sales
www.d-tacq.com