The serial number reported by IMAQdx is different from the camera's (Mightex SCE-BG04-U). Mightex has an application NewClassicCameraApp.exe that uses DirectShow and that application reports the actual serial number as written on the camera.
Also, IMAQdx DirectShow returns a blank empty module name. The Mightex NewClassicCameraApp.exe does show the module name.
IMAQdx DirectShow reports its serial number as two parts, high and low.
With the Mightex DirectShow driver configured for 2 cameras and only one connected to the computer, for serial 13-111213-001 LabVIEW DirectShow reports 3245287108 967846894 decimal or C16F26C4 39B02BEE hex. If the single connected camera is changed to one with a different serial number, the reported IMAQdx DirectShow serial number does not change.
When two cameras are connected at the same time, IMAQdx DirectShow serial number for the first camera does not change from its single camera value of 3245287108 967846894 decimal or C16F26C4 39B02BEE hex while the second camera is reported as 3245287108 967846895 decimal or C16F26C4 39B02BEF hex. Note that the second camera’s serial number changes by a value of 1 yet the true serial number’s digits have changed numerically by 2 (from -001 to -003).
When the Mightex DirectShow driver is configured for only one camera, IMAQdx reports an entirely different serial number from those above.
The IMAQdx DirectShow serial number contains more digits than the true serial number. It has 19 digits (10 for the high portion and 9 for the low). The actual serial number has 11 digits. The module name has 8 characters. The sun of those two is 19 which is the same as the total LabVIEW DirectShow reported serial number. I wonder if IMAQdx is combining the module name with serial number, especially given the fact that IMAQdx does not report a module name.
Mightex has an LVExample.vi program that does return the correct serial number.
The LVExample.vi program has a comment “It's important to have at least 16 chars space while invoking the "GetModeulNo SerialNo()" function, we put "1234567890123456" here.”
That example is using LabVIEW’s Call Library Function Node to access a dll and so I assume that is not the same as DirectShow access but might that comment indicate a similar requirement needs to take place when using DirectShow access and so that maybe the issue with IMAQdx ?
This post states "All the attributes are stored in an XML file that is uploaded to your computer when you plug the camera for the first time. You can find it in C:\Users\Public\Documents\National Instruments\IMAQdx\data"
On my Windows 7 computer, that folder is slightly different but it's cam2.iid file contains the "incorrect" serial number.
So how is IMAQdx obtaining its serial number ?
For DirectShow cameras there is no generic way to retrieve the serial number of the camera without some using vendor-specific API functions. Since IMAQdx uses the serial numbers for identifying specific cameras, associating saved camera settings, etc, we still need that identifier to be unique and track properly when the camera is disconnected and reconnected. To achieve this, IMAQdx retrives a string property that Windows maintains that is the identifier of the device to the system (unique per device instance). This is then run through a hash function which generates a serial number. As you observed, this number will have no bearing on whatever serialization scheme is used by the camera. The only guarantee is that this number should be identical for a given device from boot-to-boot.
Is the serial number not exported as one of the DirectShow properties in the same way that Width for example is ?
The manufacturer's application that also uses DirectShow is able to report the serial number as written on the camera itself. Any idea how they are able to accomplish that ? Or are you saying they must be using some API call that is not part of DirectShow ?
Unfortunately the serial number is not present in any interfaces defined by DirectShow.
Since DirectShow is just a set of defined COM interfaces, it is completely possible for vendors to add additional interfaces to their code that can be dynamically queried by client code that knows about that specific vendor-defined interfaces. It is also possible the vendor example just calls directly into their DLL rather than via DirectShow interfaces.
A perhaps related issue with this particular camera : IMAQdx Enumerate Cameras with Connected Only set True is showing two cameras as being connected when they are not, even after rebooting. What might cause that to happen ? i.e. how does IMAQdx determine of a camera is connected ?
For a DirectShow camera it is simply enumerating the devices from the system. My hunch would be that the Mightex drivers are always reporting a "pseudo device" when their driver is installed, regardless of whether there is a physical device present.
Similar problem here.
I have 2 Basler USB 3.0 acA1920-155um cameras running on my PC (WIn 10, NI-IMAQ February 2013)
Only one camera is shown in the NI-IMAQdx device list. (cam3)
I would need to have cam3 AND cam4.
Strange is that when I disconnect the grabbing camera, it will grab images from the other in cam3...
However, Using Pylon Viewer I see 2 cameras and can control them separately.
Does anybody have any idea about this hick-up?
test this example to find modes of your cameras (if you select correct one you have to see image in both display with no error)
then just put grab part inside a while loop to work with them
mode is number always between 1 to 4