Hello,
I am presently having an EPICS IOC with CA protocol, with SynApps toolkit. ( can python softIoc be used with SynApps)
I wanted the data to be displayed in a Tabular format. For this I set up a separate multi threaded python process, with pyepics on the client side, gathering (monitoring for change) the data from the SynApps SScan Module, this data is processes and published
on a python pvaccess server (pypva) in a tabular format.
Here I intentionally kept the processing in python code as the user has flexibility to adapt the code without recompiling.
The EPICS IOC and the python (pyepics client, pypva server) are started as separate processes. I can use procserv to initiate the IOC as well as the python based CA and PVA client-server.
I was wondering if by using pyDevSup or PyDevice, can I directly monitor the SScan data from the IOC and publish it directly to the python pvaccess server. This will save me one external CA connection. ie is it possible in pyDevSup and PyDevice to use
the internal mechanism of IOC for monitoring and acquiring data.
The attempted connection is as below. Is there an easier/elegant way?
<------------------------------------------------------->
EPICS IOC <--> pyepics <---> pypva <---> phoebus
I tried embedding the above python client server code using pyDevSup and PyDevice I am getting similar warnings in both modules.
cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 34549,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
I guess it has to do with the same port used by the IOC and pyepics. How do I separate the port on the client and server side so as to avoid conflict.
Regards,
Kuldeep Joshi
PS: I am using the following sequence (in pyepics) as given in the SScan documentation to gather the data
- Create local variables to hold cached values of the fields to be monitored, and a local variable (which I'll call "numPoints") to hold the number of data points accumulated.
- Monitor DnnCV, RmCV and VAL (scalar data and control fields).
- Monitor DnnDA, PmRA, DATA, and CPT (array data and control fields).
- Whenever DnnCV, RmCV, or CPT are received, cache the received scalar value in a local variable.
- Whenever DnnDA or PmRA are received, cache the received array value in a local variable.
- When DATA=""> is received, clear all data arrays, and reset numPoints to zero.
- When VAL is received, append to all data arrays from cached scalar values, and increment numPoints.
- When DATA=""> is received, clear all data arrays and replace with cached array values; set numPoints to the cached value received from
CPT.