1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Problem still exist - Question about the speed of synchronization of CaChannel (python file in the attachment) ? |
From: | lzf neu <[email protected]> |
To: | "[email protected]" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Mon, 16 Oct 2017 03:49:51 +0000 |
I have added the "self.updatePVs()" at the end of myDriver.value_callback. However, the data loss phenomenon is still exist.
The data are from beamloss monitoring by high speed digitalizer collector (NI), the sample time is about 480M samples per second (i.e., 0.48GS/s).
In my fresh uploaded python file (upload.py), pv name "caLab:okok" is the data from beamloss monitoring, then i did some treatments in python file and send the data to "MTEST:d10".
In order to contrast the display speed, I set a print "recent",a.d0[a.j] command and compared with "caLab:okok" and "MTEST:d10". I have upload the results in "beamloss.csv". it can be seen that total 65 data from beamloss monitoring, MTEST:d10 is only receive 55 data. I have no idea whether the data loss problems are related to "self.setParam('d10', a.d0[a.j])" combined with "self.updatePVs()" or
"server.process(0.1)".
Any help will be appreciated, and thanks in advance.
发件人: lzf neu <[email protected]>
发送时间: 2017年10月16日 3:45 收件人: Wang Xiaoqiang (PSI); [email protected] 抄送: lzf neu 主题: 答复: Problem still exist - Question about the speed of synchronization of CaChannel (python file in the attachment) ?
I have added the "self.updatePVs()" at the end of myDriver.value_callback. However, the data loss phenomenon is still exist.
The data are from beamloss monitoring by high speed digitalizer collector (NI), the sample time is about 480M samples per second (i.e., 0.48GS/s).
In my fresh uploaded python file, pv name "caLab:okok" is the data from beamloss monitoring, then i did some treatments in python file and send the data to "MTEST:d10".
In order to contrast the display speed, I set a print "recent",a.d0[a.j] command and compared with "caLab:okok" and "MTEST:d10". I have upload the results in "beamloss.csv". it can be seen that total 65 data from beamloss monitoring, MTEST:d10 is only receive 55 data. I have no idea whether the data loss problems are related to "self.setParam('d10', a.d0[a.j])" combined with "self.updatePVs()" or
"server.process(0.1)".
Any help will be appreciated, and thanks in advance.
Zhefu 发件人: Wang Xiaoqiang (PSI) <[email protected]>
发送时间: 2017年10月13日 9:00 收件人: lzf neu 抄送: [email protected] 主题: Re: Question about the speed of synchronization of CaChannel (python file in the attachment) ? Hi,
At the end of myDriver.value_callback, could you add “self.updaePVs()”? Until that method is called, the change events are not seen to clients. Best Xiaoqiang > On 13 Oct 2017, at 10:41, lzf neu <[email protected]> wrote: > > Hi, > > I use CaChannel python package to monitor a PV 'caLab:okok' and do some simple treatments of the PV value, then synchronise the treated PV value to 'MTEST:d00' and 'MTEST:d01' , and it works. > > However, the problem is that when monitoring the PVs ('MTEST:d00' and 'MTEST:d01'), the speed ofsynchronization of "camonitor MTEST:d00", "camonitor MTEST:d01" are quite slower than "camonitor caLab:okok", and MTEST:d00 and MTEST:d01 lost many data from caLab:okok. > > I have no idea how to solve the problem, I try to modify the command "server.process(0.1)" to "server.process(0)" of the main function, but I failed, the speed of synchronizaiton is still very very slow, and it seems the more PVs synchronization the slower the speed is. > > I have attatched the python file in the attachment. > > Any help will be appreicated and thanks in advance ! > > Zhefu > > > > > > > <1.py> |
caLab:okok 2017-10-16 10:47:33.286447 6 0 0.00576779 0 0.00576779 -0.0115356 -0.00576779 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:32.260410 0 caLab:okok 2017-10-16 10:47:33.534095 6 0.0115356 0 0.00576779 0 0.0115356 0 ,,,,,,,,,recent 0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:32.508239 0.0115356 caLab:okok 2017-10-16 10:47:33.783891 6 -0.0173034 0.00576779 -0.00576779 0.0115356 -0.00576779 -0.00576779 ,,,,,,,,,recent -0.0173033620231,,,,MTEST:d10 2017-10-16 10:47:32.758235 -0.0173034 caLab:okok 2017-10-16 10:47:34.033548 6 -0.00576779 0 0.0115356 0 -0.0173034 0 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:33.008194 -0.00576779 caLab:okok 2017-10-16 10:47:34.283324 6 0 0.00576779 0.00576779 -0.00576779 -0.0115356 -0.00576779 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:33.258245 0 caLab:okok 2017-10-16 10:47:34.533115 6 -0.00576779 0.00576779 0 0.00576779 0.0173034 0 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:33.508515 -0.00576779 caLab:okok 2017-10-16 10:47:34.780996 6 0.0173034 0.0115356 0 0 0 -0.0173034 ,,,,,,,,,recent 0.0173033620231,,,,MTEST:d10 2017-10-16 10:47:33.756240 0.0173034 caLab:okok 2017-10-16 10:47:35.032301 6 0.00576779 0 0 0.00576779 -0.00576779 -0.0115356 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:34.007634 0.00576779 caLab:okok 2017-10-16 10:47:35.281439 6 0 -0.0115356 0 0 0.0115356 -0.0230711 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:34.256457 0 caLab:okok 2017-10-16 10:47:35.531810 6 0 0.0230711 -0.00576779 0.00576779 -0.00576779 0 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:34.756426 0.00576779 caLab:okok 2017-10-16 10:47:35.781975 6 0.00576779 -0.00576779 -0.00576779 -0.00576779 0.0115356 -0.00576779 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:35.004401 -0.00576779 caLab:okok 2017-10-16 10:47:36.030246 6 -0.00576779 0 0.00576779 -0.00576779 0.00576779 -0.0115356 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:35.254360 0.0115356 caLab:okok 2017-10-16 10:47:36.280505 6 0.0115356 0 -0.00576779 0.00576779 0.00576779 0.00576779 ,,,,,,,,,recent 0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:35.504533 -0.00576779 caLab:okok 2017-10-16 10:47:36.530781 6 -0.00576779 0 0.00576779 0 -0.0115356 0.00576779 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:36.003645 -0.0115356 caLab:okok 2017-10-16 10:47:36.781152 6 -0.00576779 -0.0115356 0 0.00576779 0 0 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:36.253508 -0.00576779 caLab:okok 2017-10-16 10:47:37.030398 6 -0.0115356 0.00576779 0.00576779 0.00576779 0.00576779 0 ,,,,,,,,,recent -0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:36.503712 0 caLab:okok 2017-10-16 10:47:37.280656 6 -0.00576779 -0.0173034 0.0115356 0 0 -0.00576779 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:37.001378 0.0115356 caLab:okok 2017-10-16 10:47:37.530936 6 0 -0.00576779 0.00576779 0.00576779 0 0 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:37.251811 0.00576779 caLab:okok 2017-10-16 10:47:37.779189 6 0 0.00576779 0.00576779 0 -0.00576779 -0.0115356 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:37.750880 0 caLab:okok 2017-10-16 10:47:38.029466 6 0.0115356 0 0.00576779 -0.0115356 -0.0115356 0.0173034 ,,,,,,,,,recent 0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:38.249823 0.0115356 caLab:okok 2017-10-16 10:47:38.279734 6 0.00576779 -0.00576779 0 0 -0.00576779 -0.0115356 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:38.499957 -0.00576779 caLab:okok 2017-10-16 10:47:38.529994 6 0.00576779 -0.0115356 -0.00576779 0 0 0 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:38.749921 0.00576779 caLab:okok 2017-10-16 10:47:38.779251 6 0 0 0 0.0115356 0 -0.0173034 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:38.998728 0.0115356 caLab:okok 2017-10-16 10:47:39.028571 6 0 0.00576779 -0.00576779 0 -0.0115356 0 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:39.247558 -0.00576779 caLab:okok 2017-10-16 10:47:39.278818 6 0.0115356 0.00576779 0.0115356 0 -0.00576779 -0.0230711 ,,,,,,,,,recent 0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:39.498838 0 caLab:okok 2017-10-16 10:47:39.529066 6 -0.00576779 0 -0.00576779 0.00576779 -0.00576779 0.0173034 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:39.747948 -0.0115356 caLab:okok 2017-10-16 10:47:39.779314 6 0.00576779 -0.00576779 -0.0230711 0 0 0 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:39.997754 0 caLab:okok 2017-10-16 10:47:40.028032 6 0.0115356 -0.0173034 0 0.00576779 0.0115356 0.0173034 ,,,,,,,,,recent 0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:40.247843 0.00576779 caLab:okok 2017-10-16 10:47:40.276761 6 -0.00576779 0 0 -0.00576779 0.00576779 0 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:40.496294 -0.0115356 caLab:okok 2017-10-16 10:47:40.527666 6 0 0.00576779 0.0173034 0 0.00576779 -0.00576779 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:40.746888 0.0115356 caLab:okok 2017-10-16 10:47:40.776421 6 -0.0115356 -0.0115356 -0.0115356 -0.0173034 0 0.00576779 ,,,,,,,,,recent -0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:40.995664 0 caLab:okok 2017-10-16 10:47:41.026223 6 0 -0.0115356 -0.0115356 0.00576779 0.00576779 0 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:41.244885 0.0173034 caLab:okok 2017-10-16 10:47:41.276002 6 0.00576779 0.0115356 0.0115356 -0.00576779 0 0.00576779 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:41.494987 -0.0173034 caLab:okok 2017-10-16 10:47:41.523774 6 -0.0115356 0 -0.00576779 0.00576779 0.0115356 -0.0115356 ,,,,,,,,,recent -0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:41.744815 0.00576779 caLab:okok 2017-10-16 10:47:41.774558 6 0.0115356 -0.0173034 -0.0115356 0 -0.00576779 0 ,,,,,,,,,recent 0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:41.994776 0 caLab:okok 2017-10-16 10:47:42.023217 6 0 0 0.0115356 -0.0115356 0.00576779 -0.00576779 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:42.244122 -0.00576779 caLab:okok 2017-10-16 10:47:42.272004 6 0.0173034 0 0.0115356 0.00576779 0.00576779 -0.00576779 ,,,,,,,,,recent 0.0173033620231,,,,MTEST:d10 2017-10-16 10:47:42.494013 -0.0173034 caLab:okok 2017-10-16 10:47:42.521904 6 -0.0173034 -0.0173034 0.00576779 0.00576779 0 -0.0230711 ,,,,,,,,,recent -0.0173033620231,,,,MTEST:d10 2017-10-16 10:47:42.742877 -0.0115356 caLab:okok 2017-10-16 10:47:42.771559 6 0.00576779 0 -0.00576779 0.0115356 -0.0173034 -0.00576779 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:43.242834 -0.00576779 caLab:okok 2017-10-16 10:47:43.021310 6 0 0.00576779 -0.00576779 -0.0230711 -0.0115356 0.0115356 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:43.492224 -0.0115356 caLab:okok 2017-10-16 10:47:43.270221 6 -0.00576779 0 0 0.0115356 0 0.00576779 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:43.742230 0 caLab:okok 2017-10-16 10:47:43.519882 6 -0.0173034 0 0.00576779 -0.0115356 -0.00576779 -0.00576779 ,,,,,,,,,recent -0.0173033620231,,,,MTEST:d10 2017-10-16 10:47:44.239921 -0.00576779 caLab:okok 2017-10-16 10:47:43.768789 6 -0.0115356 -0.0173034 0 -0.00576779 0 -0.00576779 ,,,,,,,,,recent -0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:44.490056 0 caLab:okok 2017-10-16 10:47:44.017576 6 -0.0115356 0.0115356 0 -0.00576779 0.0115356 -0.0115356 ,,,,,,,,,recent -0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:44.989984 -0.00576779 caLab:okok 2017-10-16 10:47:44.268214 6 -0.00576779 -0.00576779 0.00576779 -0.0230711 0 -0.00576779 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:45.237953 0.0173034 caLab:okok 2017-10-16 10:47:44.517078 6 -0.0115356 0 0.00576779 0.00576779 0 0 ,,,,,,,,,recent -0.0115355746821,,,,MTEST:d10 2017-10-16 10:47:45.488141 0.00576779 caLab:okok 2017-10-16 10:47:44.766908 6 0 0 0 0 -0.00576779 -0.00576779 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:45.739073 0 caLab:okok 2017-10-16 10:47:45.015983 6 0 -0.00576779 0.00576779 -0.00576779 0 -0.0115356 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:46.237381 0.00576779 caLab:okok 2017-10-16 10:47:45.265162 6 -0.00576779 -0.00576779 0 -0.00576779 -0.00576779 -0.00576779 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:46.486451 0.0173034 caLab:okok 2017-10-16 10:47:45.515535 6 0 0 0.0115356 0 0.0115356 0 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:46.737103 -0.00576779 caLab:okok 2017-10-16 10:47:45.765704 6 0 0.00576779 -0.00576779 -0.00576779 0.0115356 0.0115356 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:47.234970 0 caLab:okok 2017-10-16 10:47:46.015952 6 -0.00576779 0 0 -0.0173034 0.00576779 -0.00576779 ,,,,,,,,,recent -0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:47.485462 -0.0115356 caLab:okok 2017-10-16 10:47:46.264018 6 0.0173034 0.0115356 0 0 0 0 ,,,,,,,,,recent 0.0173033620231,,,,MTEST:d10 2017-10-16 10:47:47.735453 0.00576779 caLab:okok 2017-10-16 10:47:46.514215 6 0.00576779 0 0 -0.0173034 0.0115356 -0.0115356 ,,,,,,,,,recent 0.00576778734103,,,,MTEST:d10 2017-10-16 10:47:47.984233 0.0230711 caLab:okok 2017-10-16 10:47:46.765524 6 0 0.0115356 -0.0115356 -0.0115356 0.0173034 0 ,,,,,,,,,recent 0.0,,,,MTEST:d10 2017-10-16 10:47:48.233477 -0.00576779 caLab:okok 2017-10-16 10:47:47.014746 6 0 0 0 0 -0.00576779 0.00576779 ,,,,,,,,,recent 0.0,,,, caLab:okok 2017-10-16 10:47:47.263972 6 0.00576779 0 0 -0.00576779 0.00576779 0.00576779 ,,,,,,,,,recent 0.00576778734103,,,, caLab:okok 2017-10-16 10:47:47.513173 6 0.0173034 -0.00576779 0 0 -0.00576779 -0.00576779 ,,,,,,,,,recent 0.0173033620231,,,, caLab:okok 2017-10-16 10:47:47.764367 6 -0.00576779 0 0.0115356 0 0.0115356 -0.00576779 ,,,,,,,,,recent -0.00576778734103,,,, caLab:okok 2017-10-16 10:47:48.014534 6 -0.00576779 -0.00576779 0.00576779 0.0115356 0.00576779 0 ,,,,,,,,,recent -0.00576778734103,,,, caLab:okok 2017-10-16 10:47:48.262604 6 0 -0.00576779 -0.00576779 0 0.00576779 0.00576779 ,,,,,,,,,recent 0.0,,,, caLab:okok 2017-10-16 10:47:48.513000 6 -0.0115356 0 -0.00576779 0 0.0115356 0 ,,,,,,,,,recent -0.0115355746821,,,, caLab:okok 2017-10-16 10:47:48.763195 6 0.00576779 0 0.0173034 0.0115356 0.0230711 0.00576779 ,,,,,,,,,recent 0.00576778734103,,,, caLab:okok 2017-10-16 10:47:49.012254 6 0.0230711 -0.00576779 0.0115356 0.00576779 0.00576779 0 ,,,,,,,,,recent 0.0230711493641,,,, caLab:okok 2017-10-16 10:47:49.261571 6 -0.00576779 0.00576779 0.00576779 -0.00576779 0.00576779 -0.0173034 ,,,,,,,,,recent -0.00576778734103,,,,
#!/usr/bin/env python ###### from pcaspy import Driver, SimpleServer from CaChannel import ca, CaChannel import a prefix = 'MTEST:' pvdb = { 'd10': { 'type' : 'float', }, } class myDriver(Driver): def __init__(self): Driver.__init__(self) self.chan = CaChannel('caLab:okok') self.chan.searchw() self.chan.add_masked_array_event(None, None, None, self.value_callback) def value_callback(self, epics_args, user_args): value=str(epics_args['pv_value']) a.d0[a.j]=float(value.split(',',480)[0].strip('[')) print "recent",a.d0[a.j] self.setParam('d10', a.d0[a.j]) self.updatePVs() if __name__ == '__main__': server = SimpleServer() server.createPV(prefix, pvdb) driver = myDriver() while True: server.process(0.1) #######