Skip to content
Dylan Kentish

WorkRenishaw SPD

Replacing a factory calibration tool that was holding up the instrument.

Raman spectrometers were calibrated in production with a VB6 program. On a placement in Spectroscopy Products I rebuilt that software, including the field-of-view step, in C# with WPF and OpenCV.

Product photograph

A Renishaw inVia Raman microscope. Product photograph of that class of instrument, not the calibration software.

Problem

The calibration software was old, slow to run, and awkward to change. It sat on the path of building the spectrometer. Leaving it in VB6 meant every fix was a negotiation with the tool.

What I did

I rewrote the production calibration software from VB6 into C#, using WinForms and WPF. The piece I still point at is the field-of-view calibration, rebuilt with WPF and OpenCV so the vision step was not the slow part of the job. I also worked with a senior developer on the team’s test suite, so that its automated UI tests and older scripted tests could run with every build beside the unit tests. It was my first work with automated UI tests.

Spectroscopy Products Division, during the Renishaw software apprenticeship. I replaced software the division used in production. I did not own the spectrometer product.

Constraints

It had to fit a factory process and an instrument that already existed. I was a placement engineer, not the product owner. The times on this page are the ones I recorded in my degree report for that year. They are my own figures, not a logged test.

Decisions

  • Replace the VB6 tool rather than wrap it. The maintenance cost was the actual problem.
  • Put OpenCV on the field-of-view step, inside a WPF app the production team could run the way they already ran Windows software.
  • For the larger applications, convert the VB6 with a tool and then fix what it left behind, such as error handling and arrays that start at one, with a second tool I wrote. By hand, the largest would have taken more than six months. I estimated the tools saved about three.

Result

A replacement for the field-of-view calibration, and upgrades of the other production applications, released to the production engineers who commission each new spectrometer. I recorded the field-of-view calculation going from around four minutes to no more than 15 seconds. Repeating the calibration several times had taken upwards of 15 minutes, and then took under a minute. The conversion finished about three months sooner than doing it by hand would have. The test suite ran in continuous integration with its UI tests included.

Sources

  • Degree report, 2020

    My report for the 2019–20 year of the degree records the field-of-view calculation at around four minutes before and no more than 15 seconds after. They are my figures from that year, not a logged test. The same report describes the conversion tools and the test-suite work. It is not public.

  • Instrument context

    Renishaw’s public page for the inVia, so a reader can see the kind of instrument.

  • Employment dates

    The apprenticeship ran September 2017 to June 2021, on the CV. This placement sits inside that.

Reflection

Converting VB6 to C# did not teach me much programming. It taught me the instrument. I had to sit at a spectrometer and watch the old program to understand what it was calculating before I could rewrite it.

Technical notes

C#, .NET, WinForms, WPF, MVVM, OpenCV, WiX installers, Git, Bitbucket, Jira, Confluence, Jenkins, Kanban.

Skills

C#, WPF, WinForms, VB6, OpenCV, UI test automation

Related