diff --git a/README.md b/README.md index f2ca560..abc5ecd 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,11 @@ motorDSM ========== -EPICS motor drivers for the following [Dynamic Structures and -Materials](https://www.dynamic-structures.com/) motor controllers: MD-90 +EPICS motor drivers for the following [Dynamic Structures and Materials](https://www.dynamic-structures.com/) motor controllers: MD-90 [![Build Status](https://github.com/Binary-Coalescence/motorDSM/actions/workflows/ci-scripts-build.yml/badge.svg)](https://github.com/Binary-Coalescence/motorDSM/actions/workflows/ci-scripts-build.yml) -motorDSM is a submodule of [motor](https://github.com/epics-modules/motor). -When motorDSM is built in the ``motor/modules`` directory, no manual -configuration is needed. +motorDSM is a submodule of [motor](https://github.com/epics-modules/motor). When motorDSM is built in the ``motor/modules`` directory, no manual configuration is needed. motorDSM can also be built outside of motor by copying it's ``configure/EXAMPLE_RELEASE.local`` file to ``RELEASE.local`` and defining the paths to ``EPICS_BASE``, ``MOTOR``, and itself. @@ -22,19 +19,17 @@ for one attached MD-90 controller, or $ ../../bin/linux-x86_64/dsm st.cmd.md90.multi -for eight attached MD-90 controllers. +for eight attached MD-90 controllers. You may need to change the path(s) for the serial port(s) in ``st.cmd.md90`` or ``st.cmd.md90.multi`` if the MD-90 is not attached at ``/dev/ttyUSB0``. ------------------------ -To set up a full EPICS stack for development and testing, install and configure -all of the following dependencies: +To set up a full EPICS stack for development and testing, install and configure all of the following dependencies: ------------------------ epics-base ------------------------ -Install make, gcc, and perl packages if not already installed, then clone and -build epics-base: +Install make, gcc, and perl packages if not already installed, then clone and build epics-base: $ export SUPPORT=/path/to/install/directory $ cd $SUPPORT @@ -51,18 +46,17 @@ asyn $ cd $SUPPORT $ git clone git@github.com:epics-modules/asyn.git -Needed to install (on Arch Linux) ``rpcsvc-proto`` package to get ``rpcgen`` -binary needed to make asyn. +You may need to install (on Arch Linux) ``rpcsvc-proto`` package to get ``rpcgen`` binary needed to make asyn. -In ``asyn/configure``, copy ``RELEASE`` to ``RELEASE.local`` and set ``SUPPORT`` -and ``EPICS_BASE`` paths. +In ``asyn/configure``, create the file ``RELEASE.local`` with contents: +SUPPORT=/path/to/install/directory +EPICS_BASE=/path/to/epics-base In ``asyn/configure``, create ``CONFIG_SITE.local`` file with the line: TIRPC=YES -if appropriate header files are in ``/usr/include/tirpc/rpc`` instead -of ``/usr/include/rpc``. +if appropriate header files are in ``/usr/include/tirpc/rpc`` instead of ``/usr/include/rpc``. - $ cd asyn + $ cd $SUPPORT/asyn $ make clean $ make @@ -74,15 +68,13 @@ seq $ cd $SUPPORT $ git clone git@github.com:ISISComputingGroup/EPICS-seq.git seq -Install the ``re2c`` package (Arch). +Install the ``re2c`` package (Arch) if needed. -Create ``seq/configure/RELEASE.local`` and set path for ``EPICS_BASE``. -(Note this package seems to forget to git-ignore the .local file.) +Create ``seq/configure/RELEASE.local`` and set path for ``EPICS_BASE``. (Note this package seems to forget to git-ignore the .local file.) -Edit ``seq/configure/RELEASE`` to add the missing '-' before include for ``ISIS_CONFIG`` -on the next to last line. Seems to be a typo. +Edit ``seq/configure/RELEASE`` to add the missing '-' before the ``include`` for ``ISIS_CONFIG`` on the next to last line. This seems to be a typo. - $ cd seq + $ cd $SUPPORT/seq $ make clean $ make @@ -94,24 +86,9 @@ motor $ cd $SUPPORT $ git clone git@github.com:epics-modules/motor.git -Optionally, if you want to install additional motor drivers: +Create ``motor/configure/RELEASE.local`` and set ``SUPPORT``, ``ASYN``, ``SNCSEQ``, and ``EPICS_BASE`` to the appropriate paths. - $ cd motor - $ git submodule init - $ git submodule update modules/motorAcs - $ git submodule update modules/foo - $ git submodule update modules/bar - -Optionally, edit ``motor/modules/Makefile`` and comment out all unused driver -submodules. - -Optionally, create ``motor/config/CONFIG_SITE.local`` with the line: - BUILD_IOCS = YES - -Create ``motor/config/RELEASE.local`` and set ``SUPPORT``, ``ASYN``, ``SNCSEQ``, -and ``EPICS_BASE`` to the appropriate paths. - - $ cd motor + $ cd $SUPPORT/motor $ make distclean $ make @@ -123,17 +100,13 @@ motorDSM (this package) $ cd $SUPPORT $ git clone git@github.com:Binary-Coalescence/motorDSM.git -In ``motorDSM/configure``, copy ``EXAMPLE_RELEASE.local`` to ``RELEASE.local`` -and set paths for ``EPICS_BASE``, ``MOTOR``, and ``MOTOR_DSM``. +In ``motorDSM/configure``, copy ``EXAMPLE_RELEASE.local`` to ``RELEASE.local`` and set paths for ``EPICS_BASE``, ``MOTOR``, and ``MOTOR_DSM``. -In ``motorDSM/configure``, copy ``EXAMPLE_CONFIG_SITE.local`` -to ``CONFIG_SITE.local`` and set: +In ``motorDSM/configure``, copy ``EXAMPLE_CONFIG_SITE.local`` to ``CONFIG_SITE.local`` and uncomment to set: BUILD_IOCS = YES -In ``motorDSM/iocs/dsmIOC/configure``, copy ``EXAMPLE_RELEASE.local`` to -``RELEASE.local``. Comment out the "if built inside motor" lines, uncomment the -"if built outside motor" lines, and set the path for ``MOTOR_DSM``. +In ``motorDSM/iocs/dsmIOC/configure``, copy ``EXAMPLE_RELEASE.local`` to ``RELEASE.local``. Comment out the "if built inside motor" lines, uncomment the "if built outside motor" lines, and set the path for ``MOTOR_DSM``. - $ cd motorDSM + $ cd $SUPPORT/motorDSM $ make distclean $ make diff --git a/iocs/dsmIOC/iocBoot/iocDsm/st.cmd.md90 b/iocs/dsmIOC/iocBoot/iocDsm/st.cmd.md90 index 3a8a2a4..5893de1 100644 --- a/iocs/dsmIOC/iocBoot/iocDsm/st.cmd.md90 +++ b/iocs/dsmIOC/iocBoot/iocDsm/st.cmd.md90 @@ -8,21 +8,15 @@ dsm_registerRecordDeviceDriver(pdbbase) # Network device #!drvAsynIPPortConfigure("serial0", "192.168.1.16:4002",0,0,0) # Local serial port -#!drvAsynSerialPortConfigure("serial0", "/dev/ttyUSB0", 0, 0, 0) -drvAsynSerialPortConfigure("serial0", "/tmp/motorport", 0, 0, 0) +drvAsynSerialPortConfigure("serial0", "/dev/ttyUSB0", 0, 0, 0) asynSetOption("serial0", 0, "baud", "115200") asynSetOption("serial0", 0, "bits", "8") asynSetOption("serial0", 0, "parity", "none") asynSetOption("serial0", 0, "stop", "1") -# not sure if these two are needed or what they should be set to: -#!asynSetOption("serial0", 0, "clocal", "Y") -#!asynSetOption("serial0", 0, "crtscts", "Y") - asynOctetSetInputEos("serial0", 0, "\r") asynOctetSetOutputEos("serial0", 0, "\r") asynSetTraceIOMask("serial0", 0, 2) -#asynSetTraceMask("serial0", 0, 255) # Turn on the power supply and set the deadband asynOctetConnect("initConnection", "serial0", 0) @@ -34,7 +28,6 @@ MD90CreateController("MD900", "serial0", 1, 100, 5000) ### Motors dbLoadTemplate "motor.substitutions.md90" - dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=DSM:,R=serial0,PORT=serial0,ADDR=0,OMAX=80,IMAX=80") iocInit