This repository packages the LabVIEW utilities and drivers used for Newport 1918-R power meter measurements. It keeps the instrument VIs and supporting binaries together so you can run the provided LabVIEW projects without hunting for dependencies.
Power-DAQ-Stats.lvprojandSample Power-DAQ-Stats.vi: LabVIEW project and example VI for acquiring and logging power statistics.make_powerlog.vi: Utility VI that starts a logging session, creates a timestamped file when measurement begins, and records elapsed time and measured power for each sample.Command VIs/: Individual command VIs that wrap common instrument actions (reading power, configuring filters, setting ranges, etc.).PowerMeterLib.dll,PowerMeterCommands.dll,UsbDllWrap.dll: Supporting DLLs needed by the LabVIEW VIs.drivers/: Architecture-specific driver distributions organized by platform (Win32,x64,x86Onx64).Setup.exe: Windows installer provided by Newport.Readme.pdf,Newport.ico,Autorun.inf: Original vendor documentation and assets kept for reference.
- Install the Newport instrument drivers for your platform from the
drivers/directory (pickWin32,x64, orx86Onx64). - Run
Setup.exeif you prefer the vendor installer to place dependencies automatically. - Open
Power-DAQ-Stats.lvprojin LabVIEW to explore the included example (Sample Power-DAQ-Stats.vi) and the command VIs.
- File contents are left unchanged from the vendor distribution; only the repository layout has been organized.
- Keep the DLLs alongside the VIs or in your LabVIEW search path to avoid missing dependency prompts.
If you are migrating from LabVIEW to Python, a minimal script is included:
connect_and_log.py: Connects through VISA, optionally probes identity, then logs:- elapsed time in seconds (high precision via
perf_counter_ns+Decimal) - power reading (parsed as
Decimalwhen possible) - raw response string
- UTC timestamp
- elapsed time in seconds (high precision via
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython connect_and_log.py --listpython connect_and_log.py \
--resource "USB0::...::INSTR" \
--output logs/power_log.csv \
--sample-interval 0.1 \
--max-samples 100- The default power query in the script is
MEAS:POW?as a placeholder. - If your LabVIEW VIs use a different command path (or DLL call), set
--power-queryaccordingly. - If
*IDN?is unsupported on your firmware/transport, set--idn-queryto the appropriate command or ignore the warning.