Skip to content

ScanSystem

Definition

A ScanSystem is the logical grouping of one or more JS-50 ScanHeads (and associated ScanSync device), operating in concert. A ScanSystem is represented in the Pinchot API as a single object, allowing access to the constituent ScanHeads and providing a common interface for interacting with them. It also has properties affecting the scanning operation, and serves as the central control unit.

ScanSystem Properties

Units

Beginning with API v 16.0, imperial and metric units are available. The units must be specified when the ScanSystem is created, this cannot be changed later.

using var scanSystem = new ScanSystem(ScanSystemUnits.Inches);
or
using var scanSystem = new ScanSystem(ScanSystemUnits.Millimeters);
Note that ScanSystem implements IDisposable, so that resources are cleaned up when the object gets garbage collected.

jsScanSystem scan_system = jsScanSystemCreate(JS_UNITS_INCHES);
if (0 > scan_system) {
  // handle error
}    
or
jsScanSystem scan_system = jsScanSystemCreate(JS_UNITS_MILLIMETER);
if (0 > scan_system) {
  // handle error
}    
Note that you explicitly need to call jsScanSystemFree when you are done with the ScanSystem.

Unit Scaling

In the C/C++ API, the received profiles (jsProfile) will contain the coordinates of measured points in 1/1000 of the chosen unit, whereas the .NET API already does the conversion for you and returns IProfile objects containing Point2D data in the chosen unit, as double.

MinScanPeriod

Each ScanSystem has a maximum speed, determined by how fast the Phase Table can be executed. The individual elements of the Phase table (Camera-Laser-Pairs) impose time constraints due to how long their exposure times are (see Exposure) and how big their Scan Windows were set. Additional constraints can come from the Phase Table design (having the same camera in adjacent phases will add a delay, see here). As a result, the ScanSystem has a maximum scan frequency. In the API, we don't use the frequency, instead, we calculate the MinScanPeriod (which is just the inverse).

The MinScanPeriod can only be determined when the ScanSystem is Connected, meaning that all configuration has been set and the Connect()/jsScanSystemConnect() call has returned successfully. At this point, you can 'ask' the ScanSystem for the MinScanPeriod:

all error handling omitted for clarity

using var scanSystem = new ScanSystem(ScanSystemUnits.Inches);
// add scan heads, set configuration, phase table, etc here
var unconnectedHeads = scanSystem.Connect(TimeSpan.FromSeconds(3));
uint minScanPeriod = scanSystem.GetMinScanPeriod();
// start scanning here

all error handling omitted for clarity

jsScanSystem scan_system = jsScanSystemCreate(JS_UNITS_INCHES);
 // add scan heads, set configuration, phase table, etc here
int32_t r = jsScanSystemConnect(scan_system, 3);
int32_t min_period_us = jsScanSystemGetMinScanPeriod(scan_system);
// start scanning here

The result of the call is the MinScanPeriod in μs (microseconds)1

Important

The MinScanPeriod is only the lower bound, there is no reason to scan this fast if your application does not need the scan density. Using the maximum belt/chain speed for your machine center, you can calculate what the profile spacing will be and adjust the scan period appropriately, reducing network load and processing requirements as a result.


  1. this is actually a small inconsistency between the API versions, the .NET version should appropriately be called GetMinScanPeriodUs(). Nobody's perfect.