---
title: "Test Without a Camera or PLC"
description: "Testing LumiScan VGR without hardware - replay recordings with a Virtual camera or --simulate-camera, simulate the PLC, and check an installation with metal-rings."
product: "LumiScan VGR / VGR Lite"
component: "lumiscan-vgr"
version: "2.0.0"
display_version: "2.0.0.8"
latest_version: true
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-vgr/howto/test-without-hardware.html"
---

# Test Without a Camera or PLC – LumiScan VGR / VGR Lite

LumiScan VGR runs a whole cycle without a camera, robot or PLC: a recording takes the place of the camera, and the PLC is simulated or replaced by an OPC UA client or a script. Use this to try out settings in the office, and to check an installation before the cell is connected.

## Replay recordings instead of a camera {#replay-recordings}

A recording is a folder of frames: for each capture an image (`.png`) and a point cloud (`.ply`) with the same base name, as LumiScan VGR saves them (see [Generated Data and Files](https://docs.hdvisionsystems.com/en/lumiscan-vgr/output-data.html)). A `dataset.unit.json` in the folder states the unit of the point clouds, for example `{ "unit": "METER" }`; without it, LumiScan VGR judges the unit from the depth and warns (see [Point-Cloud Unit](https://docs.hdvisionsystems.com/en/lumiscan-vgr/json-settings/cameras.html#point-cloud-unit)).

There are two ways to replay recordings:

- **A simulated camera in the settings file**: a camera driver of type `Virtual` with the folder in `path`. The camera keeps its ID and is simulated on every PC, so use it for a test or demonstration project, not for a project that goes into production. With `"layout": "DATASETS"`, each subfolder of `path` is a dataset. The example project metal-rings works this way:
  ```json
  "cameraDrivers": [
      { "driverType": "Virtual", "id": "driver-sim-camera", "path": "data/camera", "layout": "DATASETS" }
  ],
  "cameras": [
      { "cameraId": "camera", "serial": "LX20220109", "driverId": "driver-sim-camera", "enable": true }
  ]
  ```
- **The production settings with `--simulate-camera`**: every camera of the settings file is pointed at recorded data, and the settings file stays unchanged. Choose the folder with `--simulate-camera-path` or in the Start Menu. It is read as `<folder>/<cameraId>/<dataset>/`: a camera replays the subfolder named after its `cameraId`, and a camera folder with frames directly in it has one dataset.
  ```
  LumiScan_VGR.exe -s C:\Projects\cell1\settings.json --simulate-camera --simulate-camera-path D:\recordings\cell1
  ```

All command-line options: [Starting LumiScan VGR](https://docs.hdvisionsystems.com/en/lumiscan-vgr/start-menu.html).

## Simulate the PLC {#simulate-plc}

For a project with `communicationProtocol` `Profinet`, start LumiScan VGR with `--simulate-sps`, or select the PLC simulation in the Start Menu. LumiScan VGR then needs no PROFINET card and no PLC; set the PLC signals by hand in the **PROFINET** tab (see [PROFINET Process Flow and Signals](https://docs.hdvisionsystems.com/en/lumiscan-vgr/plc-settings.html)).

A project with `communicationProtocol` `OPC_UA` needs no PLC: any OPC UA client can call the methods.

## Check an installation with the example project {#check-installation}

The example project metal-rings runs without hardware and is the project on which LumiScan VGR’s own integration tests run. A cycle that works with it shows that LumiScan VGR, its dependencies and the HALCON licence work on this PC.

1. Download [lumiscan-vgr-example-metal-rings-v2.0.0.zip](https://docs.hdvisionsystems.com/en/lumiscan-vgr/_attachments/lumiscan-vgr-example-metal-rings-v2.0.0.zip) and unpack it, for example into `C:\LumiScan\examples`.

2. Run the recipe `pick-ring` in one of three ways:
   - **By hand:** follow [Try the Example Project](https://docs.hdvisionsystems.com/en/lumiscan-vgr/tutorials/first-grip-in-simulation.html).

   - **From an OPC UA client:** start LumiScan VGR with the project’s `settings.json`. Connect the client to `opc.tcp://<PC>:4840`, call `SetupSystem`, then `RunRecipe` with `RecipeId` `pick-ring`. The server starts in the operation mode `AUTOMATIC`, in which the methods are accepted. See [OPC UA Client Integration Guide](https://docs.hdvisionsystems.com/en/lumiscan-vgr/api/opcua/opc-ua-client-integration-guide.html).

   - **From a script, without the user interface:** write a text file `check.txt` that contains
     ```
     RUN_RECIPE:pick-ring, GET_BEST_TRAJECTORY
     ```

     and run
     ```
     LumiScan_VGR.exe -s C:\LumiScan\examples\lumiscan-vgr-example-metal-rings\settings.json --script check.txt
     ```

     Script mode always ends with exit code 0; the result of each command is in the log, `LumiScanVGR.log` in the folder of the day under `<HDVAppData>\LumiScan VGR\logs` (see [Logging Settings](https://docs.hdvisionsystems.com/en/lumiscan-vgr/json-settings/logging.html)).

Check: `RunRecipe` returns `ReturnCode` `SUCCESS` with `NumObjects3D` greater than `0` and a grip pose that is not all zero, or every command in the log returns `SUCCESS`.

- **If matching fails** (no objects in 3D): check the HALCON licence, see [No point cloud matching can be performed](https://docs.hdvisionsystems.com/en/lumiscan-vgr/troubleshooting.html#ts-no-point-cloud-matching).
- **If the example works but your project does not:** the installation is fine; look for the cause in your project’s settings, files or camera, see [Troubleshooting](https://docs.hdvisionsystems.com/en/lumiscan-vgr/troubleshooting.html).
