Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into
Browse files Browse the repository at this point in the history
ioc-dlslinuxvac
  • Loading branch information
gilesknap committed Jun 13, 2024
2 parents 0823608 + bce513b commit 733dfad
Show file tree
Hide file tree
Showing 9 changed files with 422 additions and 46 deletions.
11 changes: 10 additions & 1 deletion ADAravis/ADAravis.ibek.support.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions ADAravis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
1 change: 0 additions & 1 deletion ADGenICam/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions motorNewport/install.sh
Original file line number Diff line number Diff line change
@@ -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}


256 changes: 256 additions & 0 deletions motorNewport/motorNewport.ibek.support.yaml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 0 additions & 32 deletions pmac/pmac.ibek.support.todo
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
Loading

0 comments on commit 733dfad

Please sign in to comment.