diff --git a/ADAravis/ADAravis.ibek.support.yaml b/ADAravis/ADAravis.ibek.support.yaml index dbae803..eb2edad 100644 --- a/ADAravis/ADAravis.ibek.support.yaml +++ b/ADAravis/ADAravis.ibek.support.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/epics-containers/ibek/releases/download/2.0.2/ibek.support.schema.json +# yaml-language-server: $schema=../schemas/ibek.support.schema.json module: ADAravis @@ -32,6 +32,15 @@ defs: description: |- Camera class for custom commands values: + Basler-a2A2600-20gmBAS: + Basler-scA1400-30gm: + Basler-scA1300-32gm: + Basler-scA640-70gm: + Basler-acA640-90gm: + Basler-acA640-300gm: + Basler-acA1300-30gm: + Basler-acA1300-60gm: + Basler-acA1300-75gm: Basler_piA640_210gm: AVT_Manta_G319B: AVT_Mako_G040B: diff --git a/ADAravis/install.sh b/ADAravis/install.sh index 7cd7f24..029d8b4 100755 --- a/ADAravis/install.sh +++ b/ADAravis/install.sh @@ -26,12 +26,12 @@ ibek support apt-install \ xz-utils # declare packages for installation in the Dockerfile's runtime stage -ibek support add-runtime-packages libglib2.0-bin libusb-1.0 libxml2 +ibek support add-runtime-packages libglib2.0-bin libusb-1.0 libxml2 aravis-tools-cli # build aravis library ( cd /usr/local && - git clone -b "0.8.29" --depth 1 https://github.com/AravisProject/aravis && + git clone -b "0.8.31" --depth 1 https://github.com/AravisProject/aravis && cd aravis && meson build && cd build && diff --git a/ADGenICam/install.sh b/ADGenICam/install.sh index 5a2da8a..da12a5f 100755 --- a/ADGenICam/install.sh +++ b/ADGenICam/install.sh @@ -11,7 +11,6 @@ FOLDER=$(dirname $(readlink -f $0)) # log output and abort on failure set -xe - # get the source and fix up the configure/RELEASE files ibek support git-clone ${NAME} ${VERSION} --org http://github.com/areaDetector/ ibek support register ${NAME} diff --git a/README.md b/README.md index 968a9c8..5dc69fc 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Each support module folder contains:- build inside of a container for example. -## Versionig +## Versioning An important aspect of ibek-support is that it will retain backward compatibility with older versions of support modules going forward from inception in October 2023. The install.sh script will be told diff --git a/motorNewport/install.sh b/motorNewport/install.sh new file mode 100755 index 0000000..99b927f --- /dev/null +++ b/motorNewport/install.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# ARGUMENTS: +# $1 VERSION to install (must match repo tag) +VERSION=${1} +NAME=motorNewport +FOLDER=$(dirname $(readlink -f $0)) + +# log output and abort on failure +set -xe + +# get the source and fix up the configure/RELEASE files +ibek support git-clone ${NAME} ${VERSION} --org http://github.com/epics-motor/ +ibek support register ${NAME} + +# declare the libs and DBDs that are required in ioc/iocApp/src/Makefile +ibek support add-libs Newport motor asyn +ibek support add-dbds devNewport.dbd motorRecord.dbd motorSupport.dbd +# global config settings +${FOLDER}/../_global/install.sh ${NAME} + +# compile the support module +ibek support compile ${NAME} +# prepare *.bob, *.pvi, *.ibek.support.yaml for access outside the container. +ibek support generate-links ${FOLDER} + + diff --git a/motorNewport/motorNewport.ibek.support.yaml b/motorNewport/motorNewport.ibek.support.yaml new file mode 100644 index 0000000..dd7e670 --- /dev/null +++ b/motorNewport/motorNewport.ibek.support.yaml @@ -0,0 +1,256 @@ +# yaml-language-server: $schema=https://github.com/epics-containers/ibek/releases/download/1.5.0/ibek.support.schema.json + +# #errlogInit(5000) +# < envPaths +# # Tell EPICS all about the record types, device-support modules, drivers, +# # etc. +# dbLoadDatabase("../../dbd/newport.dbd") +# newport_registerRecordDeviceDriver(pdbbase) + +# ### Motors +# dbLoadTemplate "motor.substitutions.SMC100" + +# ### Serial port setup +# drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0) +# asynSetOption(serial1,0,baud,57600) +# asynOctetSetInputEos("serial1",0,"\r\n") +# asynOctetSetOutputEos("serial1",0,"\r\n") + +# ### Newport SMC100 support +# # (driver port, serial port, axis num, ms mov poll, ms idle poll, egu per step) +# SMC100CreateController("SMC100_1", "serial1",1, 100, 0, "0.00005") + +# file "$(TOP)/db/basic_asyn_motor.db" +# { +# pattern +# {P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT, RTRY} +# {IOC:, 1, "m$(N)", "asynMotor", "SMC100_1", 0, "GTS30V", mm, Pos, 1, 0, .2, 0, .5, .2, 0.00001, 6, 25, -5, ""} +# } +# iocInit + +module: motorNewport + +defs: + - name: SMC100CreateController + description: |- + Creates a SMC100 motion controller connected to an ethernetToSerialServer + + args: + - type: id + name: controllerName + description: |- + The name of the controller and its Asyn Port Name + + - type: str + name: P + description: |- + Device PV Prefix + + - type: str + name: IP + description: |- + IP address of the ethernet2serial + default: 127.0.0.1 ## localhost + + - type: int + name: TCPPORT + description: |- + Port of the ethernet2serial + default: 4001 + + - type: int + name: POLL + description: |- + Movement poll ms + default: 100 + + - type: float + name: EGUXSTEP + description: |- + EGU PER STEP + default: 0.00005 + + - type: int + name: ASYNPRIO + description: |- + ASYN PRIORITY, Default : 0 + default: 0 + + - type: int + name: AUTOCONNECT + description: |- + Asyn auto connect + 0: Auto connection + 1: no Auto connection + default: 0 + + - type: int + name: NOPRECESSESOS + description: |- + ASYN noProcessEos, Default : 0 + https://epics.anl.gov/tech-talk/2020/msg01705.php + default: 0 + + + + - type: int + name: numAxes + description: |- + The number of axes to create + + pre_init: + + - value: | + # epicsEnvSet "STREAM_PROTOCOL_PATH", "$(MOTORNEWPORT)/protocol/" + # Create Asyn Port + drvAsynIPPortConfigure("{{controllerName}}_ASYN", "{{IP}}:{{TCPPORT}}", {{ASYNPRIO}}, {{AUTOCONNECT}}, {{NOPRECESSESOS}}) + # asynInterposeEosConfig("{{controllerName}}_ASYN",0,2000,0) + SMC100CreateController("SMC100_{{controllerName}}", "{{controllerName}}_ASYN","{{numAxes}}", "{{POLL}}", 0, "{{EGUXSTEP}}") + asynOctetSetInputEos({{controllerName}}_ASYN,0,"\r\n") + asynOctetSetOutputEos({{controllerName}}_ASYN,0,"\r\n") + asynReport 10 + + + - name: motorAxis + description: |- + Creates a motor axis + + args: + - type: object + name: controller + description: |- + a reference to the motion controller + + - type: str + name: M + description: |- + PV suffix for the motor record + + - type: int + name: ADDR + description: |- + The axis number (allowed to be from 0 to controller.numAxes-1) + + - type: str + name: DESC + description: |- + The description of the axis + + - type: int + name: DLLM + description: |- + The low limit of the axis + default: -5 + + - type: int + name: DHLM + description: |- + The high limit of the axis + default: 25 + + - type: int + name: VELO + description: |- + Velocity + default: 1 + + - type: int + name: home + description: |- + The home position of the axis (in counts) + + - type: int + name: start + description: |- + The starting position of the axis (in counts) + default: 0 + + - type: enum + name: DIR + description: |- + The direction of the axis + default: 0 + values: + Pos: 0 + Neg: 1 + + - type: str + name: EGU + description: |- + Engineering Units + default: "mm" + + - type: float + name: VBAS + description: |- + Base Velocity (EGU/s) + default: 0.2 + + - type: float + name: ACCL + description: |- + Seconds to Velocity + default: 0.2 + + - type: int + name: BDST + description: |- + BL Distance (EGU) + default: 0 + + - type: float + name: BVEL + description: |- + BL Velocity (EGU/s) + default: 0.5 + + - type: float + name: BACC + description: |- + BL Seconds to Veloc. + default: 0.2 + + - type: float + name: MRES + description: |- + Motor Step Size (EGU) + default: 0.00001 + + - type: int + name: PREC + description: |- + Display precision (EGU) + default: 6 + + databases: + # TODO as this is a simulation I have hard coded some of the DB fields, + # but these could easily be made into arguments above + # + # Note: supplying no value means that the argument of the same name is used + # (the most common case - if you contrive to make args and db fields the same. + # Which is good idea for ease of transition from traditional IOCs) + - file: basic_asyn_motor.db + args: + P: "{{controller.P}}" + N: "{{ADDR +1 }}" + M: + DTYP: "asynMotor" + PORT: "SMC100_{{controller}}" + ADDR: + DESC: + EGU: + DIR: + VELO: + VBAS: + ACCL: + BDST: + BVEL: + BACC: + MRES: + PREC: + DHLM: + DLLM: + INIT: "" + post_init: + - value: | + dbl \ No newline at end of file diff --git a/pmac/pmac.ibek.support.todo b/pmac/pmac.ibek.support.todo index 8fb195a..193046d 100644 --- a/pmac/pmac.ibek.support.todo +++ b/pmac/pmac.ibek.support.todo @@ -2054,38 +2054,6 @@ COORD: name: - - name: CS_accel_dcm - description: |- - Supporting template that allows setting of variables for an - accel DCM CS - args: - - type: object - name: PORT - description: |- - Delta tau motor controller comms port - - - type: str - name: P - description: |- - Pv Prefix - - - type: str - name: COORD - description: |- - Co-ordinate system number - - - type: id - name: name - description: |- - This associates an edm screen with the template - - databases: - - file: $(PMAC)/db/accel_dcm.template - args: - P: - PORT: - COORD: - name: - name: CS_3jack_mirror description: |- diff --git a/pmac/pmac.ibek.support.yaml b/pmac/pmac.ibek.support.yaml index d6a9c8b..8dc799a 100644 --- a/pmac/pmac.ibek.support.yaml +++ b/pmac/pmac.ibek.support.yaml @@ -666,10 +666,10 @@ defs: name: UEIP description: |- Use Encoder If Present - default: 0 + default: No values: - Yes: 0 - No: 1 + Yes: 1 + No: 0 - type: enum name: URIP @@ -716,23 +716,29 @@ defs: Retry Deadband (EGU) default: 0.0 - - type: int + - type: enum name: FOFF description: |- Freeze Offset, 0=variable, 1=frozen - default: 0 + default: Variable + values: + Variable: 0 + Frozen: 1 - - type: int + - type: float name: ADEL description: |- Alarm monitor deadband (EGU) default: 0 - - type: int + - type: enum name: NTM description: |- New Target Monitor, only set to 0 for soft motors - default: 1 + default: YES + values: + NO: 0 + YES: 1 - type: float name: FEHIGH @@ -1205,3 +1211,114 @@ defs: pre_init: - value: | pmacDisableLimitsCheck("{{Controller}}", {{Axis}}, 0) + + - name: auto_translated_motor + description: |- + define a motor with forward and reverse relationship between user and + motor positions + args: + - type: str + name: P + description: |- + Device Prefix + + - type: str + name: M + description: |- + Device Suffix + + - type: str + name: DESC + description: |- + Description, displayed on OPI screen + + - type: float + name: VELO + description: |- + Velocity (EGU/s) + default: 1.0 + + - type: int + name: PREC + description: |- + Display Precision + default: 5 + + - type: str + name: EGU + description: |- + Engineering Units + + - type: float + name: TWV + description: |- + Tweak Step Size (EGU) + default: 1.0 + + - type: str # float or substitution string + name: VMAX + description: |- + Max Velocity (EGU/s), defaults to VELO + default: "{{VELO}}" + + - type: float + name: DHLM + description: |- + Dial High Limit + + - type: float + name: DLLM + description: |- + Dial Low Limit + + - type: str + name: FWD + description: |- + Forward relationship calc field + + - type: str + name: BWD + description: |- + Backward relationship calc field + + - type: str + name: SM + description: |- + PV suffix for the soft motor name + + databases: + - file: translated_motor.template + args: { P, SM, DESC, VELO, VMAX, PREC, EGU, DHLM, DLLM, M, TWV, FWD, BWD } + + - name: CS_accel_dcm + description: |- + Supporting template that allows setting of variables for an + accel DCM CS + args: + - type: object + name: PORT + description: |- + Delta tau motor controller comms port + + - type: str + name: P + description: |- + Pv Prefix + + - type: int + name: COORD + description: |- + Co-ordinate system number + + - type: id + name: name + description: |- + This associates an edm screen with the template + + databases: + - file: $(PMAC)/db/accel_dcm.template + args: + P: + PORT: + COORD: + name: diff --git a/tests/test_ioc_generate.sh b/tests/test_ioc_generate.sh index c8367d5..2464f10 100755 --- a/tests/test_ioc_generate.sh +++ b/tests/test_ioc_generate.sh @@ -5,7 +5,7 @@ set -xe THIS_FOLDER=$(realpath $(dirname ${0})) IBEK_SROOT=${THIS_FOLDER}/../ -pip install --upgrade "ibek>=3.0.0b4" +pip install --upgrade "ibek>=3.0.0b5" # make a global ioc schema for all the support modules combined # this validates all ibek.support.yaml files