AT 3D Sensor C6¶
Before a C6 series 3D laser sensor from Automation Technology can be used, the following packages must be installed on the PC besides Viper:
CommonVisionBlox CameraSuite Runtime (x64) 13.04.005 from Stemmer Imaging (since Viper 8.0): GigE Vision transport and the filter driver “siNetFilter GigE Vision Filter Driver”, which is required for image acquisition.
AT SolutionPackage 2024.1 from Automation Technology: cxExplorer (settings and user sets of the sensor, diagnostics) and the firmware of the sensor. The description on this page applies to firmware 2024.1.
The plugin ships the AT runtime (cxCamLib, cx3dLib) in the x64 subfolder of its plugin directory (<Viper.NET>\Plugins\Image Sources\AtLaser3DSensorC6.Plugin\x64); nothing has to be installed for it. If this folder or the runtime is missing, the image source reports an error in the log and in the editor when connecting; Viper keeps running.
According to the documentation, the following network settings must be set on the adapter:
Jumbo Frames/Packets: 9014 Bytes
Receive Descriptors/Buffers: 2048 Bytes
Transmit Descriptors/Buffers: 2048 bytes
Flow Control: Disabled
Interrupt Moderation Rate: Extreme
The packet size and the inter-packet delay that Viper actually writes to the sensor are on the GigE tab.
General settings¶
General settings: Image Source Editor
Function buttons:
Read from Camera: Reads the sensor parameters (exposure, trigger, encoder, regions, 3D extraction, GigE) from the 3D sensor into the image source. The settings that concern only the plugin (Z-map, Corrected Z-map geometry, Generic exposure acts on the sensor, trigger overrun handling, profiles to skip, flip, timeout, diagnostics) keep their values. Note: when the editor is opened, Viper first writes the settings of the image source to the sensor; the button therefore reads the state after that write. Afterwards the Images tab shows the components as the sensor has them (a component the sensor does not have in the current mode is dropped); the ImageIndex values can shift as a result, check the assignment of the slave image sources (see Image components).
Write: All GenICam parameters used are written to the 3D sensor.
ExportXml: All current AT parameters are read out and saved in an xml file.
Factory Defaults: Resets the settings of the 3D sensor to the factory settings.
Reset: Resets the settings of the 3D sensor to the parameter set that was active when the sensor was switched on.
Stop: Performs a manual stop of the acquisition.
Live Profile: Shows the live image of the 3D sensor (the sensor image in areascan mode). The ROI is drawn on this image, see Regions Of Interest.
Camera list: Selection list of all C6 scanners. The list can be updated with the “… - Button”.
Sensor and light settings:
Timeout: Timeout for the image acquisition in [ms]. All profiles of an acquisition (Num Profiles Scan3d) must have been triggered within this time. If the frame is not complete in time, the acquisition delivers no image; the log holds an ERROR with the cause (see Trigger Overrun Handling), the incomplete frame is discarded and the next acquisition starts clean.
Exposure Time: Exposure time per profile in [ms]. The sensor works in microseconds, the image source stores the value in [µs]; new image sources start with 1 ms (1000 µs). Guide value: typical exposure times lie between 0.025 ms and 0.5 ms (25..500 µs). Bright, matt surfaces need rather short times; even 1 ms can saturate the laser line there, so that only a few columns deliver valid height values. Dark or shiny surfaces need rather longer times. Procedure: start with a short exposure and increase it until the laser line delivers valid values over the required width without saturating (check with Live Profile or in the job display). A longer exposure limits the maximum profile rate (see tab Timing Info). In the job display invalid Z-map values (65535) are red, valid ones grey.
Generic exposure acts on the sensor: Determines whether the generic exposure of the image source (command interface
GImageSrcSetExposureTime, acquisition parameter ExposureTime per job, column Exposure of the image source list) acts on the sensor. On: the value is taken over as Exposure Time and written to the sensor. If a toolgroup sets its acquisition parameters without Restore, the job value stays stored in the image source. Off: the generic exposure is ignored, the configured Exposure Time applies. If a differing value arrives, an INFO is written to the log once per image source (DEBUG after that). The field Exposure Time in the editor acts in both cases. Reading the generic exposure always returns the configured Exposure Time. New image sources: on. Stored image sources: off, so that the exposure of existing projects does not change. Before switching it on for a stored image source, check whether jobs, the image source list or the command interface set an exposure; it then acts on the sensor.Imagesource with light control: On: Viper writes Light Brightness and Light Controller Source to the sensor, the two fields are shown. Off (default): the fields are hidden, Viper does not change the laser settings of the sensor, its active parameter set applies. If the sensor offers no laser parameters, the message “Imagesource has no light control implemented!” appears when switching it on and the checkbox is cleared again. Changing the sensor in the camera list clears the checkbox.
Light Brightness: Brightness of the laser in [%].
Light Controller Source: Controls when the laser line is on (e.g. only during the acquisition).
Acquisition Mode: Currently only the SingleFrame mode is supported.
Trigger:
TriggerEnabled: Activates the acquisition triggers used.
Acqu Trigger Source: Uses the selected internal or physical input signal as the trigger source for the AcquisitionStart. The choices come from the sensor (example C6-2040-CS-53-90):
Software: Viper triggers the start of the acquisition itself as soon as the sensor is ready (the normal case when the profiles are triggered by the encoder).
Software0, Software1: software signals of the sensor; Viper triggers them itself as well.
Line0 .. Line4: inputs of the IO panel (Line2/Line3 are the encoder channels A/B there). Acquisition start by a proximity switch or the PLC: see Trigger on the sensor below.
Encoder0: first output pulse of the encoder module; the acquisition starts with the first movement.
UserOutput0/1, Counter0Active/Counter1Active, Event0/1, LightController0, RegionStatistics0: internal signals of the sensor.
Acqu Trigger Activation: Specifies which signal edges are to be used as trigger signals.
Line Trigger Mode: Activates the LineScan.
Line Trigger Source: Uses the selected internal or physical input signal as trigger source for the LineStart (Encoder0 for the axis, see Encoder).
Readiness of the sensor: Between the start of the acquisition by Viper (start command to the AT SDK) and the AcquisitionStart event of the sensor about 120 ms pass (example C6-2040-CS-53-90: ~120 ms, longer with more components, up to ~170 ms). This time lies in the sensor or SDK and cannot be shortened by Viper. Line triggers in this window are lost, the image starts with the first trigger after it; if the axis is already moving, the travel 120 ms x speed is missing at the start (about 3 mm at 24 mm/s). Therefore start the axis only after the start of the acquisition (in the toolgroup: GImageSrcItfTool in mode StartAcquisition, then the move command, then CompleteAcquisition) or provide a run-up distance before the trigger range. Profiles to Skip is meant for the acceleration ramp, not for this gap: it discards acquired profiles, it does not bring back lost triggers.
First acquisition after the program start: At the first acquisition after the start of Viper the image source reads all parameters of the sensor and writes its complete parameter set; only then is the acquisition started. All further acquisitions write only changed parameters. The first acquisition therefore starts considerably later than the following ones. At standstill or with the acquisition started before the motion only the first cycle is longer. If the acquisition is started during the motion, the first image begins at a later position of the travel. Remedy: run a dummy measurement after the program start, or start the acquisition before the motion (see Trigger on the sensor).
Trigger on the sensor: If the plant starts the acquisition only during the motion (proximity switch or PLC output), wire the acquisition trigger to an input of the sensor instead of triggering the acquisition by software: Acqu Trigger Source = the IO panel input the signal is connected to (Line0 .. Line4; with the encoder, Line2/Line3 are in use, so another input), TriggerEnabled on, Acqu Trigger Activation = the wanted edge. Viper then only arms the sensor (with a source other than Software, Software0 or Software1 Viper sends no software trigger), the image starts with the first line trigger after the edge. The arming time thus lies before the switch instead of after it. The acquisition in Viper therefore has to be started before the axis reaches the switch (job or StartAcquisition before the motion command), and Timeout has to cover the wait for the switch plus the acquisition of the frame.
Range Image Conversion:
Profile Distance: Distance between two profiles in [mm]. Calculated from Encoder Resolution x Encoder Divider of the Encoder tab; it is the Y scale of the Z-map.
Profiles to Skip: Number of acquired profiles at the start of a frame (e.g. the acceleration ramp of the axis) that are skipped for the Cognex image. The sensor still acquires Num Profiles Scan3d profiles, the plugin discards the first N of them: the image starts N x Profile Distance later and has Num Profiles Scan3d - N rows (example: 1400 profiles, 200 skipped = 1200 image rows; at 0.02 mm per profile the image starts 4 mm later). The axis still has to deliver Num Profiles Scan3d triggers; for the full image length raise Num Profiles Scan3d by N. The trigger overrun detection evaluates only the profiles that are in the image; profiles lost in the skipped acceleration ramp do not count as overrun (from Viper 8.0.7; before, the evaluation was shifted by Profiles to Skip: a loss only in the acceleration ramp led to an ERROR or no image, a loss in the last profiles of the frame went undetected).
Convert To Z-Map (use factory calibration): On: the range image is converted into a Z-map with the factory calibration of the sensor (cx3d); the Z values are metric, see Measuring with the Z-map. Restriction: only the range image is converted. Reflectance and scatter of the same region stay in sensor columns and therefore do not lie pixel-exactly on the Z-map (height-dependent offset, see Image components); a 2D fixture or a region taken from the reflectance does not fit the Z-map exactly. On the raw path all components of a region lie pixel-exactly on top of each other. Off (raw path): the range image holds the sensor rows of the laser line with a linear Z scale over the whole chip. It is not metrically calibrated: the calibration covers only part of the rows; example C6-2040-CS-53-90: the heights are too small by a factor of 0.7 on average (locally 0.5..1.04), X has one scale for all heights. A WARN with the numbers of the sensor is written to the log when connecting. Use the Z-map for measurements.
Corrected Z-map geometry: Only with Convert To Z-Map (disabled otherwise). On: the coordinate origin of the Z-map lies metrically in the field of view like with the C5 plugin (x = -FOV/2 + (OffsetX + column) * dx, z absolute from the calibration); reflectance and scatter get the x origin of their region. A region with OffsetX > 0 is rectified with the calibration of its own sensor columns and lies at the same metric place as in the full region. Off: origin in pixel units (x starts at about +0.66 mm instead of -FOV/2, z not absolute), and a region with OffsetX > 0 is rectified with the calibration of the columns from 0: its Z-map lies 17..28 columns (0.45..0.7 mm) beside the right place, Z deviates by up to 0.4 mm. Full-width regions (OffsetX 0) are not affected by this. New image sources: on. Stored image sources: off, so that taught tools stay in place; once per connection an INFO with the numbers is written to the log (one line of its own per region with OffsetX > 0). Switching a stored image source: set the checkbox and re-teach all tools with regions or results in Sensor2D/Sensor3D (fixtures, regions, absolute Z thresholds). For full-width regions height differences do not change; for a region with OffsetX > 0 the heights only become correct with it. No effect on the raw path.
Convert To CogImage8Grey: Converts the acquired 16 bit range image into an 8 bit grey image. With this option lost profiles are not filled in.
Trigger Overrun Handling: A trigger overrun occurs when the axis delivers trigger pulses faster than the sensor can acquire profiles. The image source detects it from gaps in the encoder values of the profiles (independent of the trigger overrun counter of the sensor) and counts the lost profiles.
Mode:
Mode
Behaviour with lost profiles (raw path and Z-map alike)
Ignore
WARN in the log, the image is delivered; the lost profiles are missing (the image is compressed).
ErrorOnTriggerOverrunFlag
ERROR in the log, no image (the acquisition counts as failed).
FillLostProfilesWithPreviousData
WARN, the previous profile is inserted for every lost profile; above Max lost profiles ERROR and no image.
FillLostProfilesWithInvalidData
WARN, an invalid row (value 0) is inserted for every lost profile; above Max lost profiles ERROR and no image.
Max lost profiles: Number of lost profiles that is accepted in the two fill modes; above it ERROR and no image. 0 = no loss allowed, -1 = limit not used.
The sensor completes a frame as soon as it has acquired Num Profiles Scan3d profiles; lost triggers do not count, the frame then extends beyond the nominal travel. The fill modes always deliver the first Num Profiles Scan3d trigger positions of the travel (nominal travel): every image row belongs to its trigger position, lost profiles are filled at their position, profiles beyond the nominal travel are discarded. If the axis delivers only as many triggers as the image has profiles, a frame with lost profiles never completes: the acquisition ends with Timeout without an image. The fill modes only take effect if the encoder runs on beyond the nominal travel. The same applies to a travel that is too short or a wrong counting direction. The profiles acquired so far are discarded, the next acquisition starts clean; a wrong image never results. Remedy: let the axis travel beyond the frame (reserve at least as large as the expected losses) or choose Num Profiles Scan3d smaller than the number of triggers the travel delivers; limit the speed (see Timing Info). The ERROR in the log names the cause, e.g.
no frame within 10000 ms, frame still active. The sensor received fewer line triggers than the 500 profiles per frame (...). Encoder0 value 11799 (11399 at the start, +400 counts).It is written with details to the-Camslog and as one lineDoGet, no image: ...to the main log. If the sensor reports no active frame, no trigger has arrived (encoder not moving, wrong trigger source or wrong mode); unchanged since the start means that the encoder has not moved. The counter in the log is the number of inserted rows, not the total loss. With Convert To Z-Map the filling is done in the raw image before the conversion, the limit is checked after the conversion.An overrun in the live view affects only that one image; the following images are delivered normally.
Image components¶
In contrast to AreaScan (intensity component only), it is possible to record more than just one image component in LineScan3D recording mode. Here you can define which image components are to be output for each region. Which component the sensor delivers depends on the acquisition mode and the extraction method:
Component
Acquisition mode
Condition / content
Intensity
Areascan
Only in Areascan mode (sensor image).
Range
Linescan3D
Position of the laser line per column (16 bit); basis of the Z-map.
Reflectance
Linescan3D
Brightness of the laser line per column (8 bit).
Scatter
Linescan3D
Scattered light around the laser line per column (8 bit).
SumOfIntensity
Linescan3D
Only with Extraction Method CenterOfGravity: sum of the intensities along the laser line per column (16 bit).
If the sensor cannot deliver a component in the current mode or with the extraction method of its region, the Images tab marks it with the reason, e.g. Intensity (not in Linescan3D (Areascan only)) or SumOfIntensity (needs Extraction Method CenterOfGravity); if the connected sensor refused it without a known reason, not available on the connected sensor is shown. The marking stays after Read from Camera. The row stays in the list (e.g. for a later change of the method) and takes effect again as soon as mode or method fit; until then Viper refuses the component when writing (WARN once per image source with the reason, then DEBUG), and its image is missing.
Viper writes the extraction method of a region before its components; CenterOfGravity with SumOfIntensity therefore works from the first acquisition. When switching from CenterOfGravity to another method, Viper switches SumOfIntensity off first, so the sensor delivers no image with filler data. If SumOfIntensity is still in the list afterwards, Viper refuses the component (WARN once per image source component not available (SumOfIntensity needs CenterOfGravity), then DEBUG).
SumOfIntensity is delivered as an image of its own (16 bit). With the default scaling it often looks almost black in the display (many pixels are 0, valid values exist only where the laser line is); the data is there, adjust the scaling of the display to check it. The same applies to other 16-bit images with small values.
Every row of the list is an enabled component; the column RegionIndex names the region it comes from. The ImageIndex of a component, in contrast, is its row position in the list (first row = 0, second row = 1 and so on). It is shown in the first column ImageIndex (read-only) and has nothing to do with the RegionIndex. Index 0 is the image of the image source itself, every further index a slave image (see Image source configuration). The arrow buttons move a row up or down; this changes the ImageIndex values of the affected rows (also when adding and removing) and thus which slave image delivers which component. Read from Camera can change the list as well (components the sensor does not have in the current mode are dropped); check the ImageIndex values of the slave image sources afterwards. The component with index 0 must belong to an active region, otherwise the acquisition does not start and reports an error. Rows of disabled regions count for the position: if only region 1 is active and its range component is in the second row, it has index 1; move the row all the way up so that it gets index 0.
Reflectance and scatter stay in sensor columns; they are not mapped onto the grid of the Z-map (the AT SDK does not offer that). The offset to the Z-map depends on the height (example C6-2040-CS-53-90: 0.3..1.1 mm); a 2D fixture taken from the reflectance therefore does not fit the Z-map exactly. Viper writes an INFO about this to the log once per connection.
With Convert To Z-Map and Corrected Z-map geometry every image of a region gets the coordinate space of its region (Sensor2D/Sensor3D), see Measuring with the Z-map.
Regions Of Interest¶
Region: Selection of the region whose settings are to be adjusted. Browsing the list does not change any stored region.
Enable: Activates the currently selected region.
Num Profiles Scan3d: Number of profiles to be acquired with the next acquisition (= rows of the range image). The axis has to travel Num Profiles Scan3d x Profile Distance for it.
ROI Info: Help for setting an ROI.
ROI Settings: Offset and size of the current region in sensor pixels: OffsetX/Width are the columns (across the laser line, X of the Z-map), OffsetY/Height the rows (height direction, in which the laser line moves). The minimum values and increments come from the sensor (width e.g. in steps of 32 columns on the C6-2040) and are read when connecting; the numbers to the right of the fields are the sensor size.
Position and size of a region on the sensor (ROI Info, 4, shows a corresponding sketch as well). The origin (0,0) is at the top left; the rows run in the height direction in which the laser line moves.
Apply ROI from rectangle: Here a rectangle can be drawn into the live profile, adjusted, and its offset and size applied to the currently selected region. The rectangle picker works only on the sensor image (Live Profile, areascan). On 3D images (range, Z-map, reflectance) the rows are profiles and the columns of the Z-map are rectified; there the rectangle is discarded and a hint is shown. The number fields always work.
Rules of the sensor for regions:
Regions must not overlap vertically (in the rows); in the columns (OffsetX/Width) they may overlap, but side by side in the same rows is not possible. A further region must lie below the previous one (OffsetY >= OffsetY + Height of the region before). Otherwise the sensor refuses Height, OffsetY or switching the region on; Viper reports the refusal once per image source as WARN with the rows of the other regions and sends the value again with every write.
When a region is enabled or its ROI is edited, it is placed behind the previous region and, if necessary, shortened or disabled if it no longer fits on the sensor (dialog “Region adjusted”).
Region 0 must be active. If only another region is active, the sensor (firmware 2024.1) delivers no 3D data; Viper warns once per connection. Remedy: additionally enable a small region 0 (e.g. 64 rows without the laser line).
The 3D extraction module of a region follows the region (region off = module off, region on = module on).
When the sensor is switched on, the region selection may be locked (power-up parameter set with an active LineStart trigger). Viper detects this (WARN once per connection) and releases the lock automatically with the first write of the triggers.
3D extraction¶
Region: Selection of the region whose settings are to be adjusted. This field is linked to the selected region on the “ROI” tab.
Z Subpixel (device), Z Scale (device), Z Resolution (device): The three values come from the sensor and are only displayed.
Z Subpixel (device): Subpixel resolution of the line position [px]. Depending on the settings of the extraction algorithm, the range values are scaled by 2^Subpixel.
Z Scale (device): Scale factor with which the sensor outputs the row position of the laser line as a 16 bit range value [ProfilePx/RangeValue] (factory value 1/64 on the C6-2040, formula: Z Scale = 1/(2^Subpixel)). Viper does not write it to the sensor (from Viper 8.0.7; before, the plugin wrote the stored project value), the value of the active parameter set of the sensor applies. The Z-map is converted with the value from the chunk data of every image. If a stored project value differs from the sensor value, this is logged once per connection (INFO; on the raw path WARN, because there the raw values change by the factor project value/sensor value).
Z Resolution (device): Reciprocal of Z Scale [RangeValue/ProfilePx].
Reachable rows: with the factor 1/64 the 16 bit value range covers 1024 rows; on the C6-2040 (1088 rows) the last 64 rows are outside. This is uncritical because the calibrated measuring range ends before row 1024 (see Measuring with the Z-map).Extraction Method: Selection of the algorithm used for the exact extraction of the laser line position. Viper writes the method before the components of the region (see Image components); after a change, Filter Mode and Filter Size are written for the new method (the sensor keeps them per method).
Extraction Settings: Parameters for the different extraction algorithms can be set here. The value ranges (e.g. Validation Slope Max) come from the sensor and depend on the model.
Filter Coefficients: Filter Mode and Filter Size (order 5, 7 or 9). Which filter modes the sensor accepts depends on the method: CenterOfGravity Off, SG, Average and Manual, FIR peak only SG and Manual. The editor offers only the modes valid for the method. A stored invalid value (e.g. Off or Average with FIR peak from an older project) is replaced by SG when writing (DEBUG once per image source), without a refusal; the project itself is not changed by this.
Manual: If the “Manual” filter type is selected, user-defined filter coefficients can be used here.
Encoder¶
Encoder Control:
Encoder Resolution: Travel of the axis per counted encoder increment in [mm], in the selected Encoder Mode. Example: a measuring system with 0.01 mm per quadrature cycle gives 0.0025 mm per increment with High Resolution and 0.01 mm with Four Phase. For Four Phase therefore enter the value per quadrature cycle (4 x the value for High Resolution); the tool tip of the field says the same.
- Encoder Mode:
High Resolution: Every edge of both encoder signals is counted, 4 increments per quadrature cycle.
Four Phase: One increment per complete quadrature cycle (all four states passed).
Encoder Divider: Specifies how many encoder increments are needed to trigger one profile. Profile Distance = Encoder Resolution x Encoder Divider. Example: 0.01 mm (four phase) x 8 = 0.08 mm per profile; 2100 profiles then need 168 mm of travel. With the same measuring system, 0.02 mm per profile results from 0.0025 mm (high resolution) x 8 or from 0.01 mm (four phase) x 2.
- Encoder Output Mode:
Position Up: An encoder signal is only generated for movement in one direction. If the last encoder value of the recording is crossed in the opposite direction, the recording is only continued when the last recorded position is crossed.
Position Down: Like “Position Up”, but in the opposite direction.
Direction Up: An encoder signal is only generated for movement in one direction. The difference to “Position Up” is the position dependency.
Direction Down: Like “Direction Up”, but in the opposite direction.
Motion: Encoder output signals are generated in both directions. Note: if the axis stands still with the control loop active, jitter movements can already trigger profiles (in the live view images then arrive without any travel; in an acquisition duplicate rows at the start and end of the image). Profiles to Skip catches them at the start, Position Up avoids them.
Encoder Sources: Defines the trigger signal source(s). Usually Encoder Source A = Line2 (encoder channel A of the IO panel), Encoder Source B = Line3 (channel B); the tool tip of the fields says the same. Encoder Source B can only be selected when Encoder Source A is set; Four Phase needs both sources. If one of the two sources is set to Off, the editor sets Encoder Mode to High Resolution and a direction-dependent Encoder Output Mode to Off (with one source only Off and Motion are possible). After setting Encoder Source B again, select the Encoder Mode again.
Profile Distance: Distance between two profiles in [mm] (calculated, see above) and Y scaling of the Z-map. Viper recalculates it only when Encoder Resolution, Encoder Divider or Encoder Mode is changed in the editor; the stored value of a project is not recalculated when the project is loaded or the editor is opened, and Encoder Mode is kept on every refresh of the display. After a change, check that Profile Distance matches the actual travel per profile (travel / number of profiles).
ClearTriggerCoordinateOnAcquStart: Provides the option to perform an EncoderReset before each image acquisition.
Diagnosis: Read Current Value reads the current count of the encoder in use from the sensor; the label next to the field then names the encoder (e.g. Encoder0 value), the field shows the value. Before the first read the field is empty and the label reads Encoder value; on a read error the field shows -NotAvailable- (details in the log). Only with a connected sensor; this lets you check whether the encoder signals arrive and in which direction they are counted.
Active parameters¶
get: Reads all currently available GenICam parameters from the 3D laser sensor and outputs them in a list.
Timing Info¶
get: Reads the SensorReadoutTime (time currently needed to output an image) and the SensorRateMax (current maximum frame rate) from the 3D laser sensor and calculates from them the maximum travel speed of the axis in [mm/s], without the effect of a trigger overrun. The values apply to the currently set region and exposure; a smaller region (Height) allows a higher profile rate. In practice set the axis to at most about 70..80 % of this speed. Above that, triggers are lost (see Trigger Overrun Handling on the tab Main), and the acquisition may not complete. Besides the travel, the conversion into the Z-map after the frame is complete also counts for the cycle time (typically about 10..20 ms per frame).
GigE¶
PacketSize: Specifies the packet size in bytes. The default value is 1500. If the network card supports jumbo packets/frames, the maximum value of 7960 bytes should be used.
InterPacketDelay: Specifies the delay between packets in [timestamp counter unit]. Default values are 100 or 1000.
Both values are written to the sensor when connecting. Viper counts incomplete buffers (packet loss) per connection; the counter is in the sensor diagnostics and in the log on connection loss, with a WARN once per connection when buffers were lost.
Flip¶
FlipSensorImageOnPC: Mirrors the acquired image on the PC horizontally and/or vertically after it has been fetched from the sensor. The sensor itself is not changed.
Horizontally: reverses the order of the columns within a profile (left/right).
Vertically: reverses the order of the profiles (start and end of the travel swap).
Diagnostics¶
The Diagnostics tab helps with commissioning and support. It only reads and never writes a parameter to the sensor.
Acquisition dump: Saves a separate folder <date>_<time>_img<no> in the dump directory for every image acquisition. All options are off by default and are not saved with the project. After a restart of Viper they are off again; the image number starts anew with every Viper start.
Raw part images (TIFF): Every image part of the buffer as received from the sensor.
Range images (TIFF): The range image the Z-Map is computed from. Only produced with Convert To Z-Map.
ZMap images (TIFF): The computed Z-Map. Only produced with Convert To Z-Map.
Full dump: The metadata of the acquisition (
chunks.json,parts.json,settings.json,sensor.json,calib.xml) without images. For images, also select one of the image options.
Dump directory: Target folder for the dumps and for the CSV file of the parameter probe. %ENV% placeholders and paths relative to the Viper project are supported; the resolved path is shown below. New image sources use %VIPER_PROJECT_DIR%\Data\AtC6Diag. If the folder cannot be created, %TEMP%\Viper\AtC6Diag is used and the resolved path shows fallback in use. The directory is saved with the project.
Log sensor diagnostics now: Writes the sensor diagnostics block to the log right away: model, serial number, firmware, sensor size, Scan3d settings, settings per region, and length and checksum of the calibration. Needs a connected sensor.
Probe parameter access modes: Reads all known sensor parameters with type, access mode, value and range, writes them to the log as a table and as the CSV file AT_<model>_<serial number>_paramAccess_<timestamp>.csv to the dump directory. Needs a connected sensor.
Open dump folder: Opens the dump directory in Explorer and creates it if necessary.
Independent of the tab, Viper writes a diagnostics block to the log (INFO) after every connection and for the first image after it. The complete block appears only on the first connection or when a value has changed, otherwise only a line unchanged since. Hints about the raw path, the origin, the calibrated range or refused parameters appear once per connection, never per image. For support requests the diagnostics block from the log and a full dump with range and ZMap images of the affected acquisition are sufficient.
Image source configuration¶
When several image components are extracted, a slave image source must be created and configured here for every additional image. Every image source needs a unique Id; a slave image source refers to its component (ImageIndex) via the Id of the master. Viper cannot assign two C6 image sources with the same Id (or both with -1) (error “No GImageSrc found” or GetById in the log).
Several image sources (e.g. two toolgroups) may use the same sensor; they share the connection, and before every acquisition the acquiring image source writes its settings to the sensor (only the changed parameters; at its first acquisition after the program start the complete set, see First acquisition after the program start under Trigger on the Main tab). The live view can be held by only one image source per sensor at a time.
Slave image sources in jobs whose toolgroup starts the acquisition itself (e.g. axis travel with GImageSrcItfTool in mode StartAcquisition / CompleteAcquisition): in this case the job acquires no image before the toolgroup. A slave image source enabled in the job waits there for the image of its master, which only starts in the toolgroup, up to its Timeout wait for image from master, and the job fails. Set-up:
Disable the slave image source in the image-source list of the job.
In the slave image source set the option Set image, even if slave is disabled in imagesource list (see Master-Slave image sources); the master then hands it the component image at CompleteAcquisition.
Fetch the image after CompleteAcquisition with a further GImageSrcItfTool: mode Acquire, ImgSrcIndex = position of the slave image source in the image-source list of the job (counted from 0), SetJobResultInputImages on.
The output images of the GImageSrcItfTool on the master contain only the image of the master image source (ImageIndex 0), not the component images of the slaves.
Measuring with the Z-map¶
With Convert To Z-Map the image source delivers a 16 bit image whose values are metric heights (Z = value x scale + offset of the calibration); the X scale per column and the Y scale per row (Profile Distance) are in the coordinate spaces Sensor2D/Sensor3D of the image. A 2D NPoint calibration on the range image is therefore not needed.
Invalid points (no laser line, or outside the calibrated range) have the value 65535. Points outside the calibrated measuring range of the sensor are invalid as well (from Viper 8.0.7; before, they appeared as seemingly valid heights at the other end of the range); if more than 1 % and more than 1000 points are outside, a WARN is written to the log once per connection.
Calibrated range: The factory calibration covers only part of the sensor rows (example C6-2040-CS-53-90: rows ~83..858, Z range according to the data sheet). Workpieces outside this range deliver no heights. The sensor diagnostics in the log name the range (calibrated range covers rows).
Partial regions (OffsetX > 0): With Corrected Z-map geometry the Z-map of a partial region lies at the same metric place as in the full region. Without the option (stored image sources) it lies 17..28 columns (0.45..0.7 mm) beside it and Z deviates by up to 0.4 mm; see Corrected Z-map geometry.
Switching from the raw path to the Z-map: Set Convert To Z-Map and re-teach all 3D thresholds (the raw values were not metric). Switching from the C5 plugin: its NumSubPixel 6 corresponds to the factor 1/64 of the C6; with Corrected Z-map geometry the coordinates are defined the same way.
Reflectance/scatter lie in sensor columns, not in the Z-map grid (see Image components).
Computing time: The conversion into the Z-map costs a few milliseconds per image (example C6-2040-CS-53-90: ~20 ms for 672x1200, the first image after connecting ~130 ms). Run timing measurements with Viper in the foreground: on notebooks with hybrid CPUs (P and E cores) the threads of a window in the background run on the slow cores, the conversion then takes about twice as long.
Connection and error behaviour¶
Sensor not reachable at start (not booted yet, cable): The image source searches for it in the background (one search for all image sources together). If no GigE device answers at all (e.g. cold start of the plant, the sensor boots after Viper), it searches again after 1, 2 and 4 s and then every 4 s; a sensor booting after Viper is thus found within a few seconds. If other GigE devices answer and only the configured IP is missing (wrong IP or this sensor switched off), it searches after 1, 2 and 4 s and then every 30 s. The job cycle never waits for a search. The log holds one WARN per outage, the acquisition attempts in between on DEBUG. As soon as the sensor is found, Viper connects without a restart and writes all settings.
Connection loss in operation (cable, network, power failure of the sensor): INFO with the buffer counters at the loss, one WARN per outage, further attempts on DEBUG, every 5 min a WARN still disconnected since. The image source reconnects on its own: attempts after 1, 2 and 4 s, then every 30 s; a failed attempt takes ~0.25 s and does not block the job. If the sensor comes back within the backoff window, the connection is up after 4 s at the latest, otherwise in the 30 s raster; afterwards Viper writes all settings again (after a power failure the sensor may start with its power-up parameter set). Acquisitions during the outage fail immediately with Device not connected; a running acquisition still waits for its Timeout.
Timeout of an acquisition: The ERROR names the cause from the trigger state of the sensor and the encoder values, see Trigger Overrun Handling on the Main tab.
Parameters refused by the sensor (e.g. regions outside the rules, parameters unknown to the firmware): WARN once per image source with the reason; the value is sent again with every write, the remaining parameters are written, the acquisition runs.
Missing runtime: Without the AT runtime (
x64folder of the plugin) ERROR once at start, no C6 image source usable, Viper keeps running.Viper writes no INFO lines to the log per image; the diagnostics blocks and hints come once per connection (see Diagnostics).