basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
558 stars 207 forks source link

Camera triggering projector #326

Open niallodowd opened 3 years ago

niallodowd commented 3 years ago

Hello, I'm setting up a fringe projection system. I'm looking to trigger my projector with my camera (ace acA4600-7gc Color GigE). After setting up the circuit to use the opto-coupled output line, I'm not sure how to send the trigger using python script. Should this happen automatically, every time the camera grabs an image?

Please provide some direction, or a command which sends a pulse through the opto-coupled output line.

Thanks! Niall

thiesmoeller commented 3 years ago

It's called timer output. It gets started with start of exposure. https://docs.baslerweb.com/timer#ace-classicul-cameras

niallodowd commented 3 years ago

Thanks so much for the quick response, Thies! Does this mean that the camera outputs the trigger to the opto-coupled line automatically? Or do I have to set up this functionality myself?

niallodowd commented 3 years ago

I'm trying to set the LineSelector by calling:

`camera.Open()

camera.LineSelector.SetValue('OutputLine1')

camera.Close()

`

however, I'm getting the error: Feature 'LineSelector' : cannot convert value 'OutputLine1', the value is invalid, though in pylon viewer, I am able to set this field to "Output Line 1".

thiesmoeller commented 3 years ago

use the "Feature Documentation" window in pylon viewer to get the correct code for your setting.

only do a tiny translation to python

e.g.: for exposure mode this would be: ExposureMode_Timed -> "Timed"

image