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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Finding the PV for a specific device? |
From: | "Mooney, Tim M. via Tech-talk" <[email protected]> |
To: | "Mooney, Tim M. via Tech-talk" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Mon, 6 Jan 2020 21:33:06 +0000 |
Oops, I see a mistake already. The line
{xxx:, 100, "m$(N)", "asynMotor"
should be
{xxx:, 1, "m$(N)", "asynMotor"
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab From: Tech-talk <[email protected]> on behalf of Mooney, Tim M. via Tech-talk <[email protected]>
Sent: Monday, January 6, 2020 3:26 PM To: [email protected] <[email protected]>; [email protected] <[email protected]> Subject: Re: Finding the PV for a specific device?
Hi Emma,
This is a thoroughly solved problem, and the solution is available on github. I'm going to suggest using an overly general solution and cutting it down to what you need, instead of a specific solution to this narrowly defined problem, because there is more
help available (in the form of scripts, etc.) for the general solution.
I would install synApps (EPICS support for many of the things people do at synchrotron-radiation beamlines) on a Linux workstation by downloading the following script:
It's possible to install and build on a Windows machine, but I'm not the person who can tell you how to do that.
Edit assemble_synApps.sh to specify the path to a copy of EPICS base that is built for Linux.
Find, in assemble_synApps.sh a list of module names and versions, which begins with
ALLENBRADLEY=2.3
ALIVE=R1-1-1
...
Comment out all such lines except ASYN, AUTOSAVE, MOTOR, and XXX, and run it:
% bash assemble_synApps.sh
This goes out on the web and finds the modules, downloads them, and configures them into a system.
Then tailor the modules to what you need:
% cd synApps/support
edit asyn-Rx-xx/configure/RELEASE to comment out the definition of IPAC
edit motor-Rx-xx/configure/RELEASE to comment out BUSY, and IPAC
edit motor-Rx-xx/modules/Makefile to comment out all SUBMODULE definitions except "SUBMODULES += motorAerotech"
edit xxx-Rx-xx/xxxApp/src/Makefile, find "ifdef MOTOR", and comment out all
"$(DBD_NAME)_DBD +=" definitions in that section, then add this line:
$(DBD_NAME)_DBD += motorSupport.dbd devAerotech.dbd
Also comment out all "$(PROD_NAME)_LIBS := " definitions, and add this line:
$(PROD_NAME)_LIBS := motor Aerotech $($(PROD_NAME)_LIBS)
Then build the modules (still in the synApps/support directory):
% setenv EPICS_HOST_ARCH linux-x86_64 (or whatever arch EPICS base was built for)
% make >&make.out
If the build succeeds, it will give you an ioc directory, which you must customize:
% cd xxx-Rx-xx/iocBoot/iocxxx
Edit st.cmd.Linux to comment out the lines
< common.iocsh
and
dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminSoft.db","IOC=xxx")
Add the following lines (before IocInit):
# Substitute the IP address of your Ensemble controller in the following line
drvAsynIPPortConfigure("tcp1","164.54.113.74:8000", 0, 0, 0)
EnsembleAsynSetup(1)
EnsembleAsynConfig(0, "tcp1", 0, 1, 100, 1000)
drvAsynMotorConfigure("AeroE1","motorEnsemble",0,1)
dbLoadTemplate("AsynMotor.substitutions")
Make the file AsynMotor.substitutions, with the following content:
<--snip-->
file "$(MOTOR)/db/asyn_motor.db"
{
pattern
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{xxx:, 100, "m$(N)", "asynMotor", AeroE1, 0, "motor $(N)", deg, Pos, 1, 0, 0.2, 0, 1, 0.2, 5E-5, 5, 0, 0, ""}
}
<--snip-->
Now type
% ../../bin/${EPICS_HOST_ARCH}/xxx st.cmd.Linux
This should run the IOC, and make PVs for the motor. The PV xxx:m1.VAL should drive the motor, and xxx:m1.RBV should tell you its current position. The best way to test out a motor is to run a display manager, such as caQtDM, and bring up the motor's GUI
display. If you have caQtDM, do this:
% cd xxx-Rx-xx/iocBoot/iocxxx
% start_caQtDM_xxx
Click on "Motors 1-8", click on "m1" and choose "m1 (Debug)"
If I recall correctly, you have to turn torque on. You may also have to home the motor.
In any list this long, there are likely many things that will go wrong. If this seems like an approach you're willing to undertake, go for it and come back with problems as they arise.
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab From: Tech-talk <[email protected]> on behalf of Emma-Elizabeth Cating-Subramanian via Tech-talk <[email protected]>
Sent: Monday, January 6, 2020 11:18 AM To: [email protected] <[email protected]> Subject: Finding the PV for a specific device? Hello,
I've asked this question of a few people now and no one has been able to give me a useful answer, so perhaps I have been phrasing it incorrectly. Maybe a better way is, if you connected a new Aerotech stage to your computer, could you walk me through the
steps you would take to make it move using EPICS?
Thanks,
Emma Cating-Subramanian
Postdoctoral Researcher
Kapteyn-Murnane group
JILA
CU Boulder
|