Often with with new devices and scientific instruments there is some need to move items, take measurements, and possibly react to those measurements. If the measurements are fed back into the control software a control system is created. This requires programming and mechanics and for a prototype instrument can slow the idea generation down. Better would be quickly get some initial feedback on the design before investing engineering time.

LinuxCNC is a sophisticated controller for CNC machines, and the programmers have been very clever in creating interfaces that allow alternative GUIs to be created and external programs to interact with LinuxCNC. In this video we use LiunxCNC, controlled by Python, to prototype a scientific instrument that systematically moves precise amounts and takes measurements.

Controlling LinuxCNC with Python can be used to prototype new machines and instruments. Data can be integrated from external sensors, analyzed, and used to direct LinuxCNC. In addition to describing the theory, we look a real example to view magnet fields. Instead of building a motorized stage for to scan magnetic fields with a fluxgate magnetometer, we use Python to coordinate LinuxCNC motion and measurements using LXI and VXI-11 from a networked multimeter.

The probe is a AIM-TTI I-Prober 520 and is normally used to measure the current flowing through traces in circuit boards, but also has wire and field settings. The multimeter is a Keysight (Agilent) 34461A multimeter.

Links:
Example program
LinuxCNC Python module documentation
LXI VXI-11 Python module
AIM-TTI I-Prober 520 probe information
AIM-TTI I-Prober 520 probe on Amazon
Keysight (Agilent) 34461A multimeter on Amazon