From b38e75e02b2901aa242639796c407a30005dcbcf Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 17 Nov 2024 21:11:08 +0100 Subject: [PATCH 1/3] succbone: Update README --- succbone/README.md | 21 +++++++++++++++++++++ succbone/succbone-control-panel.jpg | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/succbone/README.md b/succbone/README.md index 828c763..3a8e670 100644 --- a/succbone/README.md +++ b/succbone/README.md @@ -13,3 +13,24 @@ succbone is our "automation" system for the vacuum system of the SEM. - Signal two different vacuum levels to the original evacuation controller * Rough vacuum reached * High vacuum reached +- Diffusion pump temperature monitoring via three PT100 sensors +- Environmental temperature & humidity monitoring (external sensor) + +### Device Overview +These are the main devices powering the succbone control system. For details, +please check the wiring diagrams in [`panel.pdf`](./panel.pdf). + +- `-KEB1`: BeagleBone as main control system with addonboard for PSU & analog 0-10V readout +- `-KED1`: MikroTik RB450G router as gateway to the outside and network switch +- `-KED2`: MODBUS-TCP to MODBUS-RTU bridge +- `-KEC1`: MODBUS-RTU 8x relay output and 8x digital input board +- `-KEC2`: MODBUS-RTU 8x PT100 500°C transmitter +- `-BTA1`: MODBUS-RTU environmental temperature & humidity sensor +- `-QAA1`: Contactor for the roughing pump interlock +- `-QAA2`: Contactor for the diffusion pump interlock + +### 3D-Printed Components +- [DIN-rail mount for the BeagleBone](https://www.printables.com/model/1058768-beaglebone-din-mount) +- [DIN-rail mount for the MikroTik RB450G] +- (legacy: [DIN-rail mount for relay board](https://www.printables.com/model/1019947-relay-board-din-rail-mount)) +- [Cable Strain Relief Plates](https://www.printables.com/model/932070-parametric-cable-strain-relief-plate) diff --git a/succbone/succbone-control-panel.jpg b/succbone/succbone-control-panel.jpg index a38c6aa..7182958 100644 --- a/succbone/succbone-control-panel.jpg +++ b/succbone/succbone-control-panel.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:897373984afb011da940bd93fee9649fd86389ba5dd88cff8a6179d0b3cf0e8e -size 1985834 +oid sha256:4366270d63ad735c5953a7d6797537474194b23550af1a52b630bc886c43c7c2 +size 1762651 From 26d297dcd3f3446b2cb8556e04b8bd1a769d15fb Mon Sep 17 00:00:00 2001 From: hmelder Date: Fri, 15 Nov 2024 23:49:26 +0100 Subject: [PATCH 2/3] succd: Do not exit prematurely if modbus connections fails --- succbone/succd/main.go | 16 ++++++++++++++-- succbone/succd/modbus.go | 23 ----------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/succbone/succd/main.go b/succbone/succd/main.go index 52a10db..bb8aed7 100644 --- a/succbone/succd/main.go +++ b/succbone/succd/main.go @@ -6,7 +6,9 @@ import ( "net/http" "os" "os/signal" + "time" + "github.com/simonvetter/modbus" "k8s.io/klog" ) @@ -55,9 +57,19 @@ func main() { } d.adcPirani = adc - err = d.modbusConnect() + // Setup modbus client + d.modbusClient, err = modbus.NewClient(&modbus.ClientConfiguration{ + URL: "tcp://10.250.241.20:8887", + Timeout: 1 * time.Second, + }) if err != nil { - klog.Exitf("Failed to connect to modbus %v", err) + klog.Exitf("Failed to setup modbus client %v", err) + } + + // Connect to modbus client + err = d.modbusClient.Open() + if err != nil { + klog.Warningf("Failed to connect to modbus TCP %v", err) } } diff --git a/succbone/succd/modbus.go b/succbone/succd/modbus.go index 4aebd03..2db5a6b 100644 --- a/succbone/succd/modbus.go +++ b/succbone/succd/modbus.go @@ -12,29 +12,6 @@ func modbusValuesToFloat(v uint16) float32 { return float32(v) / 10.0 } -func (d *daemon) modbusConnect() error { - var err error - - d.mu.Lock() - defer d.mu.Unlock() - - // Setup modbus client - d.modbusClient, err = modbus.NewClient(&modbus.ClientConfiguration{ - URL: "tcp://10.250.241.20:8887", - Timeout: 1 * time.Second, - }) - if err != nil { - return err - } - // Connect to modbus client - err = d.modbusClient.Open() - if err != nil { - return err - } - - return nil -} - func (d *daemon) modbusRestart() error { d.modbusClient.Close() return d.modbusClient.Open() From c7f94c714199503fad02645f9480697f61d40673 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 17 Nov 2024 21:11:08 +0100 Subject: [PATCH 3/3] succbone: Update README --- succbone/README.md | 21 +++++++++++++++++++++ succbone/succbone-control-panel.jpg | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/succbone/README.md b/succbone/README.md index 828c763..3a8e670 100644 --- a/succbone/README.md +++ b/succbone/README.md @@ -13,3 +13,24 @@ succbone is our "automation" system for the vacuum system of the SEM. - Signal two different vacuum levels to the original evacuation controller * Rough vacuum reached * High vacuum reached +- Diffusion pump temperature monitoring via three PT100 sensors +- Environmental temperature & humidity monitoring (external sensor) + +### Device Overview +These are the main devices powering the succbone control system. For details, +please check the wiring diagrams in [`panel.pdf`](./panel.pdf). + +- `-KEB1`: BeagleBone as main control system with addonboard for PSU & analog 0-10V readout +- `-KED1`: MikroTik RB450G router as gateway to the outside and network switch +- `-KED2`: MODBUS-TCP to MODBUS-RTU bridge +- `-KEC1`: MODBUS-RTU 8x relay output and 8x digital input board +- `-KEC2`: MODBUS-RTU 8x PT100 500°C transmitter +- `-BTA1`: MODBUS-RTU environmental temperature & humidity sensor +- `-QAA1`: Contactor for the roughing pump interlock +- `-QAA2`: Contactor for the diffusion pump interlock + +### 3D-Printed Components +- [DIN-rail mount for the BeagleBone](https://www.printables.com/model/1058768-beaglebone-din-mount) +- [DIN-rail mount for the MikroTik RB450G] +- (legacy: [DIN-rail mount for relay board](https://www.printables.com/model/1019947-relay-board-din-rail-mount)) +- [Cable Strain Relief Plates](https://www.printables.com/model/932070-parametric-cable-strain-relief-plate) diff --git a/succbone/succbone-control-panel.jpg b/succbone/succbone-control-panel.jpg index a38c6aa..7182958 100644 --- a/succbone/succbone-control-panel.jpg +++ b/succbone/succbone-control-panel.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:897373984afb011da940bd93fee9649fd86389ba5dd88cff8a6179d0b3cf0e8e -size 1985834 +oid sha256:4366270d63ad735c5953a7d6797537474194b23550af1a52b630bc886c43c7c2 +size 1762651