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

Node is not writable : AccessException thrown in node 'TriggerMode' while calling 'TriggerMode.FromString()' #617

Open akbarsharghi opened 1 year ago

akbarsharghi commented 1 year ago

Hello everyone!

I want to enable the software trigger in the Basler camera from python script, please see the following code:

    img = pylon.PylonImage();
    tlf = pylon.TlFactory.GetInstance();
    cam = pylon.InstantCamera(tlf.CreateFirstDevice());

    # Enable software triggering
    cam.TriggerSelector = "FrameStart"
    cam.TriggerMode = "On"
    cam.TriggerSource = "Software"

but it raises an issue in the output:

File "/usr/local/lib/python3.8/dist-packages/pypylon/genicam.py", line 2316, in SetValue return _genicam.IEnumeration_SetValue(self, entry) _genicam.AccessException: Node is not writable : AccessException thrown in node 'TriggerMode' while calling 'TriggerMode.FromString()' (file 'ValueT.h', line 85)

Could you please guide me in this regards?

thiesmoeller commented 1 year ago

cam.Open() is missing... See the readme or samples