- 29 Nov 2024
- Imprimir
- DF
Send custom data from PLC to camera
- Actualizado el 29 Nov 2024
- Imprimir
- DF
Create and Configure the Custom Data Tag
Start by creating two tags, one to copy data from the custom data tag and the other to move it on to the camera output tag. Both have to be a STRING data type.Define the Byte Order for Node-RED
You can choose any byte order from the output assembly assigned for Node-RED. The byte order refers to how the data is formatted and transmitted.
Develop Trigger Logic
After creating the custom data tag, use the trigger logic detailed in Ethernet/IP - Triggering to create a new set of logical instructions. The trigger logic should handle the camera's activation, ensuring that it captures an image whenever specific conditions are met.Download the .L5X file below:
Note
If you trigger the same VIN twice the data won’t be stored on the second image. Try to clear the data before sending the new one in.
Create a Flow in Node-RED
Access the Node-RED flow and create a new flow that mirrors the required functionality.
You can use the JSON file provided below to import and set up the logic within Node-RED, ensuring that the flow is configured according to the overall system requirements.Capture the Image and Associate Metadata
After triggering the camera, verify that the image capture process is working as expected.
Ensure that each image the camera takes has metadata, including the custom data.