---
title: "Description"
description: "What LumiScan Script Runner does: HALCON procedures as Data Layer modules with typed nodes, one run handshake, groups that share handles, interface hashes."
product: "LumiScan Script Runner"
component: "lumiscan-script-runner"
version: "1.0.0"
display_version: "1.0.0.2"
latest_version: true
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-script-runner/description.html"
---

# Description – LumiScan Script Runner

LumiScan Script Runner turns HALCON procedures into functions on the Data Layer. It is meant for vision experts who write their own HALCON code for demanding edge cases and want to call it from a PLC or any other Data Layer client, without writing glue code. Customers who want to solve a vision task without vision knowledge use the other apps of the LumiScan Vision Suite.

## How it works

1. **You write a procedure.** In HDevelop you write and test a procedure with a declared interface: image inputs, image outputs, value (control) inputs and value outputs. The types of the parameters come from the procedure’s documentation or from an [interface file](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/interface-file.html) next to it.
2. **You put it into the script folder.** The procedure file (`<name>.hdvp`) goes into the Script Runner’s script folder, see [Settings Folder](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/settings-folder.html).
3. **You configure a module.** An entry in the [application file](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/application-file.html) names the module, the procedure it runs, its group and where each parameter comes from or goes to.
4. **The Script Runner builds the nodes.** At start it reads every procedure of the script folder through HDevEngine, maps each parameter to a node (see [Type Mapping](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/type-mapping.html)) and publishes the module under `hdvisionsystems/lumiscan-script-runner/v1/<module>/`.
5. **A client calls the module.** It writes the inputs, raises `run/request` and waits for `run/done` or `run/has-error`, see [The run Handshake](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/run-handshake.html). The Script Runner runs the procedure, checks every output against the interface and writes the outputs.

## What you get

- **Typed nodes from your interface.** An integer parameter becomes an INT64 node, a real parameter a FLOAT64 node, a string a STRING node, several values an array node, an image a group with `data`, `width`, `height` and `pixel-type`. Descriptions, units, minimum, maximum and default values of the procedure go into the node’s description, and the minimum and maximum are checked before the procedure runs.
- **One handshake for every script.** Every module has the same `run` function (`request`, `ready`, `running`, `done`, `has-error`, `output/status-code`). One PLC function block with `xExecute`, `xBusy`, `xDone`, `xError` and `eErrorID` serves every module; only the input and output nodes differ.
- **Shared models without handles on the Data Layer.** A HALCON handle (a shape model, a dictionary) never leaves the app. Modules that share a handle run in one group and pass it through the group’s store, see [Modules, Groups and the Store](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/modules-groups-and-store.html). A module can run once at start, for example to read a model file.
- **Protection for your PLC program.** The Script Runner computes a hash of every procedure’s interface. A module is built only when the hash is the one it was accepted for, so a changed procedure never moves your PLC program’s nodes unnoticed, see [Interfaces and Hashes](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/interfaces-and-hashes.html).
- **Changes without a new build.** Replace a procedure whose interface stays the same and restart the app: the new vision logic runs behind the same nodes.
- **Protected procedures.** A procedure locked with a password in HDevelop runs as well; its interface stays readable. The password never reaches the device.

## What it does not do

- It runs procedures, not HDevelop programs (`.hdev`) with a `main`: wrap a program into a procedure first, see [Prepare a HALCON Procedure](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/how-tos/prepare-a-procedure.html).
- Regions and contours (XLD) are not transported on the Data Layer. Convert them into an image (`region_to_bin`, `paint_xld`) or into coordinate arrays before the procedure returns.
- A parameter that mixes strings and numbers in one tuple is not supported.
- The procedure has no timeout: the client times out on its side.

The limits of this version are listed in the [Release Notes](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/release-notes.html).
