{"id":17384291,"url":"https://github.com/mrothnet/dmm-logger","last_synced_at":"2025-03-27T21:17:52.455Z","repository":{"id":98696950,"uuid":"582486734","full_name":"mrothNET/dmm-logger","owner":"mrothNET","description":"Connects to a digital multimeter and log measurements into CSV files","archived":false,"fork":false,"pushed_at":"2023-11-05T15:28:05.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T23:41:38.229Z","etag":null,"topics":["dmm","logger","scpi"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrothNET.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T01:49:45.000Z","updated_at":"2023-11-05T15:03:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"63d5ba87-d35c-4a4b-a94b-ee017010fe16","html_url":"https://github.com/mrothNET/dmm-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrothNET%2Fdmm-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrothNET%2Fdmm-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrothNET%2Fdmm-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrothNET%2Fdmm-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrothNET","download_url":"https://codeload.github.com/mrothNET/dmm-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924499,"owners_count":20694731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dmm","logger","scpi"],"created_at":"2024-10-16T07:45:03.962Z","updated_at":"2025-03-27T21:17:52.429Z","avatar_url":"https://github.com/mrothNET.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DMM Logger\n\nConnects via TCP to a digital multimeter and logs measurements from the DMM using SCPI into CSV files.\n\nThe goal is to provide an easy-to-use tool for taking measurements over a longer period of time and logging the results in a CSV file.\n\nComments are added to the CSV file, making it easily understandable by someone else or even by yourself after a few months. You can also add your own comments, such as a short description of what was measured.\n\n## Install from source code\n\nDMM Logger is written in Rust. To install it from the source code, you will first need to have Rust and its package manager `cargo` installed on your system. You can obtain Rust using the official Rust toolchain installer `rustup`.\n\nVisit the `rustup` homepage at [https://rustup.rs](https://rustup.rs) and follow the instructions provided to install Rust and Cargo for your platform. Once Rust and Cargo are installed and configured, you can proceed with installing DMM Logger.\n\nTo install DMM Logger, run the following command in your terminal:\n\n```console\ncargo install --git https://github.com/mrothNET/dmm-logger\n```\n\n## Usage\n\nBasic usage is straightforward. The instrument settings remain unchanged, and one measurement per second is performed and written to the CSV file:\n\n```console\ndmm-logger 10.1.2.3 example.csv\n```\n\nReplace `10.1.2.3` with the IP address or hostname of your instrument.\n\nThe resulting CSV file can be plotted in a Python notebook with:\n\n```python\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndf = pd.read_csv('example.csv', comment='#', parse_dates=[['date', 'time']])\ndf[\"reading\"].plot()\n```\n\n### Command line arguments\n\nUsage: `dmm-logger [OPTIONS] \u003cHOST\u003e [FILE]`\n\n#### Arguments\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ccode\u003e\u0026lt;HOST\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eNetwork name or IP address of the instrument.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e[FILE]\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eFilename to save the CSV lines into. If omitted, lines are written to stdout.\u003c/dd\u003e\n\u003c/dl\u003e\n\n#### Options\n\n\u003cdl\u003e\n\n\u003cdt\u003e\u003ccode\u003e--interval \u0026lt;SECONDS\u0026gt;\u003c/code\u003e | \u003ccode\u003e--rate \u0026lt;HERTZ\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eSet the sampling interval respectively the sampling rate. Default interval is 1 second or 1 hertz.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e-n \u0026lt;COUNT\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eRestricts the number of samples to take. Default is unlimited until you hit `CTRL-C`\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--display-off\u003c/code\u003e | \u003ccode\u003e--display-text [\u0026lt;TEXT\u0026gt;]\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eSwitch off instruments display or displays a text message on instrument during logging. Makes most instruments faster.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--drop-slow-samples\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eDrop delayed samples or samples with high latency. Helps with fast sampling because lack of realtime behaviour.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e-U, --voltage \u0026lt;RANGE\u0026gt;\u003c/code\u003e | \u003ccode\u003e-I, --current \u0026lt;RANGE\u0026gt;\u003c/code\u003e | \u003ccode\u003e-R, --resistance \u0026lt;RANGE\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eConfigures instrument for voltage, current or resistant measurement.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--DC\u003c/code\u003e | \u003ccode\u003e--AC\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eSelects between DC- or AC-mode for voltage or current measurement.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e-2, --two-wire\u003c/code\u003e | \u003ccode\u003e-4, --four-wire\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eSelects between 2-wire or 4-wire resistance measurement.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--resolution \u0026lt;VALUE\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eResolution in units as the measurement function. For example `0.001`.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--nplc \u0026lt;NPLC\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eIntegration time in number of power line cycles. Typical integration cycles are 10 or 1.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e-m, --message \u0026lt;TEXT\u0026gt;\u003c/code\u003e | \u003ccode\u003e--message-from \u0026lt;FILE\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eAdd a custom message to the CSV file as comment. Use this to add a short reminder into the CSV file to help you recall the experiment a few month later.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--beep\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eBeep instrument when logging finished.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--reset\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003ePerforms instrument reset before logging. Helps to start with a known state of all instrument settings.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--port \u003cPORT\u003e\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cPORT\u003e Network port for SCPI. Most instruments use the default port 5025.\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003e--debug\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003ePrint SCPI communication to stderr. If you have problems with an instrument working together with DMM logger this will help to sort out the issues.\u003c/dd\u003e\n\n\u003c/dl\u003e\n\n## CSV file Format\n\nThe created CSV file contains 7 columns:\n\n\u003cdl\u003e\n\n\u003cdt\u003e\u003ccode\u003esequence\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eSequential sample number starting at 0\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003edate\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eLocal date of measurement: YEAR-MONTH-DAY\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003etime\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eLocal clock time of measurement: HOURS:MINUTES:SECONDS.MILLISECONDS\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003emoment\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eTime in seconds since first measurement\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003edelay\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eDelay of the measurement in seconds, caused by non-real-time behavior or fast logging rate\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003elatency\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eMeasurement duration in seconds including network roundtrip time\u003c/dd\u003e\n\n\u003cdt\u003e\u003ccode\u003ereading\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003eMeasured value returned from instrument\u003c/dd\u003e\n\n\u003c/dl\u003e\n\n### Example CSV file\n\nThe following excerpt was created by:\n\n```\ndmm-logger -R 10 -m \"Example measurement of an 11 Ohms resistor\" -n 10 10.1.2.3 example.csv\n```\n\nThe contents of the resulting CSV file are (redacted):\n\n```\n# File created by DMM logger (1.0.0) on 2022-12-27 18:04:28 (+01:00)\n#\n# ------------------------------------------\n# Example measurement of an 11 Ohms resistor\n# ------------------------------------------\n#\n# Settings\n# --------\n# Sampling interval   : 1 seconds\n# Sample rate         : 1 Hz\n# Resistance (2-wire) : 10 Ohms\n#\n# Instrument\n# ----------\n# Manufacturer        : Keysight Technologies\n# Model               : 34461A\n# Serial              : xxxxxxxxxx\n# Firmware            : A.02.14-02.40-02.14-00.49-01-01\n#\n# Fields\n# ------\n# sequence            : Sequential sample number starting at 0\n# date                : Local date of measurement: YEAR-MONTH-DAY\n# time                : Local clock time of measurement: HOURS:MINUTES:SECONDS.MILLISECONDS\n# moment              : Time in seconds since first measurement\n# delay               : Delay of the measurement in seconds, caused by non-real-time behavior or fast logging rate\n# latency             : Measurement duration in seconds including network roundtrip time\n# reading             : Measured value returned from instrument\n#\nsequence,date,time,moment,delay,latency,reading\n0,2022-12-27,18:04:28.477,0.0000,0.0000,0.4077,11.0293809\n1,2022-12-27,18:04:29.477,1.0002,0.0002,0.4076,11.0294049\n2,2022-12-27,18:04:30.477,2.0002,0.0002,0.4076,11.0293892\n3,2022-12-27,18:04:31.477,3.0001,0.0001,0.4075,11.0293611\n4,2022-12-27,18:04:32.477,4.0004,0.0004,0.4078,11.0293718\n5,2022-12-27,18:04:33.477,5.0005,0.0005,0.4075,11.0294192\n6,2022-12-27,18:04:34.477,6.0004,0.0004,0.4080,11.0294847\n7,2022-12-27,18:04:35.477,7.0001,0.0001,0.4078,11.0293944\n8,2022-12-27,18:04:36.477,8.0004,0.0004,0.4077,11.0294834\n9,2022-12-27,18:04:37.477,9.0004,0.0004,0.4075,11.0294869\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrothnet%2Fdmm-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrothnet%2Fdmm-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrothnet%2Fdmm-logger/lists"}