RPD Vaktari Measure

Measurement data analysis · user manual
RPD Engineering · v2026.10.09c

01What it does

RPD Vaktari Measure reads the CSV files that a Visitri vision system writes while it inspects parts, and turns them into the statistics you need to decide whether the process is under control: percentage out of tolerance, capability, control charts, Pareto of defects and a full report you can print or hand over.

It does not measure anything and it does not touch the machine. It only reads a folder. If the program is stopped, production carries on exactly the same; you simply stop seeing the statistics until you start it again.

what you needA PC with Python 3.8 or newer, read access to the folder where the measurement program leaves the CSV files, and a browser. Nothing is installed and nothing is sent anywhere: the program only serves pages to your own PC.

02Installation and start-up

Copy the program folder anywhere on the PC — C:\RPD-Vaktari\Measurement analysis is the usual place — and open start_vaktari_measure.bat in a text editor to set the folder you want watched:

set CARPETA=C:\STATS\Vaktari
set PORT=8760

CARPETA is the folder where the measurement program leaves its CSV files. PORT only needs changing if another program is already using 8760. One instance of the program watches one folder; if you have two folders, run two copies on two different ports.

Three ways to start it

start_vaktari_measure.bat
Opens a window showing what the program is doing. This is the one to use the first time, and whenever something does not work.
START_vaktari_measure_silent.vbs
Starts it with no window at all. Everything it would have printed goes into log_vaktari.log instead. This is the one for day-to-day use — put a shortcut to it in the Startup folder and it comes up with the PC.
STOP_vaktari_measure.bat
Stops the program. It only kills whatever is listening on the port, so other Python programs on the PC are left alone.

Once it is running, open http://localhost:8760 in the browser. From another PC on the same network, use the server PC's address instead, for example http://192.168.1.40:8760.

first startThe first scan of a folder that already holds thousands of files takes a while — roughly forty seconds for three thousand files. The dashboard opens straight away and fills in as the scan advances; you do not have to wait for it. Later starts are immediate, because the data is already in the history folder.

03The top bar

Everything above the tabs decides which data you are looking at. Everything below it is calculated from that selection.

Ref.
The part reference. Changing it reloads everything.
LOT
The lot. * means every lot in the range.
Camera
Which vision system you are analysing. There is no « all » option here, and that is deliberate — see section 12.
Range
Today, 7 days, 30 days, or everything in the history. The two date boxes let you set any other range by hand.
Language
Six languages. The choice is remembered in the browser.
Theme
Dark (the default, dark top bar) or light. Printing is always done in light, whatever you have on screen.
scan
Forces an immediate re-read of the folder instead of waiting for the next automatic scan.
the selectors show everythingEach selector lists every value that has arrived, not only the ones that fit the other filters. An option with no data behind it is flagged as such. That way you can always see what else has been measured and switch to it, instead of a filter quietly hiding it from you.
The top bar in the light theme. The dark theme is the default: it keeps a dark bar above the data, which is easier on the eyes on a shop-floor screen that stays on all day.

04LIVE · what is happening now

This is the shop-floor screen. It shows the last window that arrived and nothing else, so it answers one question: is what the machine is producing right now any good?

The last window. The first tile is part conformity: the percentage of parts with every characteristic inside tolerance at once. The rest are one tile per characteristic.

On each characteristic tile:

Recent trend: percentage out of tolerance, window by window, for the last windows of this reference. A line climbing steadily is a process drifting; spikes on single windows are usually something else.
what counts as one windowA window is one reference, one lot, one pass and one camera — in practice, one CSV file. Parts are matched to each other by part number inside a window, never between windows: the numbering restarts, so part 7 in one file has nothing to do with part 7 in another.

05Attribute characteristics

Not everything that is checked is measured. A thread is either there or it is not; a mark is either readable or it is not. These checks have no nominal and no tolerance — the CSV carries NA where the nominal would be — and the verdict comes from the Status field: 5 means the part passed, anything else means it failed.

Attribute characteristics are listed separately, with the count of parts checked, passed and rejected.

They are shown apart from the measured characteristics because there is nothing to average: an attribute has no mean, no σ and no Cpk. A pass/fail check has no distribution.

they still countAn attribute failure makes the part bad, exactly like a dimension out of tolerance. Attributes are included in part conformity and in both Pareto charts — a part without its thread is a bad part however good its measurements are.

06Measurements not found

When the vision tool cannot find what it is looking for, it writes −1 instead of a measurement. The same happens when one measurement depends on another and the first one failed.

Not-found measurements are counted on their own, per characteristic.

These are counted separately and deliberately kept out of everything else. A −1 is not a bad measurement: it is no measurement at all. Averaging it in would drag the mean down by eleven millimetres and make the statistics meaningless, and calling it out of tolerance would blame the process for something the camera did.

what it usually meansA run of not-found measurements is almost always a vision or part-position problem, not a process one: lighting, focus, clamping, a part sitting wrong, or a part missing altogether. Check those before touching the machine.

07The two Pareto charts

Both charts rank the characteristics that are causing scrap. They look alike and they answer different questions, so it is worth being clear about which is which.

Pareto of defects

How many defects each characteristic produces, most frequent first, with the cumulative percentage.

This is the classic one: what fails most often. The cumulative line is calculated over the total number of defects, so it always closes at 100 %.

Which defect to fix first

How many parts you would get back by fixing each characteristic on its own.

This one answers the question that actually matters on the shop floor: what do I fix to save the most parts? A part can fail several characteristics at once, and fixing just one of them does not save it. This chart counts only the parts that fail that characteristic and nothing else — the parts a single correction would genuinely bring back.

when the two disagreeIf a characteristic is at the top of the first chart but low on the second, it mostly fails on parts that are already bad for another reason. Fixing it alone would change your scrap very little. The second chart is the one to spend effort by.

08ACCUMULATED · the working view

The live tab shows one window. This tab puts the whole selected range together and is where you look when you want to know how the shift went, not how the last part came out.

The X̄–R control chart: subgroup means over time, with the control limits calculated from the process itself.

The control limits are not the tolerance. They are what the process does when it is left alone. A point outside them, or a run of points on one side, means something changed — even if every part is still inside tolerance. That is the whole point of a control chart: it warns you before you make scrap, not after.

Every window in the range, with its figures. Use it to find the moment things changed.

09REFERENCES · what was verified and when

One row per day, with the hours of the day across it, and a coloured block wherever a reference was being verified. It answers « what did we check on Tuesday, and when did we change over? » without opening anything.

The timeline in Detail view. Each colour is a reference; the position of a block is the time of day it was running. The hour scale is shown above and below.

To the right of the legend is the View switch. Detail draws the runs of each camera separately: when two cameras verify the same lot at the same time their files alternate, and you get one block per file, as in the figure above. Grouped joins them into a single block per reference, with every camera and every lot inside. A block is only split when the reference changes or when more than 30 minutes pass without a file, so long stops remain visible.

The same screen in Grouped view: one block per reference. Hover over a block to see the lots and cameras it contains.

The chosen view is remembered in this browser and only changes the drawing: the summary at the top, the figures for each day and the totals table are the same in both views. A run that goes past midnight is drawn up to 24:00 on the row of the day it started.

Click any block and that reference and lot are loaded into the other tabs. It is the quickest way into a particular run: find it on the timeline, click, and go to the full report. In Grouped view, a block with a single lot and a single camera selects them; if it holds more, the reference is opened with all its lots and the camera you had selected is kept.

Totals per reference over the range: lots, runs, parts, time occupied and percentage out of tolerance.
scopeThis screen is about which references were verified. It is deliberately not a machine-control screen: machine errors, stops and uptime belong in RPD Vaktari Machine, which is the module for that.

10FULL REPORT · the document

Everything about the current selection, laid out to be printed and handed over — to a customer, to an audit, or into the lot file. The browser's print command turns it into a PDF.

Tolerance board: every characteristic on its own tolerance, drawn to scale, so you see at a glance which ones are centred and which are riding a limit.
Distributions: the histogram of each characteristic with its limits, the nominal and the fitted curve.
Part conformity: how many characteristics each part fails. The first bar is the good parts.

The report also carries the summary table per characteristic, the correlations between characteristics, the attribute and not-found sections, both Pareto charts, and a written conclusion.

Conclusions: the report says in words what the numbers mean and what to look at first.

11EXPORT

The three ways data leaves the program.
All measurements
One row per individual measurement. This is the one to take into Excel or into another statistics package.
Results only
One row per characteristic, with n, mean, σ, Cp, Cpk and the counts. A summary, not raw data.
Report as PDF
Opens the browser's print dialogue on the full report. Choose « Save as PDF ».

The CSV exports use the same separator and decimal mark as the files that came in, so they open cleanly in a Spanish or Catalan Excel without a conversion step.

12Several cameras in the same folder

If more than one vision system writes into the watched folder, their files arrive mixed together. The VIS field in the CSV says which camera a measurement came from, and the Camera selector in the top bar picks the one you are analysing.

there is no « all cameras »and there must not be. Two cameras are two measuring systems, each with its own calibration, its own optics and its own bias. Pooling their measurements of the same characteristic gives a mean that belongs to neither of them and a σ that is mostly the difference between the two cameras. The capability figure that comes out is not wrong by a little — it is meaningless.

Part numbers

Each camera numbers its parts from 1 and restarts whenever it feels like it. Part 7 on camera 1 and part 7 on camera 2 are not the same part, and the program never assumes they are. Parts are matched by number only inside a single window.

Cameras also do not always take the same number of photographs: they run on time, and if something happens one of them skips a cycle. So one file can hold more parts than another from the same minutes. That is normal and the program expects it.

If a part is missing a measurement inside its own window, it is left out of the conformity count rather than guessed at, and the report says how many parts that affected.

13How to read the numbers

LSL, USL
The tolerance limits. LSL = nominal + tol− and USL = nominal + tol⁺, taken from the CSV itself.
μ
The mean of the measurements. Next to it, its distance from nominal in micrometres.
σ
The standard deviation — the spread of the measurements.
Cp
How much the tolerance is worth compared with the spread, if the process were perfectly centred. Cp = (USL − LSL) / 6σ.
Cpk
The same thing, counting how far off centre the process actually is. This is the one to look at. 1,33 is the usual target.
Pp, Ppk
The same two, calculated over the whole range rather than within subgroups. They tell you what the process really delivered, including the drift between windows.

σ and σw

Cp and Cpk are calculated on σw, the within-subgroup spread: what the process can do when nothing moves. Pp and Ppk use the global σ, which also contains every drift and every setting change over the range.

So a good Cpk with a poor Ppk is a clear message: the machine is capable, but it is moving. Look for the drift — tool wear, a temperature effect, an operator correcting between lots — rather than at the machine's precision.

status rowsRows whose type is Status are the machine's own verdict. They are kept out of the dimensional statistics and shown separately, so the machine's opinion never contaminates the measurements. For attribute characteristics the Status field is the verdict — see section 05.

14When an alarm fires

The banners at the top of the live tab are ordered by severity. The thresholds are set on the command line and these are the defaults:

BannerFires whenDefault
Out of toleranceToo many parts outside the limits in this windowover 10 %
WarningFewer, but more than you would wantover 2 %
Mean shiftThe mean moved between one window and the nextoff by default
Control chartA point outside the control limits, or 2 of 3 beyond 2σalways on
Not foundToo many −1 measurementsover 1 % warning, over 5 % alarm
Machine statusThe machine itself flagged measurements as NOKany

The two to act on first are mean shift and control chart. Both can fire while every single part is still inside tolerance, which is exactly when a correction is cheap. By the time the out-of-tolerance banner is red you are already making scrap.

To change a threshold, edit the start-up file. For example, to warn at 5 % and alarm on a mean shift of 15 µm:

vaktari_measure.py --dir "%CARPETA%" --port %PORT% ^
    --pct-out-warn 5 --delta-mu-um 15

15Where the data lives

Inside the program folder there is a hist folder. That is the database. The CSV files in the watched folder are only the inbox.

hist\dades-YYYY-MM-DD.json
One file per production day, holding every window read that day. This is the actual data.
hist\fitxers.json
The register of files already read, with their size and date, so a file is never counted twice.
hist\marques.json
The interventions you mark on the charts.
deleting the CSV files is safeOnce a file has been read, its data is in hist and the CSV is no longer needed. You can archive or delete the watched folder's files without losing a single statistic. Moving them into a subfolder is better than deleting them, in case you ever need the raw data back.
deleting hist is notDelete hist and you lose the history. The program would rebuild only what the CSV files it can still see contain — so if those have been archived too, that data is gone. Back up hist along with the rest of the PC.

The history folder can be moved somewhere else with --state, which is useful if you would rather keep it on a network drive that is backed up.

16The files

vaktari_measure.py
The server. Reads the CSV files, keeps the history and serves the dashboard.
vaktari_measure.html
The dashboard itself.
vaktari_measure_i18n.js
The translations, six languages.
vaktari_measure_theme.css
Every colour and every typeface. Both themes live here, and a new one is added by copying a block.
vaktari_measure.ico, .svg
The mark.
start_vaktari_measure.bat
Start in a visible window.
START_vaktari_measure_silent.bat
Start with no output on screen.
START_vaktari_measure_silent.vbs
Start with no window at all. This is the usual one.
STOP_vaktari_measure.bat
Stop the program.
hist\
The history — see section 15.
log_vaktari.log
What the program printed, when it was started with no window.
versionThe version number is at the bottom right of every screen and on the cover of this manual. It is the release date plus a letter. Quote it if you report a problem.

17Common problems

The browser says it cannot connect

The program is not running. Start it with the visible .bat and read what it prints, or open log_vaktari.log. The usual causes are Python not being installed and the port already being in use.

It says the port is in use

Another copy is already running — open the dashboard, it is probably there. If not, run STOP_vaktari_measure.bat and start again, or change PORT in the start-up file.

Nothing appears, or « no data »

Check that CARPETA points at the right folder and that there really are CSV files in it. The top bar shows the folder being watched and the time of the last scan. Also check the range: the selection may be on today while the data is from yesterday — a banner tells you when there is data outside the range, with a button to jump to it.

A camera is missing from the selector

The VIS field is missing or empty in that camera's files. The top bar shows the variables it found. If the field is not being written, it has to be fixed in the measurement program's output configuration.

The figures look wrong after a changeover

Check the lot selector. With * you are looking at several lots at once, and a setting change between them widens σ and sinks Cpk. Pick a single lot and compare.

A characteristic shows no mean or Cpk

It is an attribute: a pass/fail check with no nominal, so there is nothing to average. See section 05.

It is slow to start

Only the first time on a folder with a lot of history. The dashboard is usable while the scan runs. If every start is slow, the watched folder probably holds years of files — archive the old ones into a subfolder; the history keeps their data.