Skip to content

Serial numbers in the report ​

Need: on a production line, the operator scans each unit's serial number first and visually checks an LED during the test. The exported report must show which unit it was and how the operator answered.

StepWhat it does
1Ask (text): Scan the unit serial number, answer stored in sn
2Log Testing unit ${sn}
3–4Write 0x0300 = 1 (start the self-test) and read it back
5Ask (pass_fail): Unit ${sn}: is the RUN LED on?
6Write 0x0300 = 0
7Log Unit ${sn} done

At step 1 an input box appears with the cursor already in it. OK is the default button, so a barcode scanner that ends with Enter submits the answer as soon as it scans:

Enter the serial number

The question at step 5 includes the serial number just entered, and the operator clicks PASS or FAIL:

Confirm the LED

Serial number example result

What the report contains ​

After the run, click Export to export the report: 07-serial-number_report.xlsx. The detail column of the Steps sheet records the operator's answers:

stepactionverdictdetail
1askPASSsn = SN-2611-0042
2logPASSTesting unit SN-2611-0042
3writePASS
4readPASS
5askPASSoperator: PASS
6writePASS
7logPASSUnit SN-2611-0042 done

The Firmware column of the Summary sheet is the text of the Firmware field at the bottom left (FW 1.0.0 here), which you can use to record the firmware version under test.

Notes

  • If the operator clicks FAIL, the step is judged FAIL. Stop run stops the whole run.
  • If the input box is empty, or a Number answer is not a number, OK asks again.
  • Ask needs someone to answer, so in command-line runs Ask always FAILs.
  • For a separate report per unit, click Export after each unit, with the serial number in the file name.

Download the sample script ​

Sample script

Before running it, start a Slave window on 127.0.0.1:502 and click Listen, then open the script with Open JSON in Script mode and click Run. See How to use the examples.

Roach Modbus Tool by Mr.Roach