Skip to Main Content
Centre d’assistance Cognex
LogoLogo

How to Get the Latest Image via WebSocket (CogSocket) with In-Sight IS2800/IS3800 Vision Suite Cameras

How to get the latest image via WebSocket (CogSocket) with In-Sight IS2800/IS3800 Vision Suite Cameras.

31/10/2025

Question

How to get the latest image via WebSocket (CogSocket) with In-Sight IS2800/IS3800 Vision Suite Cameras?

Answer

To get the latest image acquired by IS2800/IS3800 camera, we have to send a POST request.

  1. After establishing a connection to the device, we have to send the following JSON command:

    { "$type": "post", "id": 1, "path": "cam0/img/listIds","body": true }
     
    1. In reply, we will get with HTTP status 200 OK and an array with image number(s). It can vary depending on which tools are used in your job. The first number from the array is the raw acquired image. The next numbers from the array are related to tools.

      How To Get The Latest Image Via WebSocket CogSocket With In-Sight IS2800-IS3800_Image-1


      For example, we have 1167.

  2. Then open a web browser and type:

    <cameraIP>/cam0/img/<imgnumber>

    How To Get The Latest Image Via WebSocket CogSocket With In-Sight IS2800-IS3800_Image-2

Ressources connexes

Loading component...