- 05 Aug 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
PLC Workflow
- Updated on 05 Aug 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
This article applies to these versions of LandingLens:
LandingLens | LandingLens on Snowflake |
✓ | ✓ |
You can use Programmable Logic Controllers (PLCs) to communicate with LandingEdge. For example, you can configure the system so that the PLC tells LandingEdge when to take a photo, and then LandingEdge tells the PLC what the results were.
Supported Controllers
LandingEdge is compatible with the following PLCs:
- Rockwell CompactLogix controllers
- Rockwell ControlLogix controllers
- Controllers that use the Open Platform Communications Unified Architecture (OPC UA) protocol
Set Up Inspection Points for PLCs
To set up Inspection Points when using a PLC with LandingEdge, follow the instructions below:
- Create an Inspection Point.Note:You can set up multiple configurations for each Inspection Point. For more information, go to Configurations.
- Select your Image Source.
If you want the PLC to trigger the inspection start and you are capturing images with a connected industrial camera, select GigE Vision Camera or GenICam and then select your camera. - Select your Inspection Start method.
If using an industrial camera, select PLC. Make sure you configure your PLC to start inspections. This will vary based on your PLC device. - Set up the Cloud Connection and Model settings.
- Complete the following steps in the Communication section.
- Select your PLC Type.
- Enter the IP address of the controller in the Address field.
- For Rockwell controllers, use this format: [IP Address]/[Slot Number].
Example: 192.168.1.5/0. (If there's no slot number, omit it.) - For OPC UA controllers, use this format: opc.tcp://[IP Address]:4840.
Example: opc.tcp://192.168.1.10:4840.
- For Rockwell controllers, use this format: [IP Address]/[Slot Number].
- Click Set and set up the Inputs and Outputs, which are the data points that LandingEdge and the PLC can share with each other.
To enable a data point to be shared, enter the PLC Tag or Tag Address in the Tag/Address field for that data point. (For information about how to program your PLC, refer to the device's documentation from the manufacturer.) - (Optional) Set up Image Saving settings.
- (Optional) Set up Other Settings settings.
- (Optional) Set up Custom Processing.
Inputs
Use the Inputs settings to configure the signals that the PLC emits to LandingEdge.
To enable a data point to be shared, enter the PLC Tag or Tag Address in the Tag/Address field for that data point. (For information about how to program your PLC, refer to the device's documentation from the manufacturer.)
The following table describes the configurable outputs.
Input | Description | Paired Output | Data Type |
---|---|---|---|
Trigger | Takes images immediately when the Trigger goes from Low to High (False to True). | Trigger Ready | Bool |
Results Ack | Configure the PLC to set this setting to High (True) to indicate results and errors from LandingEdge have been received. When LandingEdge receives this signal, it resets the result signals and is ready to start the cycle again. | Results Ready, Error | Bool |
Request Sub-Configuration Index | The PLC can tell LandingEdge to change to a different Inspection Point configuration. Use the configuration Index, and not the configuration name. If you're not using multiple configurations for an Inspection Point, leave this blank. Available in LandingEdge v2.6.45 and later. | Current Sub-Configuration Index | DINT |
- True/High: Indicates that the value is on.
- False/Low: Indicates that the value is off.
Outputs
Use the Outputs settings to configure the signals that LandingEdge emits to the PLC.
To enable a data point to be shared, enter the PLC Tag or Tag Address in the Tag/Address field for that data point. (For information about how to program your PLC, refer to the device's documentation from the manufacturer.)
The following table describes the configurable outputs.
Output | Description | Paired Input | Data Type |
---|---|---|---|
Trigger Ready | Indicates LandingEdge is ready to receive the trigger to capture and process an image. | Trigger | Bool |
Results Ready | Indicates inference is complete and results are ready on the output signals to be read by the PLC. | Results Ack | Bool |
Results OK | Indicates the image is good. This is the default result if you are running a Classification Model. | N/A | Bool |
Results NG | Indicates that the image is not good. An Error output will also be present. | N/A | Bool |
Classification | This option is only for Classification Models. Indicates the predicted Class ID. If there is no image, the value is -1. | N/A | DINT |
Error | Indicates an error occurred during acquisition or processing. Check the Error Code for more details. A Results NG output will also be present. To clear the error, assert the Results Ack input. | Results Ack | Bool |
Error Code | Indicates what kind of error occurred in the DINT data type.
| N/A | DINT |
Online/Ready | Indicates LandingEdge is running. | N/A | Bool |
Heartbeat | LandingEdge toggles the value from True to False every 1 second. This allows the PLC to check if LandingEdge is still functioning and that the connection between the PLC and LandingEdge still exists. | N/A | Bool |
Busy | Indicates LandingEdge is processing. | N/A | Bool |
Current Sub-Configuration Index | LandingEdge tells the PLC the Index of the Inspection Point configuration that is currently running. If you're not using multiple configurations for an Inspection Point, leave this blank. Available in LandingEdge v2.6.45 and later. | Request Sub-Configuration Index | DINT |
- True/High: Indicates that the value is on.
- False/Low: Indicates that the value is off.
Example Setup of LandingEdge and a PLC
The following example workflow shows how setting up the Inputs and Outputs enable LandingEdge and the PLC to work together.
The example assumes that these Inputs and Outputs are set up:
Input | Set Up |
---|---|
Trigger | ✓ |
Results Ack | ✓ |
Request Sub-Configuration Index | ✖ |
Output | Set Up |
---|---|
Trigger Ready | ✓ |
Results Ready | ✓ |
Results OK | ✓ |
Results NG | ✓ |
Classification | ✓ (if using a Classification model) |
Error | ✓ |
Error Code | ✖ |
Online/Ready | ✓ |
Heartbeat | ✖ |
Busy | ✓ |
Current Sub-Configuration Index | ✖ |
Example Workflow
- LandingEdge indicates that it is Online.
- LandingEdge is ready and asserts Trigger Ready (True).
- The PLC asserts Trigger (True) based on the set configurations. LandingEdge receives this signal and recognizes it is time to take an image.
- LandingEdge changes Trigger Ready to False. The PLC receives this signal and recognizes that LandingEdge acknowledged the Trigger.
- LandingEdge asserts Busy (True) to indicate that it cannot be triggered again. The PLC can monitor this signal.
- After LandingEdge has received and processed an image, Result OK is set to True and Result NG is set to False.
- If using a Classification model, Classification is set to the predicted Class ID.
- If an error occurs, Error is set to True.
- After the Results are set, LandingEdge asserts Results Ready (True) to indicate that results are available for the PLC to read.
- The PLC recognizes that Results Ready or Error is set to True. It reads the appropriate values—like Results OK, Results NG, and Classification—to determine the final prediction from the model.
- After the PLC reads the results, it asserts Results Ack. LandingEdge receives this signal and recognizes that the PLC has read the results and the cycle is complete.
- LandingEdge resets the result signals and is ready to initiate the cycle again (starting from step 2).