Skip to content

Ray Sensors

Ray sensors measure distances instead of reporting that a part is present. They give a controller, a script or an AI assistant the kind of reading a real distance sensor or safety scanner delivers. Three components work together:

  • Rangefinder measures the distance along one ray, like a laser distance sensor.
  • Laser Scanner measures along a fan of rays in one plane, like a 2D safety scanner or LiDAR.
  • Ray Target makes a node visible to both, for example a wall, a rack or a reflector.

For a yes/no detection of parts, use the Sensor instead.

A ray sensor sees things that move or that you marked:

  • Parts (MUs) that a Source created,.
  • Vehicles (AGVs). A sensor mounted on a vehicle does not see its own hull or its own load.
  • Nodes with a Ray Target. The node’s bounding box counts as an obstacle.

Static CAD geometry without a Ray Target is not seen. A wall that should stop a scanner needs a Ray Target on it.

Fan of a Laser Scanner seen from above A Laser Scanner sits at the centre. Its fan opens 270 degrees around the forward direction and leaves a dead zone of 90 degrees behind it. A part and a wall marked with a Ray Target stand in the fan and shorten the readings of the rays that hit them. Laser Scanner, seen from above forward (+Z) part (MU) wall with Ray Target 270° fan, 1° steps dead zone behind the scanner
The fan is symmetric around the sensor's forward axis (+Z). The wall and the part shorten the readings of the rays that hit them.

A Rangefinder casts one ray along its local +Z axis and reports the distance of the nearest thing it hits. Use it for a distance to a part, a fill level or a gap.

SignalDistance is a float signal that receives the distance in mm. When nothing is hit, it reports the RangeMax value, because a controller needs a number it can scale. Link the signal in the inspector with Link signal; see Signal Binding.

A Laser Scanner casts a fan of rays in the local XZ plane, centred on +Z. Defaults match a typical safety scanner.

SettingWhat it does
FieldOfViewOpening angle of the fan in degrees. Default 270
AngularResolutionAngle between two rays in degrees. Default 1. A 270° fan with 1° steps casts 271 rays, and both edges are real rays
SignalMinDistanceFloat signal (mm) with the nearest reading of each scan. No hit at all reports RangeMax
SignalObstacleInFieldBool signal reserved for a protective field. It stays false for now: no field logic is connected yet

The scanner’s RangeMax defaults to 8000 mm and its RateHz to 25.

The Rangefinder and the Laser Scanner share these settings. Enter distances in mm and angles in degrees.

SettingWhat it does
RangeMin / RangeMaxThe measuring range in mm. Hits closer than RangeMin or farther than RangeMax read as no hit. Defaults 20 and 5000 (scanner: 8000)
MountOffsetMoves the measuring origin away from the node, in mm in the node’s own axes
MountYawTurns the sensor around the node’s vertical axis, in degrees. A sensor on a vehicle root can look sideways this way
RateHzMeasurements per second. 0 measures on every simulation step. Default 0 (scanner: 25)
LatencyMsDelay between a measurement and the moment its result is available, in simulated milliseconds
NoiseSigma / NoiseSigmaPerMGaussian measurement error in mm, constant and added per metre of distance
DropoutProb / DropoutProbPerMProbability from 0 to 1 that a ray returns no hit, constant and added per metre of distance
ResolutionRounds each reading to steps of this size in mm. 0 switches it off
SeedChanges the random sequence of noise and dropouts
ShowRaysStored with the component. The viewer does not draw the rays yet

Rate, latency, noise and dropouts run in simulation time. With the same model and the same seed, a restarted run gives the same readings. In a DES model, the seed also depends on the model’s DES seed. The measurement times of several sensors are staggered, which keeps the load low.

A ray that is dropped, or a reading pushed out of the measuring range by noise, counts as no hit. It is never clamped to RangeMax, so noise does not invent a wall.

A Ray Target marks a node as an obstacle for ray sensors. The node’s bounding box, including everything below it, is what the rays hit.

SettingWhat it does
EnabledSwitches the target on or off. A disabled target is invisible to the sensors. Default on
DynamicMeasures the box again in every step. Switch it on when the node moves, for example a door or a pallet that a drive pushes. A target that never moves is measured once. Default off

If a moving node has Dynamic off, its obstacle stays where it was first measured and lags behind the drawn node.

  1. Select the node where the sensor sits, for example the front of a vehicle, and add Laser Scanner (or Rangefinder) in the Editor. The components are in the Sensors group of ADD COMPONENT; see Components Overview.
  2. Set MountOffset and MountYaw so the fan points where the real sensor looks.
  3. Select the wall or rack that should be detected and add Ray Target. Switch Dynamic on only if it moves.
  4. Click Link signal next to SignalMinDistance (or SignalDistance) and choose a PLC input float.
  5. Run the simulation. Move a part or a vehicle into the fan and watch the signal drop.
  • Vehicle obstacle detection – a scanner on an AGV delivers the distance to the nearest obstacle in front of it.
  • Level or gap measurement – a Rangefinder looks down onto a stack or across a gap.
  • Controller tests – a PLC program reads the distance signal and stops a drive below a limit. Test the program against noise and delay before commissioning.
  • Sensor data for AI – an assistant reads the scan through the AI bridge.