PROFINET Interface Reference
The PROFINET interface provides communication between LumiScan VGR and the PLC.
This chapter describes:
-
the PROFINET device: Hilscher card, device description (GSDML) and device name
-
the memory layout of the exchanged signals
-
the PROFINET device modules
-
the process flow for function calls
-
the available functions
-
return codes
-
operation modes
For an explanation of how the interface is used during operation, see PLC Settings.
PROFINET Device
LumiScan VGR is a PROFINET IO device. It communicates through a Hilscher cifX PC card in the IPC. Vision Controllers from HD Vision Systems with PROFINET are delivered with the card installed and configured as described here.
Card |
Hilscher cifX RE PC card (for example cifX 50E-RE), channel 0, configured as PROFINET IO device. LumiScan VGR uses the first card of the PC ( |
Firmware |
PROFINET IO device V3.4 ( |
Device description (GSDML) |
|
Device access point (DAP) |
|
Vendor ID / device ID |
|
Device name (station name) |
|
IP address |
None ( |
Modules |
12 slots: 288 bytes to the PLC, 256 bytes from the PLC, see Device Modules. |
How to set up the connection in the PLC project: Connect a PLC over PROFINET.
Memory Layout
The byte addresses below are offsets from the start of the area that LumiScan VGR writes (OUT_*, slots 1–8, 288 bytes) and of the area that it reads (IN_*, slots 9–12, 256 bytes). Give the modules of each direction consecutive addresses in the PLC project: several values span two modules, for example OUT_BBoxObjectFrame (bytes 90–113, slots 2–3) and OUT_PoseObjectInTcp (bytes 156–183, slots 4–5).
Two groups of signals are exchanged:
-
PLC inputs (
OUT_):* Values written by LumiScan VGR and read by the PLC. -
PLC outputs (
IN_):* Values written by the PLC and read by LumiScan VGR.
Data Types and Byte Order
-
bool: one bit of a byte.byte/uchar: one byte, unchanged. -
Integers (
int,uint32): big-endian (most significant byte first). Siemens S7 controllers read and write them directly asDINT/UDINT. -
Floating-point values (
float): little-endian (least significant byte first), 4 bytes each. A controller that storesREALbig-endian, such as a Siemens S7, must reverse the four bytes of every float it reads from LumiScan VGR and of every float it writes (IN_ParamArgFloat,IN_PoseMoveInRobot). A little-endian controller (for example a CODESYS-based PLC such as the ctrlX CORE) reads the floats unchanged and must reverse the bytes of the integers instead. -
Strings (
IN_ParamArgString,IN_FeatureId): plain ASCII characters without a length header, padded with spaces or terminated with a zero byte. Write them as an array of characters, not as an S7STRING, whose two header bytes would become part of the text.
PLC Inputs (OUT_*)
| Slot / Group | Byte Address | Bit | Data Type | Name | Description |
|---|---|---|---|---|---|
Slot 1 - System Signals |
0 |
0 |
bool |
|
Mirrors the value of |
Slot 1 - System Signals |
0 |
1 |
bool |
|
From v2.0.0: |
Slot 1 - System Signals |
0 |
2 |
bool |
|
Indicates whether the reset function is ready to be executed. |
Slot 1 - System Signals |
0 |
3 |
bool |
|
Indicates whether the reset function is currently running. |
Slot 1 - System Signals |
0 |
4 |
bool |
|
Indicates whether the setup function is ready to be executed. |
Slot 1 - System Signals |
0 |
5 |
bool |
|
Indicates whether the setup function is currently running. |
Slot 1 - System Signals |
Reserved |
||||
Slot 1 - Status Signals |
4 |
byte/uchar |
|
Contains the current operation mode. It can be changed using the Set Parameter function. |
|
Slot 1 - Status Signals |
5 |
0 |
bool |
|
Indicates whether system setup has been completed. |
Slot 1 - Status Signals |
Reserved |
||||
Slot 1 - Trigger Signals |
8 |
0 |
bool |
|
Indicates whether the Set Parameter function is ready. |
Slot 1 - Trigger Signals |
8 |
1 |
bool |
|
Indicates whether the Set Parameter function is running. |
Slot 1 - Trigger Signals |
9 |
0 |
bool |
|
Indicates whether camera triggering is ready. |
Slot 1 - Trigger Signals |
9 |
1 |
bool |
|
Indicates whether camera triggering is running. |
Slot 1 - Trigger Signals |
10 |
0 |
bool |
|
Indicates whether object computation is ready. |
Slot 1 - Trigger Signals |
10 |
1 |
bool |
|
Indicates whether object computation is running. |
Slot 1 - Trigger Signals |
11 |
0 |
bool |
|
Indicates whether the best-result calculation is ready. |
Slot 1 - Trigger Signals |
11 |
1 |
bool |
|
Indicates whether the best-result calculation is running. |
Slot 1 - Trigger Signals |
12 |
0 |
bool |
|
Indicates whether the Grip Best Result function is ready. |
Slot 1 - Trigger Signals |
12 |
1 |
bool |
|
Indicates whether the Grip Best Result function is running. |
Slot 1 - Trigger Signals |
13 |
0 |
bool |
|
Indicates whether the Get Parameter function is ready. |
Slot 1 - Trigger Signals |
13 |
1 |
bool |
|
Indicates whether the Get Parameter function is running. |
Slot 1 - Trigger Signals |
14 |
0 |
bool |
|
Indicates whether the Reset Camera function is ready. |
Slot 1 - Trigger Signals |
14 |
1 |
bool |
|
Indicates whether the Reset Camera function is running. |
Slot 1 - Trigger Signals |
15 |
0 |
bool |
|
From v2.0.0. Indicates whether the Set Active Camera Feature function is ready. |
Slot 1 - Trigger Signals |
15 |
1 |
bool |
|
From v2.0.0. Indicates whether the Set Active Camera Feature function is running. |
Slot 1 - Trigger Signals |
16 |
Reserved. Do not use (until v2.0.0: |
|||
Slot 1 - Trigger Signals |
17 |
0 |
bool |
|
From v2.0.0. Indicates whether the Run Recipe function is ready. |
Slot 1 - Trigger Signals |
17 |
1 |
bool |
|
From v2.0.0. Indicates whether the Run Recipe function is running. |
Slot 1 - Trigger Signals |
… |
Reserved |
|||
Slot 2 - Data |
64 |
byte/uchar |
|
Contains the return code of the last executed function. |
|
Slot 2 - Data |
65 |
byte/uchar |
|
ID of the object as defined in the JSON settings. |
|
Slot 2 - Data |
66 |
6 x float |
|
Not implemented: always |
|
Slots 2–3 - Data |
90 |
6 x float |
|
Bounding box of the object in the object coordinate system: |
|
Slot 3 - Data |
114 |
float |
|
Depth of the previously gripped object in meters, measured by |
|
Slot 3 - Data |
118 |
byte/uchar |
|
Number of objects in the scene that have not yet been gripped. |
|
Slot 3 - Data |
… |
Reserved |
|||
Slot 4 - Data |
128 |
7 x float |
|
Pose of the move frame for a grip point in robot coordinates: |
|
Slots 4–5 - Data |
156 |
7 x float |
|
Pose of the object in TCP coordinates. Uses the same pose format as |
|
Slot 5 - Data |
184 |
uint32 |
|
Grip priority of the best grip point, as configured in the grip point settings of the object. |
|
Slot 5 - Data |
… |
Reserved |
|||
Slot 6 - Data |
192 |
float |
|
Score of the 2D object detection result. |
|
Slot 6 - Data |
196 |
float |
|
Curvature of the previously gripped object. |
|
Slot 6 - Data |
200 |
int |
|
Nearest-neighbor value of the previously gripped object. |
|
Slot 6 - Data |
204 |
int |
|
Not written: always |
|
Slot 6 - Data |
208 |
int |
|
Not written: always |
|
Slot 6 - Data |
212 |
float |
|
Score of the 3D object detection result. |
|
Slot 6 - Data |
216 |
float |
|
Current camera temperature in °C. The value is updated when an image is captured. |
|
Slot 6 - Data |
… |
Reserved |
PLC Outputs (IN_*)
| Slot / Group | Byte Address | Bit | Data Type | Name | Description |
|---|---|---|---|---|---|
Slot 9 - System Signals |
0 |
0 |
bool |
|
Heartbeat signal from the PLC. |
Slot 9 - System Signals |
0 |
1 |
bool |
|
Reserved for PLC errors. |
Slot 9 - System Signals |
0 |
2 |
bool |
|
Requests execution of the reset function. |
Slot 9 - System Signals |
0 |
3 |
bool |
|
If |
Slot 9 - System Signals |
0 |
4 |
bool |
|
Requests execution of the setup function. |
Slot 9 - System Signals |
Reserved |
||||
Slot 9 - Status Signals |
4 |
Reserved |
|||
Slot 9 - Status Signals |
… |
||||
Slot 9 - Trigger Signals |
8 |
0 |
bool |
|
Requests execution of the Set Parameter function. |
Slot 9 - Trigger Signals |
9 |
0 |
bool |
|
Requests a new image from the active camera. |
Slot 9 - Trigger Signals |
10 |
0 |
bool |
|
Requests object computation. |
Slot 9 - Trigger Signals |
11 |
0 |
bool |
|
Requests calculation of the best grip result. |
Slot 9 - Trigger Signals |
12 |
0 |
bool |
|
Requests confirmation of the best grip result. |
Slot 9 - Trigger Signals |
13 |
0 |
bool |
|
Requests a parameter value. |
Slot 9 - Trigger Signals |
14 |
0 |
bool |
|
Requests a reset of the camera whose ID is in |
Slot 9 - Trigger Signals |
15 |
0 |
bool |
|
From v2.0.0. Requests a feature set for a camera: the camera ID in |
Slot 9 - Trigger Signals |
16 |
Reserved. Do not use (until v2.0.0: |
|||
Slot 9 - Trigger Signals |
17 |
0 |
bool |
|
From v2.0.0. Requests a recipe run. The recipe ID is in |
Slot 9 - Trigger Signals |
… |
Reserved |
|||
Slot 10 - Data |
64 |
byte/uchar |
|
Specifies the parameter or operation used by the Set Parameter or Get Parameter function. |
|
Slot 10 - Data |
65 |
byte/uchar |
|
Byte argument used by parameter functions. |
|
Slot 10 - Data |
66 |
int |
|
Integer argument used by parameter functions. |
|
Slot 10 - Data |
70 |
float |
|
Float argument used by parameter functions. |
|
Slot 10 - Data |
74 |
32 x byte/uchar |
|
String argument used by parameter functions. Also the camera ID for Reset Camera and, from v2.0.0, for Set Active Camera Feature, and the recipe ID for Run Recipe. |
|
Slot 10 - Data |
106 |
16 x byte/uchar |
|
From v2.0.0. Feature set ID for Set Active Camera Feature: at most 16 characters, padded with spaces. |
|
Slot 10 - Data |
… |
Reserved |
|||
Slot 11 - Data |
128 |
7 x float |
|
Current pose in robot coordinates using the move frame. This value should always be available. |
|
Slot 11 - Data |
… |
Reserved |
|||
Slot 12 - Reserved |
192 |
Reserved |
|||
Slot 12 - Reserved |
… |
Reserved |
Device Modules
The PROFINET device of LumiScan VGR has twelve modules. Insert exactly these modules, in this order, into the device in the PLC project. Input and Output are seen from the PLC, as in the GSDML file. If the modules in the PLC project differ from the card, the PLC reports a module difference and no data is exchanged.
| Slot | Module | Module ident | Length (bytes) | Signals and byte addresses |
|---|---|---|---|---|
1 |
64 Bytes Input |
|
64 |
|
2 |
32 Bytes Input |
|
32 |
|
3 |
32 Bytes Input |
|
32 |
|
4 |
32 Bytes Input |
|
32 |
|
5 |
32 Bytes Input |
|
32 |
|
6 |
32 Bytes Input |
|
32 |
|
7 |
32 Bytes Input |
|
32 |
|
8 |
32 Bytes Input |
|
32 |
|
9 |
64 Bytes Output |
|
64 |
|
10 |
64 Bytes Output |
|
64 |
|
11 |
64 Bytes Output |
|
64 |
|
12 |
64 Bytes Output |
|
64 |
|
LumiScan VGR uses bytes 0–219 of the input area and bytes 0–155 of the output area; the remaining bytes are reserved.
| Earlier editions of this manual listed four 64-byte modules in each direction (slots 1–8). That layout does not match the configuration of the card. |
Process Flow
Each process uses three signals:
-
OUT_*Ready -
IN_*Request -
OUT_*Running
The execution sequence is the same for all functions.
| Step | OUT | IN | Note |
|---|---|---|---|
1 |
Wait until |
Not applicable to reset functions |
|
2 |
Set |
||
3 |
Check |
||
4 |
Set |
||
5 |
Set |
||
6 |
Wait until |
Not applicable to reset functions |
|
7 |
Check |
Otherwise, the trigger is discarded |
|
8 |
Set |
||
9 |
Wait until |
||
10 |
Execute the requested function |
||
11 |
Set output variables |
||
12 |
Set |
||
13 |
Set |
||
14 |
Wait until |
||
15 |
Check the return code |
||
16 |
Read the output variables |
For a more detailed explanation of the handshake behavior, see PLC Settings: Process Flow.
Function Descriptions
| Function | Input | Output | Description | Prerequisite |
|---|---|---|---|---|
|
Resets all |
|||
|
Resets all |
|||
|
|
|
Sets a parameter.
|
|
|
|
|
Reads a parameter.
Any other |
|
|
|
Captures an image with the currently active camera. |
|
|
|
|
Calculates the poses of all detected objects from the most recent image using the active pipeline. |
|
|
|
|
|
Calculates grip points for the active robot using the most recently calculated object poses and returns information about the highest-priority valid grip. If path planning is configured, the input arguments can be used to evaluate the trajectory at a specific point: *
Path segment If invalid arguments are supplied, they are set to
|
|
|
|
Performs the same calculation as |
|
|
|
|
|
Disconnects and reconnects the camera whose ID is in Up to v2.0.0, the function restarted the camera driver, which reconnected every camera, an empty ID restarted only the driver, and Setup had to be executed again after a reset. Before v2.0.0, it returned |
|
|
|
|
From v2.0.0. Applies a feature set ( Replaces the |
|
|
|
As |
From v2.0.0. Runs a recipe (
The outputs are those of |
|
Return Codes
OUT_ReturnCode holds the result of the last function. LumiScan VGR also shows it in the status window and on the PROFINET tab, see PLC Settings: Status Information.
| Status | Value | Meaning |
|---|---|---|
|
0 |
No error occurred. |
|
1 |
An unknown error occurred. |
|
2 |
The currently active camera has not been initialized or does not exist. |
|
3 |
A connection to the camera could not be established. |
|
4 |
An error occurred while communicating with or acquiring data from the camera. |
|
5 |
The currently active pipeline has not been initialized or does not exist. |
|
6 |
The currently active robot has not been initialized or does not exist. |
|
7 |
Additional data required to execute the function is missing, for example recorded data or results from a previous calculation step. |
|
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. |
|
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. |
|
10 |
No valid grip points are available for the active robot. |
|
12 |
Auto-exposure under a hardware trigger: the frame’s intensity is outside |
|
13 |
Auto-exposure under a software trigger or a free-running camera: the retry budget ( |
|
14 |
Not returned. If |
|
15 |
From v2.0.0, OPC UA only: the method is not available in the current operation mode, for example in manual mode. On PROFINET, a function that is not available in the current operation mode keeps its |
|
16 |
From v2.0.0. The requested feature set is not configured for this camera, is not valid for it, or its ID is longer than 16 characters. |
|
17 |
From v2.0.0. The camera is connected but currently held by something else. Unlike |
|
18 |
From v2.0.0. The active camera is carried by the robot ( |
|
19 |
From v2.0.0. A pose was supplied in |
Application Example
The following diagram shows an example process using one camera, one pipeline, and one robot.
The example assumes that the operation mode does not change during the process. After each function call, check the return code and handle any reported error before continuing.
Multiple objects can be picked from a single captured image. Depending on the required cycle time, it may also be practical to capture a new image before each grip.
Manual Mode
During operation, manual mode can be activated through the user interface. The operation mode then changes to MANUAL (2).
While manual mode is active, processing functions cannot be started from the PLC.
When manual mode is exited, the system changes to IDLE (0). To resume automatic processing, set the operation mode back to AUTOMATIC through the PLC.
See also Manual Mode.
Multiple Components
All calculations use the currently active camera, pipeline, and robot.
If a project contains multiple cameras, pipelines, or robots, make sure that the correct active components are selected using OUT_SetParameter before executing each function. From v2.0.0, a recipe selects its camera, pipeline and robot itself (OUT_RunRecipe).