Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include softIoc and other executables #14

Open
zhangt58 opened this issue Oct 29, 2021 · 3 comments
Open

Include softIoc and other executables #14

zhangt58 opened this issue Oct 29, 2021 · 3 comments

Comments

@zhangt58
Copy link

zhangt58 commented Oct 29, 2021

Hi, I'm wondering if it's reasonable to distribute the tools like softIoc and softIocPVA with this package.
I'm using epicscorelibs together with pyepics and cothread, and it is great that I don't have to compile epics base, but in some cases, softIoc is wanted, if this package can provide, that would be wonderful!

Or I'm looking forward to a new package which is distributing EPICS tools via PyPI.

@mdavidsaver
Copy link
Member

@zhangt58
Copy link
Author

Thanks! Indeed, this command could be used to start up an IOC, but got the below timeout error, where I'm cothread.catools to update the PVs:

...
File "/home/tong/Dropbox/phantasy-project/phantasy/phantasy/library/pv/catools.py", line 130, in caput
    return caput(pvs, values, repeat_value=repeat_value, datatype=datatype,
  File "/home/tong/Dropbox/phantasy-project/phantasy/phantasy/library/pv/catools.py", line 59, in caput
    return catools.caput(_to_str(pvs), values,
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/catools.py", line 907, in caput
    return caput_array(pvs, values, **kargs)
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/catools.py", line 846, in caput_array
    return cothread.WaitForAll([
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/cothread.py", line 1111, in WaitForAll
    result.append(event.Wait(timeout))
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/cothread.py", line 714, in Wait
    py23.raise_with_traceback(result)
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/py23.py", line 29, in raise_with_traceback
    raise result[1].with_traceback(result[2])
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/cothread.py", line 671, in __run
    self.__function(*self.__args, **self.__kargs))
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/catools.py", line 130, in throw_wrapper
    return function(pv, *args, **kargs)
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/catools.py", line 797, in caput_one
    channel.Wait(timeout)
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/catools.py", line 243, in Wait
    ca_timeout(self.__connect_event, timeout, self.name)
  File "/home/tong/.local/lib/python3.8/site-packages/cothread/catools.py", line 157, in ca_timeout
    py23.raise_from(ca_nothing(name, cadef.ECA_TIMEOUT), timeout)
  File "<string>", line 4, in raise_from
cothread.catools.ca_nothing: VA:LS1_CA01:CAV1_D1127:PHA_RSET: User specified timeout on IO operation expired
Error executing virtual accelerator: VA:LS1_CA01:CAV1_D1127:PHA_RSET: User specified timeout on IO operation expired

All EPICS-related environment variables have been commented out.

@mdavidsaver
Copy link
Member

I can't replicate. I see:

$ cat cnt.db 
record(calc, "cnt") {
    field(CALC, "VAL+1")
    field(SCAN, "1 second")
}
$ python -m epicscorelibs.ioc -d cnt.db 
IOC Starting w/ [('cnt.db', '')] 
IOC dbd loaded
IOC rRDD
IOC db loaded
Starting iocInit
############################################################################
## EPICS 7.0.6.0
## Rev. 7.0.6.99.1.0
############################################################################
iocRun: All initialization complete
IOC Running
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>

And concurrently...

$ camonitor cnt
cnt                            2021-11-02 11:47:41.880930 4  
cnt                            2021-11-02 11:47:42.880866 5  
cnt                            2021-11-02 11:47:43.880940 6  
cnt                            2021-11-02 11:47:44.880948 7  
...
cnt                            2021-11-02 11:47:45.880953 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants