Motor record driver ("model-3" type) for the PiezoJena d-drive piezo controller.
Though it may work on other versions, the driver was tested on these:
- EPICS base 3.14.12.3 http://www.aps.anl.gov/epics/
- asyn 4-18 http://www.aps.anl.gov/epics/modules/soft/asyn/
- motor record 6-7 http://www.aps.anl.gov/bcda/synApps/motor/
- EDM http://ics-web.sns.ornl.gov/edm/log/getLatest.php Screens are provided in $TOP/opi for EDM.
- Autosave http://www.aps.anl.gov/bcda/synApps/autosave/autosave.html
-
Install EPICS
- If using a Debian-based system (e.g., Ubuntu), use the packages here http://epics.nsls2.bnl.gov/debian/
- If no packages are available for your distribution, build from source
-
Edit configure/RELEASE
- Point the directories listed in there to the appropriate places
- If using the Debian packages, everything can be pointed to /usr/lib/epics
-
Edit iocBoot/iocddrive/st.cmd
- Change the shebang on the top of the script if your architecture is different than linux-x86:
#!../../bin/linux-x86/ddrive
(check if the environment variable EPICS_HOST_ARCH is set, or perhaps
uname -a
, or ask someone if you don't know) - The following line sets the prefix to all of your ddrive PVs (with
$(P)$ (R)):Set the second quoted strings appropriately.epicsEnvSet("P", "$(P=MLL:)") epicsEnvSet("R", "$(R=DDRIVE:)")
- The following line sets the IP address of the serial device server communicating with the ddrive:
Change the 10.0.0.11 to the IP address, and 4016 to the correct port number.
epicsEnvSet("DDRIVE_NET_IP", "$(DDRIVE_NET_IP=10.0.0.11)") epicsEnvSet("DDRIVE_NET_PORT", "$(DDRIVE_NET_PORT=4016)")
- Alternatively, if you have the device directly connected to a serial port on the machine, uncomment and modify the drvAsynSerialPortConfigure/asynSetOption lines. Comment out drvAsynIPPortConfigure.
- If necessary, you can change the rate at which the controller is polled for positions and such:
The moving and idle poll periods are both in milliseconds. The former rate is used when an axis is in motion, the latter otherwise.
#ddriveCreateController(portName, ddrivePortName, numAxes, movingPollPeriod, idlePollPeriod) ddriveCreateController("DDRIVE0", "$(ASYN_PORT)", 3, 50, 100)
- If using autosave, uncomment create_monitor_set lines. Add lines in auto_positions.req and auto_settings.req for each motor.
- Change the shebang on the top of the script if your architecture is different than linux-x86:
#!../../bin/linux-x86/ddrive
(check if the environment variable EPICS_HOST_ARCH is set, or perhaps
-
Edit iocBoot/iocddrive/ddrive.sub Modify the lines so that there is one motor.db line per axis. Each will be named
$(P)$ (M). Additional control outside of that available in the EPICS motor record is given in ddrive_mbb.db, so similarly add one line for each of those if necessary. -
An asyn
-
Go to the top directory and
make
-
If all goes well:
cd iocBoot/iocddrive chmod +x st.cmd` ./st.cmd
-
Run EDM:
export EDMDATAFILES=$TOP/op/edl:$EDMDATAFILES (general motor settings configuration) edm -x -m "P=MLL:ddrive:,M=m1" motorx_all & (d-drive specific settings) edm -x -m "P=MLL:,R=DDRIVE:AX0:" ddrive_all &