Trigger camera using PLC
  • 27 Aug 2024
  • PDF

Trigger camera using PLC

  • PDF

Article summary

Trigger_Camera_Routine_RLL
5.39 KB

Connect the camera to the PLC of your choice by following this article.

Timing Diagram

The timing diagram visualizes the sequence of operations within the camera system. It shows the relationship between different signals—how one signal triggers another and how the process progresses through various stages, such as triggering, exposure, inspection, and completion. The transitions between high and low states on these signals represent the state changes in the camera's operation and help understand the timing and dependencies between each part of the process.

Breakdown of the Timing Diagram:

  1. Busy:

    • The "Busy" signal indicates whether the system or camera is actively engaged in a process. The signal starts low (inactive), goes high (active) as the process begins, and stays high throughout the operation. Once all tasks are completed, the signal goes low again, indicating that the system is no longer busy and is ready for the next operation.

  2. Trigger:

    • The "Trigger" signal is an input to the camera that initiates an image capture or inspection process. The signal goes high to activate the trigger and stays high for a short duration before going low again. This pulse indicates that a trigger command has been sent to the camera.

  3. TriggerRdy (Trigger Ready):

    • This signal shows when the system is prepared to accept a trigger command. It starts high, indicating readiness, and then goes low once the trigger is issued. After the system processes the trigger and completes the necessary actions, the signal goes high again, indicating that the system is ready for the next trigger.

  4. TriggerAck (Trigger Acknowledge):

    • After the camera receives the trigger command, it sends a "Trigger Acknowledge" signal back to the PLC. This signal goes high to indicate that the trigger was successfully received and processed. It remains high for the duration of the processing and then returns low.

  5. ExposureComplete:

    • This signal indicates that the camera has completed its exposure process. It follows the TriggerAck signal, going high after the acknowledgment and remaining high until the exposure is fully complete. At this point, it returns low.

  6. InspectionComplete:

    • After the exposure process, the camera performs image processing or inspection. Once this inspection process is finished, the "Inspection Complete" signal goes high. This signal typically follows the ExposureComplete signal and stays high until the inspection is confirmed to be complete; at this point, it goes low.

  7. InspectionPass:

    • This signal indicates whether the inspection was successful. It goes high once the inspection is complete and has passed all checks. If the inspection does not pass, this signal would remain low.


Program the logic using a similar example, PFA the logic attached

Camera Triggering and Status Monitoring

This section explains how to trigger the camera and monitor its status using PLC logic. Each signal and its corresponding action are detailed to ensure proper integration and functionality.

  • PB_TRIGGER/OV_Debug[0]

    • Function: Acts as a control signal from the PLC logic to determine when to trigger the camera.

    • Description: This tag is essential for initiating the camera trigger process. It serves as an input that, when activated, starts the sequence of events leading to image capture.

  • Trigger_ONS

    • Function: Provides a one-shot signal to ensure the trigger occurs only during the rising edge.

    • Description: The Trigger_ONS generates a single pulse when the PB_TRIGGER signal transitions from low to high. This prevents multiple triggers from occurring due to signal fluctuations or noise.

  • Camer_1:I.Data[0].0

    • Function: Indicates that the camera is ready to be triggered.

    • Description: This bit, coming from the PLC, must be monitored to confirm that the camera is in a state ready to accept a trigger signal. The camera will not respond to trigger signals unless this bit is high.

  • Camer_1:O.Data[0].0

    • Function: Sends the trigger signal to the camera.

    • Description: This output bit from the PLC must be set high to initiate image capture. It needs to be latched, meaning it remains high until the camera acknowledges receipt of the trigger. The acknowledgment is received via the Camer_1:I.Data[0].1 signal, which then allows the trigger bit to be unlatched.

  • Camer_1:I.Data[0].1

    • Function: Acknowledges the trigger from the camera.

    • Description: Once the camera has received the trigger signal, this bit will turn high. The PLC logic must monitor this bit to unlatch the Camer_1:O.Data[0].0 trigger signal, completing the trigger sequence.

  • Camer_1:I.Data[2].1  :

    • Function: Indicates that the result of the image processing is available.

    • Description: This bit turns high when the camera has processed the image and the result is ready to be read.

  • Camer_1:I.Data[2.2]  :

    • Function: Provides the pass/fail status of the image.

    • Description  :

      • If this bit is high, it indicates a pass.

      • If this bit is low, it indicates a failure.

  • Camer_1:I.Data[1].0  :

    • Function: Indicates an error condition.

    • Description: This bit turns high if there is an error with the camera. The error bit will latch and remain high until the error is cleared. Proper error-handling logic should be implemented in the PLC to reset this bit and handle the error condition accordingly.

Summary of Key Signals:

  • PB_TRIGGER: Initiates the camera trigger process.

  • Trigger_ONS: Ensures a single trigger pulse.

  • Camer_1:I.Data[0].0: Camera readiness indicator. (trigger ready)

  • Camer_1:O.Data[0].0: Trigger signal must be latched until acknowledgment. (Trigger)

  • Camer_1:I.Data[0].1: Acknowledgment of trigger from the camera. (trigger Ack)

  • Camer_1:I.Data[2].1: Indicates result availability. (Inspection Complete/Results Available)

  • Camer_1:I.Data[2].2: Pass/fail status indicator. (Inspection Pass)

  • Camer_1:I.Data[1].0: Error indicator, latched until cleared. (Acquisition/Trigger Error)

By following these steps and monitoring the specified signals, the integration of the camera with the PLC logic can be effectively managed, ensuring reliable image capture and processing.


Was this article helpful?

What's Next
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence