HBadertscher / Matlab_BaslerCamDriver

A universal MATLAB driver for Basler cameras
MIT License
21 stars 5 forks source link

Trigger #14

Open ebauch opened 8 years ago

ebauch commented 8 years ago

Hi,

does this driver support for setting up the external trigger function of the camera? I'd like to use it in Matlab, but need the ability to trigger the camera.

Thanks!

HBadertscher commented 8 years ago

I have not used external triggers so far. You'd have to try that manually, by configuring the camera to use an external trigger with the baslerSetParameter function and reading the images with baslerGetData. I guess that should work, but I don't have any experience with the external trigger function. Sorry I can't give you a more detailed answer.

ebauch commented 8 years ago

Thanks, i will give it a try and report back!

cluo31 commented 7 years ago

Hi,

I'm a colleague of ebauch.

Recently I have been trying to set up a Basler USB3.0 camera, and I encountered a problem with the TriggerMode parameter: it cannot be set as ‘On' for data acquisition. To be specific, the TriggerMode parameter can be set as ‘On’ using either the baslerSetParameter function or the Pylon software (the status of the parameter is verified in Pylon). However, once the baslerGetParameter function or the baslerGetData function or the baslerSetParameter function (setting up other parameters) is applied to the camera, this TriggerMode parameter would automatically be ‘Off’. Besides, other parameters such as ‘Width’ and ‘PixelFormat’ work fine with all the functions above.

My naive guess would be that the camera initialization overwrites some settings, but couldn't figure out why and where it is. Would you have any suggestions? Thanks a lot!

GaborST commented 6 years ago

Hi, All the functions in this driver are like this: camera.Open(); DoSomething camera.Close(); This is a safe approach, since you can't leave the camera open, but for the price of not able to use TriggerMode 'On'. (By the way, I found another parameter that you can't change in this way: For AcquisitionMode the default value is 'Continuous', but in triggered mode you may want to switch to 'SingleFrame')

You should really use camera.Open(); only once, at the beginning of your code and camera.Close(); once as well at the end. But this means you should rewrite every function here :(