malcolm.modules.demo.blocks

malcolm.modules.demo.blocks.counter_block(mri)

Hardware Block simulating a single float64 counter

Parameters:mri (str) – Malcolm resource id of the Block
malcolm.modules.demo.blocks.hello_block(mri)

Hardware Block with a greet() Method

Parameters:mri (str) – Malcolm resource id of the Block
malcolm.modules.demo.blocks.motion_block(mri, config_dir)

Device Block that controls 2 child counters to simulate a motor controller with move methods

Parameters:
  • mri (str) – Malcolm resource id of the Block
  • config_dir (str) – Where to store saved configs
malcolm.modules.demo.blocks.detector_block(mri, config_dir, width=160, height=120, label='DemoDetector')

This block uses a demo FileWriter and exposes a Detector like interface that can be controlled with a DetectorChildPart

Parameters:
  • mri (str) – MRI for created block
  • config_dir (str) – Where to store saved configs
  • width (int) – Width of the produced image
  • height (int) – Height of the produced image
  • label (str) – Beamline specific label for the detector
malcolm.modules.demo.blocks.scan_1det_block(mri, config_dir)

Demo scan that drives an detector like block called DETECTOR and a demo motion controller called MOTION

Parameters:
  • mri (str) – MRI for created block
  • config_dir (str) – Where to store saved configs
malcolm.modules.demo.blocks.scan_2det_block(mri, config_dir, initial_design='')

Demo scan that drives:

  • MOT: A motion controller called $(hostname)-ML-MOT-01
  • INTERFERENCE: A detector like block called $(hostname)-ML-DET-01
  • RAMP: A detector like block called $(hostname)-ML-DET-02
Parameters:
  • mri (str) – MRI for created block
  • config_dir (str) – Where to store saved configs
  • initial_design (str) – Design to load at init