Search code examples
pythontriggerscameraethernetacquisition

Trigger an cognex camera by script


I have got a Cognex Advantage 100 camera connected to my PC via ethernet.

After pressing F5 in the inSight Explorer to trigger the camera I can use the captured image in a Python script.

Can I make the Python script trigger the image capture itself?


Solution

  • I'm not very familiar with the Advantage series, but I am quite familiar with the other In-Sight cameras. I'm going to assume the Advantage is similar to other In-Sight cameras.

    You should be able to achieve a trigger from python by opening a telnet connection to the camera (on port 23), logging in (default username: admin, password: ), and sending the command 'SE8'. The camera trigger mode must be set to External, Manual or Network. If the command is successful, it will respond with a '1'. I'd suggest trying this with a telnet client before trying it in python. Suggested telnet clients: Putty or Hercules.

    More information can be found in the In-Sight Explorer help file. From the contents, go to 'Communications Reference -> Native Mode Communications'.