Skip to content

Commit

Permalink
add lakeshore340 support module
Browse files Browse the repository at this point in the history
  • Loading branch information
ggayDiamond committed Dec 18, 2024
1 parent c33f97e commit 8b74239
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lakeshore340/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# ARGUMENTS:
# $1 VERSION to install (must match repo tag)
VERSION=${1}
NAME=lakeshore340
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 https://github.com/DiamondLightSource/
ibek support register ${NAME}

# declare the libs and DBDs that are required in ioc/iocApp/src/Makefile
# NONE required for StreamDevice
# ibek support add-libs
# ibek support add-dbds

# # comment out the documentation from the Makefile - idempotent because it searches
# # for lines not starting with # and inserts a # at the start of the line.
# sed -i -E 's/(^[^#].*documentation)/# \1/' ${SUPPORT}/${NAME}/Makefile

# # comment out the test directories from the Makefile
# sed -i -E 's/tests/# tests/' ${SUPPORT}/${NAME}/Makefile

# 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}


59 changes: 59 additions & 0 deletions lakeshore340/lakeshore340.ibek.support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ibek/releases/download/3.0.1/ibek.support.schema.json

module: lakeshore340

entity_models:
- name: lakeshore340
description: |-
Lakeshore 340 Temperature Controller
Notes: The temperatures in Kelvin are archived once every 10 secs.
parameters:
P:
type: str
description: |-
Prefix for PV name
PORT:
type: str
description: |-
Bus/Port Address (eg. ASYN Port).
ADDR:
type: int
description: |-
Address on the bus
default: 0

SCAN:
type: int
description: |-
SCAN rate for non-temperature/voltage parameters.
default: 5

TEMPSCAN:
type: int
description: |-
SCAN rate for the temperature/voltage readings
default: 5

name:
type: id
description: |-
Object and gui association name
LOOP:
type: int
description: |-
Which heater PID loop to control (Default = 1)
default: 1

pre_init:
- value: |
epicsEnvSet "STREAM_PROTOCOL_PATH", "$(LAKESHORE340)/lakeshore340App/protocol/"
databases:
- file: $(LAKESHORE340)/db/lakeshore340.template
# use a regex to say that we want all the parameters in the template
# this is equivalent to {P: '{{P}}', PORT: '{{PORT}}', ADDR: '{{ADDR}}', SCAN: '{{SCAN}}', TEMPSCAN: '{{TEMPSCAN}}', name: '{{name}}', LOOP: '{{LOOP}}'}
args:
.*:

0 comments on commit 8b74239

Please sign in to comment.