This is a follow up from this elog: https://logbook.xray.aps.anl.gov/8id/8-ID/806.
Hao Zheng had a great suggestion today. The elog below
explained that we could not use this PV in a UserCalc
DP_LAMBDA250K_1:cam1:NumImagesCounter_RBV
because it has 42 characters. This PV is a current count of images acquired,
and my users have used it to trigger a slow voltgae change using a userCalc record.
Hao found a PV which is 38 characters long for the total number of images acquired by the
Area Detector IOC. DP_LAMBDA250K_1:cam1:ArrayCounter_RBV The limit is 40 characters!
It is shown in att. 1.
ED
Quote: | [6:38 PM] Dufresne, Eric
Hi Joe, I need help with a userCalc record. I had a userCalc in the past which worked. Recently the PV changed name, it is longer,
and I cannot get userCalc to add it. Is there a maximum length for a PV in the userCalc calculation? Will show what I mean in a picture.
​[6:40 PM] Dufresne, Eric
The prefix has just changed (from 8LAMBDA2) to DP_LAMBDA250K_1 and I want to write in the B field
userCalc6.png
[6:46 PM] Dufresne, Eric
In the above image with the new prefix, I cannot enter the full PV name on the B parameter, it clips to _R instead of _RBV. It is as if
someone put a maximum record length for the string at 39 characters.
[6:55 PM] Sullivan, Joseph
I'm afraid there is a maximum string length of 40 characters in that epics version.
The PV is 41 character long: DP_LAMBDA250K_1:cam1:NumImagesCounter_RBV
It is the number of images taken by Area Detector.
We wanted to use this field to control some sample conditions.
We're using python instead of a userCalc as a result of this limitation.
ED
P.S. The MSD user created a python script to run this instead.
See Sep 2021 in spec_data.
Re: Sample stage
Hi all,
unfortunately, the way I have programmed this no longer works.
It is caused by a limit of the string length provided to a userCalc record.
This length is limited to 40 characters and my PV is 41 characters!
DP_LAMBDA250K_1:cam1:NumImagesCounter_RBV
It use to work because it started with 8LLAMBDA2.
The above PV is too long, but tells you the number of image collected by AD.
I am not reprogramming the detector and beamline at this time by changing the name of the detector.
What I am proposing instead would be to ignore this altogether and write
a simple python script that detects the time elapsed since it started, and from the time,
you can program a periodic function to drive the amplitude of the Keithley.
The voltage to apply is this PV: epics_put('8ide:2400:setVoltAO',30) (epics_put is a spec command).
An idea is to get the time of day from the IOC, a useful PV would be: 8idd:HEARTBEAT (time in seconds since start up)
8idd:TOD is a string with the calendar time of day called Current Time in the IOC status screen attached.
This can be grabbed for documentation. The heartbeat is the useful data to make an arbitrary
function generator.
You can make a python script with the frequency and amplitude and call it in spec
before the padtimescan call, making sure it is put in the background and stops
after Nseconds as programmed in the padtimescan call.
Hope this helps,
Eric |
|