跳转到内容

pylon GigE Configurator(CLI 版本)#

本主题概述了 pylon GigE Configurator 的命令行版本。

使用 Configurator#

该工具提供了三种配置模式。根据您的要求,选择是要使用该工具来配置整个系统,还是仅配置部分系统:

此外,还有一种试运行模式,可让您在实际运行该工具之前检查该工具所做的更改。如果需要,可以记录任何更改。

运行 Configurator#

运行 pylon GigE Configurator 的命令行版本:

  1. 确保已安装 pylon 7.1 或更高版本。
  2. 打开命令行。
  3. 在命令行上,导航到您的 pylon 安装目录,例如:%programfiles%\Basler\pylon x\Runtime\x64 (Windows) 或 /opt/pylon x/bin (Linux)。
  4. 从命令行运行 PylonGigEConfigurator

信息

  • 为了配置网络适配器,配置程序需要以管理员或 sudo 权限启动。
  • 为避免网络冲突,请确保只有相机连接到您的网络适配器或交换机。

可用命令#

该工具接受以下命令和选项:

命令 解释
list 显示活动网络适配器及其当前配置的列表。
auto-ip 配置网络适配器以及连接的相机的 IP 地址和子网掩码。
auto-opt 优化网络适配器和系统设置(例如,巨型帧、中断调整率、接收描述符)以实现最佳流媒体性能。
auto-all 同时运行 auto-opt 和 auto-ip。
选项 解释
-h or --help 显示帮助。
-l or --log <filename> Logs to the file specified. Defaults to <TEMP>/<appname>_<timestamp>.log.
-n or --dry-run 启用试运行模式。这允许您在设置任何参数之前检查建议的更改。
-a or --adaptername <name> 强制分配 IP 地址和/或优化指定适配器的设置。
--class <A, B, C> 设置 IP 地址时,使用指定网络类中的专用地址。有效的网络类为 A、B 或 C。默认为 C。

示例#

PylonGigEConfigurator list

PylonGigEConfigurator auto-all -h

PylonGigEConfigurator auto-ip -a "Ethernet 2" --class C

优化系统#

The auto-all command optimizes your GigE network and camera setup in one single step.

命令语法
PylonGigEConfigurator auto-all [-a <name> ...] [--class <A | B | C>] [-n] [-h] [-l <filename>]

运作原理#

Executing the auto-all command does the following:

  1. Runs the auto-ip command to configure the IP addresses and subnet masks of network adapters and attached cameras.
  2. Runs the auto-opt command to configure your network adapters and your system settings for best streaming performance.

如需了解详情,请参阅这两个命令的文档。

配置 IP 地址#

The auto-ip command configures the IP addresses and subnet masks of network adapters and attached cameras.

命令语法
PylonGigEConfigurator auto-ip [-a <name> ...] [--class <A | B | C>] [-n] [-h] [-l <filename>]

The auto-ip command scans all local GigE network adapters and checks for connected cameras. If no camera has been detected, the given adapter is skipped and won't be configured.

然后,该工具按升序配置所有 GigE 网络适配器及其连接的相机的 IP 地址。

You can force the IP configuration of a network adapter by using the -a option, followed by the adapter's name. In this case, the adapter will always be configured, regardless of whether a camera is connected or not.

Also, you can configure a network adapter within the address ranges of other network classes, e.g., class A or class B. To do so, use the the --class option followed by the class type, e.g., --class B.

If you omit the --class option, the tool automatically uses the address range from network class C, e.g., 192.168.xxx.xxx.

示例#

PylonGigEConfigurator auto-ip
PylonGigEConfigurator auto-ip -a "Ethernet 2" -a "Ethernet 3"
PylonGigEConfigurator auto-ip -a "Ethernet 2" --class C

配置网络设置#

The auto-opt command optimizes your network adapters and your system settings for best streaming performance.

命令语法
PylonGigEConfigurator auto-opt [-a <name> ...] [-n] [-h] [-l <filename>]

The auto-opt command scans all local GigE network adapters and checks for connected cameras. If no camera has been detected, the given adapter is skipped and won't be configured.

然后,该工具会按升序优化所有连接的相机的 GigE 网络适配器。

You can force the optimization of a network adapter by using the -a option, followed by the adapter's name. In this case, the adapter will always be configured, regardless of whether a camera is connected or not.

要了解哪些参数将被优化,请阅读“受影响的网络参数”主题。

示例#

PylonGigEConfigurator auto-opt

PylonGigEConfigurator auto-opt -a "Ethernet 2"

试运行模式#

试运行模式允许您在应用更改之前检查对系统的更改。

在试运行模式下,配置器会向您显示在您执行该工具时将执行的所有配置和优化步骤。

You can enable the dry-run mode by using the -n or --dry-run option with any command.

示例#

PylonGigEConfigurator auto-all -n

PylonGigEConfigurator auto-ip -n

PylonGigEConfigurator auto-opt -n

记录更改#

配置器允许您创建日志文件供诊断之用。

命令语法
PylonGigEConfigurator auto-opt [-a <name> ...] [-n] [-h] [-l <filename>]

You can log all changes made by the configurator with the -l or --log option. If you want to log the changes to a user-defined file and directory, append the file name, e.g., -l log.txt.

默认情况下,配置器会将所有更改记录到以下临时文件夹的日志文件中:

  • Windows : %TEMP%\PylonGigEConfigurator_<timestamp>.log
  • Linux : ~/.local/temp/PylonGigEConfigurator_<timestamp>.log

示例#

PylonGigEConfigurator auto-all -l log.txt