LightBarrier
This simulation component adds a configurable light ray to the simulation and outputs a value indicating whether the ray is interrupted by other objects or not.
When to use
Use this simulation component if you want to add a light ray to the simulation environment. For example, a conveyor belt that is transporting some pallets should be stopped when a light barrier is interrupted to execute some further actions with your machine.
How to use
Add this simulation component from the simulation component library. If the light ray should be attached to a 3D object, select the 3D object either in the 3D View
window or in the Assembly Structure
window by using the select button near the property Object3D
. After that you can adjust the origin of the light ray, change direction or even adjust the length of the ray.
Note
The LightBarrier only interrupts on 3D objects, which are part of the physical simulation. That means, only 3D objects whose Rigid Body Behavior
is not equal to None
can interrupt the light ray.
Parameters
GlobalDirection
Indicates the direction of the light ray in the global coordinate system.
GlobalOrigin
Indicates the origin of the light ray in the global coordinate system.
Length
Indicates the length of the light ray in m.
Object3D
Indicates the 3D object the light ray is attached to. If not set, the reference of the light ray is the world origin.
Outputs
Interrupted
An output indicating whether the light ray is interrupted by an other physical 3D object or not.
NotInterrupted
An output indicating whether the light ray is not interrupted by an other physical 3D object or is.
Example
In this example, the 3D object of a light ray sensor is selected as Object3D
. If the simulation is running and a 3D object interrupts the ray, the simulation component sets the corresponding outputs.
In this case, the ray is interrupted by a palette which means, output Interrupted
is True
.