MHJ-SoftwareMHJ WikiOnline manuals PLC-Lab 3D Studio v1

🎛️Sensors - Skills

16 min readUpdated 2026-09-04

This page is relevant for ✅Studio ❌Player

🎛️LightBarrier

Simulates a light barrier with a digital and analog signal. Depending on the configuration, it can be used for simple object detection as well as distance measurement.

Property Type Description
Axis X, Y, Z, Xn, Yn, Zn Orientation of the light barrier in space.
BoolValue 🏷️ Symbol (Bool, Input) TRUE = light barrier is interrupted / triggered.
IsNc TRUE/FALSE TRUE = normally closed, FALSE = normally open.
ValueAnalog 🏷️ Symbol (Number, Input) Analog value for the distance to the object in mm that breaks the light barrier.
MinAnalogValue Number (Default=0) Optional scaling: Minimum scale value for ValueAnalog.
MaxAnalogValue Number (Default=0) Optional scaling: Maximum scale value for ValueAnalog.
InvertAnalog TRUE/FALSE TRUE = analog value is inverted.

Properties:

  • The 3D object is made invisible. Instead, a red beam appears which can be interrupted by an object.
  • Scaling of the analog value only occurs if MaxAnalogValue > 0.
  • The length of the 3D object defines the length of the light barrier.
  • Place the light barrier so that it is not unintentionally triggered by other objects.
  • The origin of the 3D object corresponds to the light exit of the light barrier and marks the beginning of the light beam.

The following image shows how the 3D object should be oriented: The origin (orange dot) marks the light exit of the light barrier, and the length of the 3D object defines the length of the light beam. The reference axis is the X-axis (red).

Origin of the 3D object
Origin of the 3D object

--neue beschreibung START--

How it works: The {LightBarrier} skill emits a light beam in the selected direction (Axis) and uses raycasting to check whether the beam is interrupted by an object. When the beam is interrupted, the BoolValue operand reports TRUE (or FALSE with IsNc = normally closed). The light beam is displayed as a semi-transparent red beam – the 3D object itself is automatically hidden.

Range of the light beam: The length of the light beam corresponds to the extent of the 3D object along the selected axis. If the object has no dimensions, a default value of 100 mm applies. The beam starts at the origin of the object.

Distance measurement (ValueAnalog): In addition to the digital signal, the light barrier can provide the distance to the interrupting object in millimeters. Via MinAnalogValue and MaxAnalogValue, this value can be scaled to a desired PLC value range (scaling is only active if MaxAnalogValue > 0). With InvertAnalog, the value is mirrored: with an interrupted beam, the distance is then subtracted from the beam length; with a free beam, the full beam length or the maximum value is output.

Application notes

Signal behavior without interruption: If the light barrier is not interrupted and is configured as normally closed (IsNc = TRUE), BoolValue reports the state of the voltage supply; otherwise FALSE. The light barrier thus behaves like a real sender/receiver unit.
Ensure a clear line of sight: The beam always hits the first object in its path. Other plant parts (e.g., guide rails or frames) in the beam path therefore trigger the light barrier permanently – position the object accordingly free.
Use as a passage sensor: The combination of digital signal and distance value allows, for example, a workpiece on the conveyor belt to be not only detected but also positioned or distinguished by size.

-- neue Beschreibung ENDE--

🎛️LimitSwitch

The sensor can be used as an inductive, capacitive, or optical proximity sensor. Additionally, other types are selectable for other sensor types. The 3D object that can actuate the sensor must have the same SensorTriggerType in the {Collider} settings. This sensor is triggered upon collision with another object.

Property Type Description
SensorTriggerType All, Inductive, Capacitive, Optical, Type 4–12 Determines the type of sensor. This selection influences the appearance or function in the simulation behavior.
Value 🏷️ Symbol (Bool Input) Symbolic input of the sensor (e.g., digital address).
IsNC TRUE/FALSE Normally Closed = TRUE, Normally Open = FALSE.
ColorChangeIfTriggered TRUE/FALSE Changes the color of the sensor when it is triggered – helpful for visualization in the 3D model.
Note

The LimitSwitch can also be used as a light barrier if only a boolean evaluation is required. However, the LightBarrier skill offers the visual advantage that the light beam is visibly interrupted by an object. With the LimitSwitch, an object would simply pass through, which seems less realistic.

--neue beschreibung START--

How it works: The {LimitSwitch} skill simulates a limit switch or proximity sensor that is triggered when an object collides with it. For an object to actuate the sensor, it must have a box collider and the {Collider} skill; the sensor type configured there must match the SensorTriggerType of the sensor. If the sensor is set to All, it reacts to any object with a collider skill, regardless of type.

Output signal (Value): The Value operand is TRUE as long as at least one matching object is within the sensor area. With several simultaneous objects, they are counted – the output remains TRUE until all objects have left the area again. With IsNC, the sensor behaves as normally closed, and the signal is then output inverted.

Visualization (ColorChangeIfTriggered): With ColorChangeIfTriggered, the sensor object turns yellow when triggered – useful for seeing at a glance in the 3D model whether the sensor is responding.

Application notes

Tagging in the object name: The sensor can be prepared in advance in the Blender name, e.g. {LS}%T2Belegt%{NC} for a normally closed contact or {LS}%T2Belegt%{inductive} for an inductive type. Combinations with {LAMP} are possible, so that the limit switch also functions as an indicator light.
Reaction behavior: The sensor only reacts to box colliders. Other collider shapes on the actuating object are ignored.

-- neue Beschreibung ENDE--

🎛️ Potentiometer

Simulates a rotary control (e.g. potentiometer or selector switch). It can output an analog value (potentiometer mode) or use a bool mapping for discrete selections (selector switch mode).

Property Type Description
Id Number (readonly) Internal object ID.
Description Text User-defined description of the object.
ObjectName Text (readonly) Name of the object in the scene.
Error Text Displays an error message if present.
CurrentValue 🏷️ Symbol (Bool, Input) Current analog value of the knob. Leave empty when using as a selector switch.
InitialValue Number Initial value at simulation start.
Axis X, Y, Z, Xn, Yn, Zn Rotation axis of the knob.
MinValue Number Minimum selectable value.
MaxValue Number Maximum selectable value.
StepSize Number Step size between values.
AngleRange Number (°) Total rotation angle (e.g. 120° for range 0–4).
MouseWheelSensitivity Number Sensitivity when using the mouse wheel.
BoolMapping.Value1Selected – BoolMapping.Value9Selected 🏷️ Symbol (Bool, Input) Becomes TRUE if the current value matches the corresponding step.
AudioProperties.Enable TRUE/FALSE Enables sound output when the knob is turned.
AudioProperties.ClipName Text Filename with extension of the audio clip to play.
AudioProperties.LoopAudio TRUE/FALSE Plays the audio clip in a loop.
AudioProperties.Volume Number (0.0–1.0) Volume of the audio output.

Additional Notes:

  • To simulate a potentiometer, assign an analog input symbol (e.g. Byte, Int) to CurrentValue. Adjust MouseWheelSensitivity for desired responsiveness when using the mouse wheel.
  • A selector switch with up to 9 positions can also be simulated. In this case, leave CurrentValue empty and define the corresponding input symbols (bool) in the BoolMapping section. For example, if the switch is set to position 1, Value1Selected will be set to TRUE, while all other inputs will be FALSE.

--neue beschreibung START--

How it works: The {Potentiometer} skill simulates a rotary control that the user operates with the mouse during the simulation: a click on the object advances the knob by one StepSize, and the mouse wheel adjusts it continuously (sensitivity via MouseWheelSensitivity). The set value is reported to the PLC as an analog value via CurrentValue. The knob visually rotates around the Axis within the configurable angle range AngleRange – the angle is therefore proportional to the set value between MinValue and MaxValue.

Operation with the mouse: When the knob reaches the maximum value (MaxValue) on a click, the next click resets it to the minimum value. This allows the knob to be quickly cycled through. A click sound is heard when adjusted, provided the AudioProperties are enabled.

Operation by the PLC: The knob can also be adjusted by the PLC if CurrentValue is linked to an operand. The PLC writes the target value to the operand, and the knob visually rotates to the corresponding position – useful for displays or feedback in the simulation.

Application notes

Selector switch: For a stepped selector switch, leave CurrentValue empty (symbol "0") and instead connect the nine Boolean inputs Value1Selected to Value9Selected. Depending on the position of the knob, exactly one of these inputs is TRUE and all others are FALSE. The number of usable steps results from the ratio of MaxValue and StepSize.
Initial value: With InitialValue, the knob is at a defined value at the start of each simulation.

-- neue Beschreibung ENDE--

🎛️SwitchOrButton

A button, switch, rotary switch, emergency stop switch, or main switch can be realized.

Property Type Description
DemoMode After enabling demo mode, the switch is actuated so that the Axis and MovementOnPressed settings can be checked.
SwitchOrButtonType Button, RotateSwitch, MainSwitch, EmergencyStop Type of switch; different sound effects are used depending on the selection.
Axis X, Y, Z, Xn, Yn, Zn Selection of the local reference axis of the 3D object. Note: Xn is the negative X-axis. If it is a rotatable switch, this is the axis of rotation. For pushable switches, the object is moved by MovementOnPressed (in mm) in the direction of the axis.
Address 🏷️ Symbol (Bool Input) Symbol of the input operand.
IsNC TRUE/FALSE Design as normally closed (NC)=1 or normally open (NO)=0.
SignalExtensionMs Number How long (in milliseconds) the true signal should be present when the button is pressed. (v1.4.1)
IsRotateSwitch TRUE/FALSE Is the 3D object a rotatable switch.
ClickOnStart TRUE/FALSE Should the switch be actuated at the start of the simulation?
MovementOnPressed Number By how many mm or degrees (IsRotateSwitch=true) should the switch be moved or rotated?

--neue beschreibung START--

How it works: The {SwitchOrButton} skill simulates operator controls that the user actuates with the mouse during the simulation: pushbutton, switch, rotary switch, emergency stop, or main switch. When the user actuates the object, the Address operand is set to TRUE (inverted with IsNC) – for a pushbutton only while pressed, or for the duration of SignalExtensionMs after release; with a switch (IsSwitch), the state remains toggled permanently.

Types (SwitchOrButtonType): The type influences the appearance and the sound when actuated. MainSwitch acts as a main switch: when actuated, it switches the voltage supply of the entire simulation on or off. EmergencyStop is designed as a red emergency stop pushbutton with the appropriate acoustics. RotateSwitch visually rotates the object by MovementOnPressed degrees; pushbuttons are moved by the specified number of millimeters along the Axis.

Second contact (SecondContact): In addition to the main operand, another Boolean operand can be switched via SecondContact, which can also be configured as normally closed via IsNc – e.g., for changeover circuits or auxiliary contacts.

Application notes

Tagging in the object name: The type can be prepared in advance in the Blender name, e.g. {BUTTON}%E4.4% for a pushbutton, {SWITCH}%E4.4% for a switch, supplemented by {NC} (normally closed), {emergency} (emergency stop), {main} (main switch), or {rotate} (rotary switch). A combination with {LAMP} is also possible so that the actuation is displayed visually.
Signal extension: For fast pushbutton presses, SignalExtensionMs ensures that the TRUE signal remains stable for the specified time – useful so that the PLC program reliably detects short pulses.

-- neue Beschreibung ENDE--

🎛️UltrasonicSensor

Simulates an ultrasonic sensor for distance measurement. Can be used to detect objects and measure distances within a defined range.

Property Type Description
CurrentDistance 🏷️ Symbol (Analog Input) Passes the measured distance to a symbol (e.g., for display or control).
CurrentIsTouching 🏷️ Symbol (Bool Input) TRUE/FALSE signal indicating whether an object is within the detection zone.
RangeMin Number Minimum measuring range in mm.
RangeMax Number Maximum measuring range in mm.
Invert TRUE/FALSE Inverts the logic of the sensor signal.

Properties:

  • Scaling of the analog value only occurs if MaxAnalogValue > 0.
  • The length of the 3D object defines the length of the light barrier.
  • Place the light barrier so that it is not unintentionally triggered by other objects.
  • The origin of the 3D object corresponds to the light exit of the light barrier and marks the beginning of the light beam.

--neue beschreibung START--

How it works: The {UltrasonicSensor} skill measures the distance to objects located within its detection area (trigger volume). The skill automatically creates a trigger volume of the corresponding size when assigned – the size of the 3D object therefore defines the range of the sensor. If an object is within this area, the distance is reported to the PLC via CurrentDistance in millimeters and CurrentIsTouching is TRUE. When the object leaves the area (or the voltage is switched off), both values return to 0 or FALSE.

Measuring range (RangeMin, RangeMax): The determined distance is scaled relative to the sensor size to the measuring range between RangeMin and RangeMax (in mm). The closer the object is to the sensor, the smaller the reported value. With Invert, the sensor signal is output inverted.

Application notes

Model the sensor type: Design the 3D object as a typical ultrasonic module (e.g., a rectangular sensor head). The dimensions of the object determine the detection volume – a large object therefore also detects objects farther away.
Application: Typical uses are distance measurements for fill level displays, workpiece detection at the end of a belt, or collision warnings on vehicles.

-- neue Beschreibung ENDE--

🎛️WeightSensor

Simulates a scale or weight sensor to detect objects based on their mass in the PlayerSkill properties.

Property Type Description
Enable 🏷️ Symbol (Bool, Output) True: Sensor is switched on, False: Sensor is switched off.
MassKg 🏷️ Symbol (Number, Input) Provides the measured mass in kilograms.
MassGram 🏷️ Symbol (Number, Input) Provides the measured mass in grams.
Speed 🏷️ Symbol (Number, Input) Speed of the object.
Information

The sensor is placed at the position of the object to be weighed. It does not consist of a solid body, but is equipped with a box trigger collider, which allows for non-contact measurement. No other skills are necessary. The Hide skill would be useful to make the scale invisible. If the scale detects multiple objects at the same time, the masses are added together..

--neue beschreibung START--

How it works: The {WeightSensor} skill captures the mass of all physical objects within the trigger area of the scale and reports the sum to the PLC via MassKg (kilograms) or MassGram (grams). In addition, the average speed of the captured objects is returned via Speed. With Enable, the sensor can be switched on and off by the PLC; when disabled or when no objects are in the area, all values are set to 0.

Mass of the objects: The captured mass corresponds to the mass configured in the {Player} settings of the respective object. An object can therefore only be weighed if it has the {Player} skill. If several objects are on the scale at the same time, the masses are added together.

Application notes

Dimension the trigger area: The automatically created trigger area is based on the size of the scale object. Model the weighing surface so that all objects to be weighed lie completely within the area.
Application: Typical uses are checkweighers in sorting systems (e.g., sorting out over/underweight) or fill level control by weight in packaging systems.

-- neue Beschreibung ENDE--

🎛️ SlidingPot

A slider with adjustable limits and step sizes.

Property Type Description
Axis X, Y, Z, Xn, Yn, Zn Axis of movement.
Value 🏷️ Symbol (Number, Input) Current value.
Min Number Minimum value.
Max Number Maximum value.
Steps Number Step size.
InitialValue Number Initial value.
MovementRange Number (mm) Movement range in mm.

--neue beschreibung START--

How it works: The {SlidingPot} skill simulates a slide control that the user can move with the mouse along the Axis during the simulation. The travel of the slider is MovementRange millimeters and is mapped linearly to the value range between Min and Max. The current value is continuously reported to the PLC via Value while the slider is being moved.

Step size (Steps): Steps defines the smallest value change. Values are rounded to whole numbers or snapped to multiples of the step size – this allows, e.g., a slider with 0.5 steps or only integer values. With InitialValue, the slider is at a defined value at the start of the simulation.

Application notes

Operation: The slider is dragged with the mouse button held down and follows the mouse movement along the configured axis. The axis of movement refers to the local orientation of the object – orient the object accordingly in the CAD model.
Difference to the potentiometer: While the {Potentiometer} turns in steps, the {SlidingPot} is a continuously movable slider – suitable e.g. for volume, temperature, or speed setpoints entered by the user.

-- neue Beschreibung ENDE--

MARKER-TEST-123