Open yugangzhang opened 7 years ago
channelarchiver uses XMLRPC to communicate. You need to add allow_none=True
in the xmlrpc client archiver uses, I don't think channelarchiver exposes this feature ( I might be wrong, I didn't look into the api in depth). Your issue seems like you're getting None
as a response. This can mean your archiver might not be responsive or you are searching for something that doesn't exist. I would talk to someone from accelerator controls and your beamline's control engineer to find out the addresses for both archivers you'd like to access. Once you verify all the addresses+your query params and the issue persists, we can look into it as a software related bug.
What happens if you remove limit=None
from the parameters you're sending?
@arkilic The function doesn't have allow_none option
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-7ee841f76089> in <module>()
1 res = archiver.get(pv, start_time, end_time, scan_archives= True, limit= None,
----> 2 allow_none=True, interpolation='raw')
TypeError: get() got an unexpected keyword argument 'allow_none'
Yes that's not what I meant. Did you try what @klauer ask you to do?
@klauer when remove limit= None, the function doesn't raise error, but the output is wrong
pv = 'XF:11IDA-OP{Mir:HDM-Ax:P}Pos-I'
res = archiver.get(pv, start_time, end_time, scan_archives= True, interpolation='raw')
I got
Out[35]:
ChannelData(
values=[-28],
times=[datetime.datetime(2017, 4, 24, 2, 0, 41, 717345, tzinfo=<DstTzInfo 'America/New_York' EDT-1 day, 20:00:00 DST>)],
statuses=[0],
severities=[0],
units='urad',
data_type=3,
elements=1,
display_limits=Limits(low=0.0, high=0.0),
warn_limits=Limits(low=0.0, high=0.0),
alarm_limits=Limits(low=0.0, high=0.0),
display_precision=2,
archive_key=47418,
interpolation=0
)
We know that the values of that PV (mirror pitch encoder) should change a lot in range of (-1820~-1850)and should not be that only one value (-28).
Are you sure the PV is what you think it is or is there an offset somewhere? Try to get a different time range.
Yes. I tried different time and got the same one value (-28). Actually, I also tried different PV, and it always gave me one value.
Are you sure you have the right address for the archiver? Can you try it with a different address (even a bogus one)?
bump @yugangzhang
Here is my code:
When do
I got
My questions are that is this a bug in channelarchiver.py? Or I did not use the correct server for xf11id data achiever? Also, can someone tell me the server for accelerator data achiever? We also want to know the beam current.
Thanks!