A camera appearing in the first position of a device list does not mean it is connected to the first physical socket. Enumeration can change after a reboot, reconnect or driver update. For a multi-camera inspection station, you need a repeatable relationship between the inspection role, camera identity, acquisition stream and display. Start by separating those relationships, then validate them before showing an image as belonging to a particular station position.
Separate camera identity, interface and display
To assign cameras to ports reliably, treat discovery order as temporary information rather than configuration. Store the intended camera identity for each inspection role, and check its current connection before acquisition begins.
There are four different objects in this mapping:
- Inspection role: the task or position, such as left inspection or overhead inspection.
- Camera identity: a manufacturer-assigned serial number or another documented persistent identifier.
- Transport interface: the network adapter, USB connection path or frame-grabber channel carrying the images.
- Display binding: the relationship between an acquisition session and the view that presents its frames.
A display normally receives an image from an acquisition session. It does not select a physical socket directly. Some software presents a property called a port, but that property might mean a discovery index, logical driver slot or hardware channel. Check its documented meaning before storing it.
The multi-camera acquisition session architecture guide explains how separate device sessions fit together. Use that architecture to keep camera selection independent of window creation and screen position.
Build an inventory of identities and connections
Begin with a commissioning inventory. Record the physical camera label, reported serial number, intended role and observed transport interface. Also record the identifier format and the software component that supplies it.
A serial number is often a useful primary key, but verify its uniqueness and persistence in the supported device documentation. A user-defined camera name helps operators recognize a device; it should not be your only identity check unless your system controls uniqueness.
| Connection type | Identity to verify | Connection information to record | Assumption to avoid |
|---|---|---|---|
| GigE Vision | Camera serial or documented persistent device ID | Host adapter identity and intended network path | An IP address always identifies the same camera |
| USB3 Vision | Camera serial or documented persistent device ID | Host controller and documented connection path, when available | Discovery order matches socket numbering |
| Frame-grabber channel | Camera identity where exposed, plus card identity | Documented board and channel identifiers | A channel index identifies the attached camera |
| Shared network switch | Camera identity independently of host adapter | Intended subnet and network topology | Each camera has a separate host-side port |
For network cameras, changing an address should not silently change the inspection role. Conversely, reaching an expected address is not sufficient proof of identity. Confirm which camera answered.
For USB cameras, several sockets may share a host controller or hub. Connection-path information can help enforce an installation policy, but its persistence depends on the operating system and topology. The Linux USB camera device-selection guide covers the related problem of changing device paths.
Discovery also needs coordination. If several processes initialize cameras simultaneously, start with the checks in camera discovery startup contention before interpreting an incomplete inventory as a wiring fault.
Open devices explicitly and bind their streams
Use the supported acquisition API to select each camera by its documented identity. If that API also supports selecting a transport interface, specify it according to the SDK documentation. Do not assume every transport exposes the same selection options.
A practical initialization sequence is:
- Load the desired mapping. Read each role's expected camera identity, permitted interface and display destination from configuration.
- Enumerate once for reconciliation. Build an observed inventory, keeping identity fields separate from discovery indices.
- Check uniqueness and completeness. Reject duplicate expected identities, missing required cameras and ambiguous matches before starting inspection.
- Open the exact device. Use its documented identity selector, then read back identity information from the opened handle.
- Validate the connection. Compare the observed interface or channel with the installation policy, where the API exposes that information.
- Create a session-to-role binding. Associate the opened session with its inspection role and destination display.
- Start acquisition and verify a fresh frame. Mark the role ready only after a frame from the validated session reaches the intended destination.
The configuration should describe what you want. A separate runtime record should describe what was actually opened. Keeping both makes a mismatch visible instead of overwriting the intended mapping with whatever discovery found.
Bind callbacks to a session object or another stable runtime context. Avoid looking up the destination through a mutable global camera index. Otherwise, a reconnect or list refresh can redirect frames while acquisition continues.
Treat received image buffers according to the acquisition API's ownership rules. If rendering continues after a callback returns, retain the buffer through the supported mechanism or copy it into application-owned memory. A correct identity mapping cannot prevent corruption caused by reusing a released buffer.
For callback and queue problems after binding, use the tests in multi-camera acquisition freezes. If an exception leaves a device unavailable, follow the cleanup sequence in camera handle cleanup after script errors.
Work through a five-camera example
Consider a station with five cameras and five displays. The application needs five explicit role-to-session bindings, but it does not necessarily need five independent host controllers or network adapters.
An example commissioning record could look like this:
| Inspection role | Expected identity record | Connection policy | Display destination |
|---|---|---|---|
| Left | Recorded left-camera serial | Assigned inspection interface | Left view |
| Right | Recorded right-camera serial | Assigned inspection interface | Right view |
| Top | Recorded top-camera serial | Assigned inspection interface | Top view |
| Front | Recorded front-camera serial | Assigned inspection interface | Front view |
| Rear | Recorded rear-camera serial | Assigned inspection interface | Rear view |
These are application labels, not device identifiers. Populate each identity field from the connected device during controlled commissioning, then save it with the station configuration.
The acceptance condition is exact: five required roles must resolve to five distinct camera identities. If only four resolve, keep the unmatched role unavailable. If six devices are discovered, the extra device must not displace a configured camera.
Transport capacity is a separate calculation. For an illustrative, unpacked monochrome stream, estimate payload as:
Assume each camera produces images measuring 1600 × 1200 pixels, with 1 byte per pixel, at 20 frames per second:
These are application assumptions, not specifications for any product below. The estimate excludes protocol overhead, metadata, padding, retransmissions and additional image copies. Use the SDK's reported payload size when the pixel format is packed or otherwise differs from this example.
Correct mapping does not establish sufficient bandwidth. Multiple sockets may still feed a shared controller, uplink or memory path. The multi-camera system design guide covers the broader capture-capacity decision.
Choose hardware without assuming software support
Choose the camera interface around cable routing, acquisition bandwidth and supported software. Then verify that the chosen acquisition stack exposes the identity and interface information your mapping policy requires.
Browse area scan cameras and use the camera finder to narrow the interface choice. A camera's transport specification alone does not establish that your application framework can open it through a particular selector.
The LS-CMR-0053 is a GigE area scan camera candidate. Confirm its supported acquisition software and device-selection methods before designing the binding layer.
- Sensor format
- 1/1.7"
- Lens mount
- C-mount
- Interface
- GigE
- Resolution
- 12 MP
The LS-CMR-0166 is a USB3 area scan camera candidate. Verify persistent identity access and reconnect behavior in the intended host software.
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
Host-side interface hardware also needs checking. Browse frame grabbers and the accessories finder for the relevant transport. More physical connectors do not automatically mean independent bandwidth or identical discovery behavior.
The LS-FGB-0004 is a GigE interface card candidate. Check the supported driver, host compatibility and adapter-identification method for the intended installation.
- Interface
- GigE
Before ordering, ask for confirmation of the complete acquisition path: camera, interface hardware, operating system, driver and application API. If an older display component cannot accept explicitly opened sessions, determine whether its documented interface offers deterministic device selection. Otherwise, changing the acquisition layer may be necessary.
Verify reconnects and handle exceptions deliberately
A successful first launch is not enough. Test the mapping after events that change enumeration or leave old acquisition objects behind.
Use a distinct, non-sensitive target at each camera position. Confirm the target, displayed role and opened-device identity together. Moving a target between views is a stronger check than reading display labels alone.
Run at least these tests:
- Restart the application with all expected cameras connected.
- Restart the host and compare observed identities with the saved mapping.
- Disconnect and reconnect each camera in turn.
- Connect the cameras in a different order.
- Start with one required camera absent.
- Connect an additional, unconfigured camera.
- Attempt acquisition while another authorized application holds a device.
Use only documented connection procedures. Stop affected acquisition and follow hardware guidance before moving connections that are not intended for live disconnection.
On loss of connection, mark that role unavailable and clearly identify any retained image as stale. Cancel or drain pending work according to the API. When reopening, validate identity again before restoring the ready state.
A session-generation value can distinguish frames from an old connection from frames belonging to its replacement. Increment it when rebuilding the session, and discard queued display updates carrying the earlier generation.
There are cases where identity-first assignment needs an additional rule. If calibration belongs to a fixed mounting position, the expected camera on the wrong connector or mount may still be unacceptable. Validate both identity and installation location. If a replacement camera is installed, require an explicit commissioning change and any necessary recalibration.
For fixed-channel hardware without an accessible camera serial, channel-based assignment may be the documented option. Record the card and channel, label the wiring, and verify the scene during commissioning. Recognize that swapping cables can defeat a channel-only identity assumption.
Commissioning checklist and next step
Before releasing the station, check the following:
- Identity: every required role has a unique, documented persistent device identifier.
- Connection: expected interface or channel information is recorded where available.
- Binding: each display receives frames from its assigned acquisition session, not a discovery-list position.
- Readiness: a role becomes available only after device validation and receipt of a fresh frame.
- Recovery: missing cameras remain missing rather than being replaced automatically.
- Buffer handling: display lifetime does not exceed the permitted lifetime of acquisition buffers.
- Capacity: simultaneous capture meets the required sustained payload and processing rate.
- Maintenance: camera replacement and calibration changes follow an explicit commissioning procedure.
If images reach the correct views but their placement is wrong, address that separately with display window size and screen position. Window arrangement should not change device identity or stream ownership.
Start a candidate system in the camera configurator, or contact the applications team with the camera count, interface topology, operating system and acquisition API. Include whether your requirement is identity-based assignment, fixed-connector assignment or both.
The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.
Questions
Can I assign cameras using their discovery-list numbers?
Usually not reliably. A discovery index describes the current device list, and that list can change after connection or startup events. Use a documented persistent camera identifier for selection. If fixed connector placement matters, validate the observed interface separately rather than treating the list index as a socket number.
Does every camera need its own host interface?
Not necessarily. Several cameras may share a network adapter through a switch, while several USB sockets may share a host controller. Independent acquisition sessions establish stream ownership; the physical topology determines available transport capacity. Check both requirements before deciding how many adapters or controllers are needed.
What should happen when an assigned camera disconnects?
Keep the affected inspection role unavailable and report which expected identity is missing. After reconnection, reopen through the documented API, read back the device identity and wait for a fresh frame. Do not silently attach another discovered camera or present an old frame as current.
How should the mapping handle a replacement camera?
Treat replacement as a controlled commissioning change. Record the new persistent identifier, confirm the physical position, and check whether calibration or inspection settings must change. A user-defined role name can remain the same, but it should not automatically authorize an unknown replacement device.
Does assigning cameras to ports synchronize their images?
No. It establishes which device supplies each role, not whether exposures occur together. Synchronized capture needs a separate timing design using supported triggering or clock mechanisms. Verify synchronization at the exposure event when the inspection depends on cameras observing the same instant.


