ApplicationsHow-to

Teach two parts in one vision program: separate snapshot positions

Teach two parts to one vision program: a camera locate node per part, each with its own snapshot position and calibration taken at that height.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01What a camera locate node carries
  2. 02Size the two standoffs before you teach
  3. 03Worked example: 178 mm plate and 51 mm cover
  4. 04Set up the program step by step
  5. 05Hardware that runs two nodes
  6. 06Checks before the cell runs
  7. 07Common mistakes that break the second node
  8. 08When a single node is the better answer
  9. 09Questions

A pick-and-place cell rarely handles one part at one size. The program locates a 178 mm (7 in) plate on the bench, picks it, and then has to find a 51 mm (2 in) mating cover — or check a detail on the part it just picked — and a single snapshot position serves both badly: the wide view starves the small part of pixels, and the close view cannot see the plate at all. The fix is structural, not a lens swap. Give the program a camera locate node per part, let each node keep its own snapshot position, and calibrate each one at its own height. This guide sizes the two standoffs with the field-of-view formula, walks through the setup, and lists the checks that catch the usual mistakes before the cell runs.

What a camera locate node carries

A camera locate node bundles three things: a snapshot position, which is the camera pose the image is taken from; a calibration, which is the pixel-to-millimetre map measured for that pose; and a teach model, which is what the part looks like in that image. Two parts means two nodes. Both nodes live in the same program and run in sequence, and they share nothing but the camera hardware.

The property that makes the scheme work is that the calibration is stored per snapshot position. Node 1 can be calibrated at a 540 mm standoff over the bench while node 2 is calibrated at 155 mm over the fixture, and the software keeps the two pixel maps apart. A calibration is always required when a snapshot position is created, and the target sits in that node's part plane. The snapshot pose and the calibration pose do not have to be the same place; they only have to describe the same geometry.

Each node is set up once and then reused every cycle, and the second node is created exactly like the first. The node and calibration sequence is written up step by step in configuring snapshot positions for camera locate nodes.

Size the two standoffs before you teach

Work each node's standoff backwards from the field of view its part needs: the part's largest dimension plus placement tolerance on both sides. The pinhole estimate below ignores lens distortion and lands within a few percent at these working distances.

FOV ≈ WD × sensor width / f WD ≈ FOV × f / sensor width

A 1/2.9-inch sensor is about 4.4 mm wide: the format's diagonal is about 5.5 mm, and a 4:3 sensor's width is roughly 0.8 times its diagonal. If your sensor's active area differs, the standoff shifts by the same percentage — 5% on sensor width is 27 mm at a 540 mm standoff. Keep one focal length and let the standoff absorb the difference between the parts.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Fix three inputs before teaching: the camera and lens, with one camera serving both nodes; the part-plane height at each station; and the placement tolerance the robot adds at each station. On the bench you need the calibration target, a repeatable fixture for the close pose, and a light per station, because the two heights want very different light levels — the worked example puts a number on that too.

Worked example: 178 mm plate and 51 mm cover

One camera: 1.6 MP image, about 1440 pixels wide; 1/2.9-inch sensor, about 4.4 mm wide; 12 mm lens. Part A is a 178 mm (7 in) square plate placed with ±10 mm tolerance; Part B is a 51 mm (2 in) square cover placed with ±3 mm tolerance.

Node 1 must frame the plate. Field of view target: 178 + 2 × 10 = 198 mm. Standoff: WD = 198 × 12 / 4.4 = 540 mm. At that distance the field is 540 × 4.4 / 12 = 198 mm and the scale is 198 / 1440 ≈ 0.14 mm per pixel, which leaves the planned 10 mm of margin on each side.

Node 2 must frame the cover. Field target: 51 + 2 × 3 = 57 mm. Standoff: WD = 57 × 12 / 4.4 ≈ 155 mm. The field there is 155 × 4.4 / 12 ≈ 57 mm, about 3 mm of margin per side, and the scale is 57 / 1440 ≈ 0.04 mm per pixel. Each part fills the same fraction of its own frame, about 1,290 pixels across in both views, because the fields were sized the same way.

Node Part Field target Standoff Field at standoff Scale Pixels across part
1 178 mm plate 198 mm 540 mm 198 mm ≈ 0.14 mm/px ≈ 1290
2 51 mm cover 57 mm 155 mm 57 mm ≈ 0.04 mm/px ≈ 1290

Why two nodes? At node 1's scale the cover still spans about 371 pixels, enough to locate it, but a 0.5 mm marking spans 3.6 pixels there and 13 pixels at node 2, so any detail check needs the close view. Light pulls the same way: a compact source at 540 mm delivers (540 / 155)² ≈ 12 times less light than at 155 mm, so node 1 wants a longer exposure or a brighter channel. Set exposure per node and drive the two levels separately; the drift side of that problem is covered in ambient light variation in pick and place vision.

Set up the program step by step

  1. Park the camera at node 1's pose — 540 mm above the bench in the example, lens axis square to the part plane — and define it as snapshot position 1.
  2. Set focus once, for the pose you cannot trade away. A manual-focus lens has one physical setting, so set it while watching the closer node, then check the wide view; if the wide view goes soft, stretch node 1's standoff and recompute.
  3. Calibrate node 1 with the target flat on the bench, the surface the plate actually occupies.
  4. Teach the plate model to node 1, then jog the plate ±10 mm in both axes and confirm the locate holds; the set-up notes in vision locate for robot part picking cover rotation and clutter.
  5. Move the camera to node 2's pose, 155 mm above the fixture, and define snapshot position 2.
  6. Calibrate node 2 with the target in the fixture's part plane, not on a stand above it.
  7. Teach the cover, or the detail feature you need to see, as node 2's model.
  8. Wire the flow: node 1 locates, the robot picks, the arm carries the part to the close pose, node 2 locates or checks, the robot places. If the close station is a tray or nesting fixture, its cavity can be taught as its own target, as in teaching a cavity as a part.
  9. Run 20 to 30 cycles and log both nodes' outputs before you call the cell done.

Hardware that runs two nodes

Both nodes run wherever the program lives. A smart camera inspects on the device with no PC, which suits a fixed two-station cell; a camera-plus-controller set-up suits a cell where the robot handshake, logging and light control belong in one place. The profile the worked example uses — 1.6 MP, 1/2.9-inch sensor, 12 mm manual-focus lens, Fast Ethernet — is this vision sensor, and the 6 MP mono smart camera with an 8 mm lens buys resolution for a busier close-up node.

Smart cameras & vision sensorsHikrobot MV-SCB007EC-12S-WBN SCB vision sensor, 1.6 MP, Color, 12 mm lens, Manual focusMV-SCB007EC-12S-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
$1,989.00 · quotedView and quote
Smart cameras & vision sensorsHikrobot MV-SC5060XM-08M-WBN SC5000X series Smart Camera, 6 MP, Mono, 8 mm focal length, M12-mountMV-SC5060XM-08M-WBN
Interface
GigE
Resolution
6-10 MP
$1,629.00View part

When the second node grows into a full inspection step, a VC5000 vision controller with 32 GB of memory carries the program, its PoE camera ports feed the camera over one cable, and its eight built-in light channels run the wide and close-up lights at separate levels. The wide node's roughly 12-to-1 light deficit is exactly what those separate channels absorb.

Vision controllersHikrobot MV-VC5525-256G70-NN VC5000 Vision Controller, 12th-I5, 32GB+256G SSD, Supported PCIEMV-VC5525-256G70-NN
LAN ports
5+ LAN ports
USB 3 ports
3-4 USB 3 ports
PoE
PoE camera ports
Light outputs
8 built-in channels
$4,479.00 · quotedView and quoteBuild a system with it

Browse the smart cameras and vision controllers categories, or filter by interface and shutter in the camera finder.

Checks before the cell runs

  • Scale check per node: image a 50 mm reference lying in each part plane. Node 2's calibration should read 50 mm within a few tenths of a millimetre; a high reading means the target sat above the part plane.
  • Sharpness at both heights under the one focus setting, and refocus or restandoff before teaching, never after.
  • Border margin: no taught feature within 10 pixels of the frame edge in the worst-case placement.
  • Exposure per node inside the cycle budget: the wide node wants roughly 12 times more light or exposure in this example.
  • Repeatability: 20 to 30 cycles with both nodes reporting inside the tolerances you taught around.
  • The wider feasibility questions — contrast, clutter, part presentation — are the ones in can vision locate this part?, worth a pass before hardware is ordered.

Common mistakes that break the second node

  • Reusing node 1's calibration on node 2's image: the scale is off by the standoff ratio, 540 / 155 ≈ 3.5 in the example, and every offset the robot receives is wrong by the same factor.
  • Calibrating with the target on a stand: the scale error is the height offset divided by the standoff, and it inflates every measurement that node returns.
  • Focus set at the wide node only: the close node is the one that punishes soft focus at 0.04 mm per pixel.
  • One exposure for both nodes: the wide view comes back dark or the close view blown.
  • Snapshot pose drift on a wrist-mounted camera: the approach must repeat, so watch the frame corners after any collision or cable service.

When a single node is the better answer

If both parts sit in the same plane and the wide view already gives the small part enough pixels, one node with two teach models is simpler — multiple objects in one snapshot is that pattern pushed to a whole tray. In the worked example the cover spans about 371 pixels at the wide standoff, so a locate-only task for both parts could stay single-node. Add the second node when the size ratio starves the small part — a 10 mm cover spans only 73 pixels at 0.14 mm per pixel — when a detail check is in scope, or when the two stations sit at different heights anyway.

Two nodes at two heights is also not the same problem as stitching several snapshot positions to widen one field of view; that variant is covered in multiple snapshot positions to cover a large table. More set-ups like this sit in the applications topic.

Build the whole station

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.

Start with the camera

Questions

Can the snapshot position and the calibration position be different?

Yes. The snapshot position is where the camera shoots from; the calibration is measured with a target sitting in that node's part plane. The two describe one geometry as long as the target plane matches the plane the part occupies at shot time. Put the target on a stand instead and the scale inherits the offset: a 20 mm stand at a 155 mm standoff inflates every measurement by about 13%.

How different in size can the two parts be?

The example spans a 178 mm plate and a 51 mm cover, a 3.5-to-1 field-of-view ratio from one 12 mm lens, because each node is calibrated at its own height. The binding limits are optical, not the teach step: sharpness at both standoffs from one manual-focus setting, and light at the 540 mm node, where a compact source delivers about 12 times less than at 155 mm. If the close view goes soft, move that standoff back and recompute.

Can the second node inspect the part after the pick instead of locating a second part?

Yes, it is the same structure. After the pick, the robot carries the part to the close snapshot position and the second node checks a detail: a marking, a fitted component, an assembled state. Calibrate the node at the close height, teach the detail as its own model, and treat its result as a pass-or-fail check rather than a robot target, since the part pose is already known from the first node.

How much margin should each field of view leave around the part?

Cover the robot's placement spread first: the example leaves 10 mm per side around the 178 mm plate and about 3 mm per side around the 51 mm cover, matched to each station's tolerance. Then keep every taught feature at least 10 pixels from the frame border, and re-check the margin after any robot path change, because a shifted approach moves the part inside the frame.

Does shutter type matter when one camera serves two snapshot positions?

Only if an image is taken while something is still moving. Both shots in this pattern happen with the robot and parts at rest, so a rolling shutter sensor is fine; the catalog lists global and rolling shutter models side by side. If you later take images on a moving axis, prefer a global shutter model, such as the 1.6 MP vision sensor in this guide, so motion does not smear the frame.