---
title: "PLC Settings"
product: "LumiScan VGR"
component: "lumiscan-vgr"
version: "1.8.4"
display_version: "1.8.4.6"
latest_version: true
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/plc-settings.html"
---

# PLC Settings – LumiScan VGR

The PLC parameters are available in the **PROFINET** tab, which can be used to monitor the data exchanged between LumiScan VGR and the PLC.

**PLC parameters can only be changed while manual mode is disabled.**

## Process Flow {#process-flow}

Each process uses three variables:

1. `OUT_*Ready`
2. `IN_*Request`
3. `OUT_*Running`

The execution sequence is the same for all processes.

**Table 1. Table 5: PLC Data Transmission Process**

| Step | HD Vision Systems → PLC (OUT) | PLC → HD Vision Systems (IN) | Note |
| --- | --- | --- | --- |
| 1 |   | Wait until `OUT_*Ready == 1` | Not applicable to reset functions |
| 2 |   | Set `IN_*Request → 1` |   |
| 3 | Check `IN_*Request == 1` |   |   |
| 4 | Set `OUT_*Ready → 0` |   |   |
| 5 | Set `OUT_*Running → 1` |   |   |
| 6 |   | Wait until `OUT_*Ready == 0` | Not applicable to reset functions |
| 7 |   | Check `OUT_*Running == 1` | Otherwise, the trigger is discarded |
| 8 |   | Set `IN_*Request → 0` |   |
| 9 | Wait until `IN_*Request == 0` |   |   |
| 10 | Execute the requested function |   |   |
| 11 | Set the output variables |   |   |
| 12 | Set `OUT_*Running → 0` |   |   |
| 13 | Set `OUT_*Ready → 1` |   |   |
| 14 |   | Wait until `OUT_*Running == 0` |   |
| 15 |   | Check that the return values are valid |   |
| 16 |   | Read the output variables |   |

## Status Information {#status-information}

The result of each action is displayed in two places:

- as a status message in the status window, for example **SUCCESS**
- as a numeric value in `OUT_ReturnCode` in the **PROFINET** tab, for example `0`

The available return values are listed in [Table 6](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/plc-settings.html#status-information).

![LumiScan VGR PROFINET interface showing PLC data, status information, and return values](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/_images/profinetcode.png)

**Table 2. Table 6: Return Values**

| Status | Value | Meaning |
| --- | --- | --- |
| `SUCCESS` | 0 | No error occurred. |
| `UNKNOWN_ERROR` | 1 | An unknown error occurred. |
| `CAMERA_NOT_INITIALIZED` | 2 | The currently active camera has not been initialized or does not exist. |
| `CAMERA_NOT_CONNECTED` | 3 | A connection to the camera could not be established. |
| `CAMERA_ACQUISITION_ERROR` | 4 | An error occurred while communicating with or acquiring data from the camera. |
| `PIPELINE_NOT_INITIALIZED` | 5 | The currently active pipeline has not been initialized or does not exist. |
| `ROBOT_NOT_INITIALIZED` | 6 | The currently active robot has not been initialized or does not exist. |
| `MISSING_DATA` | 7 | Additional data required to execute the function is missing, for example recorded data or results from a previous calculation step. |
| `ID_DOES_NOT_EXIST` | 8 | The specified ID does not exist. This can occur, for example, when attempting to activate a camera, pipeline, or robot that is not configured. |
| `MISSING_TRANSFORM` | 9 | The required coordinate transformation is not available. This can occur, for example, if hand-eye calibration data is missing for a robot-camera pair. |
| `RESULTS_EMPTY` | 10 | No valid grip points are available for the active robot. |
| `CAMERA_HARDWARE_TRIGGER_AGAIN` | 12 | Auto-exposure was unsuccessful. Trigger the camera again to capture another image. |
| `CAMERA_BAD_EXPOSURETIME_SETTING` | 13 | The requested exposure time cannot be reached, for example because the configured range is too short or too long for the current lighting conditions.<br> Check the auto-exposure settings or contact HD Vision Systems. |

## Manual Mode and PLC Operation

During automatic operation, manual mode can be activated through the user interface. The operation mode then changes to `OUT_OperationMode → 2`.

While manual mode is active, PLC-controlled processing is paused and most processing functions cannot be started.

When manual mode is exited, the system returns to idle mode (`OUT_OperationMode → 0`). To resume normal operation, switch the system back to automatic mode through the PLC using `OUT_SetParameter`.

## Projects with Multiple Components

All calculations use the currently active camera, pipeline, and robot.

If a project contains multiple cameras, pipelines, or robots, make sure the correct components are selected through `OUT_SetParameter` before executing a function.

For detailed information about PLC configuration, signals, and function descriptions, refer to the PROFINET Interface Description datasheets.
