I'm up against higher powers

This commit is contained in:
gac-x05la
2025-03-21 17:37:49 +01:00
parent f64d603cff
commit 5726b4349a
5 changed files with 48 additions and 47 deletions

View File

@@ -119,25 +119,25 @@ femto_mean_curr:
# readoutPriority: monitored
# softwareTrigger: true
# gfcam:
# description: GigaFrost camera client
# deviceClass: tomcat_bec.devices.GigaFrostCamera
# deviceConfig:
# prefix: 'X02DA-CAM-GF2:'
# backend_url: 'http://sls-daq-001:8080'
# auto_soft_enable: true
# std_daq_live: 'tcp://129.129.95.111:20000'
# std_daq_ws: 'ws://129.129.95.111:8080'
# std_daq_rest: 'http://129.129.95.111:5000'
# deviceTags:
# - camera
# - trigger
# - gfcam
# enabled: true
# onFailure: buffer
# readOnly: false
# readoutPriority: monitored
# softwareTrigger: true
gfcam:
description: GigaFrost camera client
deviceClass: tomcat_bec.devices.GigaFrostCamera
deviceConfig:
prefix: 'X02DA-CAM-GF2:'
backend_url: 'http://sls-daq-001:8080'
auto_soft_enable: true
std_daq_live: 'tcp://129.129.95.111:20000'
std_daq_ws: 'ws://129.129.95.111:8080'
std_daq_rest: 'http://129.129.95.111:5000'
deviceTags:
- camera
- trigger
- gfcam
enabled: true
onFailure: buffer
readOnly: false
readoutPriority: monitored
softwareTrigger: true
# gfdaq:
# description: GigaFrost stdDAQ client
@@ -169,23 +169,23 @@ femto_mean_curr:
# readoutPriority: monitored
# softwareTrigger: false
pcocam:
description: PCO.edge camera client
deviceClass: tomcat_bec.devices.PcoEdge5M
deviceConfig:
prefix: 'X02DA-CCDCAM2:'
std_daq_live: 'tcp://129.129.95.111:20010'
std_daq_ws: 'ws://129.129.95.111:8081'
std_daq_rest: 'http://129.129.95.111:5010'
deviceTags:
- camera
- trigger
- pcocam
enabled: true
onFailure: buffer
readOnly: false
readoutPriority: monitored
softwareTrigger: true
# pcocam:
# description: PCO.edge camera client
# deviceClass: tomcat_bec.devices.PcoEdge5M
# deviceConfig:
# prefix: 'X02DA-CCDCAM2:'
# std_daq_live: 'tcp://129.129.95.111:20010'
# std_daq_ws: 'ws://129.129.95.111:8081'
# std_daq_rest: 'http://129.129.95.111:5010'
# deviceTags:
# - camera
# - trigger
# - pcocam
# enabled: true
# onFailure: buffer
# readOnly: false
# readoutPriority: monitored
# softwareTrigger: true
# pcodaq:
# description: GigaFrost stdDAQ client

View File

@@ -105,7 +105,7 @@ class PcoTestConsumerMixin(CustomDetectorMixin):
raise
finally:
try:
self.parent._socket.disconnect()
self.parent._socket.disconnect(self.parent.url.get())
except RuntimeError:
pass
self.parent._mon = None

View File

@@ -6,7 +6,6 @@ Created on Wed Dec 6 11:33:54 2023
"""
import time
import numpy as np
from ophyd import Component, EpicsSignal, EpicsSignalRO, Kind
from ophyd.status import SubscriptionStatus, DeviceStatus
from ophyd_devices.interfaces.base_classes.psi_device_base import PSIDeviceBase
@@ -182,18 +181,18 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
)
# Start the acquisition (this sets parameers and starts acquisition)
self.camStatusCmd.set("Running").wait()
self.acquire.set("Running").wait()
# Subscribe and wait for update
def is_running(*, value, timestamp, **_):
return bool(value == 6)
status = SubscriptionStatus(self.camStatusCode, is_running, timeout=5, settle_time=0.2)
status = SubscriptionStatus(self.camera_statuscode, is_running, timeout=5, settle_time=0.2)
status.wait()
def disarm(self):
"""Bluesky style unstage: stop the detector"""
self.camStatusCmd.set("Idle").wait()
self.acquire.set("Idle").wait()
# Data streaming is stopped by setting the max index to 0
# FIXME: This might interrupt data transfer

View File

@@ -176,9 +176,9 @@ class StdDaqClient:
"""
old_config = self.get_config()
if update:
cfg = copy.deepcopy(self._config)
cfg.update(config)
new_config = cfg
cfg = copy.deepcopy(self._config)
cfg.update(config)
new_config = cfg
else:
new_config = config
@@ -276,7 +276,7 @@ class StdDaqClient:
self._shutdown_event.set()
if self._ws_monitor_thread is not None:
self._ws_monitor_thread.join()
logger.warning("Shutdown joined")
logger.warning("Thread joined")
if self._ws_client is not None:
self._ws_client.close()
self._ws_client = None
@@ -306,7 +306,6 @@ class StdDaqClient:
with self._ws_recv_mutex:
while not self._shutdown_event.is_set():
logger.warning("NI")
self._wait_for_server_running()
try:
msg = self._ws_client.recv(timeout=0.1)

View File

@@ -2,6 +2,7 @@ import json
import threading
import time
from typing import Callable
import traceback
import numpy as np
import zmq
@@ -86,7 +87,9 @@ class StdDaqPreview:
t_last = t_curr
except ValueError:
# Happens when ZMQ partially delivers the multipart message
pass
content = traceback.format_exc()
logger.warning(f"Websocket connection closed unexpectedly: {content}")
continue
except zmq.error.Again:
# Happens when receive queue is empty
time.sleep(0.1)