Impact Acquire SDK Python
|
The following table shows where to find files belonging to the Impact Acquire framework on a target machine where the framework has been installed.
Library | 32-bit system - 32-bit library | 32-bit system - 64-bit library | 64-bit system - 32-bit library | 64-bit system - 64-bit library |
---|---|---|---|---|
BVS_CA-BN.[some letter].[0-3].dll | - | - | - | "%windir%\system32" |
mvBlueFOX.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mvDeviceManager.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mvDisplay.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mvGenTLConsumer.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mvGenTLProducer.cti | "%MVIMPACT_ACQUIRE_DIR%\bin" | - | "%MVIMPACT_ACQUIRE_DIR%\bin" | "%MVIMPACT_ACQUIRE_DIR%\bin\x64" |
mvGenTLProducer.PCIe.cti | - | - | - | "%MVIMPACT_ACQUIRE_DIR%\bin\x64" |
mvImageProcessing.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mvIMPACT_Acquire.jar | "%MVIMPACT_ACQUIRE_DIR%\bin" | - | "%MVIMPACT_ACQUIRE_DIR%\bin" | "%MVIMPACT_ACQUIRE_DIR%\bin\x64" |
mvIMPACT_Acquire.java.dll | "%MVIMPACT_ACQUIRE_DIR%\bin" | - | "%MVIMPACT_ACQUIRE_DIR%\bin" | "%MVIMPACT_ACQUIRE_DIR%\bin\x64" |
mvPropHandling.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mvVirtualDevice.dll | "%windir%\system32" | - | "%windir%\SysWOW64" | "%windir%\system32" |
mv.impact.acquire.dll (.NET) | "%MVIMPACT_ACQUIRE_DIR%\bin\.NET" | |||
mv.impact.acquire.display.dll (.NET) | "%MVIMPACT_ACQUIRE_DIR%\bin\.NET" | |||
mv.impact.acquire.display.extensions.dll (.NET) | "%MVIMPACT_ACQUIRE_DIR%\bin\.NET" | |||
mv.impact.acquire.examples.helper.dll (.NET) | "%MVIMPACT_ACQUIRE_DIR%\bin\.NET" | |||
mv.impact.acquire.dll (.NET Standard) | "%MVIMPACT_ACQUIRE_DIR%\bin\netstandard2.0" | |||
mv.impact.acquire.display.dll (.NET Standard) | "%MVIMPACT_ACQUIRE_DIR%\bin\netstandard2.0" | |||
mv.impact.acquire.display.extensions.dll (.NET Standard) | "%MVIMPACT_ACQUIRE_DIR%\bin\netstandard2.0" | |||
mv.impact.acquire.examples.helper.dll (.NET Standard) | "%MVIMPACT_ACQUIRE_DIR%\bin\netstandard2.0" |
To operate a Balluff imaging or image capture device with the Impact Acquire framework some common files are needed for every device on the target system:
As the user-mode part of this SDK internally make use of Open MP (http://openmp.org/) on Windows® a matching version of the Open MP runtime must be installed on the target system as well. Current versions of the libraries are linked against the Microsoft Visual Studio® 2019 version of the Open MP runtime. The corresponding merge modules or redistributables can be obtained from Microsoft. See here as well: Windows®
libexpat.dll
is no longer shipped with the installation package, as it is no longer needed by any of the modules belonging to the Impact Acquire interface. This might force you to modify your installer.All these files can be either be copied somewhere in the systems path or into the applications directory.
With these files the device can be used and configured from an application. Some features however require some additional installation work:
In general any version of Windows® requires you to install properly signed kernel/device drivers. Unfortunately the signature requirements did change over the years and therefore different Windows version require differently signed drivers. The actual kernel driver is always the same in almost every scenario however the signature attached to the file is NOT and therefore the full file is different. When working with the *.msm-files for the driver installation the merge modules internal logic will detect the version of Windows the installation is running on and will then install the matching version of the device driver. Internally this is achieved by putting EVERY version of the kernel driver into the merge module and then only the correct version gets installed. When not using the merge modules this has to be implemented as well. If just a single version of Windows is targeted the easiest approach is to install the Impact Acquire package on that system and get the related driver files from the full installation. Which files are needed for which device is described further down in this chapter. Right now Impact Acquire usually comes with drivers for the following versions of Windows:
Windows version | Used Signature |
---|---|
Vista, 7, 8, 8.1, 10(smaller than release 1607) and Server 2008 | SHA256 |
Windows 10 greater or equal version 1607 and Windows 11 | SHA256 EV |
See Windows® as well!
In case an application makes use of the mvDisplay.dll library this must be deployed on the target system as well. The same restrictions, path information, etc. as in the previous section apply.
In order to allow the application to load and store settings in the registry these keys must be created during the installation:
HKEY_LOCAL_MACHINE/Software/Balluff/Settings
HKEY_CURRENT_USER/Software/Balluff/Settings
If the keys are missing settings can still be loaded and stored in the platform independent XML format by using the appropriate functions discussed in the chapters describing the software interface.
If your application shall be able to generate log output the following directory must be created on the target system:
"%PUBLIC%/Documents/Balluff/ImpactAcquire/Logs"
Apart from that these files must be installed into "%PUBLIC%/Documents/Balluff/ImpactAcquire/Logs":
The first file is discussed in detail in the logging chapter of this manual, the latter files are only needed if the standard Balluff Impact Acquire log-file style shall be used(XML with stylesheet transformation). To find out how to embed your own log-file stylesheet please refer to the chapter about the logging mechanism. Here it also explained how to create plain XML log files and XML files that can be viewed using mvLogFileViewer.html.
If your application shall be able to work with camera description files and does NOT modify the property before initialising the device the following directory must be created on the target system:
"%PUBLIC%/Documents/Balluff/ImpactAcquire/CameraFiles"
All camera description files that shall be used by the application must be installed into the folder CameraFiles
in order to be recognized by the driver.
In case an application makes use of the Impact Acquire .NET interface the corresponding libraries must be deployed on the target system as well. Were and what version of these libraries must be shipped is explained in the Building, Linking And Running Applications Using Impact Acquire chapter of the .NET API manual.
Depending on the used functionalities the following libraries might be necessary:
In case an application makes use of the Impact Acquire .NET Standard interface the corresponding libraries must be deployed on the target system as well. Were and what version of these libraries must be shipped is explained in the Building, Linking And Running Applications Using Impact Acquire chapter of the .NET API manual.
Depending on the used functionalities the following libraries are necessary:
In case an application makes use of the Java to Impact Acquire native interface the mvIMPACT_Acquire.java.dll library must be deployed on the target system as well. The same restrictions, path information, etc. as in the Common Files Needed For Every Device Family section apply.
Distributing the Impact Acquire Python API requires some additional work as the Python interface has to be compiled for the specific target platform first. The same restrictions, path information, etc. as in the Common Files Needed For Every Device Family section apply.
Please refer to Windows® for more details.
The resulting package will be located at %MVIMPACT_ACQUIRE_DIR%\LanguageBindings\Python\Output
. Depending on the Python version which should be used the resulting directory might be named according to the Python version it has been built for, e.g.:
lib.win32-3.8
for Python 3.8Impact Acquire < 3.0.1
) lib.win32-2.7
for Python 2.7The mvVirtualDevice library as well as the load/save image API of Impact Acquire make use of the FreeImage project.
The load/save video stream API makes use of the FFmpeg project. In order to use these features have a good look at the legal notice section and the video stream related API documentation. All details can be found there.
For all GenICam™ based devices the following files will be necessary:
In case of mvUSB3Vision or GigE Vision™ devices:
In case of BVS CA-BN devices:
For the GenICam cache it is necessary to make use of the environment variable MVIMPACT_ACQUIRE_DATA_DIR which will be used to store data like the log files generated by Impact Acquire, firmware update files or the GenICam cache. The variable has to be defined to a directory with the following structure:
If the GigE Vision™ capture filter kernel-mode driver shall be used the following files must be shipped as well:
For 32-bit support:
For 64-bit support:
mvGigECapture.sys
that is installed on the target system will differ from Windows® version to Windows® version. Currently Windows 2000 will need a different version of this file than newer versions of Windows. To obtain the correct file needed for the target platform the original installer must be installed on the system in question. Thus to build an installer for Windows 2000 the *.sys-file must be obtained from a Windows 2000 system. When working with the merge modules this will be done automatically.If the GigE Vision™ capture filter kernel-mode driver shall be used the following files must be shipped as well:
For 32-bit support:
For 64-bit support:
To actually install the GigE Vision™ capture filter driver on the system there are 3 ways to go: Either the tool GigEConfigure or the built-in mechanism of Windows® to install a filter driver can be used.
Using GigEConfigure there are 2 possibilities:
Using the built-in mechanism of Windows® works like this:
First navigate to any of the network connections available to the system and open the properties dialog of that connection.
Here click on Install
...
In the next Windows® select Service and click on Add
....
Now click on Have Disk...
.
Click on Browse
... and navigate to the folder containing the GigE Vision™ capture filter kernel-mode driver files mentioned above.
Select the file mvGigECapture.inf
and click on Open
Click on OK
Afterwards the GigE Vision™ capture filter driver will installed and active on EVERY network connection of the system. If that is not desired, it can be enable and disabled from the properties dialog of the network connection that shall be modified by checking or unchecking the box in from of the Balluff Impact Acquire filter driver entry.
The third approach is a possibility provided by the functionality of the mvGenTLProducer.cti which allows to install the GigE Vision™ capture filter driver using the Impact Acquire API. At first there are some values which have to be written to the Registry of Windows® to specify the GigE Vision™ support and the path to the GigE Vision™ filter driver which shall be installed
The entry HKEY_LOCAL_MACHINE/SOFTWARE/Balluff/Settings
has to be generated and afterwards the keys from the following table have to be created.
Name | Type | Value |
---|---|---|
GEV_SUPPORT | DWORD | 1 |
GEV_DRIVER_SOURCE_PATH | String | MVIMPACT_ACQUIRE_DIR%\KernelDrivers\mvGigECaptureDriver(x64)(SHA256.EV)\mvGigECapture2.inf |
GEV_DRIVER_SOURCE_PATH
might differ depending on the source of the kernel driver files. See General Considerations When Shipping Kernel Drivers as well. Afterwards some small application needs to load the required TLIMV_InstallDriverFromRegistry
function from mvGenTLProducer.cti. The following code shows how this would work:HKEY_LOCAL_MACHINE
entries, the application utilizing this functionality needs to be called with administrator permissions. Of course this cannot only be done using a C/C++ application as shown here but also by any other mechanism that can write to the Registry and can call a DLL function that doesn't require parameters. So this can also be done from within a WiX installation package or some C# application for example.For USB3 Vision™ device support the following files correctly signed for the target platform must be shipped as well:
For 32-bit support:
For 64-bit support:
Experienced users are encouraged to use the Microsoft Driver Install Framework for applications to deploy this driver on the target system (http://msdn.microsoft.com/en-us/library/ms790295.aspx). This is the recommended way for installing device drivers.
For BVS CA-BN device support the following files correctly signed for the target platform must be shipped as well:
For 32-bit support:
For 64-bit support:
Experienced users are encouraged to use the Microsoft Driver Install Framework for applications to deploy this driver on the target system (http://msdn.microsoft.com/en-us/library/ms790295.aspx). This is the recommended way for installing device drivers.
Apart from that, the GenICam™ runtime this framework has been linked with must be installed on the target system. The runtime modules are contained in the merge modules belonging to this installation package.
The framework will try to locate the GenICam™ runtime in %MVIMPACT_ACQUIRE_DIR%/Toolkits/GenICam_v<major>_<minor> thus if you plan to distribute the runtime in a different way you need to setup you environment accordingly as described by the GenICam™ standard.
The files belonging to the kernel driver correctly signed for the target platform:
amvBlueFOX2.inf
is NOT a mistake. The reason for this strange file name is that Windows 2000 by default uses the first *.inf-file in an alphabetical search that matches the detected device. As previous versions of this driver package contained 2 versions of the kernel driver, the 'older' versions *.inf-files name was mvBlueFOX.inf
and in order to install the newer version of the kernel driver as a default driver the new *.inf-file must be found before the old one as Windows does not list all available drivers but only the first one detected.The kernel driver files should be installed BEFORE connecting the device to the target system the first time as then Windows automatically detects the driver.
*.cat files can't just be copied into some system specific directory. Please refer to the corresponding documentation by Microsoft.
In addition to this a Windows® driver framework co-installer is needed. This file must be copied into the Windows® system (system32) folder. Both the 32-bit and the 64-bit version of the driver need 'WdfCoinstaller01009.dll' for the driver installation. If the co-installer is not present on the target system they must be copied as well.
Experienced users are encouraged to use the Microsoft Driver Install Framework for applications to deploy this driver on the target system (http://msdn.microsoft.com/en-us/library/ms790295.aspx). This is the recommended way for installing device drivers.
These files alone will correctly install the mvBlueFOX as a recognized device on the target system. However to access the device from any kind of application the base libraries for the Impact Acquire interface will be needed as well.
mvVirtualDevice is able to connect to the FreeImage library for loading JPEG, PNG and TIFF images from hard disk. See FreeImage Support for details. The libary will try to load the FreeImage libraries from %MVIMPACT_ACQUIRE_DIR%/Toolkits//FreeImage3160/bin/Release/FreeImage/<platform> so this is where the library needs to be to make this work.