Perpendicular Distance Measurement¶
Perpendicular distance evaluation measures object distances relative to a reference line in the scan plane. Define a field and reference line in the application; the sensor evaluates the points in that field and reports the minimum and maximum perpendicular distances and the positions of the corresponding measuring points.
multiScan1xx: Perpendicular distance application demonstration.
Configure a Measurement¶
- Open Application > Perpendicular distance measurement in SOPASair and add an evaluation group.
- Draw the zone in which objects should be measured.
- Set Max. blanking size and Detection time under Object detection to balance measurement stability and response time for the target.
- Save the configuration to the device.
- Check the live minimum and maximum distances and their measuring-point coordinates in the result list.
The evaluation runs on the sensor, so the host receives measurement results without having to detect objects from the raw scan itself. See the SOPASair configuration walkthrough for the interface details.
Read Results¶
The REST endpoint GET /api/perpendicularDistanceResult returns a timestamp
and an evaluations array. Each result contains an evaluation ID, minimum and
maximum distance, and the 3D position of each corresponding measuring point.
The evaluations array is empty when no object is measured. The result is read-only; see the picoScan100 REST API reference.
CoLa clients can poll sRN perpendicularDistanceResult for the current
measurement or subscribe with sEN perpendicularDistanceResult for event
updates. The telegram reports the shortest and furthest measuring point in
the range relative to the reference plane. See the
picoScan100 CoLa Telegram Listing.
Configure over the API (picoScan100)¶
REST and CoLa expose every variable needed to create, change, and delete a
perpendicular distance evaluation without SOPASair. The following workflow
applies to picoScan150 with firmware V2.3.3. Some of these variables are
not listed in the published OpenAPI file, but can be read and written as REST
variables (GET / POST /api/<Variable>).
A perpendicular distance evaluation has two parts, as in SOPASair:
Configure over the API (picoScan100): part, variables, and content.
| Part | Variables | Content |
|---|---|---|
| Object detection | EvalNNN, VolumeNNN |
Detection parameters (blanking mode, minimum object size, detection time) and the field in which objects are measured |
| Reference line | perpDistNNN |
Normal vector of the line in the scan plane and its signed distance from the sensor, in mm |
To create an evaluation, log in as Authorized client or Service and
write the variables in this order, using the same slot number NNN
throughout:
- Set the slot to perpendicular distance: write
EvaluationGroupTypewith all 48 values and1at the slot position (0= field evaluation). - Write
EvalNNNwithVolumeList = [NNN]. - Write the field polygon directly to
VolumeNNN. Do not useSetFieldEvaluationContourhere: it returns success for perpendicular distance slots but is not reliable for them. - Write the reference line to
perpDistNNN. The normal vector sets the orientation, for example(1, 0, 0)for a line across the forward direction, and the distance sets its position. Because the picoScan100 is a 2D sensor, thezcomponent is always0. The no-data mode sets the output when no object is measured:0zero,1hold the last value, or2a user-defined substitution distance. - Add the group to
EvaluationGroupMappingwithEvalIds = [NNN]. The whole array is replaced on every write, so include every group you want to keep. - Call
WriteEepromand wait about 1 s before reading the result.
Keep in mind:
- Perpendicular distance groups need their own slots; they cannot share a slot with a field evaluation group.
- If the field is missing (empty
VolumeListor emptyVolumeNNN) or the group references no evaluation, the device reports a recoverable error (DeviceStatus=7instead of3) and the result stays empty. - Perpendicular distance results are not assigned to digital outputs; read
them from
perpendicularDistanceResult. - Group activation (
ALWAYS,INPUTS,TELEGRAM) andActivateEvaluationGroupwork as for field evaluation.
To delete the evaluation, remove the group from EvaluationGroupMapping,
clear EvalNNN, VolumeNNN, and perpDistNNN, set the slot in
EvaluationGroupType back to 0, and call WriteEeprom.
For complete REST and CoLa payloads of every step, see the knowledge base article picoScan150: Field Evaluation and Perpendicular Distance API Possibilities.
For output and evaluation-group concepts shared with field evaluation, see Field Evaluation.