Package: pylonctl
pylonctlControl basler cameras from de command line.Can also be used as a python library. Components include helpers
to control image acquisition and a library of PyQt widgets.InstallationLinux pre-requisitepylonctl has a dependency on official pylon python wrapper:
the excelentpypylon.At the time of writing this documentation, pypylon is only
available onPypifor Windows.You can, however download the latest wheel for Linux directly from
thepypylon github repo.
Just download the wheel that is most appropriate to your machine and,
from within your favorite python environment type:pip install <wheel file>(ex:pip install pypylon-1.5.4-cp37-cp37m-linux_x86_64.whl)Finally, from within your favorite python environment:pip install pylonctlUsage$pylonctl--helpUsage: pylonctl [OPTIONS] COMMAND [ARGS]...Options:--log-level [debug|info|warning|error]--help                          Show this message and exit.Commands:camera     camera related commandstable      list of available camerastransport  transport related commandsList of transports$pylonctltransporttable+--------------+------------------+---------------------------------+------------------+| DeviceClass  |   FriendlyName   |            FullName             |    VendorName    |+--------------+------------------+---------------------------------+------------------+|  BaslerUsb   |       USB        |    USB/BaslerUsb 5.2.0.13457    |      Basler      |+--------------+------------------+---------------------------------+------------------+|  BaslerGigE  |       GigE       |   GigE/BaslerGigE 5.2.0.13457   |      Basler      |+--------------+------------------+---------------------------------+------------------+| BaslerCamEmu | Camera Emulation | CamEmu/BaslerCamEmu 5.2.0.13457 | Camera Emulation |+--------------+------------------+---------------------------------+------------------+List of cameras$pylonctltable+-----------------------+-----------------+-----------+---------------------------------+------------------------------+--------------+------------+--------------+|       FullName        | UserDefinedName | ModelName |          DeviceFactory          |         FriendlyName         | DeviceClass  | VendorName | SerialNumber |+-----------------------+-----------------+-----------+---------------------------------+------------------------------+--------------+------------+--------------+| Emulation (0815-0000) |                 | Emulation | CamEmu/BaslerCamEmu 5.2.0.13457 | Basler Emulation (0815-0000) | BaslerCamEmu |   Basler   |  0815-0000   |+-----------------------+-----------------+-----------+---------------------------------+------------------------------+--------------+------------+--------------+| Emulation (0815-0001) |                 | Emulation | CamEmu/BaslerCamEmu 5.2.0.13457 | Basler Emulation (0815-0001) | BaslerCamEmu |   Basler   |  0815-0001   |+-----------------------+-----------------+-----------+---------------------------------+------------------------------+--------------+------------+--------------+| Emulation (0815-0002) |                 | Emulation | CamEmu/BaslerCamEmu 5.2.0.13457 | Basler Emulation (0815-0002) | BaslerCamEmu |   Basler   |  0815-0002   |+-----------------------+-----------------+-----------+---------------------------------+------------------------------+--------------+------------+--------------+| Emulation (0815-0003) |                 | Emulation | CamEmu/BaslerCamEmu 5.2.0.13457 | Basler Emulation (0815-0003) | BaslerCamEmu |   Basler   |  0815-0003   |+-----------------------+-----------------+-----------+---------------------------------+------------------------------+--------------+------------+--------------+camera information$pylonctlcamera--host=10.20.30.40infoAddress: 10.20.30.40:3956DefaultGateway: 10.20.30.254DeviceClass: BaslerGigEDeviceFactory: GigE/BaslerGigE 5.2.0.45678DeviceVersion: 104845-21FriendlyName: hpcal (2210004)FullName: Basler acA1300-30gm#004050607080#10.20.30.40:3956Interface: 10.20.30.1IpAddress: 10.20.30.40IpConfigCurrent: 6IpConfigOptions: 7MacAddress: 004050607080ModelName: acA1300-30gmPortNr: 3956SerialNumber: 2210004SubnetAddress: 10.20.30.255SubnetMask: 255.255.255.0UserDefinedName: hpcalVendorName: BaslerXMLSource: Devicecamera parameters$pylonctlcamera--model=EmulationparamtreeRoot├── AOI│   ├── Height│   │   ├── limits: (1, 4096)│   │   ├── readonly: False│   │   ├── step: 1│   │   ├── suffix:│   │   ├── tip: Sets the height of the area of interest in pixels.│   │   ├── title: Height│   │   ├── type: int│   │   └── value: 1040│   ├── HeightMax│   │   ├── limits: (1040, 32768)│   │   ├── readonly: False│   │   ├── step: 1│   │   ├── suffix:│   │   ├── tip: Indicates the maximum allowed height of the image in pixels.│   │   ├── title: Max Height│   │   ├── type: int│   │   └── value: 4096│   ├── OffsetX│   │   ├── limits: (0, 3072)│   │   ├── readonly: False│   │   ├── step: 1│   │   ├── suffix:│   │   ├── tip: Sets the X offset (left offset) of the area of interest in pixels.│   │   ├── title: X Offset│   │   ├── type: int│   │   └── value: 0...├── TransportLayer│   ├── ForceFailedBuffer│   │   ├── readonly: False│   │   ├── tip: Marks the next buffer as failed.│   │   ├── title: Force Failed Buffer│   │   └── type: action│   ├── ForceFailedBufferCount│   │   ├── limits: (1, 1024)│   │   ├── readonly: False│   │   ├── step: 1│   │   ├── suffix:│   │   ├── tip: Number of failed buffers to generate.│   │   ├── title: Failed Buffer Count│   │   ├── type: int│   │   └── value: 100│   ├── PayloadSize│   │   ├── limits: (-9223372036854775808, 9223372036854775807)│   │   ├── readonly: True│   │   ├── step: 1│   │   ├── suffix:│   │   ├── tip: Size of the payload in bytes.│   │   ├── title: PayloadSize│   │   ├── type: int│   │   └── value: 1064960│   ├── readonly: True│   ├── tip: This category includes items related to the IIDC 1394 transport specif[...]│   ├── title: Transport Layer│   └── type: group├── readonly: True├── title: Root└── type: group$pylonctlcamera--model=Emulationparamtree+------------------------------------------+------------------+--------+--------+|                   Name                   |      Value       |  Type  | Access |+------------------------------------------+------------------+--------+--------+|                   AOI                    |       None       | group  |   RO   |+------------------------------------------+------------------+--------+--------+|         AcquisitionFrameRateAbs          |       10.0       | float  |   RW   |+------------------------------------------+------------------+--------+--------+...+------------------------------------------+------------------+--------+--------+|             UserSetSelector              |       None       |  list  |   RW   |+------------------------------------------+------------------+--------+--------+|                  Width                   |       1024       |  int   |   RW   |+------------------------------------------+------------------+--------+--------+|                 WidthMax                 |       4096       |  int   |   RW   |+------------------------------------------+------------------+--------+--------+AcquistionInternal triggerpylonctl --log-level=debug camera --model=Emulation acquire -n 3 -e .1Acquiring 3 frames on Basler Emulation (0815-0000) (Total acq. time: 0.300s)2020-05-04 21:33:30,812 DEBUG MainThread Emulation (0815-0000): OnOpened: Preparing network parameters2020-05-04 21:33:30,813 DEBUG MainThread Emulation (0815-0000): OnOpened: Finished configuration2020-05-04 21:33:30,955 INFO MainThread Emulation (0815-0000): Grabbed (1040, 1024) uint82020-05-04 21:33:31,067 INFO MainThread Emulation (0815-0000): Grabbed (1040, 1024) uint82020-05-04 21:33:31,201 INFO MainThread Emulation (0815-0000): Grabbed (1040, 1024) uint8Elapsed time: 0.362473sSoftware triggerpylonctl --log-level=debug camera --model=Emulation acquire -t software -n 3 -e 1Acquiring 3 frames on Basler Emulation (0815-0000) (Total acq. time: 3.000s)2020-05-04 21:32:42,855 DEBUG MainThread Emulation (0815-0000): OnOpened: Preparing network parameters2020-05-04 21:32:42,856 DEBUG MainThread Emulation (0815-0000): OnOpened: Finished configurationPress any key to trigger acquisition 1 of 3...2020-05-04 21:32:46,123 INFO MainThread Emulation (0815-0000): Grabbed (1040, 1024) uint8Press any key to trigger acquisition 2 of 3...2020-05-04 21:32:47,675 INFO MainThread Emulation (0815-0000): Grabbed (1040, 1024) uint8Press any key to trigger acquisition 3 of 3...2020-05-04 21:32:49,312 INFO MainThread Emulation (0815-0000): Grabbed (1040, 1024) uint8Elapsed time: 6.425155s